‎2005 Dec 09 1:34 PM
Hi Friends,
I have created sales order using BDC. Now I want to include the texts in the header data. How can I include the item texts in BDC? can anyone send me sample code if available.
Raj.
‎2005 Dec 09 1:36 PM
Hi Raj,
You cannot achieve that using BDC.
Instead use, 'SAVE_TEXT' function module.
Regards,
Vamsi
‎2005 Dec 09 1:46 PM
‎2005 Dec 09 1:48 PM
Hi Vamshi,
I've already created a BDC program for the sales order. Can't I call this function module in my BDC program?
Raj.
‎2005 Dec 09 1:58 PM
Hi Raj,
Check this link for adding structure to ur program.
http://help.sap.com/saphelp_erp2005/helpdata/en/fa/0970a4543b11d1898e0000e8322d00/frameset.htm
Hope this helps u,
Regards,
Nagarajan.
‎2005 Dec 09 2:03 PM
Hi,
there are 2 function modules, which we use to read text & save the text.
1. READ_TEXT
for this you have to pass the below fields to the fm
ID
LANGUAGE
NAME
OBJECT
and you will get already stored text for this ID into the LINES internal table.
the above values for ID,NAME,OBJECT etc. you can find in the transaction.
for example: for delivery,goto header-> texts -> select the text you want to proceed ->select DETAIL ->
you will see a new screen .there in the menu GOTO -> header .
here you can find all the required fields to pass to the function module.
2. SAVE_TEXT
for this what data you have to process first store in LINES internal table.but remember this function module will overwrite existing text,if it exists.so first get the records by using READ_TEXT . append ur lines to that then finally call this FM.
SAVEMODE_DIRECT set this field to X ,sothat changes will reflect immediately.
NOTE: dont call SAVE_TEXT directly, this will over write existing text,if any there.so first call Read_text & then append ur new text to this & finally call save_text sothat this will not disturb any existing texts.
place this function modules call after checking sy-subrc = 0.
i.e. call transaction success, then populate this text & store it .
‎2005 Dec 09 2:32 PM
Or you could bypass the BDC all together and use the BAPI - BAPI_SALESORDER_CREATEFROMDAT2. It has text(s) tables that you can fill and it will create the text as you create the order.
Good luck!
Terry
‎2005 Dec 09 2:36 PM