2008 Oct 11 10:55 AM
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
2008 Oct 11 11:06 AM
<copy&paste_removed_by_moderator>
Edited by: Julius Bussche on Oct 11, 2008 8:13 PM
2008 Oct 11 11: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.
2008 Oct 11 12:04 PM
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.