Skip to Content
avatar image
Former Member

How to use WRITE_FORM_LINES in SAP Scripts..

Hello Experts.

I am not able to understand what is the functionality of the function module WRITE_FORM_LINES in SAP scripts. Please help me out with suitable examples.

Thanks in advance!!!!

Regards,

Benu

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Oct 11, 2008 at 10:06 AM

    <copy&paste_removed_by_moderator>

    Edited by: Julius Bussche on Oct 11, 2008 8:13 PM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 11, 2008 at 10:27 AM

    Hey Buddy,

    I got the same solution from SAP HELP. i want to know how to use that function module in the program.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello.

      Use something like:

      * Data declaration
      DATA: header TYPE thead.
      DATA: ti_lines TYPE STANDARD TABLE OF tdline.
      DATA: wa_lines TYPE tdline.
      DATA: vbeln TYPE vbeln.
      DATA: posnr TYPE posnr.
      
      * Fiels taken from SE75
      CLEAR header.
      header-tdobject = 'VBBP'.
      header-tdid = '0001'.
      header-tdspras = 'E'.
      CONCATENATE vbeln posnr INTO header-tdname.
      
      * Fill ti_lines
      APPEND wa_lines TO ti_lines.
      
      * Call FM
      CALL FUNCTION 'WRITE_FORM_LINES'
        EXPORTING
          header                   = header
          window                   = 'ZWINDOW'
        TABLES
          lines                    = ti_lines
        EXCEPTIONS
          function                 = 1
          type                     = 2
          unopened                 = 3
          unstarted                = 4
          window                   = 5
          bad_pageformat_for_print = 6
          spool_error              = 7
          codepage                 = 8
          OTHERS                   = 9.
      IF sy-subrc <> 0.
      * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
      *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      

      Regards,

      Valter Oliveira.