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 Director
From a high-level perspective, there are two places to add database retrieval logic for use in a Smart Form:
(1) The print program
(2) The form itself
If you add this logic to the print program, there are two rules:
If you add this logic to the form itself, you can put it either at the top of the form under Global definitions (in 'Initialization' or 'Form routines') or in a 'Program lines' node within the body of the form itself. However, if you go with the second option, there are other rules:
The reason is that the form will generate an ABAP function module. All of its program logic will become part of this code. So basic ABAP programming standards should apply, including efficient database access (e.g. no SELECT statements in nested loops, no retrieval of irrelevant table columns or rows).
To put it another way, avoid accessing the database more than necessary. Program nodes which can be hit multiple times as the form is output should only pull from pre-populated tables passed from the top of the form or from the print program -- not from the database.
This was first published in November 2005