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
417

Hi,

I need to do a perform statement from Sapscript. The Z program returns an internal table. How do i declare the internal table in sapscript and use it?. Please help.

thanks,

Sandeep

2 REPLIES 2
Read only

Former Member
0 Likes
383

Hi,

You cannot declare an internal table in SAPSCRIPT.

Thanks,

Naren

Read only

Former Member
0 Likes
383

You cannot delcare internal tables in SAPSCRIPT. One way is to write the PERFORM statements in SAPSCRIPT by passing the values and you can write your own logic in the subroutine.

<b>/: PERFORM <form> IN PROGRAM <prog>

/: USING &INVAR1&

/: USING &INVAR2&

......

/: CHANGING &OUTVAR1&

/: CHANGING &OUTVAR2&

......

/: ENDPERFORM</b>

INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.

OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.

The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:

<b>FORM <form> TABLES IN_TAB STRUCTURE ITCSY

OUT_TAB STRUCTURE ITCSY.

...

ENDFORM.</b>

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). See the example below on how to access the variables.

The internal table OUT_TAB contains names and values of the CHANGING parameters in the PERFORM statement. These parameters are local text symbols, that is, character fields.