12-03-2007 1:46 PM
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
12-03-2007 1:47 PM
You need to handle it seperately using the function module SAVE_TEXT.
Regards,
Satish
12-03-2007 4:02 PM
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
12-03-2007 4:08 PM
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
12-03-2007 4:12 PM
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
12-04-2007 9:07 AM
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
12-03-2007 5:58 PM
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