2010 Oct 12 10:49 AM
Hi!
What I have:
Material, Quamtity, Text
12345;7;Testmaterial 12345
12344;1;Testmaterial 12344
User creates an salesorder via transaction VA01, enters the cusotmer, hits enter and then can use a button that allows him to load an excel file with materials he wants to add to the sales order.
This is done with help of SD_SALES_ITEM_MAINTAIN. The Materialnumber, the quantity and the Text (char40) are loaded from the excel for several positions and added to the current sales order. the user can change things after that import, add new materials manualle or import another set of materials.
What I need:
Material, Quamtity, Text, SalesText
12345;7;Testmaterial 12345; Our best 12345 that has ever been! Buy 5 and pay 5 available!
12344;1;Testmaterial 12344; This is the version of 12345 that comes with something else...
Unfortunately that methode does not work for the item texts that can be entered in during the order creation (like the Material sales Text). How can I change the Text at the same time I add the new positions?
Any ideas?
Kind Regards
Manfred
Hi!
What I have:
Material, Quamtity, Text
12345;7;Testmaterial 12345
12344;1;Testmaterial 12344
User creates an salesorder via transaction VA01, enters the cusotmer, hits enter and then can use a button that allows him to load an excel file with materials he wants to add to the sales order.
This is done with help of SD_SALES_ITEM_MAINTAIN. The Materialnumber, the quantity and the Text (char40) are loaded from the excel for several positions and added to the current sales order. the user can change things after that import, add new materials manualle or import another set of materials.
What I need:
Material, Quamtity, Text, SalesText
12345;7;Testmaterial 12345; Our best 12345 that has ever been! Buy 5 and pay 5 available!
12344;1;Testmaterial 12344; This is the version of 12345 that comes with something else...
Unfortunately that methode does not work for the item texts that can be entered in during the order creation (like the Material sales Text). How can I change the Text at the same time I add the new positions?
Any ideas?
Kind Regards
Manfred
2010 Oct 13 7:22 AM
not sure about these particular texts, but all SAP Long texts are handled through Read_text EDIT_TEXT & SAVE_TEXT function modules.
2010 Oct 13 8:50 AM
while ur getting item details from exel puthte texts in the the table with vblen and posnr and then export to memory
then after_save exit method just import data from memory and push the data in to database tables using SAVE_TEXT functionmodule.
2010 Oct 22 10:22 AM
Hi Bhagathsap,
thats not possible I think. At this time I dont have the salesordernumber. It will be created if the salesorder is saved. Therefore I can't use save_text because of not having the textname. the saving of the order will be done by the user after the "upload" of the positions. Most likely the user has to add more positions manually or change small things so I cant save it before that.
The other problem is, that I dont have any customer exit or user exit or what so ever in the function SD_SALES_ITEM_MAINTAIN where I could implement my IMPORT from MEMORY ID... And in addition to that, the function wont return the position number. The number is not needed if I can place my import from memory within the SD_SALES_ITEM_MAINTAIN.
My calling:
types: begin of ty_position_texts,
posnr type posnr,
tdid type tdid,
text type TLINE_T,
end of ty_position_texts.
data gt_texts type table of ty_position_texts.
...
READ TABLE gt_texts INDEX lv_tabix INTO ls_texts.
IF sy-subrc = 0 AND ls_texts IS NOT INITIAL.
EXPORT ls_texts TO MEMORY ID 'SETDATATOMV45A_LSTEXTS'.
ENDIF.
CALL FUNCTION 'SD_SALES_ITEM_MAINTAIN'
EXPORTING
fvbapkom = ls_vbapkom
fvbapkomx = ls_vbapkomx
fvbepkom = ls_vbepkom
EXCEPTIONS
error_message = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Maybe you get a better Idea about my problem now!
But already thanks for answering!
Regards, Manfred