Home > Ask the SAP software/management Experts > SAPscript and Smart Forms Questions & Answers > Employee details in a Smart Form
Ask The SAP Expert: Questions & Answers
EMAIL THIS

Employee details in a Smart Form

Mark Smithson EXPERT RESPONSE FROM: Mark Smithson

Pose a Question
Other SAP Categories
Meet all SAP Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 31 March 2005
I am having a problem creating a Smart Form. I pass an internal table with a few employee numbers but I do not know how to loop this internal table from the Smart Form. FYI, this internal table has a few lines for the same employee number.

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

Now 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 am stuck and need your help with this.

Any ideas would be much appreciated.


>
There are a number of ways to do what you desire. Using your example, the answer may depend on whether you are interested in showing a separate set of details from both records related to the same employee '900' (all plan-specific info, such as each corresponding amount).

Let'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.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
SAPscript and Smart Forms
Modifying standard SAP Smart Forms for purchase orders
How to solve output alignment problems with SAPscript printing
Using SAP Smart Forms to change layout of Plant Maintenance
How to fix Smart Forms printing double purchase orders
Deriving the name of a Smart Style from a Smart Form
Fixing a common OPEN_FORM and START_FORM error in SAPscript
Avoid printing out blank address lines in SAP Smart Forms
Setting soft breakpoints in ABAP that reside in Smart Forms
Printing specifics on the last page of a Smart Form
Unwelcome change in Smart Forms icons

SAPscript and Smart Forms
Modifying standard SAP Smart Forms for purchase orders
How to solve output alignment problems with SAPscript printing
Using SAP Smart Forms to change layout of Plant Maintenance
How to fix Smart Forms printing double purchase orders
Deriving the name of a Smart Style from a Smart Form
SAP administration information for a Basis interview
Transferring R/3 Admin skills to SAP NetWeaver
Easier maintenance of output types, procedures, conditions, etc.
Avoid printing out blank address lines in SAP Smart Forms
Setting soft breakpoints in ABAP that reside in Smart Forms
SAPscript and Smart Forms Research

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



SAP White Paper Topics
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
SearchSAP.com is a search service provided by TechTarget and is completely
independent of and not affiliated with SAP AG.
  TechTarget - The IT Media ROI Experts