1. Find a way to consistently reproduce the problem
2. Then use the appropriate debugger to hone in the cause
For a discussion on SAP's form debugger tools, refer to my SDN weblog here* or visit http://help.sap.com. If you are having trouble isolating the problem, one of the techniques I employ is to create a stripped-down version of the form to reduce the number of 'moving parts'.
For what it's worth, I once dealt with the following (somewhat related) issue:
I was troubleshooting a custom purchase order Smart Form -- based on the one provided by SAP -- to be printed in either Chinese or English on a R/3 4.6C system. As you probably know, SAP stores product descriptions on individual documents when the documents are created. When there are multiple language-based descriptions on the product master, the one which gets stored on the document is the one in the logon languages of the person entering the document. This makes sense, but also can lead to problems, as it did in our situation.
For instance, let's say the document was entered in Chinese then later printed in English. In this case, the document-based description always would print in Chinese. The person printing it in English wanted the description -- along with everything else -- to print in English. I achieved this by adding some code to the form to override all printed product descriptions with those from the product master in the desired language.
* Authorization required to access the SDN
Dig Deeper on SAPscript and Smart Forms
Related Q&A from Mark Smithson
An SAP user is working with an SAPscript form to create the form development for an Invoice List, and wants to know if it's possible to migrate the ... Continue Reading
An SAP user is looking to fix an error with a packing slip print-out in an SAP Smart Form. Continue Reading
An SAP user is trying to align a barcode in the center of a defined window on an SAP Smart Form. Continue Reading