Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Spools created from Smartform - Issue with Sequence of Spools

Hi,

I have a Custom SmartForm called in a Custom Program creates Spool for each SmartForm. I have an internal table sorted before it calls the SmartForm. Between Loop & Endloop, each time it calls the SmartForm, it generates the Spool. Even though the Spools numbers created are in Sequence, the SmartForms are not in line with the SORT order in the Internal table i.e., The Internal table is SORTed for Material Number and I expect the SmartForms (Spools) to be generated for the same Order with that of Internal table. Do I have to include a Commit Statement for each and every call to the Smatform inside the Loop/Endloop?

I hope I have made my posting understandable. Please let me know if you have any solutions.

I Appreciate Your Help!

Thanks,

Kannan.

Tags:
Former Member
replied

It is hard to tell why system is not processing Smartform in given sequence. But you can link the spool with its genertor's number.

To link between your material number and generated spool you can one more field in the SPOOL table.

Like:

DATA: BEGIN OF IT_SPOOL OCCURS 0,
MATNR TYPE MATNR,
SPOOL TYPE I,
END  OF IT_SPOOL.

LOOP AT ITAB.
* CALL OF SMARTFORM
* GET THE SPOOL NUMBER FORM RETURN
  IT_SPOOL-MATNR = ITAB-MATNR
  IT_SPOOL-SPOOL = <SPOOL_NO>.
  APPEND IT_SPOOL.
  CLEAR  IT_SPOOL.
ENDLOOP.

Regards,

Naimesh Patel

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question