cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting Criteria in smartforms

Former Member
0 Kudos

Hi expert,

Currently the PO items is sorted by storage location,

i.e. stor location A => page 1,

stor location B => page 2...

I've specified the sort criteria in the loop in the smartforms with "Event on sort Begin" and "Event on sort End" ticked for "LGORT".

And in the "LGORT Event on Sort Begin", I set the command go to new page. It works fine.

Now, I'd like to print the PO items by storage location and then account assingment category,

i.e. stor location A, account assignment F => page 1

stor location A, account assignment K => page 2

stor location B, account assignment F => page 3

stor location B, account assignment K => page 4

What should I do? Thanks!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Macy.

Try this.

Add one more field in ur internal table as indicator .

In coding block sort ur internal table by LGORT and then account assignment.

loop at itab into wa.

on change of lgort or acnt_assign(field for account assignment)

wa-ind = 'X'.

modify itab from wa.

endon.

endloop.

in Table or loop.

chk wa_ind ='X'.

use command node to go to new page.

use this coomand in main area of table before line type.

i hope it is useful

Former Member
0 Kudos

in select statement you can do sorting...