Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAPscript

Former Member
0 Likes
656

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
626

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

4 REPLIES 4
Read only

Former Member
0 Likes
627

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

Read only

Former Member
0 Likes
626

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.

Read only

Former Member
0 Likes
626

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

Read only

Former Member
0 Likes
626

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