Application Development 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: 

Add Form Header text to Sales Order

Former Member
0 Kudos

I am creating a sale order using BAPI_SALESORDER_CREATEFROMDAT1and I need to add text into the header text titled Form Header but I can't find any way to pass that information into the BAPI. Can anybody point out a BAPI that I should be using for this task (the header text)?

Thanks,

Aaron

6 REPLIES 6

Former Member
0 Kudos

You need to handle it seperately using the function module SAVE_TEXT.

Regards,

Satish

0 Kudos

Do you have any example code on how to use it? I am not sure what I want to fill in the structure header and what I need to use in the field tdformat in the table lines.

Regards,

Davis

0 Kudos

Hi

Can't u use the BAPI BAPI_SALESORDER_CREATEFROMDAT2? Here you can add the text.

If you can't use it, use the FM SAVE_TEXT, here you need to pass the HEADER data:

TDOBJECT (The object of your text)

TDNAME (The number of the sales order)

TDID (The id of your text)

TDSPRAS (The language)

Probably u can transfer other fields, but u can get their values seeing an hit (of a simalar text) in the table STXH

In the LINE parameter you need to transfer the text:

TDFORMAT = '*'

TDLINE = <text>

Max

0 Kudos

Max, I would love to create the text in BAPI_SALESORDER_CREATEFROMDAT2 but the only text that I can find are for the individual line items when I need it for the header. If it is in the BAPI, can you point me in the right direction?

How do I know the object and ID?

Regards,

Davis

0 Kudos

Hi

The structure of the text is BAPISDTEXT, if you don't indicate the number of the item (so the value of ITM_NUMBER is 000000) it means it's uploading an header text.

Max

Former Member
0 Kudos

I found it by going to the plain text editor for the header text and then GoTo -> Header. That gives you the information needed to update the header text.

Davis