on 05-15-2009 8:55 AM
BKPF-BUDAT + [BSEG-ZBD1T u2013 day of today = days in arrears (invoice was due)
above logic how i will put in my sap script using subroutine.
BKPF-BUDAT + [BSEG-ZBD1T u2013 day of today = days in arrears .
EX: 20.04.2009 + 30 - 15.05.2005 = 24
How can i show above logic in my script using subroutines.
Hello,
You can call a subroutine of any program using the statement:
PERFORM GET_DATE IN PROGRAM XXXX
USING &BKPF-BUDAT&
USING &BSEG-ZBD1T&
CHANGING &W_DATE&
ENDPERFORM
In the variable w_date you will get the calculated date which can be used in the script
Thanks,
Sowmya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
/: PERFORM <form> IN PROGRAM <prog>
/: USING &BKPF-BUDAT&
/: USING &BSEG-ZBD1T &
/: CHANGING &W_DATE&
/: ENDPERFORM
FORM <form> TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
DATA :
BUDAT TYPE SY-DATUM,
ZBD1T TYPE SY-DATUM,
W_DATE TYPE I.
READ TABLE IN_PAR WITH KEY u2018BKPF-BUDATu2019.
CHECK SY-SUBRC = 0.
BUDAT = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY u2018BSEG-ZBD1T' .
CHECK SY-SUBRC = 0.
ZBD1T = IN_PAR-VALUE.
w_date = BUDAT + ZBD1T - SY-DATUM.
READ TABLE IN_PAR WITH KEY u2018W_DATE' .
CHECK SY-SUBRC = 0.
MODIFY OUT_PAR INDEX SY-TABIX
ENDFORM.
For more help refer to this link..http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
By creating the SUBROUTINE POOLS, call the perform with the required export, import parameters, and code accordingly for the perform in the subroutine pool.
It works!!!!
Regards,
Santhosh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.