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: 

Creation of Text in Standard Header text for va01(FM:CREATE_TEXT)

alex_georgek
Associate
Associate
0 Kudos
479

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
214

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

2 REPLIES 2

Former Member
0 Kudos
215

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

Former Member
0 Kudos
214

Hello


FID:0001 " <----- '0001' here instead of '001'
FLANGUAGE:DE
FNAME:Sales orde number
FOBJECT:VBBK
SAVE_DIRECT:X