BAPI_SALESORDER_CHANGE is not updating route.

Hi All,
I have tried updating the values of route for a particular sales order number. It is updating correctly if they have single line items .If they have multiple line items, only some of them are getting updated. In my case it is updating only the first 2 out of 4 line items. I have been debugging it fr a long time , couldnt get any lead on this.Please help me on this.
loop at li_order into lwa_order.
            clear lwa_ext_in.
            lwa_ext_in-structure = 'BAPE_VBAP'.
            assign lwa_ext_in-valuepart1 to <fs_bape_vbap> casting.
            <fs_bape_vbap>-vbeln = lwa_order-vbeln.
            <fs_bape_vbap>-posnr = lwa_order-posnr.
            <fs_bape_vbap>-zztruck_id = wa_output-truck_no.
            <fs_bape_vbap>-zzdrop_seq = wa_output-seq_no.
            append lwa_ext_in to li_ext_in.
            clear lwa_ext_in.
            lwa_ext_in-structure = 'BAPE_VBAPX'.
            assign lwa_ext_in-valuepart1 to <fs_bape_vbapx> casting.
            <fs_bape_vbapx>-vbeln = lwa_order-vbeln.
            <fs_bape_vbapx>-posnr = lwa_order-posnr.
            <fs_bape_vbapx>-zztruck_id = 'X'.
            <fs_bape_vbapx>-zzdrop_seq = 'X'.
            append lwa_ext_in to li_ext_in.
          endloop.
        endif.
        call function 'BAPI_SALESORDER_CHANGE'
          exporting
            salesdocument    = wa_output-vbeln
            order_header_in  = wa_order_header_in
            order_header_inx = wa_order_header_inx
          tables
            return           = i_return
            order_item_in    = i_order_item_in
            order_item_inx   = i_order_item_inx
            schedule_lines   = i_schedule_lines
            schedule_linesx  = i_schedule_linesx
            order_text       = i_order_text
            extensionin      = li_ext_in.

For the four line items im getting these messages.
ORDER_HEADER_IN has been processed successfully
ITEM_IN has been processed successfully
The sales document is not yet complete: Edit data
Standard Order XYZ 23232 has been saved

