cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting in SapScript

Former Member
0 Kudos

Hi,

Is any chance to make sorting order positions in SapScript, I know that I can call function PEFROM .. IN PROGRAM ..., but how send a table form SapScript, and then receive her from program to SapScript... ?

Thanks a lot.

DAD

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

try this:

Filling the Internal Sort Fields

To fill the ten internal sort fields in the sort record, use the SAPscript statement PERFORM. Make sure to place the statement into the default text element of the main window before outputting any text. Only very few statements such as DEFINE may precede the PERFORM statement.

Pass the up to ten sort fields as USING parameters to the subroutine RDI_FILL_INTERNAL_SORTFIELDS in program RSTXSORT.

Example:

/: DEFINE &SORT01& = u2018SAPu2019

/: DEFINE &SORT02& = u2018FIu2019

/: PERFORM RDI_FILL_INTERNAL_SORTFIELDS IN PROGRAM RSTXSORT

/: USING &SORT01&

/: USING &SORT02&

/: ENDPERFORM

This program fragment enters the values u2018SAPu2019 and u2018FIu2019 into the sort fields SORT01 and SORT02. Each sort field can be up to 32 characters long.

It was taken from :

http://help.sap.com/saphelp_40b/helpdata/en/d2/cb3df6455611d189710000e8322d00/content.htm