Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to use WRITE_FORM_LINES in SAP Scripts..

Former Member
0 Likes
1,251

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

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

3 REPLIES 3
Read only

Former Member
0 Likes
862

<copy&paste_removed_by_moderator>

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

Read only

Former Member
0 Likes
862

Hey Buddy,

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

Read only

0 Likes
862

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.