CHANGEDOCUMENT_READ

Req:
While creating condition records through VK11, if we maintain scale prices as well, the entries that get stored in CDHDR and CDPOS are wrt to new entry only and not reflecting KONM table with scale prices.
However, when we change scale prices in condition records through VK12, the changes are captured as old value and new value in CDPOS table.
Now the requirement is that user wants to report scale prices data even when they are creating the new condition records. And using  FM u2018CHANGEDOCUMENT_READu2019
Or u2018CHANGEDOCUMENT_READ_HEADERSu2019 is not capturing the scale prices data as explained above.
Any pointers for this are appreciated.
Probable Solution:
Do the coding after CHANGEDOCUMENT_READ and read the table (structure CDRED) with tcode VK11 and read the data from KONM table.
Modify internal table accordingly and let the rest of processing go on.
If you find any solution better than this usual brute-force method, please advise.
Thanks in advance !

Hi,
if we maintain scale prices as well, the entries that get stored in CDHDR and CDPOS are wrt to new entry only and not reflecting KONM table with scale prices.
is it the new condition records maintained are not getting updated in KONM table
Can u specify which condition type u r using ..
if u r able to retreive the new records maintained from KONM ,thn the probable solution u specified wud work..
Regards,
Mdi.Deeba

Similar Messages

  • Error TSV_TNEW_PAGE_ALLOC_FAILED caused by Function CHANGEDOCUMENT_READ

    Hi,
    I met the error TSV_TNEW_PAGE_ALLOC_FAILED when I call the function CHANGEDOCUMENT_READ.
    However, I only import a day , a table and a objectclass.
    CALL FUNCTION 'CHANGEDOCUMENT_READ'
          EXPORTING
            date_of_change             = c_day
            objectclass                = c_class
            tablename                  = c_table
            date_until                 = c_day
          TABLES
            editpos                    = i_editpos
          EXCEPTIONS
            no_position_found          = 1
            wrong_access_to_archive    = 2
            time_zone_conversion_error = 3
            OTHERS                     = 4.
    And when I debug it, I found it get very huge data(Both CDHDR and CDPOS have more than 500,000 records).
    Any suggestion will be helpful.
    Thanks,
    Franklin

    It looks like you will read to call it multiple times including the parameters TIME_OF_CHANGE and TIME_UNTIL, But this will be very time consuming.
    Check the documentation on these two parameters.
    Rob

  • Using of CHANGEDOCUMENT_READ FM

    HI
    I want to know if admin delete role for user (i need also the time that the role change) and i found CHANGEDOCUMENT_READ
    but i dont know how to use it ?
    i know about table agr_users and CDHDR but i dont know how to use it.
    for example in date 16.8.2009 the admin delete for user the role sap_all ,
    i want to know that .
    Best Regards
    Joy

    Which release and SP are you on? This is relevant.
    Roles are just a tool ontop of profiles (and JAVA UME groups) to assign access, so:
    If this is in an ABAP system, then you can use report RSUSR100 to evaluate the changes (the backend table is USH04) when the actual profiles were assigned.
    But the application specific user change documents are now (since about a year or so) merged into the standard application change documents (CDPOS etc).
    There is a new report now => RSUSR100N which will evaluate both.
    There are some important SAP notes to implement and also the possibility to migrate existing data to the new mechanism (created prior to it existing).
    Cheers,
    Julius

  • Report on deleted sales orders ( va02)

    hi,
    i got one requirement to write a program to display the list of deleted sales orders (through VA02 Tcode).
    to my knowledge when a sales order is deleted through VA02 the order will be deleted from the database itself and will be deleted from all the SAP tables.
    if that is correct, is there any possibility that we can create a Ztable and update the data before deletion or any other solution for the above requirement?
    thanks in advance,
    Rajani yeluri

    hi rajani,
    u will get deleted data from using tables CDHDR,CDPOS,CDRED and function module '  CHANGEDOCUMENT_READ'.
    i am sending u some sample code, i hope it will helps u
    DATA: it_editpos    LIKE cdred OCCURS 0 WITH HEADER LINE,
                                     "Change documents, display structure
          it_editpos1   LIKE cdred OCCURS 0 WITH HEADER LINE,
                                     "Change documents, display structure
          x_editpos1    LIKE cdred,  "Change documents, display structure
            x_editpos     LIKE it_editpos,
                                     "Change documents,display structure
    *-----Calling FM to populate the structure 'EDITPOS'
      CLEAR it_editpos.
      CALL FUNCTION 'CHANGEDOCUMENT_READ'
           EXPORTING
              objectclass                = ' ' 
           TABLES
                editpos                    = it_editpos
           EXCEPTIONS
                no_position_found          = 1
                wrong_access_to_archive    = 2
                time_zone_conversion_error = 3
                OTHERS                     = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CLEAR: x_editpos,
             it_editpos1.
      LOOP AT it_editpos
        INTO  x_editpos
        WHERE tcode = 'ME21N' OR  "Here u have 2 pass 'VA02'
              tcode = 'ME22N' OR
              tcode = 'ME23N'.
        APPEND x_editpos TO it_editpos1.
        CLEAR x_editpos.
      ENDLOOP.
    now it_edipos1 has all CHANGENR numbers, so now u have to fetch data from F_NEW and F_OLD Fields
    i hope this will helps u
    Regards,
    prasad

  • Re-open EDI - ORDCHG for outbound sales order

    Re-opening post
    Hi Experts,
    I am trying to capture the changes done to a sales order
    in SD and outbound the information changed in the sales order?
    I was thinking that ORDCHG was the correct message type.
    But seems that this is used for captureing purchase order changes instead of sales order change.
    I know I can send a new idoc with ORDERSP but I want to capture what information was changed.
    Any help is greatly appreciated.

    Rolmega,
    There are two options to send out a IDOC when there is a sales order change.
    You need to do the message control customization and user exit programming in such a way that it triggers the output only when there is some change with the sale document.Tiggering output can be controlled for specific fields like 'Inco terms' (Header level) and 'Quantity' or 'Schedule lines' (item level).
    Generating an IDOC for a change can be controlled via this mechanism.This method we have already implemented for the requirement like this.
    The problem is generated IDOC would not only contain the changes done to the sale order.But this can be very well handled that at the other end by simply updating the sales order information based on the sales order number.
    (ii) In this method you can have a custom table to have all the changes done to the sales order.All the changed information can be captured at the user exit MV45AFZZ and updated with the custom table which you could for sending only the changed information to the sales order.
    With this method you can have a better control about sending the changes only once.
    If you are using CDHDR,CDPOS table how would you exactly captutre the information which have not been previously sent.Selecting the values from change documents table would affect the performace considerably.If you decided to go with the change document option then use function module 'CHANGEDOCUMENT_READ'.
    I would suggest you to take up the option 1 which is easy to implement ( Will guide you if you are intrested) and can be controlled in a better way.
    Thank you.
    Regards,
    Karun M

  • How to extract data from cluster table

    Hi, experts,
    Here I want to extract change documents, which is from tables CDHDR(header) and CDPOS(line items). The problem is that CDPOS is a cluster table so that I can't create a view to develop a generic data source.
    I have search on the forum and some one said generic data source based on function module was a choice, but I think coding FM is so complex, especially including delta implementation.
    Could any one give me some advice? or give me some coding samples?
    Thanks a lot!

    Dear Sam,
    I would suggest you to have a look at the function module CHANGEDOCUMENT_READ u2013 you can use this function module as a core in the developed function module for generic extractor. Unfortunately, the suggested function module can not handle import parameters for field names, so the strategy which can be applied here is to use this function module to fill the internal table based on restrictions on object class and table name and then go through filled internal table and delete records which are not relevant for fields KOFIZ or ABRSPERR.
    As for delta implementation, would you please advise if delta relevant field based on timestamp generated on date and time of the change document is sufficient for your needs? If so then you can use fields UDATE and UTIME to generate timestamp on them including the field containing generated timestamp to the extract table. Next step here is to choose this field as delta relevant field in the Generic DataSource maintenance (TCode RSO2).
    Please inform me if this solution suits you or if you have any questions or concerns regarding it.
    My best regards,
    Vadim

  • Problem while generating Update progam for a Change Document Object

    Hi,
    I'm trying to deal with Change Document concept in a R/3 4.6C environment and to establish new Change Document object for my (Z)-table. I haven't using any namespace and created object with name ZTEST. Following the online documentation I came to the point, where I have to generate include program. I made all the nessesary inputs (using Z prefix) but faced
    "Function module name is reserved for SAP"
    Creating everything similarily using some of our registered namespaces (/somenamespace/) I succeed to generate the Update program and to integrate it in my Z-programs as well.
    My question is: is it possible to use Change Document Object-names without predefined namespace - being a regular customer developer, but not an SAP developer - means, if I am allowed to manage programs in the customer namespace (Z,Y, X) only. If yes, how to do this?
    Further (I decided not to open a new thread) - generated Update program uses
    CALL FUNCTION 'xxxxx' IN UPDATE TASK
    for creation of Change Numbers for generated Change Document Object. This CALL doesn't work when I implemented it in my Z-program, but when changed  (IN UPDATE TASK was commented) - everything goes well and the system creates records in CDHDR/CDPOS tables for my object class and table.
    Why is that? According to the documentation I shoud only fill appropriate variables for the Change Document Object (class, tr.code, etc.) and call generated FM, nothing is pointed out about any possible problems? Am I doing something wrong?
    Well, to be precise, I think I have to give a sample:
    1. I have a sample Z-table with few fields (their data elements are marked as Change-Document relevant).
    2. Using own z-progam I created a new record for this z-table. Also fill all the nessesary variables included in the interface of generated FM for Change Document Object (for example - FM-mane CD_CALL_my_object).
    3. I call the CDO FM.
    4. Check what is happening (directly in both tables CDHDR/CDPOS or using FM CHANGEDOCUMENT_READ).
    Further, I perfom the steps from 1 to 4 updating the created in previous loop record in my Z-table.
    In both cases if the FM 'CD_CALL_my_object' is called IN UPDATE TASK nothing happens, but in case of direct call (without addition IN UPDATE TASK) the system behaves as expected. Well, obliously I can change the generated code for our production needs, but it doesn't seems to be the correct decision - in case of next possible modification of the Change Document Object definition, respectively in need of re-generation of the code.
    Any hints are wellcome.
    Thanks in advance.
    Ivaylo Mutafchiev
    Edited by: Ivaylo Mutafchiev on Jan 24, 2008 10:24 AM

    "IN UPDATE TASK" resolved by myself. The one should explicitly call 'COMMIT WORK' from Z-program after CALL FUNCTION '...' IN UPDATE TASK in order to get changes in the CDHDR/CDPOS commited. The key in this issue for me was to check the documentation of CALL FUNCTION :-).
    Regards,
    Ivo

  • BP change documents ( linking problem between Object id and Business Partner)

    Hi,
    We need to create a report for documents changed for a Business partner.
    This will be done in sap bw.
    on source side I have created the datasource with function module changedocument_read and I am getting most of the information
    which I want. Only missing part is Business Partner number.
    Can somebody suggest , how I would be able to link Object Id to business partner.
    I need to pull everything that is changed at BP level and the Object class selection around 30 in number.
    So I am looking for any standard function module which can provide me the link between Object id and Business partner.
    If I establish the rules to determine the Business partner from Object id , its getting bit difficult.
    Can somebody please help/suggest.
    I have gone through many documents and scn posts but unable to find anything on this.
    Thanks !

    Hi, looking at the change history header table CDHDR it seems that object ID simple equals the internal format of the business partner number.

  • How BBPUPDVD determines vendor master change in ECC?

    Hi Experts,
    How is the vendor master change in ECC captured and what is the strategy/check that the BBPUPDVD transaction OR vendor update report uses/does in ECC to pick up the updated vendor with qualified fields for transmission?
    Qualified fields -> Purchasing block, curr change, comm method change, etc.
    For e.g, if a vendor is blocked for a P.Org today and if we either execute BBPUPDVD OR vendor update job, so how does it determine the change in vendor master in ECC?
    Thanks!
    Regards,
    Karthik

    Hello Karthik,
    just to complete what wrote Konstantin, those change documents are determined in ECC using CHANGEDOCUMENT_READ function modul inside BBP_SCAN_VD function modul which is called by RFC from SRM (report BBP_VENDOR_SYNC).
    Regards.
    Laurent.

  • Purchase order release history table

    Hi,
      I would like to know the table where we can have history of purchase order releases.
    For example, If the purchase order created and released. Later purchase order release is cancelled. Again i will release the purchase order.
    Even the the release history is not maintained in the table EKBE. I am not aware of the reason for not having the data in EKBE.
    I would like know all the release history would be maintained . In the table EKKO, i can find only  latest release status.
    Can you please throw light on this. Thanks.
    Regards
    Badari
    Edited by: Badari Narayana1 on Nov 19, 2009 8:10 PM
    Edited by: Badari Narayana1 on Nov 19, 2009 8:11 PM

    If memory serves correctly, you have to use change documents for this.
    Read the documentation for FM CHANGEDOCUMENT_READ . You will also find lots of information in the forum.
    Rob
    Edited by: Rob Burbank on Nov 19, 2009 2:22 PM

  • Purchase Order History in smartform

    Hi gr8 minds
    I have developed smartform for purchase order .
    now i wanna develop amendment purchse order .
    any idea how to go for it .
    thanks & regards
    siddharth

    Hi Siddharth,
    As Samir has suggested you have to get this information from CDHRD and CDPOS. In one of the posts yesterday, Andreas and Rob have nicely mentioned how to fetch data from Change Document.
    Updated record should come in txt file
    CALL FUNCTION 'CHANGEDOCUMENT_READ'
      EXPORTING
    *   ARCHIVE_HANDLE                   = 0
    *   CHANGENUMBER                     = ' '
    *   DATE_OF_CHANGE                   = '00000000'
        objectclass                      = '<b>EINKBELEG</b>'
        OBJECTID                         = EKKO-EBELN "PO Number
    *   TABLEKEY                         = ' '
    *   TABLENAME                        = ' '
    *   TIME_OF_CHANGE                   = '000000'
    *   USERNAME                         = ' '
    *   LOCAL_TIME                       = ' '
    *   TABLEKEY254                      = ' '
    *   KEYGUID                          = ' '
    *   DATE_UNTIL                       = '99991231'
    *   TIME_UNTIL                       = '235959'
      tables
        editpos                          =  editpos
    EXCEPTIONS
       NO_POSITION_FOUND                = 1
       WRONG_ACCESS_TO_ARCHIVE          = 2
       TIME_ZONE_CONVERSION_ERROR       = 3
       OTHERS                           = 4
    IF sy-subrc <> 0.
    ENDIF.
    Regards,
    Subramanian V.

  • Table & Field Name Problem

    Hi Mentors,
    I am creating a z report in that one perticular field i want new value, old value details.
    Field is in MMR - Foreigh trade import - CAS numner (pharma) this field we are using for material status.( ex. A,B,C)
    Table Name - MARA Fiels name - CASNR
    This status we will change every three months. so when i am taking the report i need old value and new value status.
    For new value i will get from MARA-CASNR But, where i will find the old value table.
    Ex. if i edit master record MM02 and go to top - environment-dispay changes- in that i am finding the chage details, if i choose the details option i am getting old value and new value details.
    pls help me any one to find the old value details.
    Highly appreciated any solution
    award points if use ful answer
    Regards
    Laxman

    Hi Laxman,
    I have found one program Please check the same.
    *& Report  ZAK_MM_CHANGE_HISTORY                                       *
    REPORT  ZAK_MM_CHANGE_HISTORY                   .
    TABLES:
            CDHDR, CDPOS, MARA, MAKT, MARD.
    FIELD-GROUPS: HEADER.
    DATA: BEGIN OF CHGDOC OCCURS 50.
            INCLUDE STRUCTURE CDRED.
    DATA: END OF CHGDOC.
    DATA:
          CHGTYPE(1),
          PLANT(4),
          MATNR1 LIKE CHGDOC-OBJECTID.
    SELECT-OPTIONS:
        XMATNR  FOR CDHDR-OBJECTID,    "Material
        XUDATE  FOR CDHDR-UDATE,       "Change Date
        XUNAME  FOR CDHDR-USERNAME,    "User Name
        XTCODE  FOR CDHDR-TCODE,       "Transaction Code
        XWERKS  FOR MARD-WERKS.        "Plants
    SELECTION-SCREEN SKIP.
    *Filter change type
    SELECTION-SCREEN BEGIN OF BLOCK CHG0 WITH FRAME TITLE TEXT-001.
       PARAMETERS : XCHG1 AS CHECKBOX DEFAULT 'X',
                    XCHG2 AS CHECKBOX DEFAULT 'X',
                    XCHG3 AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF BLOCK CHG0.
    START-OF-SELECTION.
    INSERT:
            CHGDOC-OBJECTID        "Material
            CHGTYPE                "Change type
            PLANT
            CHGDOC-CHANGENR
            CHGDOC-USERNAME
            CHGDOC-UDATE
            CHGDOC-TCODE
            CHGDOC-TABNAME
            CHGDOC-TABKEY
            CHGDOC-CHNGIND
            CHGDOC-FNAME
            CHGDOC-FTEXT
            CHGDOC-TEXTART
            CHGDOC-OUTLEN
            CHGDOC-F_OLD
            CHGDOC-F_NEW
    INTO HEADER.
    SELECT * FROM MARA WHERE MATNR IN XMATNR.
       MATNR1 = MARA-MATNR.
       CALL FUNCTION 'CHANGEDOCUMENT_READ'
         EXPORTING
            ARCHIVE_HANDLE             = 0
            CHANGENUMBER               = ' '
            DATE_OF_CHANGE             = '00000000'
              OBJECTCLASS                = 'MATERIAL'
              OBJECTID                   = MATNR1
            TABLEKEY                   = ' '
            TABLENAME                  = ' '
            TIME_OF_CHANGE             = '000000'
            USERNAME                   = ' '
            LOCAL_TIME                 = ' '
         TABLES
              EDITPOS                    = CHGDOC
         EXCEPTIONS
              NO_POSITION_FOUND          = 1
              WRONG_ACCESS_TO_ARCHIVE    = 2
              TIME_ZONE_CONVERSION_ERROR = 3
              OTHERS                     = 4.
       LOOP AT CHGDOC.
          CHECK:  CHGDOC-UDATE    IN XUDATE,
                  CHGDOC-USERNAME IN XUNAME,
                  CHGDOC-TCODE    IN XTCODE.
        Chg type: 1. Part revision, 2. Price change, 3. Others
          CASE CHGDOC-TCODE.
             WHEN 'MM01' OR 'MM02' OR 'MM03'.  CHGTYPE = '1'.
             WHEN 'MR21'.  CHGTYPE = '2'.
             WHEN OTHERS.  CHGTYPE = '3'.
          ENDCASE.
        Filter chg type
          IF ( CHGTYPE = '1' AND XCHG1 <> 'X' ) OR
             ( CHGTYPE = '2' AND XCHG2 <> 'X' ) OR
             ( CHGTYPE = '3' AND XCHG3 <> 'X' ).
             CONTINUE.
          ENDIF.
        Plant is a substring of tabkey
          PLANT = CHGDOC-TABKEY+21(4).
          IF NOT ( XWERKS IS INITIAL ) AND NOT ( PLANT IS INITIAL ).
             CHECK PLANT IN XWERKS.
          ENDIF.
          EXTRACT HEADER.
       ENDLOOP.
    ENDSELECT.
    END-OF-SELECTION.
    SORT.
    LOOP.
    Material
       AT NEW CHGDOC-OBJECTID.
          SELECT SINGLE * FROM MAKT  WHERE MATNR = CHGDOC-OBJECTID.
          FORMAT INTENSIFIED ON.
          SKIP.  SKIP.
          WRITE:/' *** Material:', (18) CHGDOC-OBJECTID, MAKT-MAKTX.
       ENDAT.
    Change type
       AT NEW CHGTYPE.
          FORMAT INTENSIFIED ON.
          SKIP.
          CASE CHGTYPE.
             WHEN '1'.   WRITE:/ '  **  Change type:  PARTS REVISION'.
             WHEN '2'.   WRITE:/ '  **  Change type:  PRICE CHANGE'.
             WHEN '3'.   WRITE:/ '  **  Change type:  OTHERS'.
          ENDCASE.
          SKIP.
       ENDAT.
       SHIFT CHGDOC-F_OLD LEFT DELETING LEADING SPACE.
       SHIFT CHGDOC-F_NEW LEFT DELETING LEADING SPACE.
       FORMAT INTENSIFIED OFF.
       WRITE:
         /     PLANT          UNDER 'Plant',
          (50) CHGDOC-FTEXT   UNDER 'Field',
          (45) CHGDOC-F_OLD   UNDER 'Old value',
          (45) CHGDOC-F_NEW   UNDER 'New value'.
       AT NEW CHGDOC-CHANGENR.
          FORMAT INTENSIFIED OFF.
          WRITE:
               CHGDOC-CHANGENR   UNDER 'Change doc',
               CHGDOC-TCODE      UNDER 'Tcod',
               CHGDOC-USERNAME   UNDER 'User name   ',
               CHGDOC-UDATE      UNDER 'Date    ' DD/MM/YY.
       ENDAT.
       AT END OF CHGDOC-OBJECTID.
          SKIP.
          ULINE.
          SKIP.
       ENDAT.
    ENDLOOP.
    TOP-OF-PAGE.
    WRITE: / SY-DATUM, SY-UZEIT,
        50 'ABC PTE LTD',
       100 'page', SY-PAGNO,
           / SY-REPID,
        48 'Change Documents Report',
       100 SY-UNAME.
    SKIP.
    ULINE.
    WRITE:/3
            'Change doc',
            'Tcod',
            'User name   ',
            'Date    ',
            'Plant',
       (50) 'Field',
       (45) 'Old value',
       (45) 'New value'.
    ULINE.
    Go to SE38 Create one Z report and paste the program without disturbing anything and execute. If it doesnot show any values in this report use Leading zeros formulae ieGive material no like 000000000000100222 etc. Try this i have tried in my system and its working.
    Reg,
    Ashok
    Assign points if useful.

  • Retrieving latest changed date UDATE for Vendor.

    Hi All,
    I have a requirement to retrieve latest changed date UDATE field from CDHDR table based on company code wise??.
    As the vendor can be same for different company codes, I need to retrieve the company code wise latest changed date of vendor.
    Hope am clear.
    Currently am doing this 
    SELECT objectclas objectid tcode udate
        FROM cdhdr INTO  CORRESPONDING FIELDS OF TABLE it_cdhdr
        FOR ALL ENTRIES IN it_lfa2
        WHERE objectclas = 'KRED' AND
              objectid   = it_lfa2-objectid
        AND   change_ind = 'U'.
    SORT it_cdhdr BY objectid udate  DESCENDING.
    Its giving me the latest changed date. But I need latest changed date -company code wise?
    Any help is highly appreciated.
    Thanks & regards
    Himayat.

    Hi,
    Use function module CHANGEDOCUMENT_READ to get the details of CDHDR as well as CDPOS data. Records of table CDPOS where TABNAME = 'LFB1' will have the details related to changes in company-specific data.  Structure EDITPOS of above function module will give you detail information.
    Regards
    Vinod

  • Updated record should come in txt file

    Hi Friends,
    My requirements like this way, any changes make in mara, mard, mbew, makt, vbak, vbap, vbrk and abrp table. that newly created data should come in .txt file of application server.
    I have already developed a program for that. it is downloading data in every 3 hours slots. it is running in background. whatever changes made during these hours it will download.
    now, my requirement has been changed, instance data should come in .txt file of app server. e.g. when newly created record save in database table, same time that record should come in .txt file with proper format.
    is it possible? please let me know.
    Thanks in advance,
    Parag

    Hi Parag,
    To obtain changes you know you can get the details from the tables CDHDR and CDPOS.
    Also you have questions about performance and so. SO here are some details.
    - When you flag a data element for change document (is checked) it is ONLY a marker that allows for registration of this field's changes into CDHDR and CDPOS. The actual control is done on datafile level in its technical settings (Transaction SE11 with datafile name and then push button "Technical Settings" or CtrlShiftF9). Herein you will find a flag "Log data changes".
    Within the CDHDR file and CDPOS file a field OBJECTCLAS is used. Only for existing OBJECTCLAS values the changes are logged.
    - Now obvious this is the trick for standard SAP (as Subramanian has already pointed out you can find "OBJECTCLAS" values with transaction SCDO). If you want to know on how to create your own "OBJECTCLAS" values with working logging on your own designed fields follow Subramanian suggestion and read the documentation.
    Now to your questions:
    You gave some tables you need to track changes (and now also for initial creation) like MARA, MARD, MAKT and others.
    To get changes for these tables use the following "OBJECTCLAS" values:
    - MATERIAL (Tables MARA, MARC, MARD, MBEW, MFHM, MLGN, MLGT, MPGD, MPOP and MVKE). By-the-way, this object will be replaced by MATERIAL_N  (available from release 4.6x).
    - VERKBELEG (Tables VBAK, VBAP, VBEP, VBKD, VBLB, VBPA, VBPA2 and VBUK).
    To collect changes (suggested by Andreas) you could use function module CHANGEDOCUMENT_READ. This is very usefull if also archiving is active for the objects you need to track changes for and your changes are scattered through time, but for your problem it is better to approach the log data directly.
    1. First select the main change documents from CDHDR table for a given "OBJECTCLAS" and "OBJECTID". Here you can use additional filtering on DATE (field UDATE) and TIME (field (UTIME). Even filtering on a specific transaction is possible (field TCODE).
    This gives you a number of change documents (field CHANGENR).
    2a. Secondly select the specific field changes from table CDPOS by using the found fields from CDHDR and additionally fill TABNAME with the specific table and if required FNAME with the specific field name. 2b. Since in your case the values will not be known, you need to track changes, you have to be very carefull in your selections. If you track the object MATERIAL or MATERIAL_N, you best loop over the MARA table and for each MATNR fill the OBJECTID field of CDHDR with this MATNR value.
    3. In order to find NEWLY created items you need to check the CHANGE_IND flag. When 'I' it is an new insert, when 'U' it is an update. Now this rule applies ONLY to key fields, since SAP first creates the key record (CHANGE_IND = 'I') and then the other fields (CHANGE_IND = 'U').
    Finally the warning given by Andreas (runtime increases - you MUST select with OBJECTCLAS and OBJECTID) is very important. Not supplying OBJECTID will have a very heavy impact on the runtime.
    Hope this gives you some clues on how to approach your problem.
    Regards,
    Rob.

  • How to get the change document Number.

    Hi,
    We have a scenario where the any customer master changes need to be send to the agent. I thought of using CDHDR,CDPOS.I've checked the FMS CHANGEDOCUMENT_READ and position header FMS too.even for these we need to provide the object class.
    But for them we need to have the document number and object class. They can be changed from any transactions. We have many Z transactions through which he can change the customer master data too,but finally master tables only get updated. Is there any FM to find the document numbers.
    Thanks,
    Bharathi.

    Hi Bharti,
    In such situation, you can create the event based on the CDHDR table entries. In fact, based on the object ID and object class, the recent change document can be picked up. If standard change object does not work, a Z change document can be created. This practice can help in picking the change in selected fields as the master tables can be updated in many fields which are not relevant for the requirement.
    Do let me know in case you need more help on it.
    Thanks,
    Jyoti

Maybe you are looking for

  • Custom sorting in data grid

    Sorting entire records Problem: Assume you have an array of 20 items (master array), and first 5 items are pulled into another array (paged array), Which is the dataprovider for the datagrid. And the datagrid has 10 columns. When the user sorts on th

  • Design view of CSS layout is innacurate

    Hello all - I'm beginning to redraft my company's hompage using a full CSS layout instead of our current nested table layout. Since I need to ensure that other staff members can edit pages freely - and I'm the only person comfortable doing straight c

  • Adobe Flash Plugin not showing up in Finder

    Very frustrated here. I have installed and uninstalled the latest version of adobe flash trying to get it to work on OSX 10.7 and it's just not showing up in my plugins in Finder. What is going on? I can't watch video content or other flash on this M

  • How to cluster ISE 1.2.1.98

    Hi Team, I have 6 boxes of ISE and we planned to make 2 as a PSN's. how about other 4 ISE ...? How should i cluster them as admin and monitor nodes..?

  • System-independent (and transportable) web service

    Hello, I would like to use a web service in my Interactive Form. Therefore, I created an RFC function module and created the corresponding web service. Then I launched SOAMANAGER to get the URL of the WSDL file, copy it, changed it a bit (removed the