2010 Apr 16 12:45 PM
Hi all,
I have a FM :Create_text to create text in header (va01).Also i am passing all the the importing parameter as follows
Export
-
FID:001
FLANGUAGE:DE
FNAME:Sales orde number
FOBJECT:VBBK
SAVE_DIRECT:X
Tables
-
FLINES The text to be written
Even though i am passing all the parameter the FM is not working.Could anyone help.Sample code will be helpful...
Regards,
Alex.
2010 Apr 16 12:50 PM
Hi, Use SAVE_TEXT. Sample code below.
data: headerl like thead occurs 0 with header line.
data itab3 like tline occurs 0 with header line.
headerl-tdobject = 'VBBK'.
headerl-tdname = '1000037520'. "Order Number"
headerl-tdid = '0001'.
headerl-tdspras = 'E'.
append headerl.
move '*' to itab3-tdformat.
move 'Testing SO Header text' to itab3-tdline.
append itab3.
call function 'SAVE_TEXT'
exporting
header = headerl
insert = 'X'
savemode_direct = 'X'
tables
lines = itab3
exceptions
id = 1
language = 2
name = 3
object = 4
others = 5
.
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
Vinod
Edited by: Vinod Kumar on Apr 16, 2010 5:23 PM
2010 Apr 16 12:50 PM
Hi, Use SAVE_TEXT. Sample code below.
data: headerl like thead occurs 0 with header line.
data itab3 like tline occurs 0 with header line.
headerl-tdobject = 'VBBK'.
headerl-tdname = '1000037520'. "Order Number"
headerl-tdid = '0001'.
headerl-tdspras = 'E'.
append headerl.
move '*' to itab3-tdformat.
move 'Testing SO Header text' to itab3-tdline.
append itab3.
call function 'SAVE_TEXT'
exporting
header = headerl
insert = 'X'
savemode_direct = 'X'
tables
lines = itab3
exceptions
id = 1
language = 2
name = 3
object = 4
others = 5
.
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
Vinod
Edited by: Vinod Kumar on Apr 16, 2010 5:23 PM
2010 Apr 16 12:52 PM
Hello
FID:0001 " <----- '0001' here instead of '001'
FLANGUAGE:DE
FNAME:Sales orde number
FOBJECT:VBBK
SAVE_DIRECT:X