How to Convert SAP Script to Text (OTF)?

Manual conversion to OTF format

  • If there are more than 10 pages,
    • Tick the spool request
    • then click Edit -> OTF display -> No. of OTF pages
  • Convert SAP Script to text
    • Display the spool request
    • then click Goto -> List display
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.

More Function Module
Functions / SAP Script / ALV

Tables
Database Table

ABAP Books List
ABAP/4 Certification, Programming, Smartforms, Sapscripts and Object Oriented Programming Books

Smart Forms
SAP Smartforms

ABAP Menu:
ABAP Example Hints and Tips

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

(c) www.gotothings.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.gotothings.com is in no way affiliated with SAP AG.
Any unauthorised copying or mirroring is prohibited.