ABAP Certification, Smartform, Sapscripts, BAPI, JAVA, Visual Basic Programming Books
How to 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.

Return to :-
SAP ABAP/4 Programming, Basis Administration, Configuration Hints and Tips

(c) www.sap-basis-abap.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.  The site www.sap-basis-abap.com is in no way affiliated with SAP AG.
Any unauthorised copying or mirroring is prohibited.