How to update sale order haeder conditions

hi
how to update header conditions using sale order bapi ' create from data 2'.
regards
Siva Shanmugam.A.V.

u can use  'BAPI_SALESORDER_CHANGE'
and see the following link
http://abap.wikiprog.com/wiki/BAPI_SALESORDER_CHANGE
Edited by: krupa jani on Nov 25, 2008 11:15 AM

Similar Messages

  • How to update Sales Order status using  BAPI_SALESORDER_CHANGE

    Hi,
    I want to update Sales Order status using BAPI_SALESORDER_CHANGE, this BAPI is called from middle ware, but there is no parameter to pass the status value to this function, please help me how to update sales order status using BAPI only.
    Thanks
    RK

    Hi,
    Can u give me details of what status u would like to update in sales order.
    If we are able to update the status from VA02, Then BAPI will assist for the same.
    Regards.

  • How to update sales orders using B1WS in SAP 8.8 PL18

    Hello all.
    We are having a problem updating sales orders using Sap Business One Web Service ( B1WS ).
    We are running SBO 8.8 PL18, MS-SQL 2008, and all is fine when using the SBO client.
    But when it comes to updating sales orders through B1WS we just cannot get it to work.
    We can add new orders easily without problems. Updating orders always gives this error:
    \[ORDR.PayDuMonth\]\[line: 0\] , 'Field cannot be updated (ODBC -1029)'
    We have checked and verified multiple times that our setup is correct.
    Also the WDSL files are verified.
    We can update orders just fine using the sboclient.
    And using B1WS we can basically do everything, besides updating.
    We have also tried this on different company db's, so we are quite sure this is not
    something related to some general setting we missed, but who knows?
    We have tried different ways to "assemble" the order before updating, but it always
    ends with the above error.
    Here is an example of one of the tests, where we load an order by docentry,
    increment the quantity of all open lines by '1', and then try to update it.
            protected void Page_Load(object sender, EventArgs e)
                // First we login
                string sessionId = "";
                LoginService.LoginService l_login = new LoginService.LoginService();
                LoginService.LoginDatabaseType l_dbtype = LoginService.LoginDatabaseType.dst_MSSQL2008;
                LoginService.LoginLanguage _lang = LoginService.LoginLanguage.ln_English;
                string _server = "SAP-8_8PL18";
                string _licserver = "SAP-8_8PL18:30000";
                string _db = "my_test_company";
                string _user = "manager";
                string _pass = "********";
                try
                    sessionId = l_login.Login(_server, _db, l_dbtype, true, _user, _pass,
                               _lang, true, _licserver);
                catch (Exception ex)
                    Response.Clear();
                    Response.Write(ex.Message);
                    Response.End();
                if (sessionId == "")
                    Response.Clear();
                    Response.Write("No sessionId");
                    Response.End();
                // We are logged in and have a sessionId
                // Now load a valid open order by docentry
                try
                    OrdersServiceRef.OrdersService orderService = new OrdersServiceRef.OrdersService();
                    orderService.MsgHeaderValue = new OrdersServiceRef.MsgHeader();
                    orderService.MsgHeaderValue.SessionID = sessionId;
                    orderService.MsgHeaderValue.ServiceName = OrdersServiceRef.MsgHeaderServiceName.OrdersService;
                    orderService.MsgHeaderValue.ServiceNameSpecified = true;
                    OrdersServiceRef.DocumentParams docParams = new OrdersServiceRef.DocumentParams();
                    docParams.DocEntry = 31; // Docentry of a known open order
                    docParams.DocEntrySpecified = true;
                    OrdersServiceRef.Document order = orderService.GetByParams(docParams);
                    OrdersServiceRef.DocumentDocumentLine line = null;
                    for (int i = 0; i < order.DocumentLines.Length; i++)
                        line = order.DocumentLines<i>;
                        if (line.LineStatus == OrdersServiceRef.DocumentDocumentLineLineStatus.bost_Open)
                            line.Quantity += 1;
                    orderService.Update(order);
                catch (System.Web.Services.Protocols.SoapException ex)
                    Response.Clear();
                    Response.Write(ex.Message);
                    Response.End();
                catch (Exception ex)
                    Response.Clear();
                    Response.Write(ex.Message);
                    Response.End();
                Response.Clear();
                Response.Write("All OK");
                Response.End();
    I hope that someone has an idea as to why this happens.
    The customer often changes quantity or adds lines on their orders,
    and the only way to solve it so far has been to make a new order and
    close the old one.
    Thanks in advance
    J. Thomsen

    Hi,
    Welcome you post on the forum.
    Have you checked if you only update a specific line instead of a loop?
    Thanks,
    Gordon

  • How to update Sales Order Delivery Block while saving Delivery ?

    Hi,
    I have a requirement wherein i need to update sales order delivery block field(VBAK-LIFSK) while saving the delivery for the order.
    Also I need to remove this block while execution of  Backorder Rescheduling program SDV03V02 (Tcode : V_V2),
    Can anybody help me out in this?
    regards,
    Nitin

    HI,
    try using BAPI_SALESORDER_CHANGE
    pass ur vbeln in SALESDOCUMENT
    pass an 'X' to    BAPISDH1-DLV_BLOCK
    and 'X' to        BAPISDH1X-DLV_BLOCK
    Also add the UPDATE task clause, you will want to set the flag only when delivery is being saved, not before that.

  • How to update sales order number (KAUFN) characteristic in the profitability segment of the PA document created at the time of service entry sheet confirmation, as a result of shipment cost document

    Hi,
    We have a scenario wherein we create shipment cost documents against delivery. As a result of shipments fully transferred, a PO for freight vendor is automatically created and a service entry sheet confirmation happens. As a result of service entry sheet confirmation, we have Financial accounting, Controlling and profitability analysis documents created. We have a requirement wherein we need to have the characteristic “sales order number (KAUFN)” populated in the profitability analysis document created as a result of service entry sheet confirmation.
    Could someone please advice how could this be attained in COPA. Thanks for your help in advance.
    Regards,
    Sandeep

    Hi Ajay,
    Thank you for the quick update.
    The document is updated to COPA through OKB9 settings. The profitability segment is updated with fields like customer, product, company code, plant, sales area data, profit center, etc; however the sales order number is missing.
    Could you please elaborate further how could FI substitution be implemented to call for the FM COPA_PROFITABILITY_SEGMENT through user exit? Are you recommending the substitution through GGB1? What could be the possible validation to call for the user exit to be implemented?
    Regards,
    Sandeep Kulkarni

  • How to validate sales order by condition type ?

    Can we validate sales order(VBELN)  by condition type(KSCHL/KSCHA) ??
                                                           OR
    Is there any table which has both the fields sales order (VBELN) and  condition type(KSCHL/KSCHA) ?

    Well You can use table VBAK  to get the field KNUMV for every respective Sales Order then go to KONV to get the KNUMH for each KNUMV, there itself u will get the pricing conditions applicable for a particular Sales Order.
    Hope This Helps...

  • Sales order pricing conditions

    Can any one let me know what are the tables that are updated while working with sales order pricing conditions .......      r sales order conditions

    Hi Ali,
    VBRK     Billing document :header data
    VBRP     Billing document :Item data
    KONH      Conditions header
    KONP     Conditions items
    KONV     Procedure ( billing doc or sales order)
    KOND     Conditions (data)
    These tables will give sufficient information on Sales order pricing and its billing conditions etc.
    best regards
    Ramakrishna

  • Tax code entry in sales order item conditions  from excel template

    Hi experts ,
    I have a requirement , in which  tax code in sales order item conditions should be determined from an excel template.
    A Z transaction will fetch values from the template & create sales order in which tax code will be detrmined from the template only, irrespective of the value maintained in condition records.
    Kindly suggest the way, how this can be implemented. Currently tax code field in item conditions of sales order is greyed out and hence cann't be maintained directly in sales order.
    Is there any user exit which can take values from excel template & populate tax code in sales order, bypassing condition records?
    Thanks in advance,
    Vimal

    Hi Vimal,
        I don't understand why you want to read tax code from excel, bcoz what ever criteria you are trying to determine the tax code from excel sheet you can build a condition table and arrive at the appropriate tax code with condition technique.
    Just think, if you some how achieve to get the tax code to pick up from the excel sheet, what will happen if you want to change the order after few days or create a subsequent document? the system will try to read the record from the condition records and may go for a toss.
    My opinion is, suggest the user/business to use the condition technique and build your condition tables with all possible options and arrive at the tax rate and tax code.
    If you still want to go ahead with bespoke develpoment, request you to further specify your requirment so that someone can help you.
    I don't think it is the right idea to reinvent the wheel again.
    Regards
    Raj

  • How to block sale order

    Hi
         Can anybody clarify me how to block sale order at material level (One sale order for no. of materials).  While searching for it got solution using XD05 Tcode which blocks at customer level. For my scenario one customer having more than one material.  How to block it?
    Regards,
    K.V.Manikandan

    HI,
    Listing and exclusion functionality are used to block customer for particular material which is readily available in standard SAP.Use standard exclusion type B001 and create condition record for all customer material combination for which you want to block the customer,
    Path: Spro-IMG-Sales and distribution-basc function-listing and exclusion:
    Second way:  You can also block particular customer at sales area level by assign 01 at sales org level against field "DChain-spec. status'
    This will resolve your problem if you want to block the material for particular customer.
    Regards
    Jitendra singh

  • Updating sales order pricing after partial delivery

    I have a requirement where due to an enhancement being implemented I need to be able to update the item pricing on the sales order after the item has been partially-delivered. Currently the standard system
    controls do not allow access to the Update Pricing button in the item conditions tab after a partial delivery for the item. Is there any way around this using the standard functionality?
    Regards
    BK GAIKWAD

    Dear,
           For update in sales pricing after delivery you require to reverse and delete delivery.
          Without delivery deletion it is not possible to update sales order's price.
          One more option is you can update your price in billing if you can not accounting of invoice.
    Regards,
    Sandip

  • How to get sales order data in substitution of fi-docu from GM posting ?

    How to get sales order data in substitution of FI documents from goods movement posting?
    When I posting a material document with movement type "501E", the system will creating a FI document automatically. And I need to get the sales order data in the substitution of FI document.
    I tried to export the data of the material document in user-exit "MB_CF001 Updating of material document data upon posting", but this user-exit does not triggered in the posting process at all. what's the problem?
    Do you have better solution or idea for this? Please help me. Thank you!

    Hello Harish,
    Please use BAPI_BUSPROCESSND_GETDETAILMUL to read details of sales order. This works as a remote enabled counterpart of CRM_ORDER_READ.
    Similarly if you want to display sales order from R/3, use FM BAPI_BUSPROCESSND_DISPLAY.
    Regards
    Kaushal

  • How to create sales order using bapi( test purpose)

    Hi all,
           while i was creating sales order using the BAPI_SALESORDER_CREATEFROMDAT1 it is giving some error,
    version 0 is not defined for the fiscal year ****.
    I have given the fallowing parameters as input
    ORDER_HEADER_IN
         DOC_TYPE     OR
                    SALES_ORG  1000
         DISTR_CHAN  10
                    DIVISION         00
    ORDER_PATNERS
         PARTN_ROLE     SP
         PARTN_NUMB     1000
    ORDER_ITEMSIN
         MATERIAL     M-13
    I need to create sample sales order . Please help me how to create sales order with an example( for test purpose).
    Regards
    Deviprasad.

    Hi Prasad,
    Try using BAPI_SALESORDER_CREATEFROMDAT2.
    While creating sales order using FM: BAPI_SALESORDER_CREATEFROMDAT2, please make sure ORDER_ITEMS_IN, ORDER_ITEMS_INX, ORDER_SCHEDULES_IN, ORDER_SCHEDULES_INX.
    Pricing Conditions will not be mandatory to create a sales order via BAPI.
    As you were saying, you can create a sales order but not with items. Do populate the internal tables that i have specified above.
    Also try to pass the item number internally, this will help you in identifying the schedule lines.
    Regards,
    Priyanka.

  • How to compare sale order bom and production order bom.

    i would like to provide report with respect to comparation of sale order bom and production order bom, but i am not familiar with SD and PP, can anyone give me some clue? i only know sale order bom is created via 'CS61', afterwards run mrp to get production order, the process appears complicated, i needn't know the process detail, just want to know how to get sale order bom and relative production order bom. please guide me.

    Hi,
    Check Tcode:CS14 to SD/PP BOM's
    Chidambaram

  • Update Sale Order Header Text through Enhancement

    Hi Experts,
             I Have a requirement to update the sale order Header Text , when the sale order is opened in VA02 and saved.
    Here in I tried using edit_text, it updates sale order header text  directly in DB during run time even before the save action is completed.
    But I need to just fill the header text and that has to be saved during the save action only.
    I tried coding the same in the user exit (userexit_save_document) but this user exit gets triggered only when there is some changes made to the document when opened in VA02 & Saved.
    Is there any  user exist to pass sale Order Header text and save when save button is clicked irrespective of the document been changed or not.
    Thanks in advance
    Sathish

    Hi Brad Bohn,
        My actual requirement is to trigger an Idoc when the user goes to VA02 transaction and clicks save.
    IDoc gets triggered only when there is some changes to that document, that is through NAST table entry based on the output configurations in NACE transaction.
    Now that the user wants to trigger an IDoc even if there is no change (ie. to reprocess the IDoc) when he just opens a sale order in VA02 and click save.
    It is not possible to trigger an IDoc through configurations when there is no actual change in VA02 and saved.
    So it has to be forcefully sent by making some additions to the Order through coding, so I choose that Text box to fill some additional data and save .
    Kindly Let me Know any thing could be done for this scenario.
    Thanks in advance
    Sathish

  • Error while updating Sales Order : Another user Modified Table (RDR1 )

    Hi All,
    I am getting an error message while running the following steps.
    Steps
    1)     Pull an entry from sales order.
    2)     Add new data to line.
    3)     Update the sales order.
    a)     Sap updated the data.
    b)     Through code using DI API we updated some UDF.
    4)     With out closing / Pressing OK button…
    5)     We added new data to line.
    6)     Then Press update.
    An Error will through by B1 as “Another user modified the table(RDR1 ).” Before going to the code where we are handling the update of UDF.
    But after the 3rd step above when we do
    4) Close the window or pressed ok
    5)  take the sales order window again pull the data
    6) Add new Data to line.
    7) Update sales order then it will go smoothly.(Updating by B1 and from code )
    Can anybody tell me why this happens?And any workarounds to solve this?
    Deepesh

    are u adding a matrix row thru the code? I get this error when I am adding rows and I get the rownumber out of sync.
    if so get the max (lineid) from rdr1 and then check against the matrix.rowcount before adding a row. if lineid is greater that matrix.rowcount take lineid + 1 and assign it to the matrix.row, else take the rowcount + 1
    if not, and as a workaround, then you can try using the SBO_SP_transactionnotification stored procedure.

Maybe you are looking for