You will have to call the save_text after each line item. I am assuming the bapi is getting called in a loop. After bapi call and before end of loop, you should loop at each line item and call the FM SAVE_TEXT.

Note : for each line item you need to create one long text

The Data you need to pass to SAVE_TEXT should be similar to the below screen shot

Text Name = concatenation of sales order and sales order item

text id = 00001 ( I am assuming your updating the sales text given on the texts tab of the item display)

rest details same as above.

The text you need to update must be passed to LINES table of the FM interface. AND Yes you need a commit work to save the long text

Why are we not using the text parameter order_text present in BAPI BAPI_SALESORDER_CREATEFROMDAT2 instead of SAVE_TEXT? you are bringing in unnecessary code and complexity by using separate code for saving the text which could be done usinG BAPI.; I would say this is not a right approach unless we got a right reason for that. also, you need not worry about passing the value to SAVE_TEXT for using BAPI to do this. Please post the code used to pass the text in BAPI which did not work for you in the initial case, let us see and find out and troubleshoot the issue.

can you create a salesorder with this text manually in the system? I think there is a config issue, try to do it manually and find out you can successfully do that. Wrong config could potentially cause such issue, example TEXT ID not assigned to a language could be one of the reason.. Hope this helps.. keep me posted.

Sorry to repeat some points, but this thread has stretched a bit too long and is confusing .

1. You have tried using SAVE_TEXT manually and it was successful. So, ideally these values will help you to get the desired result.

2. You attempted using SAVE_TEXT in your program by calling it after the BAPI, but failed. Here, the BAPI's output Sales Order No. must have been used with the Item Number concatenated to form a number of 16 digits. Please check in debug-mode for the values passed and errors from the FM SAVE_TEXT again. Header-tdobject, Header-tdname, Header-tdid, Header-tdspras & lines-tdline

3. Finally and Ideally the internal table ORDER_TEXT should be used with the BAPI to add Item Text. Here, you need to pass ORDER_ITEMS_INX-UPDATEFLAG = 'I'

Try doing the below things for sales order item things and let me know what are you getting in the desired text header. Are you passing the same information in SAVE_TEXT ?please check in debug mode and post