09-10-2008 11:42 AM
I have called a sub routine from SAPSCRIPT as given below.
/: PERFORM GET_PPVAR IN PROGRAM ZHR_TRNG
/: USING &PPVAR&
/: ENDPERFORM
Here I have passed a structure &PPVAR& as actual parameter to subroutine GET_PPVAR in print program ZHR_TRNG.
REPORT ZHR_TRNG
..
..
FORM GET_PPVAR TABLES IN_PAR STRUCTURE ITCSY.
ENDFORM.
Here my main aim is to supply whole structure value to print programu2019s subroutine during run time. It gives error message like too many parameters in called program. I only know how to pass individual field value of a structure to print program like USING &PPVAR-KNDDA& . But do not know how to pass the entire field values of structure from SAPSCRIPT to its print/driver program.
Please help.
09-10-2008 11:52 AM
You can read in the below link:
"/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
......
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
......
/: ENDPERFORM
INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types
The values of the SAPscript symbols passed with /: USING... are now stored in the internal table IN_TAB . Note that the system passes the values as character string to the subroutine, since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80)."
http://help.sap.com/saphelp_nw70/helpdata/EN/d1/803279454211d189710000e8322d00/frameset.htm
I'm afraid you have to insert a list of variables instead of the structure itself (that I think it's your goal).
Regards.
Valter Oliveira