Sales order changes- table & field name

Hi gurus,
last week i created a sales order for 250 qty, and today i have changed the quantity from 250 to 200.
from which table i can find out the old qty,updated qty and the changed date.
cheers,
Sumith

Hi
For  Changes to sales order  Check Table CDHDR & CDPO for Item Changes
goto SE16 , enter the table & Give the Object values as the Sales order number
you will get the change details
Thanks & Regards
Kishore

Similar Messages

  • Table for sales order change by field

    Dear Friends,
    I want to get the data @ table level for the list of sales orders with changed by field. Can you please tell which table/s for sales order change by field can be used?
    Thanks,
    pinky

    Hi
    You can get the changes for SALES ORDER item in CDPOS table
    Goto SE16 and find the changes.
    hope it will serve your purpose.
    thanks,
    santosh

  • BAPI SALES ORDER CHANGE CUSTOM FIELD

    Hello Gurus,
    I am trying to update a custom field for sales order. The field name is zfield1 in vbak. The field is added to vbakkom, vbakkomx, vbakkoz, vbakkozx, BAPE_VBAK, BAPE_VBAKX. I guess i need to use the EXTENSIONIN table to populate this field's values to change it with the BAPI. But I not sure exactly how to populate the fields. Can someone tell me how exactly i need to do this?
    Also the documentation says fill Extensionin this way.
    STRUCTURE VALUEPART1 1234561234567890123
    BAPE_VBAP 0000004711000020 XYZ
    BAPE_VBAPX 0000004711000020 X
    What is the 1234561234567890123? Is it a field?
    Thanks,
    KB

    Hi,
    Check this example..I am updating the VBAP field..Instead you can replace it for VBAK..
    PARAMETERS: P_VBELN TYPE VBAK-VBELN.
    DATA: T_LINE LIKE BAPISDITM OCCURS 0 WITH HEADER LINE.
    DATA: T_LINEX LIKE BAPISDITMX OCCURS 0 WITH HEADER LINE.
    DATA: T_EXTEN LIKE BAPIPAREX OCCURS 0 WITH HEADER LINE.
    DATA: T_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
    DATA: BAPE_VBAP LIKE BAPE_VBAP.
    DATA: BAPE_VBAPX LIKE BAPE_VBAPX.
    DATA: ORDER_HEADERX LIKE BAPISDH1X.
    ORDER_HEADERX-UPDATEFLAG = 'U'.
    T_LINE-ITM_NUMBER = '000010'.
    APPEND T_LINE.
    T_LINEX-ITM_NUMBER = '000010'.
    T_LINEX-UPDATEFLAG = 'U'.
    APPEND T_LINEX.
    BAPE_VBAP-VBELN = P_VBELN.
    BAPE_VBAP-POSNR = '000010'.
    <b>BAPE_VBAP-<b>YYFREETEXT</b> = '02'.</b>
    T_EXTEN-STRUCTURE = 'BAPE_VBAP'.
    T_EXTEN+30 = BAPE_VBAP.
    APPEND T_EXTEN.
    BAPE_VBAPX-VBELN = P_VBELN.
    BAPE_VBAPX-POSNR = '000010'.
    <b>BAPE_VBAPX-YYFREETEXT = 'X'.</b>
    T_EXTEN-STRUCTURE = 'BAPE_VBAPX'.
    T_EXTEN+30 = BAPE_VBAPX.
    APPEND T_EXTEN.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    salesdocument = p_vbeln
    order_header_inx = ORDER_HEADERX
    tables
    return = T_RETURN
    ORDER_ITEM_IN = T_LINE
    ORDER_ITEM_INX = T_LINEX
    EXTENSIONIN = T_EXTEN.
    COMMIT WORK.
    Thanks,
    Naren

  • What  balance value  in sales order  and iwant to know table field name in

    where the balance value come in sales order i want make sales order report in which i want to add this filed how we add it  and tell me table field name of balance vlue and how we give it in FS please help me in this my report are left without it please give me solution

    Hello
    where the balance value come in sales order
    Please note that when you raise your question at SDN forum, your question needs to be clear...
    What do you mean by BALANCE VALUE ????
    Regards,
    Sarthak

  • TABLE-FIELD NAME FOR AGENT (SALES ORDER)

    HI
    I am making despatch report agent wise .
    Can any one tell me the table-field name for agent it is used in saleorder
    t.code va01 .
    Regards
    Rakesh Kumar Singh

    Whereever you can see that Input Field for Agent..Click F1, click Technical Information..You can see the Table and Data Element and Field Name..
    Incase it is a structure, click on the data element..click Where Used List..You will get a list of tables.

  • Extending sales order change BAPI and updating custom fields

    Hi
    i added 3 new fields into VA01/02/03 screen.i added at the header level in the additional data tab B area and appended them in VBAK table.
    i want to change these values using sales order change BAPI.i added the fields in the structure VBAKKOZ,VBAKKOZX,BAPE_VBAK,BAPE_VBAKX.
    may i know what else i need to do?should i move them anywhere with in the code or does the bapi take those values automatically using EXTENSIONIN structure?
    also can some one send me code to actually check if bapi is changing my values?
    if poss tell me how should i populate values into BAPI.

    After adding field in structures VBAKKOZ,VBAKKOZX,BAPE_VBAK,BAPE_VBAKX, create pair of name-value pair extensiot structure and value.
    Fill values as follows :
    Data :   ls_parex  TYPE  bapiparex,
                lt_parex  TYPE STANDARD TABLE OF  bapiparex.
    ls_parex-structure = 'BAPE_VBAK'.
    ls_parex-valuepart1+0(10) = Sales order no
    ls_parex-valuepart1+10(XX) = somevalue.  <---- Value for custom field no 1
    ls_parex-valuepart1+XX(XX) = somevalue.  <---- Value for custom field no 2
    APPEND ls_parex TO lt_parex  .
    clear ls_parex.
    ls_parex-structure = 'BAPE_VBAKX'.
    ls_parex-valuepart1+0(10) = Sales order no
    ls_parex-valuepart1+10(1) = 'X'. <--- checkbox mark for custom field no 1
    ls_parex-valuepart1+11(1) = 'X'. <--- checkbox mark for custom field no 2
    APPEND ls_parex TO lt_parex.
    Same pair for VBAKKOZ & VBAKKOZX
    Updating custom fields
      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          salesdocument    = Sales order number
          order_header_inx = 'U'   <--- U for update
        TABLES
          extensionin      = lt_parex[].
    Edited by: nkarwa on Oct 25, 2010 12:39 PM

  • 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

  • Sale Order Item : Custom Field : Table Control

    I have added two fields to sale order item table control in program SAPMV45A screen no . 4900. Now the field which i have added are working fine while creating sale order but while changing those fields are not changing.
    condition is like this: the custom field are automatically filled by some logic and if the user want to change those field he will able to do. Now 1st condition is fine and when i change those field they will show the previous saved value inspite of changed value. 
    I have also added those field in additional data b tab in screen 8459 , there they are working fine but here the problem remains the same.

    Hi,
    u can use BAPI_SALESORDER_CHANGE to update the values of those fields. for that u need to extend few tables and coding that u can get from the BAPI documentation. If not getting reply back. i can help u..
    regards,
    pavan.

  • Credit status change through Sales order - change log

    Hi Friends,
      I'm currently facing a scenario were it was reported by the client that
      credit release is happening automatically.
      Brief details : 
       Order was created on 4th Of Oct and it was blocked (reaches the VKM1 bucket )
       since the customer reaches the credit limit.The same order on 5th Oct was not in VKM1
       bucket were the status of order in Sales document header states that it's  released.
      Initial check : (Sales order change log)
      1, I've checked the change log on 5th Oct were the  field VBUK - CMGST  "Overall status of credit checks changed"  from  B to A.
       ((  Status and details below
          A - Credit check was executed and document is OK.
          B - Credit check was exectued and Document is not OK (credit block).
          C - Credit check was executed document not OK, Partial release.
          D-  Document released by Sales representative. ))
    2, I tried to replicate the order status for block and release, But when I release through  VKM1 / VKM3
         the change logs are getting updated with Status - D .(ie from B to D) .
      I'm  wondering that  what could be the reason that causes the system to update in the table - VBUK  - CMGST from A to B
      or because of what change from the client in the sales document header level could impact this changes.
      Note - There is no payment which received from customer on that day.
      Please let me know in case if you are getting the clue...
      Thanks in Advance..
      - Pugal stalin

    Hi
    A simple credit check, as the name suggests, is very simple in nature. The functionality is limited and considers only open A/R items and open items from special G/L and sales orders for performing the credit checks. When you create/change a sales order that is relevant for a simple credit check, SAP calculates the payer/customeru2019s credit exposure by adding the open A/R balance for the customer, open item balances from the special G/L, and the net sales order value. This credit exposure is then compared against the customer credit limit maintained in the customeru2019s credit master. If the credit exposure is greater than the credit limit, the system sets the credit check status as u201Cfailu201D and shows a warning, generates an error message, or performs a delivery block
    Regards from Pakistan

  • Sales Orders Change Log question

    Hi All,
    I am currently working on a project that involves querying SAP Database to get custom reports via web browser, I've made a lot of advances and most of the site is ready but I'm missing just one item that I hope you could help me.
    Thing is I am working with the Sales Order change log and the problem comes one a user deletes a row. If I go to the change log inside SAP and see the differences a new record will be shown saying that row X was deleted and
    if I go to the database (ADOC and ADO1 tables) I don't have a way to see wich row was deleted.
    My way of doing this is to check for the number of rows on the current state of the sales order and check the same on the previous instance of the SO and see if a line was deleted. Then I would have to check row by row between instances what rows are there and what row is missing and store that info. I think this kind of approach will definitively kill the server.
    I was wondering if some one can give me a hint about how to approach this problem. Does any body know how SAP works on this area?
    I'm working with SAP2005A and SQL Server 2005 Standard Edition.
    Any help is greatly appreciated.
    Thanks!
    Alejandro.-

    Hola Alejandro,
    Thanks for your answer, as I see it I'm doing exactly what you proposed but the problem comes with the following scenarios:
    a.- If I post a new SO with two lines I will have on the ADO1 table two records with the values 0 and 1 for each line respectively but if I delete the item on LineNum = 1 and then I add a new item, this last item will be also created with LineNum value = 1. This is not a complicated thing to do but the problem comes when the user is used to work with SOs with several items at detail level and is used to add and erase lines once in a while and as I see it it's very difficult for me to track those specific changes. There's also the fact that on the Log table a new instance is created every time the user hits the update button regardless if a modification was actually made or not. I mean I would know that a line was deleted or added but I would have to start comparing each field on each line of a sales order with it's previous instance to check what was actually added/deleted and I'm afraid that this may affect the server performance. I know that SAP does this without affecting to much the system resources and that is what I'm trying to find.
    I forgot the other scenario I was considering he he I will post again as soon as I remember it but I hope I'm explaining this ok (I'm not very good at explaining...) If not let me know and I'll try to explain again.
    I'm also working on trying to get another approach to see what comes up...
    Thanks for checking this thread, your answers are helpful.
    Regards.

  • How to Generate sales orders with custom Fields using BAPI_BUSPROCESSND_CREATEMULTI

    Hi,
    I need to generate sales orders with custom fields on table CRMD_ORDERADM_H using BAPI_BUSPROCESSND_CREATEMULTI, after changing the structure BAPI_TE_CRMD_ORDERADM_H, and feed the  EXTENSIONIN table of the BAPI with data, the order is created, but any value on custom fields.
    After debuging, I saw that the BAPI search for structure conversion in table CRMC_OBJECTS_GEN, but we haven't entry with BAPI_TE_CRMD_ORDERADM_H in this table. is that the problem ?, Is there any way to fix it?
    Best Regards,
    Salah.

    That depends on where do you have the customer fields, check the table CRMD_CUSTOMER_H, if your custom fields are there, you need to use the changing parameter CUSTOMER_HEAD, I guess your already checked that one, right? but there's no custom fields, well...AET/EEWB doesn't enhance the strcuture of the BAPI, so you should do it manually, check the note following note for further details.
    988410 - FAQ: User-defined fields in the BAPI
    If you don't have access to the SAP Marketplace, in resume you should create an append on the structure BAPIBUS20001_CUSTOMER_H and include the following strcutrue CI_EEW_CUSTOMER_H
    Cheers!
    Luis

  • Addition Item getting added while posting Sales Order Changes - ORDCHG

    Hello,
    I have a requirement to post sales order changes - ORDCHG. Now, when I am adding the qualifier 002 at the item segment E1EDP01 with the existing Item number, it is creating another Item in the sales order rather than changing the existing one. What could be the reason? I am passing the below values in to the respective segments.
    E1EDK01-ACTION = '003' - Changes in one or more items
    E1EDP01-ACTION = '002' Item Changed.
    Please advise.
    Regards,
    Venkata Phani Prasad K

    I encountered the same problem.  As Vinit pointed out, it looks up the line item using field POSEX on VBAP instead of POSNR.  If you want to look up POSNR,  you can implement either user-exit ZXVDBU07 or ZXVDBU09 in IDOC_INPUT_ORDCHG and do the following.
    Loop through YVBAP and modify the internal table to set POSEX to be equal to POSNR.
    This will cause the IDOC to select the correct line item based on POSNR.  The only side-effect is that when the order is updated, it will also update field POSEX on table VBAP.

  • Determine Sales Order change (ECC6.0 using Enhancement-point)

    Hi all,
    I want to determine Sales Order change e.g. if any item added to sales order or any item deleted fron sales order and also if Sales Order is deleted .... how can I achive this???
    I am using ECC6.0 , in which I am using Include          MV45AFZZ and FORM USEREXIT_SAVE_DOCUMENT to determine change at SAVE. The table XVBAK and structure VBAP is available but from this I am not able to determine the change.
    How to do this..?
    Regards,
    NiLesH.

    Hi Nilesh,
    Please see USEREXIT_SAVE_DOCUMENT_PREPARE instead of the one you are using in the Include MV45AFZZ.
    SAP comments this customer form as:
    * This userexit can be used for changes or checks, before
    * a document is saved.                                           
    * If field T180-TRTYP contents 'H', the document will be  
    * created, else it will be changed. This form is called at the
    * beginning of form BELEG_SICHERN
    For the deletion, try to code your check in the form USEREXIT_DELETE_DOCUMENT in the Include MV45AFZZ provided for the customers.
    I feel these would be more suited for your requirement.
    Cheers,
    Sougata.
    You can use tables CDHDR/CDPOS for change documents but on a large scale reporting this would be very slow.
    Alternatively, for performance reasons, you can use the form USEREXIT_READ_DOCUMENT to capture the sales order at its original state (in an internal table) then use form USEREXIT_CHECK_VBAP for any changes made while in the sales order create. Then in USEREXIT_SAVE_DOCUMENT, compare the previous and current condition values. If any changes exist, insert a row in a custom table with the change information. At the end you can base your report on your custom table rather than change document tables which will be slow on processing large volume of data.
    Note: Go the user-exit way only if you are dealing with high volume of data
    Edited by: Sougata Chatterjee on Jan 1, 2008 11:38 PM
    Added after considering Ranjith's post

  • Have to provide a popup when there is a Sales order change(VA02)

    Hello,
    I would like to know how to capture Sales order changes(VA02) through an enhancement. Based upon users changes which can be either a addition or deletion in sales order then I have to provide a popup. I am unable to find out whether Sales order has undergone a change or not. Field r185d-dataloss is alway having 'X' whether data has changed or not. System field SY-DATAR is not capturing any deletion is sales order.
    I am using USEREXIT_SAVE_DOCUMENT_PREPARE but unable to check sales order is changed or not.
    I need to provide popup after user clicks on Save. Tables CDPOS & CDHDR won't have current sales order change.
    Thanks for your replies.
    Edited by: harryibm on Dec 11, 2011 8:07 PM

    I am using USEREXIT_SAVE_DOCUMENT_PREPARE but unable to check sales order is changed or not.
    Donot do any changes and hit save. check if this routine is triggered if you are not changing anything.
    In program MV45AF0B_BELEG_SICHERN there is a condition
    IF R185D-DATALOSS = SPACE       FORCE_UPDATE   = SPACE     AND
           UPD_VBUK IS INITIAL        AND
           UPD_VBUP IS INITIAL.
    The else part will only tirgger if its changed. The routine USEREXIT_SAVE_DOCUMENT_PREPARE is called in the else part.

  • Table & field name related to credit

    Hi experts,
    Are the tables/field names below are correct?
    If yes, what reasons would be for the field of sales value shows zero in SE16 while the field shows correct amount in FD33?
    If not, pls provide the correct table & field name for credit exposure & sales value. Thx.
    Table KNKK - SKFOR = credit exposure
    Table KNKK - SAUFT = Sales value.

    Hi
    You are looking the right table
    However field KNKK - SAUFT = Sales value, displays the Total of all order values which have not been transferred to FI, but which are taken into consideration when checking the credit limit.
    You can check following fields
    Table KNKK - KLIMK = Credit LIMIT
    Table KNKK - SKFOR = Credit Exposure (i.e Total Receivables)
    Check for the values appearing against  Receivables field (skfor) on the customer credit management : status page (FD33).
    Regards
    Tejpal

Maybe you are looking for