2006 May 06 1:27 PM
Hi All
can anybody plz tell me waht is subroutine pool of sapscript??
waiting for replies
THanks
Hi All
can anybody plz tell me waht is subroutine pool of sapscript??
waiting for replies
THanks
2006 May 06 1:32 PM
Hi,
If you want to do calculations on some of the fields in a script one way is to change the print program. And other way is to call a routine in the windw which is in another program.
For eg: if you have a subroutine named ADD_INCOME in a program ZSHAIL_BASIC, you can call the subroutine in SAPScript as follows:
/: PERFORM ADD_INCOME IN PROGRAM ZSHAIL_BASIC
/: USING &var1&
/: CHANGING &var2&
/: ENDPERFORM.
Here the input parameter to the subroutine is var1 and the value returned by the subroutine is var2.
In the program ZSHAIL_BASIC, you have to call the subroutine as
FORM ADD_INCOME TABLES IN_TAB STRUCTURE ITCSY OUT_TAB STRUCTURE ITCSY.
ENDFORM.
IN_TAB is a structure of type ITCSY,which has 2 components, NAME and value.
So in the program, var1(which is sent from SAPScript) , will be stored as IN_TAB-NAME and its value will be in IN_TAB-VALUE. You can utilise the IN_TAB-VALUE and after performing the required operations, the return value should be assigned to table OUT_TAB.
This value can thus be obtained in var2 specified in SAPScript.
Thanks and Regards,
Bharat Kumar Reddy.V
2006 May 06 1:32 PM
HI Rashmi,
Check the link
http://help.sap.com/saphelp_470/helpdata/EN/d1/803279454211d189710000e8322d00/content.htm
http://sap.niraj.tripod.com/id18.html
Basically subroutines are used to write ABAP logic from which can be called from the SCript without modifing the print program.
Cheers
VJ
Message was edited by: Vijayendra Rao
2006 May 06 1:34 PM
2006 May 06 1:35 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |