Problem solve Get help with specific problems with your technologies, process and projects.

What are some common Smart Forms printing errors?

Are you having trouble printing in Smart Forms? SAPscript and Smart Forms expert Mark Smithson tries to diagnose a user's problem by covering some common mistakes.

I am using Smart Forms to print a template. I have passed an internal table containing different line items from the driver program using the function modules (used for Smart Forms). Now in the Smart Forms I have looped through the template using the internal table and work area in the Smart Form, but still only one page is getting printed. What is the problem?

If I loop the internal table in the driver program at the point of the function modules, the print preview gets repeated.

There are a number of possible explanations for your problem. Here are some things to check:

1) Did you create a table or a template? Your question uses the word "template" several times. Please understand there is a significant difference between the two in a Smart Form. A template is designed primarily for fixed information, such as a grid in a secondary window. A table – which is what you need here – is designed for information of unknown height (until runtime, anyway) but fixed width. It is always found inside a MAIN window.

2) Does your form consist of multiple mapped pages? A form can consist of a single named page (e.g. FIRST). However, it needs to be told what to do when that page fills up. At that point, it can print info to the same page (i.e. a second page is generated with the same look and feel), or to a different page, or to none at all.

3) Have you verified that the entire table is passing into the form? Perhaps there is something amiss in the way data is passed or declared. To check this, set a break-point in your Initialization section and pass the internal table into it. Alternately, create a program node with a break-point inside the table and pass the table's work area into it. See what the values are at that point.

4) Are the nodes which print the table's work area properly contained within the table body? Sometimes it is difficult to tell whether a node is inside another node or at the same level. A quick way to check this is to expand and collapse the table and see whether these nodes appear then disappear when you do so.

Since you are working with a Smart Form, I would recommend against putting the loop inside the print program itself. Output loops there are designed for dealing with changes to header info, not line item info. This is a major distinction between SAPscript and Smart Forms.

Dig Deeper on SAP development and programming languages