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

How to write subroutine for SORT in SapScript

Former Member
0 Likes
1,001

Hi,

We have a Z Script to show the output in Standard T.code F.27. But in that Account Statement is ascending based on the Document Date. Now user want that it should be based on the Posting date inplace of Document Date.

I am unable to find why statement is sort by Document Date. Can we write subroutine for sort the statement by Posting date???

Or any alternate for it..

Plz help...

7 REPLIES 7
Read only

Former Member
0 Likes
947

hi,

go to se16> enter table name TNAPR> enter script name and execute see the driver porgram attached.

then go to driver program sort the table base on Posting date inplace of Document Date.

Prabhudas

Read only

0 Likes
947

Thanks dear...

But we don't have the driver program for this script.

As i told earlier, we have made Z Script but t.code is standard F.27. Then from where we can change sorting criteria...

Read only

0 Likes
947

There is always a print program for a SAPScript form. How else would the data get selected and passed to the form?

Read only

0 Likes
947

Thanks guru...You are right that there is always a print program for a SAPScript form.

I have found the driver program through another way...but not was in table.

But in that driver program, there is no sort statement. If exist, already commented.

In this case, what should I do...

Read only

0 Likes
947

If standard SAP driver program: If there is a subroutine where the form is opened, or other appropriate point before loop to process main window, find and implement an implicit enhancement adding a sort statement for the table that will be processed to lay down the main window rows of the form.

If customer-space driver program, edit the program and add a sort statement at the appropriate point.

Read only

Former Member
0 Likes
947

Hi Anil ,

I am also facing some problem can you tell me how you have added

your Z script to F.27 tcode ?

Regards ,

Nilesh

Read only

0 Likes
947

Dear, first find out the driver program for f.27 and go to variant of that program.

There is a option of sorting by which you want to sort..