Similar Messages

  • Bapi_salesorder_change is not updated

    hai all
    i am handling a bapi_salesorder_change in which i am changing quantity field,after running alv program  i have to change the quantity field and by calling bapi it should get updated in database.but it is not happenng i am sending code please tell me solution
    WHEN 'PROCESS'.
        READ TABLE TB_OUTPUT INTO WA_OUTPUT WITH KEY  CHAR = 'X'.
          IF SY-SUBRC = 0.
        TB_HEADER-VBELN  = WA_OUTPUT-VBELN.
        TB_CHECK-UPDATEFLAG = 'U'.
        TB_ITEMNX-ITM_NUMBER = WA_OUTPUT-POSNR.
        TB_ITEMNX-TARGET_QTY = WA_OUTPUT-KWMENG.
         APPEND TB_ITEMNX.
        TB_ITEMNX2-TARGET_QTY = 'X'.
        TB_ITEMNX2-UPDATEFLAG = 'U'.
        APPEND TB_ITEMNX2.
         ENDIF.

    Hi,
    Just ensure all these points.
    You must enter the order number in the SALESDOCUMENT structure.
    You must always enter key fields for changes.
    You must always specify the update indicator in the ORDER_HEADER_INX.
    2. Commit control:
    The BAPI does not run a database Commit, which means that the application must trigger the Commit so that the changes are read to the database. To do this, use the BAPI_TRANSACTION_COMMIT BAPI.

  • Changes in poduction order,routing not updating in product cost estimate

    Dear SAP Gurus,
    i had done mto thru sale order and done some changes in production order,routing,and not updated the standard costestimate  of newly updated can anybody tell me the procedure of updating the routings and production  orders after production order released .
    pls help me the standard cost estimate how to get updated while changing the routing,production order.
    regards,
    muralidhar putta

    Hi Muralidhar,
    Could you please share with us how your problem was resolved. It may help others too.
    Thanks,
    Manjula.S

  • Route not updated on the delivery

    Hello Experts,
    A STO(UB document type) is created & saved. In the STO on the shipping tab Route by default is getting updated but when delivery is created for the same STO Route is not getting copied under Transport Tab.
    Can anyone please suggest & guide what could be the problem?
    Rgds
    Deepak Prabhu

    Hi Deepak,
                      First check whether the delivery tpe "NL"(OR CUSTOMIZED DELIVERY TYPE LIKE ZNL WHICH IS USED FOR THIS STO) does have a new route determination assigned to it in the Transaction "OVLO". If it has either B/C options assigned to it, new route determination will be carried out. But for the system to determine new route you should have the entries in "0VRF"(ZERO VRF) Transaction. To check If your delivery has the route assigned to it , go to the table "TROAZ" in SE16 and check If the route is getting determined. If you see that your route is getting determined, then system should normally find that route other wiase maintain the entries in "0VRF". Kindly please let me know If you need any more information on this. But Kindly please note that Route determination should be done using "Weight group". You can define weight groups in "OVS8". Once you do this , go to "0VRF" and maintain the route determination using weight group.
    Regards,
    Ram Pedarla
    Edited by: RamPedarla on Mar 8, 2010 4:34 PM

  • Bapi_salesorder_change alt UOM not updating

    Hello gurus,
    I am using BAPI_SALESORDER_CHANGE to change the sales order items data .
    In that i am passing Denominator (Divisor) for Conversion of Sales Qty and Numerator (factor) for conversion of sales quantity
    values to bapi structure fileds
    bapisditm-sales_unit = 'KG'
    'bapisditm-salqtyden','bapisditm-salqtynum'
    bapisditmx-salqtyden  = 'X',bapisditmx-salqtynum  = 'X' update flags.
    but the given values are not updating.it is updating what we define in the alternative uom values in unit of measure tab of mm01 transaction.
    kindly look into this.
    thanks in advance,
    padmaja.

    Hi
    Use the BAPI
    BAPI_TRANSACTION_COMMIT
    Regards
    Sagar

  • BAPI_SALESORDER_CHANGE - not updating ITEM CATEGORY(VBAP-PSTYV)

    Hi all,
    I have used bapi to change sales order  but the Item category(pstyv) is not updating .
    please tell me whether it needs to be passed to the bapi structure , if passed then how to retrieve (table) the item cateogry(pstyv) for the material.
        CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
                EXPORTING
                  salesdocument               = e_vbeln
                 ORDER_HEADER_IN             = wa_hdr
                  order_header_inx           = wa_hdrx
                tables
                  return                     = i_ret
                 ORDER_ITEM_IN               = i_item
                 ORDER_ITEM_INX              = i_itemx
                 SCHEDULE_LINES              = i_sch
                 SCHEDULE_LINESx             = i_schx
                  EXTENSIONIN                = i_parex.
              endif.
    please help me out.

    Hi,
    I think if you use FM BAPI_SALESORDER_CHANGE, you have to explicitly specify the field and its value you want to change. So put the value you want in the field ORDER_ITEM_IN-ITEM_CATEG and also "X" to ORDER_ITEM_INX-ITEM_CATEG and see what happen.
    Hope it helps,
    Chang

  • BAPI_SALESORDER_CHANGE field REF_DOC (VGBEL) not updated

    Hi,
    I use BAPI BAPI_SALESORDER_CHANGE to update link between sales order and contract. It means updated field VGBEL (for VBAK and VBAP)
    It works fine for sales order header : VBAK-VGBEL is updated.
    But it doesn't work for VBAP-VGBEL.
    I have tried to update other fields on vbap with the BAPI and it works fine.
    I copy bellow source code used (it is a test program)
    Do you have any ideas why VGBEL is not updated?
    thanks in advance for your help.
    Luc
    source code:
    REPORT ZLM01 .
    tables vbak.
    Tables and structures used in BAPI
    DATA : wt_order_header_in  LIKE bapisdh1,      " Order Header Fields
           wt_order_header_inx LIKE bapisdh1x.   " Order Header checkbox
    DATA : t_bapiret            LIKE bapiret2   OCCURS 0 WITH HEADER LINE.
    DATA : t_bapiret2           LIKE bapiret2   OCCURS 0 WITH HEADER LINE.
    DATA : s_bapiret2           LIKE bapiret2   OCCURS 0 WITH HEADER LINE.
    DATA : wt_order_item_in    LIKE bapisditm  OCCURS 0 WITH HEADER LINE.
    DATA : wt_order_item_inx   LIKE bapisditmx OCCURS 0 WITH HEADER LINE.
    DATA : wt_partnerchange    LIKE bapiparnrc OCCURS 0 WITH HEADER LINE.
    DATA : wt_schedule_in      LIKE bapischdl  OCCURS 0 WITH HEADER LINE.
    DATA : wt_schedule_inx     LIKE bapischdlx OCCURS 0 WITH HEADER LINE.
    DATA : wt_sales_text       LIKE bapisdtext OCCURS 0 WITH HEADER LINE.
    clear : wt_order_header_in , wt_order_header_inx, t_bapiret2.
    Header
    wt_order_header_inx-updateflag = 'U'.
    wt_order_header_in-refdoc_cat  = 'G'.
    wt_order_header_inx-refdoc_cat = 'X'.
    wt_order_header_in-ref_doc     = '0040001508'.
    wt_order_header_inx-ref_doc    = 'X'.
    *ligne 1
    wt_order_item_in-itm_number  = '000010'.
    wt_order_item_inx-itm_number = '000010'.
    wt_order_item_inx-updateflag = 'U'.
    wt_order_item_in-ref_doc     = '0040001508'.
    wt_order_item_inx-ref_doc    = 'X'.
    wt_order_item_in-ref_doc_it     = '000010'.
    wt_order_item_inx-ref_doc_it    = 'X'.
    append wt_order_item_in.
    append wt_order_item_inx.
    call function 'BAPI_SALESORDER_CHANGE'
         EXPORTING
              salesdocument    = '0000025246'
              order_header_in  = wt_order_header_in
              order_header_inx = wt_order_header_inx
         TABLES
              order_item_in   = wt_order_item_in
              order_item_inx  = wt_order_item_inx
              return           = t_bapiret2.
    loop at t_bapiret2.
    write :/ t_bapiret2.
    endloop.
    call function 'BAPI_TRANSACTION_COMMIT'
         EXPORTING
              wait   = 'X'
         IMPORTING
              return = s_bapiret2.
    move-corresponding s_bapiret2 to t_bapiret.
    append t_bapiret. clear t_bapiret.

    i give one example :
    pass SCHEDULE_LINES .
    REPORT  ZSALESORDER_CHANGE MESSAGE-ID 38.
    Selection Screen Definitions *
    PARAMETERS: p_vbeln TYPE vbap-vbeln OBLIGATORY, "Order Number
    p_posnr TYPE vbap-posnr OBLIGATORY, "Order Item
    p_etenr TYPE vbep-etenr OBLIGATORY, "Schedule Line
    p_reqqty TYPE bapischdl-req_qty OBLIGATORY. " Order Qty
    Internal Tables/Structures/Variables for calling BAPI. *
    DATA: i_hdr TYPE bapisdh1,
    i_hdrx TYPE bapisdh1x,
    i_ret TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
    wa_ret TYPE bapiret2.
    DATA: BEGIN OF i_sched OCCURS 10.
    INCLUDE STRUCTURE bapischdl.
    DATA: END OF i_sched.
    DATA: BEGIN OF i_schedx OCCURS 10.
    INCLUDE STRUCTURE bapischdlx.
    DATA: END OF i_schedx.
    START-OF-SELECTION Event *
    START-OF-SELECTION.
    *" Initialize internal tables.
    REFRESH: i_sched, i_schedx, i_ret.
    CLEAR: i_sched, i_schedx, i_ret.
    *" Fill required ORDER_HEADER_IN data.
    i_hdrx-updateflag = 'U'.
    *" Fill required SCHEDULE_LINES data.
    i_sched-itm_number = p_posnr.
    i_sched-sched_line = p_etenr.
    i_sched-req_qty = p_reqqty.
    i_schedx-updateflag = 'U'.
    i_schedx-itm_number = p_posnr.
    i_schedx-sched_line = p_etenr.
    i_schedx-req_qty = 'X'.
    APPEND i_sched.
    APPEND i_schedx.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    salesdocument = p_vbeln
    order_header_in = i_hdr
    order_header_inx = i_hdrx
    TABLES
    return = i_ret
    schedule_lines = i_sched
    schedule_linesx = i_schedx.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    LOOP AT i_ret.
    WRITE / i_ret-message.
    ENDLOOP.

  • Route schedule not updated in some line item of a sales order

    Hi Gurus,
    All order are processed through the EDI interface automatically. Order
    XXXXXXXXX for USA customer 40000XXXX is maintained in route reschedule
    setup T-code VL52 on specific departure day thursday.
    above are line item of same sales order, with same shipping point and route .
    Why only some salesorder lines missing the route schedule ?? 
    Please Help
    Regards
    Abhilash

    When you post a query here, you need to have patience until some members go through your post.  Please dont expect somebody should respond to you immediately as everybody has their own priorities.
    Coming to your query, it could be due to many reasons as per the following note:-
    Note 1750978 - Route Schedule does not populate on sales order
    Go through the Resolutions given in the above note and check with your system
    G. Lakshmipathi

  • Sale Order change BAPI - Storage loc not updated

    Hi Everybody,
    Iam using "BAPI_SALESORDER_CHANGE", to change the sale order items.
    First iam calling above bapi with switch B, for new pricing & then second time for material change.
    When i change any material number, it is getting updated correctly.
    But the storage location, even though iam passing in the bapi it is not updated, & is blank - updation flag is also passed.
    When i execute sale order change again it is updated - ie, for any material change for first bapi call, storage loc is not updated - for 2nd bapi call storage loc is updation - for same input in both the cases.
    Is there any way to update the storage loc is first call of sales order change bapi.
    Below is the parameters iam passing in bapi :
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          SALESDOCUMENT      = LS_SALESDOCUMENT
          ORDER_HEADER_IN    = LT_HEADER_IN
          ORDER_HEADER_INX   = LT_HEADER_X
        TABLES
          RETURN                            = LT_RETURN
          ORDER_ITEM_IN               = LT_ITEMS
          ORDER_ITEM_INX             = LT_ITEM_X
          ORDER_CFGS_REF          = LT_CFGS_REF
          ORDER_CFGS_INST         =  LT_PARTS
          ORDER_CFGS_VALUE     = LT_VALUES
          ORDER_CFGS_BLOB        = LT_CUBLOB
          ORDER_CFGS_VK            = LT_CUVK
          ORDER_CFGS_REFINST   = LT_CUREF
          SCHEDULE_LINES            = LT_SCHEDULE_L
          SCHEDULE_LINESX         = LT_SCHEDULE_X
          ORDER_TEXT                   = LT_TEXT
          CONDITIONS_IN                = LT_CONDITION_L
          CONDITIONS_INX              = LT_CONDITION_X.
    Any help is appreciated.
    Regards,
    Nagarajan.J

    Hi,
    Storage location is updated only when same sale order bapi is called another time with required details.
    rgs,
    Nagarajan J

  • HT201210 Iphone 4s will not update to iOS 7.  Says an error occurred.  I have to plug my phone into the computer also because it will not connect to home wifi.  All other devices will connect to wifi though.  I have enough storage to update also.

    My iphone 4s will not update to ios 7.  I'm trying to update this through my imac because the iphone will also not connect to my home wifi.  I've tried several different things but nothing is working.  I deleted enough pics and apps so there is enough storage.  When i plug it in, it starts to bring all my photos to the imac. I cancel this because i don't want it.  It then says extracting software, backing up iphone, then i get the error message.  Do I need the iphone 5?

    I just tried again, no code comes up on the imac.  Just says cannot back up this device with my "initials" because of an error.  It's weird because my iphone has been connected to othert wifi sources in the past. I've looked through these forums and have tried multiple things like resetting the phone, resetting network, shutting off modem and router, nothing works.  I have an apple airport extreme router too.  Any suggestions are greatly appreciated.

  • Financial document - Letter of credit not updated

    Hi ,
    The financial document ( LC) open value is not updated in vx13n after the PGI  and billing even though accounting document is generated in both the cases.
    We have assigned the financial document at the item level in the sales order.
    Aslo we have tried the cycle where i have assigned the LC in header details .
    In both the cases its not getting updated .
    Can you please guide how can it can be done .

    Got solution.
    updated settings in the credit limit check. Automatic credit check with routing updated in the config. now open values are updating in the fin.documents

  • Billing type is not updating in COPA table

    HI Gurus
    Billing type is not updating for few billing documents in ECC COPA table CE11000 but for few documents billing type is updating correctly in ECC COPA table CE1100
    Example 1 for billing document 10351144 billing type is not updating in ECC COPA table  CE11000 billing type ZDN 
    Example 2 for billing document 10354965 billing type is updating in ECC COPA table  CE11000
    Billing type is same for the both billing documents but its updating for one document and it is not updating for another document
    Please help me to find out the rout cause

    hi,  can your replay the problem in your system?
    if so , I suggest you to set a user breakpoint in ERP  function BAPI_ACC_DOCUMENT_POST, (the user need to use the Middleware user not your foreground login user)
    And when billing document inbound to ERP, SAP will call the function. then you can check if the CO-PA fields has been filled correctly or not.

  • Applications not updated

    My Ipod Touch is less than one week old, it worked fine for 2 days. Then no update on any application although the Wifi is ON.
    Wifi is on. Password has been accepted. Network screen provides IP Address Subnet Mask Router and DNS - Search Domain and Client ID are left blank.
    All existing applications, Weather, Stocks, ... are not updated.
    I have tried to do a full restore. This does not solve the problem.
    Has anyone got a solution to my problem.

    There is no auto update, you have to go the App store and check updates. On the main screen under app store will be a red circle with a number in it that tells yo how many apps need updating. It's best to update when on WIFI, no data usage.

  • Measuring point/document is not updating

    Dear all,
    I am  new in PM. I have one issue over here.Measuring point/document is not updating automatically after production order confirmation via co11n . I tried with following steps
    1) Created the equipment as (P)Production resources/tools -->created measuring point as a counter ---> maintain the usage value formula SAPF02 in the PRT tab . Unit of measurement for the characteristics and base unit of measure of material are same
    2) Then i have assigned this equipment as a PRT in the routing of material .
    3) Production order confirmation via co11n  Each unit
    Which steps i am missing. if u give me steps by steps procedure to me for counter based maintenance, its helpful for me.
    STILL not answered and no reply.
    I am waiting for reply.
    Thanks
    tarun
    Edited by: tarun on Oct 5, 2010 5:06 PM

    Hello,
    Have look this thread [Re: Auto Update of measuring point/document;
    Regards,
    Rakesh

  • Problem with ios certificate server not updating the CRL

    Hi all,
    The background is that i'm currently setting up a DMVPN solution with the ipsec tunnels between the spokes created using certificates.
    I'm using a cisco 877 as the CA server (its running 12.4(6)T5) to provide the certificates to the spoke routers. This part is working fine - the spokes can request a certificate and get one issue all well and good.
    The problem is on the CA, the CRL lifetime is set to 24 hours but the CA is not updating the CRL so when the spokes look for the revocation list (as set in their trustpoint) they are reporting an error that the CRL is out of date and won't connect.
    If is do a '#sh crypto pki server' it lists a 'CRL NextUpdate timer. this has a timestamp that is 24 hours after the last certificate was revocked. The only way i can get the CRL to be re-generated is to revoke a certificate.
    So, my question is, have i missed something here? I thought the CA would automatically generat a new CRL file every 24hours.
    Can anyone help?
    thanks.

    Hi Mark (?)
    this seems to match this bug:
    CSCsy95838    IOS CA: CRL not updated, update timer no started
    However it does not mention if 12.4(6)T5 is affected, only that it was found in 12.4(15)T3 and resolved in 12.4(15)T10 and other more recent releases.
    I would suggest trying the latest 12.4(15)Tx, 15.0(1)Mx or 15.1(4)Mx release if you can.
    I supposed you've though of it, but just in case: as a workaround you can disable the CRL check on all the DMVPN routers, obviously they will still allow connections from routers with a revoked spoke.
    As a (temporary?) replacement for a CRL, you could use a "certificate ACL" with which you can kind of create a "manual local CRL" :
      crypto pki certificate map certACL 10
       serial-number ne
       serial-number ne
       etc.
      crypto pki trustpoint myTP
       match certificate certACL
    (note the "ne" stands for "not equal" so you are permitting any certificate whose serial number is not listed)
    Obviously you would have to configure (and maintain!) this on each router participating in the DMVPN so this is cumbersome, but I suppose if you don't often revoke certs it might be an option.
    hth
    Herbert
    If this post answers your question, please click the "Correct Answer" button

Maybe you are looking for

  • How do i add a signature to my texts?

    I have a bb 8330. is it possible to add a signature to the texts? if it is then how? Solved! Go to Solution.

  • Data trim in oracle 9i

    I need to load the data from incoming file or table and one of the column contains data like AB01, AB02, AB03, AB04, AB05, AB06, AB07, AB08, AB09 and I need to load the data for this column as AB1, AB2, AB3, AB4, AB5, AB6, AB7, AB8, AB9 not like orig

  • How to extract Loan Data from HR module

    Hi Experts, I want to extract Loan data from HR module. Can anyone tell me what are the Data sources I can use, The Loan InfoType is 0045, passed on this I have created one generic DS but it is not working correctly, some values are it is missing. Ho

  • ISE MAR in a Kiosk Environment

    Situation: Windows native supplicant configured for "Machine or User authentication." ISE configured for MAR with cache timeout of 24 hours. Questions in Red: 1. Every morning Machine boots and successfully authenticates wiht 802.1X.   Machine dACL p

  • Performance costs of throwing an Exception

    Hi people. I was just reading another post around here, and I became curious about how much the Exception mechanism could become an overhead... I made a simple (REALLY simple) little test class, and I was shocked to perceive that actually throwing an