*insert new line item in sales order*
Hi guys,
I have requirment where, user would enter a material and system determines if free material is to be added to it. thats standard based on configuration.
the user is maintaing ztable for additional free product for the material. now, i want to insert the third additional item along with other items. this has to be added before saving and it has to show on screen before user saves it.
Thanks,
Abhi.
See, if u debug and enter the exit, then it shows 2 line item in xvbap[] i.e. sale material and free material.
now i want to add third add. free item. if insert in internal table xvbap[], it doesn't show on screen
i want the solution for that.
can anybody help me with that.
Similar Messages
-
Inserting new line item in Sales order
Hi,
We are doing a feasibility check to find out whether a new line item can be successfully inserted into a sales order based on certain pricing conditions that is received through an ORDERS05 inbound idoc.
I tried adding a new segment E1EDP01 to the existing idoc in the user exit EXIT_SAPLVEDA_011 assuming that the VA01 posting program would accept the new line item but that approach is not working.
Looking at various posts in the forum, I gather that the best way is to use the function 'BAPI_SALESORDER_CHANGE'. Can anyone please let me know how exactly a new item can be inserted using this function module?
Any help would be appreciated.
ThanksHi Sneha,
Please use the FM 'BAPI_SALESORDER_CHANGE' to add a new line item as under:
CALL 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = "Pass the Sales order no here"
order_header_inx = "Pass the value of update flag as I as u need to "
"insert a new line item"
TABLES
return = "Will contain the error/success messages"
"after the processing"
ORDER_ITEM_IN = "Here pass the item info tht needs to be added"
Also do a Commit Work after this FM call to reflect the changes in database.
Regards,
Chetan.
PS: Reward points if this is helpful.
Message was edited by:
Chetan H. Dubey -
User exit - VA01 - Adding new line items while Sales Order Creation
Hi All ,
I have a requirement where : in VA01 , i have to add new line items using USER EXIT or BADI.
The scenario is : we maintain Characteristics for Material. When we select a particular characteristics, Factor and length will be displayed in a Popup. we can specify the Factor and lenght.
Here , if i specify Factor as 10 and lenght as 1000. the Material has to be cut / split into 10 items of 1000 mts each. and the ITEMs table control should get 10 ITEMS .
How to add new items using User exit or Badi in VA01 while creating a sales order.
i have identified the user exit . What code should be used to add new line items.
kindly help me in solvng this.
Waiting for your replies.
Thanks in advance.
Suki.hi
wich user exit do you take for that ??? -
Create a new line item in sales order
Hi,
I have to create a new line item in a sales order. The scenario is that if we donot find the desired quantity from a plant. Then we have to go ahead and pick the remaining quantity from another plant and automatically create a new line item.The new plant is picked from a custom table so u need not worry about it.
According to me I will have to use the BAPI for it but one constraint is that while creating a sales order the order number assignment is not done until saved. So what can be done in the case if its a new document.
Kindly let me know if there is any appropriate user exit or if someone has worked on a similar requirement.
thanks
VarunHi,
Thanks for your response. I have tried to use these exits already but the problem dat comes here is dat when we try to use the BAPI we donot have any sales document created in the first instance(i.e. while creating an order) so the BAPI returns error and when i tried to populate the itabs in the program directly the new values just wont get processed.
I think like: in case its a new document and we face this scenario I can just terminate the document creation and create a new document using the BAPI with proper plant assignments.But i am doubtful about the stability of this process.
Kindly comment.
Thanks
Varun -
Insert new line item in va01&va02 - urgent
Hi frndz,
At the time of creation standard sales order using va01.
When user enters the sold to party in header and then
material & quantity in line item reocrds. After user enters the details in first line. I have some checks to be executed and on the basis of that customer will get the free material that should come on second line item.
I am getting the details which i will be inserting on new line item but the problem is that in which exit i should write the code for the same.
So frndz could you please let me know, in which userexit I should insert this new line item. There can be more than one free material.
If anyone has done this already, please let me know.
I know one exit i.e.MV45AFZB but in that there are many forms. so exactly which form i should where i will write the code to insert new line item???
Points will be awarded surely.
Regards,
PrashantHI Stephen,
I have the same prolem. I modified the 5 global tables, but I don't see the new line in the screen.
Can you help me with some details?
Thx!
Mihaela -
How to add line item to sales order item table?
Kindly help me the with the below requirement .
Add line item to sales order(va01) dynamically on click of button. The button is also custom created push button.
In the above requirement I have added the pushbutton to va01 tcode. But when I click on that button I need to add line item to sales order item table.
I tried a lot but I am not successful. If possible can u please help on this.
Regards,
RachelHi!
It's quite easy even in the standard SAP to add a line item for a customer order, I don't think it worth to develop a new button for this.
However if you wanted to add a line automatically, the you can do the following in the program MV45AFZZ, FORM USEREXIT_SAVE_DOCUMENT.
You can use similar code, but with some modifications.
DATA: lv_posnr.
LOOP AT xvbap.
MOVE xvbap-posnr TO lv_posnr. "get the last posnr
ENDLOOP.
ADD 10 TO lv_posnr.
MOVE 'XYZ' TO xvbap-matnr. "enter your material number here
MOVE lv_posnr TO xvbap-posnr.
* fill additinal field data in XVBAP if necessary
MOVE 'I' TO xvbap-updkz. "Insert line
APPEND xvbap.
Regards
Tamá -
MRP RUN for the more than one line item in sales order.
Hi ,
In the sales order nuber of line item are , i will have to take MRP RUN for selected line item .
So plz suggest what development will require?
Abhay
Edited by: abhay patil on May 30, 2008 8:52 AMHI,
U can write separate prog. Which will ask sales order no. and from to line item or multiple line item of sale order. Then in loop internally pass the each line item no to MD50 prog. Which will run in background.
I will give u sample prog. Which I had created for running MRP for all the lines items of given sales order in one go.
*& Report ZPRG_PP_001
REPORT ZPRG_PP_001.
tables vbak.
data: begin of it_vbap occurs 1,
vbeln type vbap-vbeln,
posnr type vbap-posnr,
end of it_vbap.
DATA: P_MODE TYPE C.
Batchinputdata of single transaction
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
selection-screen begin of block b1 with frame title text-001.
parameters : p_vbeln like vbak-vbeln obligatory.
selection-screen skip.
parameters : p_fore radiobutton group mode,
p_back radiobutton group mode default 'X'.
selection-screen end of block b1.
at selection-screen.
Check Sales Order
if not p_vbeln is initial.
select single * from vbak
where vbeln eq p_vbeln.
if sy-subrc <> 0.
message e499(sy) with 'Invalid Sales Order no.' p_vbeln.
endif.
endif.
start-of-selecTION.
Get Sales order items
select vbeln posnr from vbap
into table it_vbap
where vbeln eq p_vbeln.
Set BDC mode
if p_back eq 'X'.
p_mode = 'E'.
else.
p_mode = 'A'.
endif.
Process MD50 BDC
LOOP AT IT_VBAP.
perform bdc_dynpro using 'SAPMM61X' '0160'.
perform bdc_field using 'BDC_CURSOR' 'RM61X-TRMPL'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'RM61X-KDAUF' IT_VBAP-VBELN.
perform bdc_field using 'RM61X-KDPOS' IT_VBAP-POSNR.
perform bdc_field using 'RM61X-BANER' '1'.
perform bdc_field using 'RM61X-LIFKZ' '3'.
perform bdc_field using 'RM61X-PLMOD' '3'.
perform bdc_field using 'RM61X-TRMPL' '1'.
perform bdc_dynpro using 'SAPMSSY0' '0120'.
perform bdc_field using 'BDC_OKCODE' '=XBAC'.
CALL TRANSACTION 'MD50' USING BDCDATA MODE P_MODE.
CLEAR BDCDATA.
REFRESH BDCDATA.
ENDLOOP.
end-of-selection.
Start new screen *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM.
Insert field *
FORM BDC_FIELD USING FNAM FVAL.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDFORM.
Ajay P. Nikte -
Add Line Item In Sales Order VA01
HI All,
I have new requirement in creation of sales order . Here we have free promotion sales . Here if customer buy one material then he will get some other material as free .In standard sap we can give only one line item as free not more than that .
Here our requirement is more than one line item . I suggested them maintain all the free materials in one Ztable when ever the original material will come for sales order then i have to fetch these materials from ztable automatically and it should create sales order. I started doing this using user exit FORM USEREXIT_MOVE_FIELD_TO_VBAP.
These are the below links i checked in our sdn.
Adding Line items to sales order on creation using User-Exit in VA01.
Please give me some idea on this .
Regards,
Madhu.Hi Asik,
Thanks for your reply.In my case i can not got for Bom because the schemes will change for every ten days. I think Bom creation will fill a lot of data but it wont solve my issue.
Regards,
Madhu. -
To add the line item in Sales Order
Hi Experts,
I have to insert the line item between two line item in sales order dynamically.
How should i do this.
any idea??
Thanks in Advance.Hi,
I guess you are talking about BOM, sub-items or free goods, wherein after you put in one item the other material defined gets added automatically in the sales order.
That is done with the help of Item Category config by functional person.
Check here for more info
[Item Category|Re: Item Category;
You can also use user exit MV45AFZZ form user_exit_move_to_vbap for a specific logic defined at runtime.
Regards,
Amit
Edited by: Amit Iyer on Aug 26, 2009 10:21 PM -
Delete the line item in sales order in VA01/VA02 when the quantity is modif
Hi SAP,
I have requirement to delete a line item in sales order.Please suggest me to do the same.
THe scenarios is , we are inserting a free good line item based on some condition and quantity, If the quantity is modified the free good line item inserted needs to be deleted.
Waiting for your responce
Thanks,
Billa
Moderator message : Spec dumping is not allowed,search for available information. Thread locked.
Edited by: Vinod Kumar on Nov 14, 2011 1:54 PMHi,
Can you also check the SALES LINE.
Sales line is the combination of SALES ORGANISATION + DISTRIBTION CHANNEL +PLANT.
Hope it was not maintained.
Transaction code : OVX6
PATH: IMG->ENTERPRISE STRCTRE->ASSIGNMENT>SALES AND DISTRIBTION->ASSIGN SALES ORG- DISTRIBTION-PLANT.
please revert if the error still exists.
santosh -
Hi,
I need to insert new line item into PO if the material entered is BOM material. My requirement is like this, If the user creates the PO with BOM material then i need to insert all the inside components as line item in that PO. Please suggest me any user exits avaiable or any way to achieve this( It's not a subcontracting PO).
Thanks,
Ganga.hi
PCSD0001 Applications development R/3 BOMS
PCSD0002 BOMs: Customer fields in item
PCSD0003 BOMs: Customer fields in header
PCSD0004 BOM comparison
PCSD0005 BOMs: component check for material items
PCSD0006 Mass changes user exit
PCSD0007 Check changes in STKO
PCSD0008 WBS BOM: Customer-specific explosion for creating
PCSD0009 Order/WBS BOM, determine URL page
PCSD0010 Order/WBS BOM, determine explosion date
PCSD0011 Knowledge-based order BOM, parallel update
PCSD0012 Customer - Mat. number/mat. number during material exch
PCSD0013 Customer-specific processing of an explosion for BOM br
**Please reward suitable points***
With Regards
Navin Khedikar -
Automatically add line-items to Sales order
Hello,
Our client needs us to add line items to sales orders. The requirement is such that, when the users enter a material on a line item, they wish to see few more materials automatically added as new line items -- item category to be maintained as "Free" items. This appears similar to automatically getting BOM-sub-items for materials which have BOMs maintained. The client is not willing to maintain BOMs for materials in question. They instead have asked us to maintain sub-item materials in a Z-table and then fetch those to populate the subsequent line-items on the sales order.
So far, we have tried to fiddle around with the XVBAK and XVBAP internal tables in sales exit (MV45AFZZ) and also tried to use BAPI within the same exit. Both methods do not work.
Could you please guide us ? Thank you.
Regards,Hi,
I think you can try with product proposal(Item Proposal). T.Code:VA51.
Using this one can create list of items to be proposed at the time sales order processing.
Item proposal contains list of items with or without default quantities those were frequently ordered by the customer. You can create any no of items in an Item proposal.Like wise you can create any no.of item proposals.
But,You can assign only one item proposal per customer in sales tab of the CMR.So that when ever you are creating order for that customer you can access those materials which are listed in an Item proposal completely or selectively,with or without default quantities.
The items which are proposed from an Item proposal are always changeable.
Item proposal makes sales order processing simple and fast.
Only the thing here is it will not automatically explode like in case of BOM.You have to manually select those items from an item proposal.
Regards,
Revan
Edited by: REVAN on Dec 23, 2008 10:55 AM -
Automatically add line-items to sales orders
Hello,
Our client needs us to add line items to sales orders. The requirement is such that, when the users enter a material on a line item, they wish to see few more materials automatically added as new line items -- item category to be maintained as "Free" items. This appears similar to automatically getting BOM-sub-items for materials which have BOMs maintained. The client is not willing to maintain BOMs for materials in question. They instead have asked us to maintain sub-item materials in a Z-table and then fetch those to populate the subsequent line-items on the sales order.
So far, we have tried to fiddle around with the XVBAK and XVBAP internal tables in sales exit (MV45AFZZ) and also tried to use BAPI within the same exit. Both methods do not work.
Could you please guide us ? Thank you.
Regards,Ist method:
Maintain one Ztable with the fields of Material and sub materials.
write BDC to create order,before entering the material number check if material is existed in Ztable or not.
If it exist take that material and added as a another line item.
if not exist create like normal line item.
2 nd method:
Ask your MM functional consultant to maintain supression of materials concept. -
To add line items to sales order using User exit.
Hi ,
I have to add line items to sales order .
I have tried adding the code in usr exit move field _VBAP // Check VBAP and in savedocument _prepare . But in all the places I dont see it in VA01 . I can see it in the VA02 and VA03 . But I am not able to save the order as they have made the flooring term as mandatory field, and I am supposed to populate the XVBKD structure for this.
Pls tell me whts the procedure like say , should I popluate the XVBKD / XVBAP / and should i use the bapi_SALES_ITEM_CHECK to populate the structures at the save_document prepare.Hi,
1. It is not possible to delete records using DTW, only importing new records or updating existing ones are supported. These are the only valid operations via DTW.
2. It is possible to delete the contents of an edit text field by using the character / or -1. However it is not possible to clear an entire row/line using this notation.
Thanks & Regards,
Nagarajan -
How to get Characteristic Values assigned to the line item of Sales Order?
Hi,
I want to get the Characteristic Values( Variant Configuration )assigned to First Line Item of Sales Order.
I was using the Fn. Mod.: VC_I_GET_CONFIGURATION_IBASE,
this fn. mod. giving all the Characters but not the assigned characteristic values.
Is there any other way to find characteristic values of sales order.
Thanks,
vinayak.
Message was edited by: vinayaga sundaramFor example, please see this example program.
It lists the characteristic names, the values, and the description of the values which are tied to a sales document.
report zrich_0001.
* Internal Table for Characteristic Data
data: begin of i_char occurs 0.
include structure comw.
data: end of i_char.
data: xcabn type cabn.
data: begin of xcawn,
atwtb type cawnt-atwtb,
end of xcawn.
data: xvbap type vbap.
parameters: p_vbeln type vbap-vbeln,
p_posnr type vbap-posnr.
start-of-selection.
select single * from vbap into xvbap
where vbeln = p_vbeln
and posnr = p_posnr.
clear i_char. refresh i_char.
* Retrieve Characteristics.
call function 'CUD0_GET_VAL_FROM_INSTANCE'
exporting
instance = xvbap-cuobj
tables
attributes = i_char
exceptions
instance_not_found = 1.
loop at i_char.
clear xcabn.
select single * from cabn into xcabn
where atinn = i_char-atinn.
clear xcawn.
select single cawnt~atwtb into xcawn
from cawn
inner join cawnt
on cawn~atinn = cawnt~atinn
and cawn~atzhl = cawnt~atzhl
where cawn~atinn = i_char-atinn
and cawn~atwrt = i_char-atwrt.
write:/ xcabn-atnam, i_char-atwrt, xcawn-atwtb.
endloop.
Regards,
RIch Heilman
Maybe you are looking for
-
How do I edit or enter values on multiple sheets at the same time in Numbers? I can do it in Excel but I don't the procedure in Numbers. Thank you!
-
What is saved in the iPhoto library file when photos are backed up?
I have been using an external hard drive to back up my Mac files. My Mac stopped working, so now I have a PC netbook. I am trying to get some photo files off my external hard drive, but I can't find the ones I want. Instead, I found the iPhoto librar
-
Different Currency in Purchase order and Invoice
Hi MM Gurus, Kindly suggest me as to how to map the following scenario is SAP. Purchase order is placed on the Vendor in currency USD. Vendor is from India.Excise details are not captured in Purchase order. Vendor invoice is in currency
-
I just purchased a MacBook for the first time and I am having a problem with my web page being too large. I have to scroll almost half the page to read the screen. I have been unable to find a solution to fit the page to the screen. I have been unabl
-
Prints in PS CC incorrect format and not borderless - please help?
Hi I am new to printing and thought I would get the basics before I upgrade the printer. I just can't get my prints to reflect correctly on paper, please help - I will explain by way of pictures The first image is what I want to print but borderless.