ORDER QUANTITY FIELD IN  'BAPI_SALESDOCU_CRETEFROMDATA2'

Hi All,
I am creating a sales order through BAPI_SALESDOCU_CRETEFROMDATA2. Now I need to update the order quatity field . Can I know what is the field name in bapi that I need to update. I updated with target_qty and comp_qty but in the vbap table the value of KWMENG is 0. Pls give the right filed to update
Thanks in advance.

Hi Friend,
Pass quantity in TARGET_QTY of ITEM parameter
and REQ_QTY of SCHEDULE line parameter.
It will solve ur problem.
Regards
Krishnendu

Similar Messages

  • Order Quantity Field in Sales order

    Hi All
    I'm creating High Sea Sales order. When i start creating sales order after punching the order quantity in screen that particular field gets greyed out. Quantity which i put in field is not getting updated . If i go to item level & update quantity, still in item overview screen the order quantity field is greyed out with no quantity.
    This problem occuring only with this document type , no other sales order type is getting this problem.
    Please help.

    Hi,
    go to VOV7 >>> Select item catgeory which you are determining in sales order >>> details.
    Hear tickmark to Business item, schedule line allowed
    Check out this & reply
    Kapil

  • I need to make the ordered quantity field (RV45A-KWMENG) disabled in 'VA02'

    Hi SAP COMMUNITY,
    I have urgent requirement for which i did'nt worked before on this requirement. I hope you people can help me in this regerd.
    My requirement is, I need to make the ordered quantity field (RV45A-KWMENG) disabled in the transaction code is VA01/VA02. User should not be able to edit this ordered quantity in VA01/VA02 Transaction.
    Here the condition to disable this field ordered quantity is IF ORDER TYPE EQUAL TO OR AND IF ITEM CATEGORY EQUAL TO TANN in technical IF VBAK-AUART EQ OR AND IF VBAP-PSTYV EQ TANN then only the field (RV45A-KWMENG) ordered quantity should be disabled in that transaction VA01/VA02.
    Correct me if iam wrong, I think in the program SAPMV45A and do we need to include any screen number which i have seen in VA02 is 4001. Do we need to write a code in Include MV45AFZZ (FORM USEREXIT_FIELD_MODIFICATION.). But i don't know what code i need to write here to disable this field.
    I had searched in the forum some example code so please suggest me whether i can use this and if i can use this please suggest me how to write the condition and insert the code in that FORM. If this sample code is wrong then please suggest me what exact code should be given. Can anyone help. Quick response will be much appreciated.
    Looking forward for ur prompt replies.

    As per my understanding , To disable the field RV45A-KWMENG based on the condition for Transaction VA01/VA02.
    The conditions which i need to check is Order Type and item category.
    I understand that this is the code which i need to insert for disabling the field but i have a question here, where is the condition here and how the system understand for this field RV45A-KWMENG it has to disable. I think we need give the condition as if RV45A-KWMENG....... Another one if iam not wrong we need check that it has to be done in VA01 and VA02 then only this condition should be executed.
    IF VBAK-AUART EQ 'XXX' OR VBAP-PSTYV EQ TANN .
    IF SCREEN-NAME = 'XXX'.
    SCREEN-ACTIVE = 0
    ENDIF.
    ENDIF.
    Please suggest me the better way how can i do it in the coding.
    Awaiting for ur prompt reply.

  • Order quantity field in the item overview tab of a sales order

    Hi,
    I would like to make the order quantity field inactive, i.e., the field should be greyed out, when i enter the transaction VA01.
    Is there any way this can be done through functional configuration?
    Cheers,
    MR

    Unfortunately, it doesn't.
    The requirement was to adapt transaction's layout in order to disable editing (e.g. turning it to grey, disactivating the field) for a particular field. This kind of job should be done dinamically as it interests only some kind of Purchase Requisitions (whose attributes should be checked "runtime").
    I found a good user exit which is executed every time a PR is loaded from Enjoy transactions ME51N/ME52N/ME53N in which i can easily check if prerequisites for the "locked field" exist... but there's no visibility over the right SCREEN in that user exit (and also, I tried, in ANY of the std userexit) so I don't know how to tell the transaction "hey, for this order turn the EPSTP (=pstyp in EBAN) grey since it must be not-modifiable".
    Can't get at the same time Field Exit to work on this system (46C)

  • Sales order quantity field editable even when billed.

    Hi Gurus,
    Good Day to you all!
    We have this sales order that is already delivered and billed. I was just wondering why the sales order 'order quantity' field can still be changed or is still editable? Is it standard procedure that it would be disabled and uneditable? Is there a configuration behind this?
    We have some sales orders that are directly billed without any need for delivery. These sales orders shows the order quantity as disabled and uneditable unlike the one stated above. Anyone can please help regarding this problem
    Thank you very much!
    Best Regards,
    JV Nunez

    Dear,
    User exits in the program MV45AFZZ - USEREXIT_FIELD_MODIFICATION or USEREXIT_SAVE_DOCUMENT
    SEREXIT_FIELD_MODIFICATION -> you can disable/enable screen fields by using this user exit as you want quantity in VA02.
    screen-name = 'RV45A-KWMENG' OR " Order quantity
    screen-name = 'VBEP-WMENG' OR " Order qty in Schedule Lines
    screen-name = 'RV45A-KMPMG'. " Order quantity in "Structure" tab
    SCREEN-INPUT = 0.
    Please check with ABAPr.
    Regards,
    R.Brahmankar

  • Order Quantity field editable in line item in Quantity Contract

    Hi,
    We are using a quantity contract for our project.
    Our requirement s to have Plant, Quantity, Batch and Amount to be editable in the line item of contract.
    We made ZQC Sales order type and assigned screen group of Sales order in which we are getting Plant, Batch and amount as editable but however there is a field Order quantity which is greyed out.
    There is a fields Target quantity which is available for input however it is not in the line item which is displayed below, user has to double click n the line item and enter that value.If we can get order quantity as input field or target quantity can be made available in line item our purpose would be resolved.
    Kindly help on the issue.
    Anil.

    try screen variant SHD0

  • Purchase Order - Quantity Field printing.

    Hi Gurus.
    I am printing purchase orders via SAP script.
    My users want the quantity field (RM06P-PRMG1) to have a dot(.) not a comma(,)
    eg they want to print the number as 200.000 and not 200,000
    Is there somewhere, i can switch this without adding an ABAP routine to fix this.
    Thanks.
    Points will be awarded.

    Hi Wandai,
    Did you try changing the user settings? Access the menu and go to System -> User profile -> User defaults. Here you can see two options in the Decimal notation tab.
    Option 1 is : Comma and
    Option 2 is : Period.
    Please change and try with each of the above option.
    If this doesn't work you need to check the data type you are using for this variable.
    Hope this helps.
    Please reward if useful.
    Thanks,
    Srinivasa

  • Production order quantity field

    Dear all,
    I add a operation (rework operation) in my production order. But I don't know how to change operation quantity. because this field close ,  how  can I open this field for enter new quantity of this operation? and which contol key do I have to use for rework operation?
    thanks in advance,
    regards,

    Okey.
    I donot think at this stage you can change the operation qty.
    if it is released...I think you have inserted the RW operation during confirmation i suppose.
    If that is the case, when you cinfirm this rework opration you can confirm the actual quantity and confirm the opration with final confirmation tick..

  • Change order quantity in VA01

    Hi gurus!
    I'd like to modify the value of 'order quantity' field while creating a sales order with VA01. I see that this value is maintained in several tables, not only xvbap. Could you please tell me the most indicated place (userexit), to insert my code and which tables must I update in order that new value is available within the following sales creation process?
    thanks a lot.

    Hi Hernandez,
    You can use this user exits in program MV45AFZZ.
    USEREXIT_MOVE_FIELD_TO_VBAP
    USEREXIT_SAVE_DOCUMENT
    and change internal table XVBAP.
    Hope this will help.
    Regards,
    Ferry Lianto
    Please reward points if helpful.

  • Restricting prod order quantity from being higher than sales order quantty

    Dear Experts,
       I create production order interactively through co08 ( prod order with respect to sales order). the prod order automatically picks up the quantity in the sales order which is desired, but this order quantity field in the prod order is editable (i.e can be made higher or lower). Please how do I restrict this prod order quantity from being  higher than the sales order quantity?i mean what should be done to make system disallow the prod order qty being fixed higher than thesales order qty?

    Hi,
    Even though you create the production in refernce to the SO, the order quantity can be alter.
    This is a normal behaviour of the system.
    To restrict any change in the order quantity, you can use tarnsaction variant for CO08. T code is SHD0.
    Secondly you can use the following enhancements to restrict the same,
    PPCO0006
    PPCO0007
    Hope this helps you.
    SmanS

  • Order qty field in bapi and exit

    Hi All,
    Pls resolve my issue......
    I am creating the sales order through 'VA01' t-code.Now based on some conditions I will create a new sales order through BAPI_SALESDOCU_CREATEFROMDATA1 in t-code. I could not found the order quantity field in tables of BAPI thus I am not able to update the order quatity(kwmeng in vbap) for new sales order. Somebody suggested me that I need to update the schedule line item req_qty(its not working).
    *Second Issues:*++
    I am writing the code in SAVE DOCUMENT user exit , this is going into infinite loop. Can anybody suggest me the correct EXIT too.
    Points will be given
    Thanks in advance.

    Hi Friend,
    For the first point:
    Pass quantity in TARGET_QTY of ITEM parameter
    and REQ_QTY of SCHEDULE line parameter of the specified BAPI.
    It will solve ur problem.
    Please clarify little bit on second point.
    Regards
    Krishnendu

  • Quantity field dissabled

    Hi,
    Creating sales order with reference to periodic contract system showing Dissable in sales order Quantity field.PLeasegive me the solution to enter quantity in Sales order level.
    Thanks,
    Miku

    Hi Miku,
    I think you need to go for enhancement.
    Use exit  : MV45AFZB - USEREXIT_CHECK_VBAP USING US_DIALOG
    check and revert
    Regards
    Ram

  • Max order quantity to preserve service levels

    Dear Sales Gurus,
    Here is an interesting challenge. I have seen a lot of topics around this issue, but no clear explanation on the background and probably for that reason no clear solution.
    ==============
    Heading 1:The business case
    Products that are sold can be characterized by being high or low volume, and frequently or not frequently ordered. This particular scenario is in the context of low-volume and not frequently ordered products. To assure service levels and working capital optimization you have defined a safety stock that corresponds to the frequence of the orders, average quantity ordered and standard deviation of ordered quantity. As practical example: Product AAA is sold every 2 months by 3 orders with average quantity of 15 and standard deviation of 5. The safey stock has been set to 60 units.
    One of your sales offices/persons spots a one off-opportunity to sell 60 units of that product AAA and places a sales order for it. Consuming the inventory completely would result in most of the other regular customers being unsatisfied and service levels being broken.
    ==============
    Objective
    Assume partial deliveries are not accepted. The system should not propose a date, which is based on the available inventory. It should take into account the assumption that the quantity should be produced in order not to completely exhaust the safety stock and damage the service level for other regular customers.
    One way to achieve that is to introduce a maximum order quantity, which can be statistically estimated to fit in certain constrains and factors.
    ==============
    System Behaviour
    Lets say a max quantity can be defined somehow and used in SO processing. When the ATP is run, it should check the max quantity and if the order exceeds that quantity, it should be satisfied by planning a new production. For example if the max quantity is set to 30 (mean + 3st.deviations), any order for up to 30 would be sourced from inventory, provided there is stock available, any order above this limit will immediately be planned for production even if stock is available to cover the individual order.
    ==============
    Alternative Solutions
    Any solution which allows that the above issue is avoided can be considered. The Max Quantity is probably only one of the possible alternatives.
    Looking forward for your solution ideas.
    ==============
    P.S. Custom development and User exits are always an option, but in this request we need to answer with standard functionality as much as possible.
    P.S.S. I have been looking at the Quantity Optimization functionality for PO's and SO's, but I am not sure if it is really a solution as I do not have experience with it and did not understand how exactly it works.
    P.S.S.S. I had problems formating this to come as structured text with some line breaks. Sorry for the output.
    Thanks,
    Valentin
    Edited by: Valentin Yonchev on May 10, 2010 4:38 PM
    Edited by: Valentin Yonchev on May 10, 2010 4:40 PM

    Hi Kaan,
    Here are the answers to your questions:
    1) Is there a Max.Order Quantity field in the material master record like Min.Order Quantity field in the
    Sales: Sales org.1 screen?
    Answer: Unfortunately there is no such field.
    2) How can we define a limit for the total amount of the order quantity per a sales order?
    Answer: You could consider using USEREXIT_SAVE_DOCUMENT_PREPARE in MV45AFZZ.
    This userexit will be called during the save process of sales document.
    You could add additional check in it.
    3) How can we control that one material no. could be written just one item line in the sales order?
    Answer: You could consider using USEREXIT_CHECK_VBAP in MV45AFZB.
    This userexit will be called after item creation. You could add check for material number.
    Thanks and best regards,
    Smile

  • Quantity field to be shown on 1ST line only for purchase order items in ALV

    Dear All,
    I am fetching data from purchase order history table (EKBE) where PO line items contains multiple times. User does not want to view  fields that are repeating multiple times in all lines, but in the top line. By sorting the same in ALV , I can do the same with character type fields, but how to do the same with quantity fields. One way out is converting the same into character fields. Is there any other way. Please give me some solution. Also while sorting , the number which gets repeated (i.e Items in PO for different PO's ) does not gets displayed. I want my program to display them.
    Thanks,
    Debopriyo Mallick

    Try this
    loop at ist_mseg into wa_mseg.
      ON CHANGE OF wa_mseg-con.
        move '111' to wa_mseg-con1.
        modify ist_mseg from wa_mseg.
      ENDON.
    endloop.
    loop at ist_mseg into wa_mseg.
      if wa_mseg-con1 ne '111'.
        move 0 to wa_mseg-menge.
        move 0 to wa_mseg-netpr.
      endif.
      modify ist_mseg from wa_mseg.
    endloop.
    mseg-con is the concatenation of ebeln and ebelp values.
    pk

  • Query Alert for a change in value of the Quantity field of the sales order

    Hi Experts,
    A query alert has been set up to alert the warehouse employee when a new sales order is created by a sales employee. Our client wants the warehouse employee alerted when the sales employee edits the quantity field of an already added sales order.
    Kindly assist in designing a query to notify of this change in the Quantity field of the sales order.
    David

    Try this one:
    SELECT T0.DocNum, T0.CardCode, T1.ItemCode, T3.Quantity 'Old Qty', T0.Quantity 'New Qty', MAX(T2.LogInstanc) 'Times Changed'
    FROM dbo.ORDR T0
    INNER JOIN dbo.RDR1 T1 ON T1.DocEntry = T0.DocEntry
    INNER JOIN dbo.ADOC T2 ON T2.DocNum = T0.DocNum AND T2.ObjType = '17'
    INNER JOIN dbo.ADO1 T3 ON T3.DocEntry = T2.DocEntry AND T3.ItemCode = T1.ItemCode
    WHERE T0.DocStatus = 'O' and T0.DocType = 'I' AND T1.Quantity != T3.Quantity
    GROUP BY T0.DocNum, T0.CardCode, T1.ItemCode, T1.Quantity, T3.quantity

Maybe you are looking for

  • Satellite A300-20P - Games with Windows 7 not working in full screen

    I have Satellite A300-20P and VGA ATI 3650 I made upgrade to Windows 7 Professional All games working well but not in full screen. I installed the last driver for ATI for Windows 7. It was working in full screen in Vista before I make upgrade. Same p

  • How to hide the table header if no data present

    Hi I need to hide the table header if no data present. Table has 5 column. if no any clolumn has data then this table section should not be display. i am using <?if:count(Installation_Event_S19)= 0?> but this is not work for me. Could you please help

  • How to run a Java applet on a website.

    Hi, I am trying to run the code below [DrawLines.java|http://www.dgp.toronto.edu/~mjmcguff/learn/java/01-drawingLines/] import java.applet.*; import java.awt.*; public class DrawingLines extends Applet {    int width, height;    public void init() {

  • When I start Firefox, I get an error message instead of my home page: Server not found Firefox ca

    The error message is: Server not found Firefox can't find the server at co108w.col108.mail.live.com. If I then hit "Home" it goes to the home page. Changing the home page hasn't helped. Resetting Firefox hasn't helped. This just started today. Restar

  • Ipad not recognized on imac

    When I had to reset my IPAD( couldnt remember my password), my iMAC does not recognize my Ipad and unable to sync any music, apps etc. I have tried everything, what is the next step?