SAP ABAP Programming, Functional and Basis Components Books


SAP Script - calling SAP layout set from ABAP/4

Table ITCPO - SAPscript output interface

Spool Control
Print Immediately   - itcpo-tdimmed   = 'X'.
Delete after print    - itcpo-tddelete    = 'X'.
New spool request - itcpo-tdnewid   = 'X'.
Output device        - itcpo-tddest       = 'SAP1'.

Calling layout script from ABAP/4
call function 'OPEN_FORM'
       exporting
                     form           = space
                    language       = 'E'
                    device         = 'PRINTER'
                    options        = itcpo
                    dialog         = 'X'
                   exceptions form  = 5.

call function 'START_FORM'
       exporting
                    form      = 'ZSAP_FORM'
                    language  = 'E'
                   startpage = 'FIRST'.

call function 'WRITE_FORM'
       exporting
                   window   = 'MAIN'
                   type     = 'BODY'
                   element  = 'HEADER_TEXT'.

call function 'END_FORM'.

call function 'CLOSE_FORM'.

Back to Previous

Return to SAP Hints and Tips on Configuration and ABAP/4 Programming