on 11-27-2007 5:50 AM
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
Hi
http://help.sap.com/saphelp_nw2004s/helpdata/en/c8/4adf7ba13c4ac1b4600d4df15f8b84/frameset.htm
this is enough for both print based and interactive
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.