Home > Ask the SAP 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.


>
EXPERT RESPONSE
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
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
Need more options in newer Smart Forms
What is SAPscript 'RV_CONNOTE_SUPPL'?
Problems with the output device 'LOCL'
How to print Smart Forms on Zebra printer with the landscape format
Half the page disappears after a wrong click in the SAPscript editor; how is this fixed?
New fonts added to SAP are replaced by old fonts in a print preview, why?
How to include T&Cs on the back of every printed page in a PO form

SAP Smart Forms and SAPscript
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
Printing specifics on the last page of a Smart Form
How to print Smart Forms on Zebra printer with the landscape format
Half the page disappears after a wrong click in the SAPscript editor; how is this fixed?
New fonts added to SAP are replaced by old fonts in a print preview, why?
How to include T&Cs on the back of every printed page in a PO form
Smart Forms vs. PDF-based print forms in SAP solutions -- pros and cons
Converting a PDF form to Word
SAP Smart Forms and SAPscript 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

HomeNewsTopicsBlogsTipsAsk the ExpertsWebcastsWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2000 - 2008, 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