Update the sales order ( Quantity ).

Hi Experts,
I am using BAPI_SALESORDER_CHANGE. I want to change only Quantity of a sales order for that I pass it in ITEM Table and set the flag for these values in ITEMX table.
After executing BAPI it runs Successfully so I commit it by using BAPI_TRANSACTION_COMMIT.
Now my query is after commited BAPI it does not update the  related sales order in database.
Why is it occurs meantime it is possible manually by VA02.
Suggess what to do to solve this?
Points will be sured for helpful answers.
Thanks & regards
Alok Vishnoi

Hi Alok,
If you want to change the quantity in a sales order item using BAPI_SALESORDER_CHANGE you have to pass the new quantity in the Schedule Lines (SCHEDULE_LINES) table to the BAPI_SALESORDER_CHANGE. Then only the new quantity gets reflected at the item level.
If u just change the quantity at the Item level it will not get effected.
I hope it is useful. Please let me know if u need any information.
Regards,
Suresh Linga.

Similar Messages

  • Order recommendation must be extra than the sales order quantity

    Hi Expert,
                   My client is using the MRP wizard to generate the Purchase and Production order once a sales order comes from customer than MRP create the production order for parent item and purchase order for chilld items with required quantity but there is a possibility of rejection which comes to know at the end of production and to complete the quantity required some time.
                                                                                    Is there any possibility that MRP generate the recommendation 10%(for example) extra than the sales order quantity.So that it will full fill the rejected quantity at the end of production.
    Thanks

    Hi,
    MRP in B1 designed in a way that you don't need to enter many choices to select from.  To fulfill your goal, I think it is not that difficult because you could export recommended order and calculate the new total by a formula like New Qty = Recommend Qty * 1.1 in Excel and DTW the production orders using the calculated results.
    Thanks,
    Gordon

  • Rounding : User flexibility to edit the Sales Order quantity.

    Hello Gurus,
    We are on 6.0 and have the following requirements.
    1st requirement: To round the Sales Order Quantity to the Alt Unit of Measure (higher or lower). As a solution we could use the Rounding Profile.
    The problem is with 2nd requirement below.
    2nd business requirement: When the system rounds the Sales Order quantity to higher or lower, the user should have the flexibility to edit the Sales Order quantity and decide whether to permit rounding or not, as suggested by the system.
    Currently, with standard config, the system gives the message V1720 saying it has rounded the quantity with a reason. After the rounded quantity is suggested by the system, even if the user edits the Sales Order quantity, the system puts it back to the previously rounded quantity.
    SYSTEM REQUIREMENT : We would like to have the Rounding but we want the user to be able to edit the rounded quantity.
    REASON : Since the products are high value, we want the customer to feel comfortable with the rounded quantity.
    The users do not want to impose the rounded quantity compulsorily on the customer. If the customer is not comfortable with the rounded quantity, the customer should be givne the choice of a non-rounded quantity.
    IMPACT : In these difficult times, every Order is important. If we don't not give this choice to the customer, the customer might decide not to order at all. We do not want to lose the Order just because of the higher rounded quantity. But, at the same time, we would like to give the choice to the customer of the rounded quantity and his non-rounded quantity.
    PLEASE NOTE : In this situation, the Rounded quantity is slightly different from Minimum Order quantity. The Minimum Order quantity is not the solution.
    QUESTION : Is there any standard setting or is User Exit, BADI the only method ?
    Thanks in advance
    Srinivas

    Hi Prakash,
    Thanks for the reply. Actually these customers are created as a Agents and we are using these customers in Commission rebates. So at the time of Rebate partial credit memo, then these agents should be active otherwise system will give the error.
    So what i am thinking is, Standard sales order creation needs to be restricted so that users can not able to create standard order.
    So can you suggest is there any user exit can be used to prevent creation of standard order for these account group and order type xxx?
    Regards,
    SK

  • Restrict the Sales Order Quantity in Integer

    Hi All,
    our system need to restrict the Sales Order Quantity in having no decimal value.  
    We have got the OSS reply as:  
    "Unfortunately I regret to tell you that it is not possible to
    restrict the order quantity number to integer in standard system.
    The number of allowed decimals is defined in the system via SE12.
    In SE12, you can see that for VBAP-KWMENG, the number of allowed decimals is 3. I'm sorry but this is the standard system behavior."
    But we need to avoid programming. Can you anyone suggest any work around methods, like define rounding profile to do the restrictions.
    Regards,
    Simon

    Hello All,
    Thanks for the excellent answere.
    Please anybody can provide us the SAP OSS Note for the same as the reply received from SAP Support.
    We have got the OSS reply as:  
    "Unfortunately I regret to tell you that it is not possible to
    restrict the order quantity number to integer in standard system.
    The number of allowed decimals is defined in the system via SE12.
    In SE12, you can see that for VBAP-KWMENG, the number of allowed decimals is 3. I'm sorry but this is the standard system behavior."
    But we need to avoid programming. Can you anyone suggest any work around methods, like define rounding profile to do the restrictions.
    Regards,
    Farhan

  • Function Module to update the sales order header status

    Hi,
      I am looking for a function module to update the Sales order header status.
      Pls. let me know if anybody has used any FM to update the SO status.
    Thanks,

    By mentioning status do you mean Object status or Document status??
    For Object status you may use FM: STATUS_MAINTAIN
    For document status it changes according to flow.
    Regards
    Eswar

  • Restricting a user(based on Responsibility) from updating the sales order

    Hi,
    We have a requirement here, that for a prticular responsibility the user shouldn't be able to update anything in the sales order. He can although perform below operations -
    1. Query the order to view the details.
    2. Release the OM holds, if any.
    Other than these two things.. He shouldn't be able to make/save any changes to the order. We are using R12.
    Now, what we tried is -
    1. Created a forms personalization, that would check
    if fnd_global.resp_id = <desired resp_id>
    then raise form trigger failure in when-validate-record.
    this is restricting the user to make any change in order. But, issue is he can still book an entered order.
    So, requirement drills down to -
    1. How to restrict the user from booking an entered order.
    2. How to restrict the user to perform any other thing than releasing the hold (from actions).
    Any help regarding this will be highly appreciated. Also, please let me know, if it is possible using Processing constraints or any other standard means.
    Regards
    Bhushan

    i think you are putting this filter on employee table.If you want to apply adat level security then put these filters on groups.create one group and assign al user on which you want to apply data level security.on this group put this filter
    upper("Employee"."DEPARTMENT") = upper(VALUEOF(NQ_SESSION."DEPARTMENT")).
    And create another group and assign Jeff to that group and dont apply any filter on this group.You can apply these filters on individual users also but its a good parctise to make use of groups.
    Regards,
    Sandeep

  • How production peoples will know the sales order quantity?

    Hi,
    In our business we are getting orders from our customer in advance (ie before stock production). Is there any notification to send the Ordered item, Quantity and Dispatch date to the production department to produce the stock? Is there any setup for the same?
    Thanks in Advance,
    Regards,
    Prabhu.S.J

    Your MRP / APS will create wip jobs based on the sales order demand. The shop floor may / maynot care about which sales order they are building it for.
    If you want to create one-to-one relationship between the jobs and the sales orders, you can either make your items as ATO items and autocreate the wip jobs or check the LOT FOR LOT option in your ascp plan.

  • How to pick-up the sales order quantity

    Hello Friends,
    I am writing a report where I need to pickup the sales order details like, item no, material, qty etc.
    But when I check qty filed it is showing field "RV45A-KWMENG" here RV45A is the structure. So can I fetch qty in my report?
    Please help me,
    Shreekant

    Hi,
    I feel you would have the fecth the data from the table, structure will not give you the data against the quantity field, so when you are using the field in your program to fetch the data, look for the relevant table and use the quantity field from that table.
    Let me know if my views are correct and please rate my answer if you find it useful.
    Regards,
    MD.

  • Need to update the sales order status

    Hi Friends,
    I have one query.
    we are doing archiving of sales documents.during the preprocessing we have identified that there are some non-archivable documents due to status check.
    Example:As per Sales order schedule line category "CT" is relevant for delivery. Now we had a talk with business and removed the "item relevant for delivery indiacaotor" from schedule line category.
    This config changes will apply for newly created sales orders.
    Now the requirement is to update the status of old sales orders with this new config change to make these non archivable data to be ARCHIVED.
    can any one help me out by providing relevant SAP note or by sending me the program name which will update the old order status with the new config changes.
    Thanks & regards,
    Shaik Hussain

    Hi Liam,
    In the Program MV45AFZZ in the FORM userexit_save_document
    you use the following fn module to change the user status
    'STATUS_CHANGE_EXTERN'
    Example
    IF t180-trtyp = 'H'.  "Only creation time
      READ TABLE xvbap WITH KEY matnr = c_matnr.
      IF sy-subrc = 0.  "If above material exist then change status
        LOOP AT xvbap WHERE cuobj NE space
                       AND  matnr =  c_matnr.
          l_objnr = xvbap-objnr.
          CALL FUNCTION 'STATUS_CHANGE_EXTERN'
            EXPORTING
              objnr               = l_objnr
              user_status         = 'E0013'  "Send ej IDOC
              set_chgkz           = 'X'
            EXCEPTIONS
              object_not_found    = 1
              status_inconsistent = 2
              status_not_allowed  = 3
              OTHERS              = 4.
        ENDLOOP.
      ENDIF.
      sy-subrc = 0.  "Restore the previous condition
    ENDIF.
    Reward if helpful *********

  • How to update the sales order header & item data in TM system

    Hi Experts,
    Greetings!
    I need your help,I have a one requirement sales order data came from ECC these sales order data need to update in TM Sales order header table as well as item table also these fields are additional fields.
    Can anyone please guide me I am very new in TLM .
    Thanks in advance.
    Thanks&Regards,
    Siva.

    Hi Siva
      "/SCMTMS/TRQ~ROOT" is for sales order header and "/SCMTMS/TRQ~ITEM" is for details.
      I assume you need to
    enhance the structures for these nodes to hold your add. fields;
    and do the same for the input parameter of service TransportationRequestRequest_In (which is used to create OTR) from PI side;
    Pass the add. fields during service call (impelment in ERP system);
    Map the fields from service paremeter to node attribute (implement in TM system, BAdI   /SCMTMS/TRQ_SE_TPNRQ_REQ~CHANGE_MODIFICATION create modification table for the input parameter).
    I cannot find source code for all of that; hope it helps.
    Sensen

  • Issues in Web service created for updating the Sales Order

    Hi All,
    We created a Web service using the Web service tool in CRM 7.0 ( Using the Component WS_DESIGN_TOOLS )
    Web service was created for three modes such as READ, CREATE and CHANGE Modes.
    READ Web Service we tested and its working fine as we were able to see the data for an existing Sales Order in the Web Service.
    We expect that the Change Web Service will update the data of an existing Sales Order.
    Through our Web service we are passing the Order GUID ,Order ID and some Header Fields as well as Item Fields but  the in the Web Service we are getting a message that Web service executed successfully but the CRMD_ORDERADM_H Table isnot getting updated.
    What could be problem.
    Any suugestions will be highly appreciated.
    Regards,
    Sijo

    Hi Gourav,
    I checked in SICF for the Webservice name created.
    this is the service path
    /default_host/sap/bc/srt/rfc/sap/ for the corresponding Web Service created in DEV 200 Client.
    I checked in SOAMANAGER and saw  that the  endpoitnts were zero.
    the Search Operation for Webservice have got three query fields mainly
    Object Id, Posting Date,Procees Type
    If we give Process Type
    sign - blank
    option - blank
    low - YPO ( Custom )
    High - blank we are getting 126 entries.
    and if we check for the Process Type YPO (Custom ) in CRMD_ORDERADM_H Tbale also we are getting the same no of entries.
    but only for option BT , for Posting Date issue is thr..
    Any inputs to move forward will be highly appreciated.
    Regards,
    Sijo.
    Edited by: sijokjohn85 on Mar 5, 2010 10:52 PM

  • Error while updating the sales order through Process Order API

    Hi,
    Please any one will help plz.
    I am updating the promise_date through oe_order_pub.process_order(Process Order API) i am getting the following error.
    FND_AS_UNEXPECTED_ERROR N PKG_NAME OE_Order_Cache N PROCEDURE_NAME get_tax_calculation_flag N ERROR_TEXT ORA-01403:no data found
    Please any one will help plz
    Below is my code.
    Declare      
    l_archive_file_name VARCHAR2(1000);
    l_shipment_exists NUMBER:=0;
    l_header_id NUMBER;
    l_line_id NUMBER;
    p_header_rec Oe_Order_Pub.Header_Rec_Type;
    l_line_tbl oe_order_pub.line_tbl_type := oe_order_pub.g_miss_line_tbl;
    l_header_rec OE_ORDER_PUB.Header_Rec_Type;
    l_header_val_out_rec OE_ORDER_PUB.Header_Val_Rec_Type;
    l_header_adj_out_tbl OE_Order_PUB.Header_Adj_Tbl_Type;
    l_header_adj_val_out_tbl OE_Order_PUB.Header_Adj_Val_Tbl_Type;
    l_header_price_att_out_tbl OE_ORDER_PUB.Header_Price_Att_Tbl_Type;
    l_header_adj_att_out_tbl OE_ORDER_PUB.Header_Adj_Att_Tbl_Type;
    l_header_adj_assoc_out_tbl OE_ORDER_PUB.Header_Adj_Assoc_Tbl_Type;
    l_header_scredit_out_tbl OE_Order_PUB.Header_Scredit_Tbl_Type;
    l_header_scredit_val_out_tbl OE_Order_PUB.Header_Scredit_Val_Tbl_Type;
    l_line_rec OE_ORDER_PUB.line_rec_type;
    l_line_out_tbl OE_ORDER_PUB.Line_Tbl_Type;
    l_line_val_out_tbl OE_ORDER_PUB.Line_Val_Tbl_Type;
    l_line_adj_out_tbl OE_ORDER_PUB.Line_Adj_Tbl_Type;
    l_line_adj_val_out_tbl OE_ORDER_PUB.Line_Adj_Val_Tbl_Type;
    l_line_price_att_out_tbl OE_ORDER_PUB.Line_Price_Att_Tbl_Type;
    l_line_adj_att_out_tbl OE_ORDER_PUB.Line_Adj_Att_Tbl_Type;
    l_line_adj_assoc_out_tbl OE_ORDER_PUB.Line_Adj_Assoc_Tbl_Type;
    l_line_scredit_out_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
    l_line_scredit_val_out_tbl OE_Order_PUB.Line_Scredit_Val_Tbl_Type;
    l_lot_serial_out_tbl OE_Order_PUB.Lot_Serial_Tbl_Type;
    l_lot_serial_val_out_tbl OE_Order_PUB.Lot_Serial_Val_Tbl_Type;
    l_action_request_out_tbl OE_Order_PUB.Request_Tbl_Type;
    l_msg_count NUMBER;
    l_msg_data VARCHAR2(2000);
    l_return_status VARCHAR2(1);
    l_index NUMBER;
    l_rows_processed NUMBER:=0;
    l_line_mawb VARCHAR2(240);
    l_line_hawb VARCHAR2(240);
    l_line_flight_num VARCHAR2(240);
    l_org_id NUMBER :=143;--FND_GLOBAL.ORG_ID;
    l_resp_id NUMBER:=FND_GLOBAL.RESP_ID;
    l_resp_appl_id NUMBER:=FND_GLOBAL.RESP_APPL_ID;
    l_user_id number := FND_GLOBAL.USER_ID;
    l_promise_date date;
    BEGIN
    SELECT ol.org_id, oh.header_id, ol.line_id,ol.promise_date
    INTO l_org_id, l_header_id, l_line_id,l_promise_date
    FROM apps.oe_order_headers_all oh, apps.oe_order_lines_all ol
    WHERE ol.header_id=oh.header_id
    AND ol.line_id =1319526; --&line_id
    -- apps.fnd_global.apps_initialize(&l_USER_ID,&l_resp_id,&l_resp_appl_id);
    apps.fnd_global.apps_initialize(67778,51017,660);
    p_header_rec := OE_ORDER_PUB.G_MISS_HEADER_REC;
    p_header_rec.header_id :=835035;-- l_header_id;
    p_header_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
    l_line_tbl := oe_order_pub.g_miss_line_tbl;
    -------------------------Line Record -------------------------------
    l_line_tbl(1) := oe_order_pub.g_miss_line_rec;
    l_line_tbl(1).header_id := 835035;
    l_line_tbl(1).line_id := 1319526;
    l_line_tbl(1).promise_date := sysdate;
    l_line_tbl(1).operation := oe_globals.g_opr_update;
    BEGIN
    apps.oe_order_pub.process_order
    (p_api_version_number => 1.0
    ,p_init_msg_list => fnd_api.g_true
    ,p_return_values => fnd_api.g_true
    ,x_return_status => l_return_status
    ,x_msg_count => l_msg_count
    ,x_msg_data => l_msg_data
    ,p_header_rec => p_header_rec
    ,p_line_tbl => l_line_tbl
    -- out variables
    ,x_header_rec => l_header_rec
    ,x_header_val_rec => l_header_val_out_rec
    ,x_header_adj_tbl => l_header_adj_out_tbl
    ,x_header_adj_val_tbl => l_header_adj_val_out_tbl
    ,x_header_price_att_tbl => l_header_price_att_out_tbl
    ,x_header_adj_att_tbl => l_header_adj_att_out_tbl
    ,x_header_adj_assoc_tbl => l_header_adj_assoc_out_tbl
    ,x_header_scredit_tbl => l_header_scredit_out_tbl
    ,x_header_scredit_val_tbl => l_header_scredit_val_out_tbl
    ,x_line_tbl => l_line_out_tbl
    ,x_line_val_tbl => l_line_val_out_tbl
    ,x_line_adj_tbl => l_line_adj_out_tbl
    ,x_line_adj_val_tbl => l_line_adj_val_out_tbl
    ,x_line_price_att_tbl => l_line_price_att_out_tbl
    ,x_line_adj_att_tbl => l_line_adj_att_out_tbl
    ,x_line_adj_assoc_tbl => l_line_adj_assoc_out_tbl
    ,x_line_scredit_tbl => l_line_scredit_out_tbl
    ,x_line_scredit_val_tbl => l_line_scredit_val_out_tbl
    ,x_lot_serial_tbl => l_lot_serial_out_tbl
    ,x_lot_serial_val_tbl => l_lot_serial_val_out_tbl
    ,x_action_request_tbl => l_action_request_out_tbl
    --dbms_output.put_line('l_msg_data-->' ||l_msg_data ||' l_return_status --> ' ||l_return_status);  
    END;
    commit;
    END;
    Regards,
    Sangu

    Hi Sangu,
    See if the following notes help you:
    Error when calling API from SQL*Developer, eg. ORA-01403 in API OE_ORDER_PUB.PROCESS_ORDER (Doc ID 1054295.1)
    Cancellation Of Transfer Orders Is Not Possible - ORA-01403: no data found in Package OE_Order_PVT Procedure Process_Order (Doc ID 391307.1)
    Thanks &
    Best Regards,

  • How to update the sales text in the Sales Order.

    Dear all,
    I want to Update the sales text in the Sales Order. I used the "CREATE_TEXT" but i couldn't update using it.
    Can u please guide me, how to use the Function Module to update the sales Order line item text values.
    Thank U
    Uwanthi

    HI
    Check this link
    User Exit to update Sales order text (Terms of delivery) on saving it
    Regards,
    Krishna

  • How to update the condition price in the sales order for all the items

    Hi,
    How to update the condition price for all the itmes in the sales order to carry out the new price automatically through a stand alone program, for all the orders in the billing due list table?
    Thanks,
    Balaram

    Hi,
    There is a change in the requirement.
    Scenario:
    I have created a sales order with some 4 condition types, in that 2 condition types are of class A & B and the other two is of class C. Here I need to update the condition price of class A & B only and the remaining condition types should not get update even though there is an updated price is available.
    For the above scenario, I need to write a standalone program. Do we have any function modules to update the price of the single condition in the sales order? Please tell me how we can update the sales order at item condition level.
    Thanks.
    Balaram

  • Message type and IDoc type to update a sales order

    I can create sales order at WE19 by the message type SALESORDER_CREATEFROMDAT2 and IDoc type SALESORDER_CREATEFROMDAT202 . Can I use the same message type and IDoc type to update a sales document (sales order) and also how can I do (I mean, which structures should I use; at E1BPSDHD1X - UPDATEFLAG what should I enter? Put an X to update a document or etsc?)? I enter the "E1BPSDHD1X - UPDATEFLAG" as X, "E1BP_SENDER - LOG_SYSTEM", "E1BPSDITM - ITM_NUMBER", " E1BPSDITM - MATERIAL", "E1BPPARNR - PARTN_ROLE", "E1BPPARNR - PARTN_NUMB" and "E1BPSCHDL - REQ_QTY". The sales order quantity is at "E1BPSCHDL - REQ_QTY" and it is the field that I want to update. When I look at the transaction code BD87, I see the status text as "Enter a document number between 0005000000 and 0005999999". I cannot update the order. How can I update it? Canybody explain me in a detailed manner?
    Thanks in advance....
    Edited by: Hikmet Akcali on Oct 21, 2009 4:00 PM

    At the IDoc type pop-up selection, there are 3 types. These are: ORD_ID01, ORDERS05 and /NFM/ORDERS05. SAP system component version is SAP ECC 6.0 . I choose ORD_ID01. There are structures EDI_Z1, EDI_Z3, EDI_Z5, EDI_Z9 and EDI_Z53. Where should I enter the number of the sales document to be updated? Also, which function module should I choose?
    Edited by: Hikmet Akcali on Oct 21, 2009 5:34 PM

Maybe you are looking for