‎2006 May 24 1:48 PM
Hi all,
I have an issue regarding SAP scripts. The issue is like this I had written one perform statement in page windows coding using changing and using statements. Now I am populating data in that in one subroutine prog using itcsy structure.
Now my question is that I want to pass one internal table in that perform subroutine and want to populate the itab in subroutine prog ans print the values of itab in scripts.
Can anyone pls help me in solving this issue.
Experts pls help me I am working on it.
With regards,
Abir.
‎2006 May 24 1:53 PM
Hi
You can't do it in the sapscript, but only the program driving it:
For example:
SAPSCRIPT
/E ITAB_LINE
&ITAB-LINE&
In the program:
LOOP AT ITAB.
CALL FUNCTION 'WRITE_FORM'
ELEMENT = 'ITAB_LINE'
WINDOEW = ....
ENDLOOP.
Max
‎2006 May 24 1:53 PM
Hi
You can't do it in the sapscript, but only the program driving it:
For example:
SAPSCRIPT
/E ITAB_LINE
&ITAB-LINE&
In the program:
LOOP AT ITAB.
CALL FUNCTION 'WRITE_FORM'
ELEMENT = 'ITAB_LINE'
WINDOEW = ....
ENDLOOP.
Max
‎2006 May 24 1:54 PM
Hi,
Read:
http://help.sap.com/saphelp_46c/helpdata/en/d1/803279454211d189710000e8322d00/frameset.htm
This gives a very clear description on how to realize this.
BR,
Sjoerd.
‎2006 May 24 1:57 PM
Hi ,
Check this.
<b>Calling an ABAP form from SAPScript</b>
In Layout Set:
DEFINE &X& = ...
DEFINE &Y& = ...
DEFINE &Z& = ...
PERFORM XXXXXX IN Zxxxxxxx
USING &X&
USING &Y&
CHANGING &Z&
In ABAP program Zxxxxxx
FORM XXXXXX TABLES INPUT1 STRUCTURE ITCSY
OUTPUT1 STRUCTURE ITCSY
*get input parameters
LOOP AT INPUT1.
CASE INPUT1-NAME.
WHEN 'X'.
INPUT_X = INPUT1-VALUE.
WHEN 'Y'.
INPUT_Y = INPUT1-VALUE.
ENDCASE.
ENDLOOP.
{logic to use program variable input_x and input_y to set say program variable output_z}
*set output variables:
REFRESH OUTPUT1.
OUTPUT1-NAME = 'Z'.
OUTPUT1-VALUE = OUTPUT_Z.
APPEND OUTPUT1.
<i>Hope This Info Helps YOU.</i>
Regards,
Lakshmi
‎2006 May 24 2:40 PM
Hii Abir,
refer to this link..
http://www.sapdevelopment.co.uk/sapscript/sapscript_executeabap.htm
this will clear your problem
revert back for more help
Regards
Naresh