The question is: How do I make a command in the Smart Form to instruct the form to print the details only related to the employee?
Example: The internal table has this entry:
EMPLOYEE PLAN AMOUNT 000900 B001 56.00 000900 B002 100.00 000901 B001 10.00
I would like the Smart Form to print details of employee 00090, followed by employee 000901, without having to loop at the first employee details. I'm stuck and need your help on this. Any ideas are very much appreciated.
Requires Free Membership to View
When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.
Hannah Smalltree, Editorial DirectorLet's assume that's your objective here. If so, one option is to add some logic to your Initialization section to build a new global index table -- that is, a basic single-column table -- with a unique record for each employee.
Then create a loop in your main window using that new table. Within that loop set up another sub-loop using the original table with the where clause picking up the unique record(s) tied to each employee and showing the relevant sub-detail, as the sub-loop processes all plans tied to that employee. In the outer loop you could show any general info for that employee, and perform other formatting, such as page breaks to show each employee's info on a separate page.
This was first published in March 2005