BPL Sales orders: Updating index tables

Hello forum,
After using BPL to copy sales orders, index tables are not updated. Examples of these tables are VAKPA (sales index by partner function), VAPMA (sales index by material), VLPMA (deliveries by material) or VRPMA (billing documents by material).
To correct this what we do is run program RVV05IVB (Reorganization of SD Document Indices) but this report is very time consuming. (it is not that easy to know the documents numbers for all sales / deliveries / billing docs that were copied so we have to run the report for all documents; even if we knew the document numbers, though, the report is very slow because these tables do not have an index by document).
Is this the way to do it, or are other people working differently?
Or should these tables be included in the context?
Thanks in advance,
Rui Dantas

>
Nico Gaertner wrote:
> Alternatively you can also create this index on the receiver side and connect these tables with the Table VBUK in the BPL datamodel.
> Nico
In this case you mean sender system, right?
The access won't be that bad if you choose the right table to link: VBAP-MATNR for VAPMA, or VBPA-KUNNR + VBPA-PARVW for VAKPA. I'll try in our system.
It would be even better, of course, if we could link from more than one table (e.g. VBAK + VBAP to VAPMA). This is not possible, right?

Similar Messages

  • Sales Order update in APO

    Hi,
    We have a z-program in ECC which is triggered once sales order is saved. As of now we have maintained a nominal delay (30 secs) in the program to take into account sales order update to APO (as we are fetching some key information from APO based on SO update to APO).
    So instead of maintaing the delay in the program, is it possible to check that the sales order specific CIF queue is processed successfully and then that is taken as a trigger point to execute the program in ECC.
    Regards,
    YR

    Hi Babu,
    thanks for your reply...
    One last query before I close this thread.
    Can this queue processing in table TRFCQIN be mapped as a 'trigger event' in case it is successful to initiate the program on ECC side with reference to the specific sales order ?
    YR

  • Sales order updation if master data is incomplition

    is there any solution for sales order updation if master dat is incomolish.
    Ex.we r created material master without account assingment group. while creating sales order it is showing in incomplition for gl a/c and we saved it. and we made POs on order.
    now with out deleting POs i want clear the sale order
    thanks
    sreenivas

    Hi,
    You have two options
    1) Goto Material master data maintain account assignment group.
    2) create billing document for that sales order. In billing Item level, click on item details tab.
        In accounting segment select material account assignment group and save it. System will create  accounting   document.
    If you don't maintain any account assignment group in material master, system will give incomplete message in sales order, complete the G/L account.  You don't want to maintain account assignment group in material master then choose table '2' in VKOA and maintain G/L accounts. so system will not give any incomplete messages at sales order level.
    Chandra

  • Sales order changes history table

    hi.........
    i wann field for user name from sales order change history table. i hv tried CDHDR and CDPOS, but i cound't get the exact link in those tables.
    will u tel me any other table, so that i can get this field by passing sales order ?

    Hi subharao,
    Go though this program.
    REPORT zmm_rep_poh NO STANDARD PAGE HEADING LINE-SIZE 250 LINE-COUNT 65.
    TABLES: cdhdr,cdpos,ekko,ekpo.
    TYPE-POOLS : slis.
    DATA       : t_fieldalv     TYPE slis_t_fieldcat_alv.
    DATA       : import_variant LIKE disvariant.
    DATA       : xrepid         LIKE sy-repid.
    DATA       : layout         TYPE slis_layout_alv.
    DATA: BEGIN OF itab OCCURS 0,
            fname(40) ,
            objectid(10),
            changenr(10) ,
            value_new(10),
            value_old(10),
            unit_old(10),
            unit_new(10),
            cuky_old(10),
            cuky_new(10),
            key(5),
            username(10),
            udate LIKE cdhdr-udate,
            utime LIKE cdhdr-utime,
          END OF itab.
    DATA iebeln(15).
    DATA: BEGIN OF itab1 OCCURS 0,
            username(10),
            udate LIKE cdhdr-udate,
            changenr(10),
            utime LIKE cdhdr-utime,
          END OF itab1.
    DATA: BEGIN OF itab3 OCCURS 0.
            INCLUDE STRUCTURE itab.
    DATA: END OF itab3.
    DATA iekko LIKE ekko OCCURS 0 WITH HEADER LINE.
    *Select Option
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_ebeln FOR ekpo-ebeln OBLIGATORY,
                     s_ekorg FOR ekko-ekorg NO INTERVALS DEFAULT '77IN',
                     s_bukrs FOR ekko-bukrs NO INTERVALS DEFAULT '77IN'.
    SELECTION-SCREEN END OF BLOCK b1.
    *INITIALIZATION.
    for alv field catalog definition.
      PERFORM initial_alv_fieldcat CHANGING t_fieldalv[].
    START-OF-SELECTION.
      SELECT * INTO iekko
      FROM ekko
      WHERE ebeln IN s_ebeln AND ekorg IN s_ekorg AND bukrs IN s_bukrs.
        APPEND iekko.
      ENDSELECT.
      LOOP AT iekko.
        SELECT username udate changenr utime
        INTO   (itab1-username,itab1-udate,
               itab1-changenr,itab1-utime)
        FROM  cdhdr
        WHERE objectid EQ iekko-ebeln.
          APPEND itab1.
        ENDSELECT.
      ENDLOOP.
      LOOP AT itab1.
        SELECT objectid changenr fname value_old value_new unit_old unit_new
               cuky_old cuky_new
        INTO  (itab-objectid, itab-changenr, itab-fname,
              itab-value_old,itab-value_new ,itab-unit_old, itab-unit_new,
              itab-cuky_old,itab-cuky_new)
        FROM  cdpos
        WHERE changenr = itab1-changenr.
          IF sy-subrc = 0.
            itab-username = itab1-username.
            itab-udate    = itab1-udate.
            itab-utime    = itab1-utime.
            APPEND itab.
          ENDIF.
        ENDSELECT.
      ENDLOOP.
    delete itab where fname eq 'KEY'.
      sort itab by fname.
    delete ADJACENT DUPLICATES FROM itab comparing all fields.
      LOOP AT itab.
        IF itab-fname = 'ZTERM'.
           itab-fname = 'Payment Terms'.
          MODIFY itab.
        ELSEIF itab-fname = 'AEDAT'.
               itab-fname = 'Date'.
          MODIFY itab.
        ELSEIF itab-fname = 'EFFWR'.
               itab-fname = 'Effective Value'.
          MODIFY itab.
        ELSEIF itab-fname = 'MENGE'.
               itab-fname = 'PO Quantity'.
          MODIFY itab.
        ELSEIF itab-fname = 'BRTWR'.
               itab-fname = 'Gross Order Value'.
          MODIFY itab.
        ELSEIF itab-fname = 'NETWR'.
               itab-fname = 'Net Order Value'.
          MODIFY itab.
        ELSEIF itab-fname = 'PROCSTAT'.
               itab-fname = 'Purchasing Doc processing state'.
          MODIFY itab.
        ELSEIF itab-fname = 'FRGSX'.
               itab-fname = 'Release Strategy'.
          MODIFY itab.
        ELSEIF itab-fname = 'FRGKE'.
               itab-fname = 'Release Ind. Pur. Doc'.
          MODIFY itab.
        ELSEIF itab-fname = 'ZBD1P'.
               itab-fname = 'Cash Discount Perc 1'.
          MODIFY itab.
        ELSEIF itab-fname = 'ZBD1T'.
               itab-fname = 'Cash Discount Days'.
          MODIFY itab.
        ELSEIF itab-fname = 'ZBD2T'.
               itab-fname = 'Cash Discount Days'.
          MODIFY itab.
              ELSEIF itab-fname = 'KEY'.
               itab-fname = 'Item Entered'.
          MODIFY itab.
        ENDIF.
      ENDLOOP.
      PERFORM alv_grid_display.
    *&      Form  alv_grid_display
          text
    -->  p1        text
    <--  p2        text
    FORM alv_grid_display .
      DATA  : gt_event  TYPE slis_t_event.
      DATA  : dbcnt TYPE i.
      DATA  : dbcntr(10) TYPE c.
      DATA  : title(100) TYPE c.
      CLEAR : dbcnt,dbcntr,title.
      DESCRIBE TABLE itab LINES dbcnt.
      dbcntr = dbcnt.
      CONCATENATE 'NO.OF ENTRIES : ' dbcntr INTO title SEPARATED BY space.
      sy-title = title.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = sy-repid
          is_layout          = layout
          it_fieldcat        = t_fieldalv[]
          i_save             = 'A'
          i_grid_title       = 'Purchase Order Amendment Details'
        TABLES
          t_outtab           = itab
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
    ENDFORM.                    " alv_grid_display
    *&      Form  initial_alv_fieldcat
          text
         <--RT_FIELDCAT  text
    FORM initial_alv_fieldcat  CHANGING rt_fieldcat TYPE slis_t_fieldcat_alv.
      DATA       : ls_fieldcat TYPE slis_fieldcat_alv .
      DATA       : cntr TYPE i VALUE 1.
      CLEAR ls_fieldcat.
      cntr = cntr + 1.
      ls_fieldcat-col_pos   = 1.
      ls_fieldcat-fieldname = 'USERNAME'.
      ls_fieldcat-seltext_l = 'UNAME'.
      ls_fieldcat-do_sum    = 'X'.
      APPEND ls_fieldcat TO rt_fieldcat.
      CLEAR ls_fieldcat.
      cntr = cntr + 1.
      ls_fieldcat-col_pos   = 2.
      ls_fieldcat-fieldname = 'UDATE'.
      ls_fieldcat-seltext_l = 'UDATE'.
      ls_fieldcat-do_sum    = 'X'.
      APPEND ls_fieldcat TO rt_fieldcat.
      CLEAR ls_fieldcat.
      cntr = cntr + 1.
      ls_fieldcat-col_pos   = 3.
      ls_fieldcat-fieldname = 'UTIME'.
      ls_fieldcat-seltext_l = 'UTIME'.
      ls_fieldcat-do_sum    = 'X'.
      APPEND ls_fieldcat TO rt_fieldcat.
      CLEAR ls_fieldcat.
      cntr = cntr + 1.
      ls_fieldcat-col_pos   = 4.
      ls_fieldcat-fieldname = 'OBJECTID'.
      ls_fieldcat-seltext_l = 'PO Number'.
      ls_fieldcat-do_sum    = 'X'.
      APPEND ls_fieldcat TO rt_fieldcat.
      CLEAR ls_fieldcat.
      cntr = cntr + 1.
      ls_fieldcat-col_pos   = 5.
      ls_fieldcat-fieldname = 'FNAME'.
      ls_fieldcat-seltext_l = 'Field Name'.
      ls_fieldcat-do_sum    = 'X'.
      APPEND ls_fieldcat TO rt_fieldcat.
      CLEAR ls_fieldcat.
      cntr = cntr + 1.
      ls_fieldcat-col_pos   = 6.
      ls_fieldcat-fieldname = 'VALUE_OLD'.
      ls_fieldcat-seltext_l = 'Old Value'.
      ls_fieldcat-do_sum    = 'X'.
      APPEND ls_fieldcat TO rt_fieldcat.
      CLEAR ls_fieldcat.
      cntr = cntr + 1.
      ls_fieldcat-col_pos   = 7.
      ls_fieldcat-fieldname = 'VALUE_NEW'.
      ls_fieldcat-seltext_l = 'New Value '.
      ls_fieldcat-do_sum    = 'X'.
      APPEND ls_fieldcat TO rt_fieldcat.
      CLEAR ls_fieldcat.
      cntr = cntr + 1.
      ls_fieldcat-col_pos   = 8.
      ls_fieldcat-fieldname = 'UNIT_OLD'.
      ls_fieldcat-seltext_l = 'Old Unit'.
      ls_fieldcat-do_sum    = 'X'.
      APPEND ls_fieldcat TO rt_fieldcat.
      CLEAR ls_fieldcat.
      cntr = cntr + 1.
      ls_fieldcat-col_pos   = 9.
      ls_fieldcat-fieldname = 'UNIT_NEW'.
      ls_fieldcat-seltext_l = 'New Unit'.
      ls_fieldcat-do_sum    = 'X'.
      APPEND ls_fieldcat TO rt_fieldcat.
      CLEAR ls_fieldcat.
      cntr = cntr + 1.
      ls_fieldcat-col_pos   = 10.
      ls_fieldcat-fieldname = 'CUKY_OLD'.
      ls_fieldcat-seltext_l = 'Old Cuky'.
      ls_fieldcat-do_sum    = 'X'.
      APPEND ls_fieldcat TO rt_fieldcat.
      CLEAR ls_fieldcat.
      cntr = cntr + 1.
      ls_fieldcat-col_pos   = 11.
      ls_fieldcat-fieldname = 'CUKY_NEW'.
      ls_fieldcat-seltext_l = 'New Cuky'.
      ls_fieldcat-do_sum    = 'X'.
      APPEND ls_fieldcat TO rt_fieldcat.
      layout-zebra = 'X'.
      layout-colwidth_optimize = 'X'.
    ENDFORM.                    " initial_alv_fieldcat
    *********Rewards some points.
    Rgds,
    P.Naganjana Reddy

  • Problem with Sales Order update(VA02)

    Hi,
    I have created a sales order. I am changing the same order. I am adding few more items to this order and saving it. When I am saving this order, it says that the order has been saved. and when I am trying to view the same order again using VA02, I am getting a 'SAP office express info' popup saying 'Express document "Update was terminated" received from author "Paddu"'. and the description says 'Update was terminated'.
    Error Info...   V2 101: Error during update of Table VBAP
    Can someone tell me why I am getting this error. and what is this error related to.
    and when I again view the order in VA02, the changes I did were not saved. Con someone please tell me the reason for this. Thanks in advance.
    Best Regards,
    Paddu.

    Hi Gert,
    Thanks for your reply. Sorry for not providing the details.
    I just found the update error details in SM13. Please find the details below.
    Function Module   : RV_SALES_DOCUMENT_UPDATE
    Status                  : Update was terminated
    Report                  : LV45UF0V
    Row                      : 175
    Error details   Class:     V2         Number:    101
    V2 101: Error during update of Table VBAP
    Could you please let me know if you find any reason for this error as it is very urgent. Once again I am very much thankful to your time. Tell me if you find any reason.
    Thannks & Regards,
    Paddu.

  • Sales Order Update during Delivery Creation

    Hi,
      I have a requirement to update one of the customer specific sales order header table field during the creation of delivery.I'm trying to do this through the delivery user exit USEREXIT_SAVE_DOCUMENT program MV50AFZ1.
    I have a structure CVBAK available, but if i update customer specific the field in the CVBAK it's not changing the sales order.I won't be able to use BAPI or BDC to update SO from the exit, because during this delivery process the current sales order is being used, so system doesn't allow me to acces the sales order.
    Please give me the solution for my problem.
    Thanks

    Hi
    Probably the table VBAK is not updated by delivery transaction, so u can try to update that field (if it's custom field) by yourself.
    U can create a you function module for updating and call it in USEREXIT_SAVE_DOCUMENT:
    FORM USEREXIT_SAVE_DOCUMENT.
    CALL FUNCTION 'Z_VBAK_UPDATE'
          IN UPDATE TASK
          EXPORTING
               VBAK = VBAK.
    ENDFORM.
    In 'Z_VBAK_UPDATE' insert the code to update VBAK, you can also try to call the BAPI here, perhaps (the fm is called in update tusk) in this moment all blocks are released.
    Max

  • Sales order updation - reg

    Hi Experts,
        I am updating schedule line item category in sale order using the user exit MV45AFZZ.
    Within that user exit I am modifying the standard internal table XVBEP with new schedule line item category.
    It is updating when I use VA01, VA02.
    But when I update sales order using BAPI, it is not getting updated. But that portion of code is triggered and XVBEP internal table is getting updated. But in sales order it is not updated. After that piece of code no where XVBEP internal table is updated.
    Kindly help me.
    Thanks and regards,
    Venkat.
    Edited by: VENKAT RAMAN on Jun 17, 2010 3:18 PM

    Hi,
    Add following line in the code which you have written in user exit.
    MOVE 'U' to xvbep-updkz.
    Regards
    Vinod

  • Sale order deleted item - Table

    Dear Friends,
    I would like to know if in a Sale order I have 4 items out of which am deleting 1 line item form the list and 1 line item stock is getting changed.
    in the document changes i cannot see the material code which is getting deleted.
    Is there any table where i can see the deleted material code or the quantity changed material code.
    CDPOS or CDHDR does not give full information.
    throw some light as i need to prepare a report.
    Thanks,
    Satish

    I seriously doubt such information is available anywhere in SAP. In the change documents (the above mentioned FM just reads the above mentioned tables) you'll find only that line # so-and-so was deleted, when and by whom. There won't be any details and, in fact, this kind of makes sense.
    If it is important to track the items that, say, were cancelled by the customer, use Rejection Reason instead of deleting the line. You can prevent the lines from being deleted through a user exit, however, it would be better to address this via business process and user training.

  • Sales Order updation error

    Hi All,
    I am facing problems while updating a sales order. I have some custom actions in the middle. I am loading another custom window when tabbing out of Quantity field in Salesorder matrix. In that window I am updating batch quantity for the Sales order line from which I tabbed out using DI API to zero quantity. After that action,I am trying to update the Sales Order. Then I am receiving the error "There is a difference between the document total and its components. [Sales Order - Document Total (FC)]  [Message 439-138]". Please help me on this issue.
    Thanks
    Jisha

    Hi John,
    Thank you for the updation. Yes. I am working with an addon.
    Let me explain my current environment and requirments.
    I have 2 cases which I am mentioning below. In the given 2 cases , first case(adding Sales Order works well for me). Problem occurs while updation.
    Adding Sales Order
    When I am adding a new Sales Order, I am updating the batch allocation for the line items using DI API in the FORM_DATA_ADD_Event - Action success true section. (This section work successfully)
    Updating the Sales Order
    In the update mode, If I am changing the quantity for the Sales Order lines(I am mentioning here only the case when I am reducing quantiy) , the custom window opens for me to reallocate the batches for the new quantity. In this window, I am not updating the new batch allocation. Just I am clearing the existing batch allocation  using DI API so that I can give the new batch allocation in the Sales Order window - FORM_DATA_UPDATE_Event - Action success true section.
    After this step, when I am trying to update the Sales Order , I am getting the error"There is a difference between the document total and its components. [Sales Order - Document Total (FC)]  [Message 439-138]".
    Can you please give me a solution for this?
    One more thing to note, If the unit price field for the line item is zero, the Sales Order is getting updated successfully. If the price is greater than zero, then only the problem occur.
    Please let me know, if you need further details.
    Thanks
    Jisha

  • Sales Order Updation when a Quotation is saved

    Hi All,
    Kindly help me with this.
    I have the following scenario : A Quotation (ZQR) is created with reference to a Sales Order (ZRPR). The current requirement is that if the status of the Quotation is put to "Accepted" and the quotation is saved, then a new line needs to be added to the ZRPR Order on line 1000 through "Repairs" with repair action = '109' (i.e Debit), Material = 'LABOR', item Category = 'ZSER' and Quantity = 1.
    Is there any way so that i can update the Sales Order when the Quotation is Accepted and is saved??? Please help.
    Thanks,
    Vijay

    Hey,
    You could use workflow to automatically create a Sales order when a PO is saved.
    -Kiran
    *Please mark useful answers

  • Return Sales order - update of Item category change

    Hi
    We are creating the Return Sales order with respective original sales order.
    After copying the line item details in to return sales order, we are not able to change item category to another.  Since item category is in display mode(grayed out).
    We tried with
    1.Transaction varant, it is not helpful.
    2.Maintained the item category which is required in item category determination(Manual entries)
    Though we are able to change the item catgory in the sales order through some user exit, price condition are in active status. we are doing price update, but still condition types are still in-active.
    Please help, how to change the item cateogry and to redetermine the price based on the item category in sales order.
    Thanks & Regards,
    Rajesh.

    Then how do you settle it with the customer? He has still paid for the original materials and has returned some or all of them. He is still going to be invoiced for the full quantity. There should be some way to either replace the materials or give him a credit memo
    but coming to Gunda's query, the only way I see to map this is to create a different order type ZRE which is a copy of RE and item category ZREN which is a copy of REN. In ZREN, turn on Pricing. Maintain copy controls from OR to ZRE and keep the pricing condition type Manual. Then whenever the business decides not to give the customer a refund, go to the item conditions, set the pricing condition value to 0 and save the order

  • BAPI / Function Module for Sale order updation

    Hi,
         I need to update sale order details(Reason for rejection)..Can you please tell me any of the existing BAPI's / Function modules to do the same.

    hi,
      try bapi_salesorder_change
        <b>allocate points if useful</b>
    regards,
    pavan

  • XI IDOC ORDERS04 create sales order update VBKD_BSARK

    Hello
    I have created a sales order interface from an external partner who sends a file (Purchase order), XI reads and transfers to R/3 via IDOC ORDERS04 to create the sales order.  this works fine, but i need the purchase order type field VBKD-BSARK to be updated for further processing of order confirmations and deliveries (the customer also has manual orders created which are handled differently).
    in the XI mapping i have mapped the required entry for VBKD-BSARK into E1EDP02-BSARK, but it does not work.  I notice that this is at line itme level.  i have had a good look through the segements in ORDERS04 but I cannot find any reference to PO type.
    I also tried mapping the required data to E1EDK14 'QUALF'=013 .. this did not work either.  i use FM IDOC_INPUT_ORDERS and can only find reference to vbap-bsark  but this is not working.  it always takes the default setting.
    Does anyone have any ideas?  I have to use ORDERS04 as we have user enhancements for sales orders that are not available with SALESOREDERCREATEFROMDAT2.  which may work ok.
    cheers
    Nick

    Hi,
    Can u tell me the steps to create a sales order using idoc, i've created a bapi but thats a temprory use. I wanted to created a sales order automatically when a purchase order is saved after data entry is completed.
    Please let me know if u can help me, i wanted to do it using idoc
    Regards
    Sanju

  • Simulation in Bapi/FM for sales order is locking tables

    Hi
    We want to use bapi BAPI_SALESORDER_CHANGE or FM SD_SALESDOCUMENT_CHANGE to simulate the effect on prices of a sales order. We must do this during the printing of the sales order. This bapi/FM is locking the sales order tables during the simulation mode. As we are printing from the sales order, the sales order is already locked so we get the error: V1 042 Sales document xxx is currently being processed. Does anyone have a solution to avoid this lock or an alternative to simulate the price from a sales order?
    We need to use the simulation of the sales order to capture all manual changes in the sales order pricing.
    Kind Regards

    Hi,
    FM BAPI_SALESORDER_SIMULATE gives the same pricing data as  BAPI_SALESORDER_CHANGE. you do not need to change an existing document to get the pricing data. Just simulate the creation of a new order.. th prices should be the same as long as you send the same data.
    Dev.

  • Problem with sales order update from MIGO ( using BADI)

    I have written a BADI while doing MIGO, through which I am updating Sales order “Order Quanity”.
    I am able to update the Quantity successfully in sales order, but I am getting following update termination message which is mentioned below.
    "Sales Order 376446 has failed an update to the billing date associated to Transaction MIGO
    Contact your STC Key user for assistance
    PO Number:"
    Any clue? Please suggest.
    Regards,
    Krishna Prasad MVN

    I have written a BADI while doing MIGO, through which I am updating Sales order “Order Quanity”.
    I am able to update the Quantity successfully in sales order, but I am getting following update termination message which is mentioned below.
    "Sales Order 376446 has failed an update to the billing date associated to Transaction MIGO
    Contact your STC Key user for assistance
    PO Number:"
    Any clue? Please suggest.
    Regards,
    Krishna Prasad MVN

Maybe you are looking for