USE OF CDHDR & CDPOS Tables

Hi
could any one pls let me know about the use of CDHDR and CDPOS Tables
and what role they can play in capturing Deltas
Regards
D

CDHDR has header information for changes in objects.
CDPOS has the information for the positions of the object.
<a href="http://www.sap123.com/showthread.php?t=47">Example with Screenshots</a>
Also Look at :
https://forums.sdn.sap.com/click.jspa?searchID=5749799&messageID=1456945
Re: Delta - Records changed directly in table
Generic delta queue for CDHDR
LBWE, delta extraction without BW

Similar Messages

  • How to find OBJECTCLAS value to use in CDHDR/CDPOS tables?

    Hi Experts,
    Please help me the way to find out the objectclas, we use in CDHDR/CDPOS tables

    Pls refer to the thread,
    Object class for CDHDR
    BR,
    Krishna

  • Reg: Object class stored in CDHDR , CDPOS tables

    Hi Guys,
    we have released blocked Invoice document using transaction MRBR, it is released. we have developed manually zprogram all the invoices which are released manually. but when execute we were unable to get details manually released documents. Here we observed data is fetching from CDHDR,  CDPOS tables. Upon observation the Object class we found after released the invoice is getting saved with object class " BELEG". but in zprogram objcet class checking with " INCOMINGINVOICE".
    can you explain the which scenario object class is saved with "BELEG",  object class is saved with " INCOMINGINVOICE".
    Thanks!
    Mahendar Patha.

    Hi Steve,
    (If I understood your question correctly then) Under the Object Value Column 0350035419 is the Customer number. Also under Table key column 1st three characters are your client i.e. 050 followed by customer number 0350035419.
    -ruby

  • FOR ALL ENTRIES - CDHDR / CDPOS Tables

    Hi,
    I know there have been a lot of threads concerning the "for all entries" statement. Nevertheless I got a problem downloading the change document tables CDHDR/CDPOS with this statement and I haven't found anything in this forum regarding this special issue.
    While trying the for all entries statement in the below manner for downloading first CDHDR and then the CDPOS for all entries of the selected CDHDR it took 3 days and didn't finish, so we aborted the ABAP. The JOIN statement doesn't work in a 4.6c environment for the Cluster tables, hence this isn't an option.
    Can you give me some advise of how to improve downloading those tables in this way:
    1. Download CDHDR with limitation of fields OBJECTCLAS and UDATE
    2. Then Download CDPOS for all CHANGENR out of the first selection of CDHDR
    This was the way I tried it:
    SELECT
    ACT_CHNGNO  CHANGE_IND  CHANGENR  MANDANT  OBJECTCLAS  OBJECTID  PLANCHNGNR  TCODE  UDATE  USERNAME  UTIME  WAS_PLANND APPENDING CORRESPONDING FIELDS OF TABLE T_CDHDR FROM CDHDR WHERE UDATE IN  s_UDAT1 AND OBJECTCLAS IN  s_OBJE0.
    ENDSELECT.
    SELECT
    CHANGENR  CHNGIND  CUKY_NEW  CUKY_OLD  FNAME  MANDANT  OBJECTCLAS  OBJECTID  TABKEY  TABNAME  UNIT_NEW  UNIT_OLD  VALUE_NEW  VALUE_OLD INTO gs_CDPOS FROM CDPOS CLIENT SPECIFIED for all entries in  T_CDHDR WHERE OBJECTCLAS IN  s_OBJE2 AND MANDANT EQ  T_CDHDR-MANDANT AND OBJECTCLAS EQ  T_CDHDR-OBJECTCLAS AND CHANGENR EQ  T_CDHDR-CHANGENR.
    ENDSELECT.

    THis prg might b usefull to u
    *  Mass display or print Purchase Order History
    *  You can request report by :
    *  1.  Change date
    *  2.  User Name
    *  3.  Purchase Order Number
    *  4.  Vendor Code
    * Written by : SAP Basis, ABAP Programming and Other IMG Stuff
    *              http://www.sap-img.com
    REPORT ZPOCHANGE LINE-SIZE 132 NO STANDARD PAGE HEADING
                     LINE-COUNT 065(001)
                     MESSAGE-ID VR.
    TABLES: DD04T,
            CDHDR,
            CDPOS,
            DD03L,
            DD41V,
            T685T,
            VBPA,
            TPART,
            KONVC,
            EKKO.
    SELECT-OPTIONS: XUDATE FOR CDHDR-UDATE,
                    XNAME  FOR CDHDR-USERNAME,
                    XEBELN FOR EKKO-EBELN,
                    XLIFNR FOR EKKO-LIFNR.
    SELECTION-SCREEN SKIP.
    * TEXT-001 - Sorting Sequence
    SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: SUDATE RADIOBUTTON GROUP R1,
                SNAME  RADIOBUTTON GROUP R1,
                SOBID  RADIOBUTTON GROUP R1.
    SELECTION-SCREEN END OF BLOCK BLK1.
    DATA: WFLAG,
          WCHANGENR LIKE CDHDR-CHANGENR.
    DATA: INDTEXT(60) TYPE C.
    DATA: BEGIN OF ICDHDR OCCURS 50.
            INCLUDE STRUCTURE CDHDR.
    DATA: END OF ICDHDR.
    DATA: BEGIN OF ICDSHW OCCURS 50.
            INCLUDE STRUCTURE CDSHW.
    DATA: END OF ICDSHW.
    DATA: BEGIN OF EKKEY,
            EBELN LIKE EKET-EBELN,
            EBELP LIKE EKET-EBELP,
            ETENR LIKE EKET-ETENR,
          END OF EKKEY.
    DATA: BEGIN OF ITAB OCCURS 50,
            BEGIN OF EKKEY,
              EBELN LIKE EKET-EBELN,
              EBELP LIKE EKET-EBELP,
              ETENR LIKE EKET-ETENR,
            END OF EKKEY,
            CHANGENR LIKE CDHDR-CHANGENR,
            UDATE    LIKE CDHDR-UDATE,
            UTIME    LIKE CDHDR-UTIME,
            USERNAME LIKE CDHDR-USERNAME,
            CHNGIND  LIKE CDSHW-CHNGIND,
            FTEXT    LIKE CDSHW-FTEXT,
            OUTLEN   LIKE CDSHW-OUTLEN,
            F_OLD    LIKE CDSHW-F_OLD,
            F_NEW    LIKE CDSHW-F_NEW,
          END OF ITAB.
    DATA: OLD_OBJECTID LIKE CDHDR-OBJECTID.
    FIELD-SYMBOLS: <F_OLD>, <F_NEW>.
    SELECT * FROM EKKO WHERE EBELN IN XEBELN AND
                             LIFNR IN XLIFNR.
      CLEAR CDHDR.
      CLEAR CDPOS.
      CDHDR-OBJECTCLAS = 'EINKBELEG'.
      CDHDR-OBJECTID   = EKKO-EBELN.
      PERFORM GETCHGDOCS.
    ENDSELECT.
    IF SUDATE = 'X'.
      SORT ITAB BY UDATE EKKEY-EBELN CHANGENR EKKEY-EBELP
                   EKKEY-ETENR.
    ELSEIF SNAME = 'X'.
      SORT ITAB BY USERNAME EKKEY-EBELN CHANGENR EKKEY-EBELP
                   EKKEY-ETENR.
    ELSE.
      SORT ITAB BY EKKEY-EBELN CHANGENR EKKEY-EBELP EKKEY-ETENR.
    ENDIF.
    LOOP AT ITAB.
      CLEAR: INDTEXT, EKKEY.
      CASE ITAB-CHNGIND.
        WHEN 'U'.
            INDTEXT(50) = ITAB-FTEXT.
            INDTEXT+51  = TEXT-020.
            CONDENSE INDTEXT.
        WHEN 'D'.
            INDTEXT = TEXT-021.
        WHEN 'E'.
            INDTEXT(5) = ITAB-FTEXT.
            INDTEXT+51 = TEXT-021.
            CONDENSE INDTEXT.
          WHEN 'I'.
            INDTEXT = TEXT-022.
        ENDCASE.
        RESERVE 4 LINES.
        IF WCHANGENR NE ITAB-CHANGENR.
          WCHANGENR = ITAB-CHANGENR.
          EKKEY = ITAB-EKKEY.
          WRITE:/ ITAB-UDATE UNDER 'Change Date',
                  ITAB-UTIME UNDER 'Time',
                  ITAB-USERNAME UNDER 'User Name',
                  ITAB-EKKEY-EBELN UNDER 'PO No',
                  ITAB-EKKEY-EBELP UNDER 'Item',
                  ITAB-EKKEY-ETENR UNDER 'Sch No',
                  INDTEXT     UNDER 'Changes'.
        ELSEIF ITAB-EKKEY NE EKKEY.
          WRITE:/ ITAB-EKKEY-EBELP UNDER 'Item',
                  ITAB-EKKEY-ETENR UNDER 'Sch No',
                  INDTEXT     UNDER 'Changes'.
        ENDIF.
        CASE ITAB-CHNGIND.
          WHEN 'U'.
            ASSIGN ITAB-F_OLD(ITAB-OUTLEN) TO <F_OLD>.
            ASSIGN ITAB-F_NEW(ITAB-OUTLEN) TO <F_NEW>.
            WRITE: / TEXT-023  UNDER 'Changes',
                     <F_OLD>.
            WRITE: / TEXT-024 UNDER 'Changes',
                     <F_NEW>.
          WHEN 'E'.
            ASSIGN ITAB-F_OLD(ITAB-OUTLEN) TO <F_OLD>.
            WRITE: TEXT-023 UNDER 'Changes',
                   <F_OLD>.
        ENDCASE.
        SKIP.
    ENDLOOP.
    TOP-OF-PAGE.
    WRITE:/ SY-DATUM,SY-UZEIT,
           50 'P U R C H A S E  O R D E R   H I S T O R Y',
          120 'Page', SY-PAGNO.
    WRITE: / SY-REPID,
             60 'Purchase Orders Changes'.
    SKIP.
    ULINE.
    IF SUDATE = 'X'.
      WRITE:/001 'Change Date',
             014 'Time',
             024 'User Name',
             038 'PO No',
             050 'Item',
             057 'Sch No',
             065 'Changes'.
    ELSEIF SOBID = 'X'.
      WRITE:/001 'PO No',
             013 'Item',
             020 'Sch No',
             028 'Change Date',
             041 'Time',
             051 'User Name',
             065 'Changes'.
    ELSE.
      WRITE:/001 'User Name',
             015 'Change Date',
             028 'Time',
             038 'PO No',
             050 'Item',
             057 'Sch No',
             065 'Changes'.
    ENDIF.
    ULINE.
    FORM GETCHGDOCS.
      CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
           EXPORTING
                DATE_OF_CHANGE    = CDHDR-UDATE
                OBJECTCLASS       = CDHDR-OBJECTCLAS
                OBJECTID          = CDHDR-OBJECTID
                TIME_OF_CHANGE    = CDHDR-UTIME
                USERNAME          = CDHDR-USERNAME
           TABLES
                I_CDHDR           = ICDHDR
           EXCEPTIONS
                NO_POSITION_FOUND = 1
                OTHERS            = 2.
      CHECK SY-SUBRC EQ 0.
      DELETE ICDHDR WHERE CHANGE_IND EQ 'I'.
      CHECK NOT ICDHDR[] IS INITIAL.
      LOOP AT ICDHDR.
        CHECK ICDHDR-UDATE IN XUDATE.
        CHECK ICDHDR-USERNAME IN XNAME.
        CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
                     EXPORTING  CHANGENUMBER       = ICDHDR-CHANGENR
                     IMPORTING  HEADER             = CDHDR
                     TABLES     EDITPOS            = ICDSHW
                     EXCEPTIONS NO_POSITION_FOUND  = 1
                                OTHERS             = 2.
        CHECK SY-SUBRC EQ 0.
        LOOP AT ICDSHW.
          CHECK ICDSHW-TEXT_CASE EQ SPACE.
          MOVE-CORRESPONDING ICDSHW TO ITAB.
          MOVE-CORRESPONDING ICDHDR TO ITAB.
          MOVE ICDSHW-TABKEY+3 TO ITAB-EKKEY.
          APPEND ITAB.
        ENDLOOP.
      ENDLOOP.
    ENDFORM.
    * END OF PROGRAM

  • How to get deleted project definitions information from CDHDR CDPOS tables

    Hi,
    I want to get project definitions or WBS ELmenets that got deleted from CJ02 or CJ12. We can get this information from CDHDR or CDPOS table by passing PROJ object class but in this table changes (change or deletion) are not captured. so can anybody please let me know how to activate object class PROJ or how to track changes in CDHDR or CDPOS table?
    Regards,
    M, Manohar
    <Contact information removed by moderator>
    Edited by: Vinod Kumar on Sep 19, 2011 3:37 PM

    Hi,
    If the requirement is to identify when the project / WBS was deleted, then alternate oprion is to pass the WBS OBJNR to JCDS. JCDS will give you the status updates happened on a project and also when and who made the changes.
    Regards
    Sreekanth

  • Changes not reflected in table CDHDR/CDPOS using production order(CO02)

    Hi experts..
    i want to extract all the changed\new entries from table RESB (reservation table). The object class for this table is ORDER. I m using CDHDR/CDPOS tables for retrieving the changes. But the changes reflected in RESB using Service Order transaction (iw32) only is getting updated in CDHDR/CDPOS, not through Production Order transaction (co02). Any idea about this problem ?

    Hi,
    Refer this wiki code ALV Grid Display with checkbox to process selected records at runtime, it will definitely help you:-
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/alv%252bgrid%252bdisplay%252bwith%252bcheckbox%252bto%252bprocess%252bselected%252brecords%252bat%252bruntime
    Regards,
    Tarun

  • How to use CDHDR and CDPOS tables

    Hello Gurus,
    How can the data be extracted from CDHDR and CDPOS tables ?
    For example, I want to find the changes for the material master, what is the object need to be given in the OBJECT value etc..
    I tried to use restricting the transaction MM02 and the date valid from and to, but it is taking longer time.
    Appreciate, if you can provide the objects which can be used to track the changed data like Production orders etc..
    Thanks
    Aadhya

    Hi Aadhya,
    For the Change Document Object (OBJECTCLAS), you can use the following item:
    MATERIAL = material master
    ORDER = production order/maintenance order
    EINKBELEG = purchasing document
    VERKBELEG = sales document
    The Object Value (OBJECTID) is usually the object's number, such as material number, production order number, etc.
    Get the Document Number (CHANGENR) and go to CDPOS to see the changes detail.
    Regards,
    Julian

  • How to use Function module generated to update CDHDR CDPOS

    Hi,
    I have a Z-table, and I want to tracks the value changes in some fields,
    the data elements for those specific fields are marked for "Change document".
    I created a Change document object using the transaction SCDO and I got the function module.
    now can any one tell me how to use these function modules like ( what values need to be passed to function module. what value do we need to pass for   OBJECTID,..value for tables ...etc )
    I have a custom program to update/delete entries in the custom table so should I use the function module in my custom program to result an entry in CDHDR & CDPOS.
    how to display the old value and new values  for the fields specified to changes.
    Regards,
    Nagu.

    check in SE37
    RV_ORDER_FLOW_INFORMATION
    SD_SALES_DOCUMENT_READ
    SD_SALES_DOCUMENT_READ_POS
    SD_DOCUMENT_PARTNER_READ
    SD_DETERMINE_CONTRACT_TYPE
    SD_SALES_DOCUMENT_COPY
    SD_SALES_DOCUMENT_SAVE
    SD_SALES_DOCUMENT_ENQUEUE
    SD_PARTNER_READ
    RV_DELIVERY_PRINT_VIEW
    SD_PACKING_PRINT_VIEW
    SD_DELIVERY_VIEW
    RV_BILLING_PRINT_VIEW
    RV_PRICE_PRINT_HEAD
    RV_PRICE_PRINT_ITEM
    Rewards if useful...........
    Minal

  • Unable to join the tables CDHDR, CDPOS

    Hello,
    I want to create a Query connecting tables CDHDR & CDPOS to extract cost center details which are changed. To be precise, when cost center details are changed using transactions KS02 & KS03, I want to extract those details and run the report. I am unable to join the tables using SAP Queries SQ01, SQ02, SQ03.
    Kindly suggest me regarding the same.
    Thanks in advance.
    Regards
    Sravan Mulumudi.

    Hi Jeve,
    I was testing the report S_ALR_87012308, but this displays changes done to G/L accounts. I have tried every possibility. Could you please explain further ?
    Regards
    Sravan.

  • CDHDR and CDPOS tables are not updated

    Hi,
    When I am trying to change (or delete) Project definitions or WBS elements (changed all its related data which have change document ticked in its data element) those changes are not captured in CDHDR and CDPOS tables.
    Here in our system PROJ object class exists in SCDO t-code and has all its generated programs, but still not able to find changes in CDHDR and CDPOS tables.
    Can anybody plz let me know if I am missing anything or PROJ is not the appropriate object class or does BASIS team need to do any configuration to capture change documents in CDHDR or CDPOS tables because I do not see not even one record with PROJ object class in those tables.
    Appriciated for quick response.
    Regards,
    M, Manohar

    Hi Manohar,
    Even we have project system in my project.We are able to see the changes and we did not done any settings for that.Just check with your basis people else raise an oss note.I did not see any sap notes also related to that.
    Regards,
    Madhu.

  • Use of value change table cdpos

    i got the idea from madhvi (thanx) about using two tables when fetching data from cdpos table .like we can give tabname = 'eket'
    or = 'ekpo'.but what about fieldname which are associated with these two tables how to write feilds,like for the first two which belongs to eket table i write fname in ('eindt', 'menge') but what about the third field netpr related to second table ekpo.actually in output the changes of  only first two is reflecting if am using 'or'  for distingushing between tables and fields.

    Please refer to:
    1) [Applications Electronic Technical Reference Manuals (eTRM) |https://metalink2.oracle.com/metalink/plsql/tec_main.etrm?p_version=ETRM_SITE_URL]
    2) [Oracle Integration Repository |http://irep.oracle.com/]

  • Unable to proceed in change document are not updating in CDHD, CDPOS tables

    Hi all,
    This is a question related to Change document.
    I created one custom Change document object ‘ZBUDGETS’.
    As I am trying to place a trigger on FMIT (Total Funds Management) table I created a Change document object ‘ZBUDGETS’.
    I included some of the authorized fields from FMIT table on which we placed the trigger.
    And of course all those fields are change document enabled in the data element level. I generation of the update program was completed. And I got the function module zbudgets_write_document along with some include programs and structure.
    Everything is fine, But i am unable to get this change document generated information to these tables are CDHDR and CDPOS.
    the problem is when I make any expenditure like PO Posting, it will be logging in the FMIT table and the respective fields also updating. With this the Change document object should trigger and it should send the record in CDHDR and CDPOS tables. This is not happening. If the records are getting updated in the CDHDR and CDPOS tables I can use those include programs and function modules in my program to retrieve the changes in FMIT table.
    Since I am unable to proceed further since the documents are not updating in CDHDR and CDPOS tables.
    Prabhakar

    CDHDR and CDPOS will not be populated with entries only by creating the change document object.Change documents will be written to CDHDR and CDPOS tables only if the function zbudgets_write_document is called in the transaction which updates FMIT.
    You need to find an use exit in the transaction updating FMIT and call the function zbudgets_write_document in that exit.
    Refer the below link http://help.sap.com/saphelp_47x200/helpdata/en/2a/fa01b6493111d182b70000e829fbfe/content.htm
    -Kiran
    *Please reward useful answers

  • Is modifying CDPOS table is advisable???

    Hi ,
    For PWC audit as per the rules no credit card details should be stored in SAP system. For that we have written a Zprogram which will modify the Documents via FB02 trasaction but now the Changes are captured in CDHDR and CDPOS table. Now please suggest a way to remove that. Currently I'm Changing those credit card values in CDPOS to '*' using modify statement is that advisable ? if not please give me some suggestions.
    Thanks and Regards,
    Arun.

    I would not do that in a program executed in productive system. I would (your zprogram should run only once ?)
    create a first worjbench transport request with deactivation of the check,
    import and execute program
    create a second request with reactivation of flag
    If auditors disagree, to change flag either
    Look at FM like DDIF_DTEL_GET, _PUT and _ACTIVATE (read, update, activate data element). (*)
    Code the import of the request in a program (little oversized solution...) with FM like
    TMS_MGR_GREP_TRANSPORT_QUEUE  Check request in import queue
    TMS_MGR_FORWARD_TR_REQUEST  Add missing request to import queue
    TMS_MGR_IMPORT_TR_REQUEST  Execute import
    Regards,
    Raymond
    (*) Those FM are released for use, but are we allowed to change standard element is another matter...

  • Performance issue in CDHDR & CDPOS

    Hi,
      I'm having the below QUERY on CDHDR which take a <bowdlerized> lot of time:
    SELECT OBJECTCLAS
             OBJECTID
             CHANGENR
             TCODE
             UDATE
             UTIME
        INTO TABLE IT_CDHDR2
        FROM CDHDR
       WHERE OBJECTCLAS = C_OBJECT
         AND OBJECTID   = C_OBJECT
         AND ( TCODE    = C_TCODE1 OR                    
               TCODE    = C_TCODE2 ). 
    Then I've the other select query on CDPOS using for all entries on IT_CDHDR2. Both the queries are taking a lot of time.in the CDPOS select query I'm passing all the keys in order while I couldn't do that  for CDHDR. Kindly advise if anyone has worked on the performance issues with CDHDR/CDPOS. What are all the possible ways of improving the performance of CDHDR / CDPOS.
    Thanks:
    Gaurav
    Edited by: Rob Burbank on Jun 10, 2011 3:00 PM

    Hello Gaurav,
    basically John was right.
    Table CDHDR has first key fields MANDT, OBJECTCLAS, OBJECTID.
    Object ID is normally selective enough to provide good performance for the select that you mentioned.
    The only reason that comes to my mind is the outdated statistics.
    When the database decides whether to make an index scan or a full table scan, it looks at the table statistics (number of rows, selectivity, etc.).  Tables like CDHDR grow after GoLive of the system. If the statistics was last collected when this table was small, the database will think that it will be cheaper to do a full table scan. And it is not the case anymore.
    Please go to the transaction DB20 and update statistics for CDHDR and CDPOS tables.
    See if it helps.
    Regards,
      Yuri

  • Data source to be created on CDPOS table in CRM.

    Hi
    I have to create a data source on CDPOS table in CRM. I would like to know is it necessary
    for  me to include or join it in infoset query with CDHDR table.
    In my case I do not want to extract all the records from CDPOS , only the ones with the
    date fields changed and which has tab_key as *zdtcvn(say). The valid records matching this criteria
    won't be too much. So still do i need to take into consideration the CDHDR table to improve the
    index thing...
    Please advise.
    Thanks in advance
    Regards,
    kate.

    Hi Kate,
      This will be depend upon your requirement , if u need to extract header level info  also like who changed this document what is the time...e.t.c..THEN u need to add CDHDR also..Otherwise CDPOS is enough....
      Assign points , If useful...

Maybe you are looking for

  • How do I restore the white sync button on iPhone 4s?

    Last night I was attempting to add a Kindle book to my iPhone via the sync method. Something has gotten corrupted, as my iPhone no longer shows the white sync button option, under the iTunes /wifi option in settings.  When I open iTunes, it sees the

  • Error while refreshing webi reports

    Hi I am getting the below error when i try to refresh my webi reports in prod/uat/qa/dev These reports are developed on my team mate's id . Please assist regards, mahi

  • Can we park customer incoming payment

    Hello experts I am a end user of FI/co I have a problem that when we received the customer payment in our bank at that time we don't have the details of invoices which are included in amount which was we received in bank. But we want to keep update t

  • Error when trying to open an express window

    Hi Can anyone enlighten me on this error? It occurs when a button is selected to open another express window. USER ERROR: The EnterAt operation was invoked on a qqsp_Heap with an invalid row number (0). The row number must be >= 1 Class: qqsp_UsageEx

  • Premiere Pro CC Not Responding

    Spent an hour with online chat support and lets just say the pace at which the troubleshooting progressed was slower than slow.  My online chat case was 0186030659 for your reference.  It seems I figured out what the issue was in between the dead sil