cancel
Showing results for 
Search instead for 
Did you mean: 

printing adobe forms

former_member745780
Active Participant
0 Kudos

hi all,

pl any send me the detail for using the adobe forms in report and how can i validate or which are the function module we used in general for print something.

Then

Anirudh

Message was edited by:

ANIRUDH SAINI

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos
former_member745780
Active Participant
0 Kudos

Hi Naresh ,

if u send me any example of adobe forms like print the table data or else then it is very helpfull for me.

n thnx for ur help.

Thnx

Anirudh

Former Member
0 Kudos

HI

check below code and understand it...

&----


*& Report ZFR_TEST_APPROVERS_LIST *

*& *

&----


*& *

*& *

&----


REPORT ZFR_TEST_APPROVERS_LIST

NO STANDARD PAGE HEADING

LINE-SIZE 130

LINE-COUNT 50.

----


*--Data Declaration

----


DATA: w_level LIKE ZFAP_ROLE_LEVEL-ZLEVEL,

w_user type zuserid,

w_userid LIKE WFSYST-ACT_AGENT.

----


*-- Internal Tables declaration

----


*--To store user history table details

DATA: it_user_history like zfap_history occurs 0 with header line.

*--To store approver list

DATA: it_apprlist TYPE ZFAP_USERS WITH HEADER LINE.

*--Selection Screen

PARAMETERS: p_docno LIKE zfap_history-zbelnr,

p_compcd LIKE zfap_history-zbukrs,

p_zgjahr LIKE zfap_history-zgjahr.

----


*START-OF-SELECTION

----


START-OF-SELECTION.

*--Get the data from history table for the document and comp code.

SELECT *

FROM ZFAP_HISTORY

INTO TABLE it_user_history

WHERE ZBELNR = p_docno and

zbukrs = p_compcd and

zgjahr = p_zgjahr.

*--Sort the internal table by seqno to get the latest row.

SORT it_user_history by zseqno descending.

----


*END-OF-SELECTION

----


END-OF-SELECTION.

read table it_user_history index 1.

*--Username

Concatenate 'US' it_user_history-zsapuserid into w_userid.

clear it_apprlist.

refresh it_apprlist.

*--if the status is not either Missed Vertical/Horizontal deadline

if it_user_history-zstatus NE 'Missed Horizontal Deadline' AND

it_user_history-zstatus NE 'Missed Vertical Deadline'.

CALL FUNCTION 'ZF_AP_CURRENT_APPROVERS'

EXPORTING

user_id = w_userid

comp_code = p_compcd

IMPORTING

LEVEL = w_level

tables

appr_list = it_apprlist

EXCEPTIONS

NO_APPROVERS_FOUND = 1

OTHERS = 2

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

elseif it_user_history-zstatus EQ 'Missed Horizontal Deadline'.

CALL FUNCTION 'ZF_AP_VERTICAL_APPROVERS'

EXPORTING

user_id = w_userid

comp_code = p_compcd

tables

escaltion_list = it_apprlist

EXCEPTIONS

USERS_NOT_FOUND = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

elseif it_user_history-zstatus EQ 'Missed Vertical Deadline'.

CALL FUNCTION 'ZF_AP_HORIZONTAL_APPROVERS'

EXPORTING

user_id = w_userid

comp_code = p_compcd

tables

escaltion_list = it_apprlist

EXCEPTIONS

USERS_NOT_FOUND = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

endif.

write:/10 'Status of the document:'.

write:35 it_user_history-zstatus.

write:/10 'List of Approvers'.

write:/10 '----


'.

loop at it_apprlist.

write: /10 it_apprlist.

endloop.