‎2009 Aug 03 8:35 AM
Hi all,
Is there any way to create sales order item text when creating sales order .
(any user exit/ BADI/ vofm routine) ???
thanks,
chandra
‎2009 Aug 04 7:47 AM
Hi..
check include "MV45AFZZ" and inside this include check routine "USEREXIT_SAVE_DOCUMENT"
You have to do the logic here:
Pick your sales order number from structure VBAK(vbeln is the field name).
Item for your sales order can be picked up from VBAP(posnr is the field name), at this moment VBAP-VBELN field will be blank so you would not find sales order from item table(VBAP-VBELN), this is why you have to take the sales order from the header which is VBAK-VBELN.
Now this is up to you that for what all objects ids you want to maintain the texts.
Make use of the CREATE_TEXT FM, pass the required parameters to it, and your texts will be created.
Regards,
Mark
‎2009 Aug 03 8:43 AM
Hi,
How are you creating the sales order?
Do you want to add the item text when creating a sales order via BAPI then use BAPi BAPI_SALESORDER_CREATEFROMDAT2 and pass teh item text in table ORDER_TEXT.
Regards,
Ankur Parab
‎2009 Aug 03 8:53 AM
Hi,
I am creating Sales order by VA01 only. my requirement is to save the item text automatically not by manually.
‎2009 Aug 03 10:16 AM
HI,
Please check this
MV45AFZZ and MV45AFZB
You may use enhancement V45S0001.
In this u can write yur code for creation of sales order text.
http://abaplovers.blogspot.com/2008/02/function-modules-create-text-and-read.html
As replied in one of your earlier post
Regards
Hiren K.Chitalia
‎2009 Aug 03 10:19 AM
Hi,
Inside MV45AFZZ , you can use the Function Module CREATE_TEXT to create the text for line item.
Regards,
Vimal.
‎2009 Aug 04 6:31 AM
Hi Hiren,
Thanks for ur suggesion.
But how to get the Vbeln , Posnr values when I am creating the Sales order.
‎2009 Aug 03 10:33 AM
Hi..
Check include "MV45AFZZ" this gives you control to modify header and item level data for the sales order...
you can process each item record(XVBAP) then based on key(vbak-vbeln+vbap-posnr) which would be the TDNAME(text name), you can then build the long text using FM create_text.
Note: When creating the long texts you have to know for which all text id and text objects you want to create them.
You can go for tables TTXID TTXOB, futher you can consult you functional guy to have more clarification as to which text objects and id, long text have to be created with.
Regards,
Mark
‎2009 Aug 03 10:54 AM
Hi Chandrd,
Use FM: CREATE_TEXT.
CALL FUNCTION 'CREATE_TEXT'
EXPORTING
fid = c_id
flanguage = c_en
fname = l_anfnr(SALES ORDER NO)
fobject = c_ekpo
save_direct = c_check
fformat = '*'
TABLES
flines = i_headtext[]
EXCEPTIONS
no_init = 1
no_save = 2
OTHERS = 3.
Here you need to pass the sales order no.
if you use bdc then after bdc, you can call this function module.
Regards,
Tutun
‎2009 Aug 04 7:47 AM
Hi..
check include "MV45AFZZ" and inside this include check routine "USEREXIT_SAVE_DOCUMENT"
You have to do the logic here:
Pick your sales order number from structure VBAK(vbeln is the field name).
Item for your sales order can be picked up from VBAP(posnr is the field name), at this moment VBAP-VBELN field will be blank so you would not find sales order from item table(VBAP-VBELN), this is why you have to take the sales order from the header which is VBAK-VBELN.
Now this is up to you that for what all objects ids you want to maintain the texts.
Make use of the CREATE_TEXT FM, pass the required parameters to it, and your texts will be created.
Regards,
Mark
‎2009 Aug 04 12:31 PM
‎2011 Nov 03 3:44 PM
Chandra
How did you resolve, please let us know the solution
Regards
Karthik