Make your own free website on Tripod.com
 

SAP ABAP Programming, Functional and Basis Components Books


Convert SAP Script to Text (OTF)

Manual conversion to OTF format

Automatic conversion to OTF format
tables: tline.

data:   begin of int_tline1 occurs 100.
             include structure tline.
data:   end of int_tline1.

call function 'OPEN_FORM'
                 device         = 'OTF_MEM'
          .........................................

* after CLOSE_FORM
call function 'CONVERT_OTF_MEMORY'
     exporting
          format                = 'ASCII'
          max_linewidth         = 132
     tables
           lines                 = int_tline1
     exceptions
          err_max_linewidth        = 1
          err_format                    = 2
          err_conv_not_possible = 3
          others                          = 4.

* write the text file to spool
loop at int_tline1.
   if int_tline1-tdline = space.
      skip.
   else.
      write:/ int_tline1-tdline.
   endif.
endloop.

Back to Previous

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