Change documents for the custom transaction

hi,
how could we trap the changes in our custom transaction to CDHDR,CDPOS tables.
we had created the object and generated update information.
where exactly we should call our  write_document function module (generated in the object class ) in our module pool program.

Activate the 'Change document' checkbox for data element. You must updating some table by your program. So just check the 'Change document'  checkbox for those dataelement that you are updating in the table.
You will find the 'Change document' checkbox in the following path : dataelement-> farther element->'Change document'  checkbox.
Now, if that checkbox is checked, the CDHDR and CHPOS table will be updated whenever you do any chnge in the table.
Now you can readthe table with a date to find out whether the bable is modified.
Now performance wise it is better to use change pointer instead of change document. Change pointer also do the same functionality as the change document.
To do that go to BD52, give a message type andd all the table and fields for which you are updating through your program.
Now you can use 'Change_pointer_read' FM to read the values that are change.
Ex:
        CALL FUNCTION 'CHANGE_POINTERS_READ'
          EXPORTING
            message_type                = gc_message_type
            creation_date_high          = s_erdat-high
            creation_date_low           = s_erdat-low
            creation_time_high          = gc_time_high
            creation_time_low           = gc_time_low
            read_not_processed_pointers = 'X'
          TABLES
            change_pointers             = lt_chgptrs_tab.
gc_message_type message you have given in BD52 and you will get all the chaged element in lt_chgptrs_tab.
Now after reading the values to update the fact that you have read those values you have to call another FM.
          CALL FUNCTION 'CHANGE_POINTERS_STATUS_WRITE'
            EXPORTING
              message_type           = gc_message_type
            TABLES
              change_pointers_idents = gt_pointer_id.
          COMMIT WORK.
gt_pointer_id will have all the change pointer ids from lt_chgptrs_tab table that you have already reead.
The table for change pointer is BDCP.

Similar Messages

  • Change Documents for the table EKET

    Hi ,
    We create a purchase order from ME21N . We do have some data for delivery schedule for the data .
    This delivery schedule data gets stored in tabe EKET . When this PO is processed from V_V2 the dates
    in the  delivery schedule are overwritten and he new values will be even in the table EKET .  When I follow  
    the navigation  Environment -> Item Changes  I dont see the changes documents for these fate fields . I did
    debug through the FM   EINKBELEG_WRITE_DOCUMENT to see but it looks like it is not captuirng the fields .
    Now my requirement is to find where the change documents can be found for the date changes in the delivery
    schedule tab in the PO .  The fields of interest are  :
    EKET-SFLDT , EKET-DAT01, EKET-MBDAT , EKET-LDDAT , EKET-WADAT .
    I tried for some OSS notes too, but in vain . Can anyone please help to find out how we find the changes documents for these fields .
    <b>Also please tell me if there are any OSS notes which explain us to extend the table EKET .</b>
    Thanks and Regards ,
    Varun  .

    HI ,
    I did check the table CDHDR and CDPOS and also the change document is checked for the data element but no change documents are stored in CDHDR and CDPOS .
    <b>Did anyone ever extend the tabke EKET ? Any OSS notes available for this .</b>
    Regards ,
    Varun .
    Message was edited by: varun sonu

  • Change documents for the user in Ep7.0

    Hi,
    Is there a way can we track change documents for a user in user admin in AS java stack.We have LDAP sun 5.2 version as the datasource.in ABAP stack we have some thing like in suim the change docs.Thanks.

    Hi Ambarish,
    Please check the Security Logging (.../usr/sap/<SID>/j2ee/cluster/serverX/log/security.log) might helps.
    Security audit log - 1278155
    Refer to http://help.sap.com/saphelp_nw70/helpdata/EN/03/37dc4c25e4344db2935f0d502af295/frameset.htm
    Regards
    Arun Jaiswal

  • Creating change documents for VDH1N-customer hierarchy

    Hi
    i need to create change documents so that i can read the changes and extend DEBMAS06 to send customer hierarchy data to non-sap system using IDOC.
    can anyone let me know how to create change documents to customer hierarchy ...

    Hi
    i need to create change documents so that i can read the changes and extend DEBMAS06 to send customer hierarchy data to non-sap system using IDOC.
    can anyone let me know how to create change documents to customer hierarchy ...

  • Number range for the customized transaction

    Hi Experts,
    I am developing customized screen. When user saves after entering data a number should be generated automatically. Please tell how to maintain the number ranges for my transaction.
    Regards,
    B V Rao

    Hi,
    Go to SNRO tcode and enter an object to be created and press create button.
    Enter data element as S_CARR_ID and domain as POSNR
    and 10% as warning and save.
    create small program to update SCARR table with a carrid 01.
    data : begin of itab occurs 0.
    include structure scarr.
    data end of itab.
    itab-carrid = '01'.
    append itab.
    clear itab.
    modify scarr from table itab.
    and execute the program now your SCARR table will have 01 as carrid.
    now maintain the number ranges for your newly created object in SNRO tcode
    prees numer ranges button and enter 01 in Air line input field
    in your program where you want these number ranges
    declare a variable as follows
    data number type nriv-nrlevel.
    CALL FUNCTION 'NUMBER_GET_NEXT'
      EXPORTING
        nr_range_nr                   =  01  " Air line just you created
        object                        =  "the object name that you created in SNRO
      QUANTITY                      = '1'
       SUBOBJECT                     = '"naturally enter 01 ( which you assigned while creating N ranges)
      TOYEAR                        = '0000'
      IGNORE_BUFFER                 = ' '
    IMPORTING
       NUMBER                        = number
      QUANTITY                      =
      RETURNCODE                    =
    EXCEPTIONS
       INTERVAL_NOT_FOUND            = 1
       NUMBER_RANGE_NOT_INTERN       = 2
       OBJECT_NOT_FOUND              = 3
       QUANTITY_IS_0                 = 4
       QUANTITY_IS_NOT_1             = 5
       INTERVAL_OVERFLOW             = 6
       BUFFER_OVERFLOW               = 7
       OTHERS                        = 8
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Best Regards
    Ramchander Rao.K
    Edited by: ramchander krishnamraju on Dec 12, 2008 9:17 AM

  • Displaying change documents for custom fields  in FPP2

    I have added a new subscreen to the Business partner via BUPT. The new fields are on a custom table. I have created change documents for the new fields and all that is working fine - details are being written to CDHDR/CDPOS as expected. In the standard FPP2 transaction the user can select Extras / Partner changes which will display a list of the change documents. This does not include my custom fields.
    Does anyone know if it is possible to include my custom field changes in this list? I have searched several forums but cannot find any reference to this.

    Hi,
    Fix a break-point in the following function modules and check whether you are passing custom fields
    CHANGEDOCUMENT_SINGLE_CASE
    or
    CHANGEDOCUMENT_MULTIPLE_CASE
    SAP uses the above said function modules to update change documents. Its have two import paratmeters
    WORKAREA_OLD
    WORKAREA_NEW 
    or
    TABLE_OLD          
    TABLE_NEW 

  • Change Documents for SQ03

    Hi Experts,
    I want to know the changes documents for the transaction SQ03 (User Groups). There are some changes in user group/infoset assignments through this transaction. I want to know where we we can get this information in SAP ECC 6.0?
    Regards
    Keerthy Kumar

    Hi,
    This is SAP Business one system admin forum. Please find correct forum and repost above discussion to get more help.
    Close this thread here with helpful answers.
    Thanks & Regards,
    Nagarajan

  • Change history of the customer master

    Hi Gurus, need help.
    We have a customer requirement where a customer was assigned to multiple sales areas before, but the customer assignment to one of the sales areas is deleted.
    Where is the place where we can see the relavant change history for the customer master.
    regards,
    Krishna

    In customer master data, choose environment from Menu bar then select Fields Changes.
    There you will get info related to,
    -All Changes
    -Entries
    -Deletions
    -Field Names
    Similarly for Account Changes, choose environment from Menu bar and select Account changes. And correspondingly based requirement go for All Fields or Senesitive Fields.
    Hope it assist you.
    Thanks & Regards
    JP

  • Change Documents for Reservation

    Hi Masters
        How to find the change documents for the reservation?.I have Checked it in MB22 and tables CDHDR and CDPOS.I found nothing.Is there any other T code for finding this?
    Regards
    Mohan

    Hi
    Thank you for your reply
    I checked with the Tcode TLR5.I have given user name only and i am not getting the change documents.Could you please tell me what i am missing?
    Regards
    Mohan

  • Change documents for Classification View

    Hi,
    Can anyone please tell me how to activate Change documents for the Classification view of material master.  if we activate that one what will be consequences?
    Thanks in adavance

    CHANGING CLASSIFICATION VIEW FOR MATERIAL USING BAPI
    ->CREATE CHARACTERISTIC USING TCODE CT04
    ->CREATE CLASS USING TCODE CL01 .
    -> RUN THIS PROGRAM TO CHANGE THE CLASSIFICATION VIEW
    PARAMETERS: P_MATNR TYPE MARA-MATNR. "MATERIAL
    DATA: OBJECTKEY TYPE BAPI1003_KEY-OBJECT,
    OBJECTTABLE TYPE BAPI1003_KEY-OBJECTTABLE,
    CLASSNUM TYPE BAPI1003_KEY-CLASSNUM,
    CLASSTYPE TYPE BAPI1003_KEY-CLASSTYPE,
    ALLOCVALUESNUMNEW TYPE TABLE OF BAPI1003_ALLOC_VALUES_NUM WITH HEADER LINE,
    ALLOCVALUESCHARNEW TYPE TABLE OF BAPI1003_ALLOC_VALUES_CHAR WITH HEADER LINE,
    ALLOCVALUESCURRNEW TYPE TABLE OF BAPI1003_ALLOC_VALUES_CURR WITH HEADER LINE,
    RETURN TYPE TABLE OF BAPIRET2 WITH HEADER LINE.
    OBJECTKEY = P_MATNR.
    OBJECTTABLE = 'MARA'.
    CLASSNUM = 'MTS_CABLE_BIN1'. "CLASS(CREATED USING CL01)
    CLASSTYPE = '023'. "CLASS TYPE (023 FOR BATCH)
    CALL FUNCTION 'BAPI_OBJCL_CHANGE'
    EXPORTING
    OBJECTKEY = OBJECTKEY
    OBJECTTABLE = OBJECTTABLE
    CLASSNUM = CLASSNUM
    CLASSTYPE = CLASSTYPE
    STATUS = '1'
    STANDARDCLASS =
    CHANGENUMBER =
    KEYDATE = SY-DATUM
    NO_DEFAULT_VALUES = ' '
    IMPORTING
    CLASSIF_STATUS =
    TABLES
    ALLOCVALUESNUMNEW = ALLOCVALUESNUMNEW
    ALLOCVALUESCHARNEW = ALLOCVALUESCHARNEW
    ALLOCVALUESCURRNEW = ALLOCVALUESCURRNEW
    RETURN = RETURN
    LOOP AT RETURN.
    WRITE: / RETURN-TYPE ,RETURN-MESSAGE.
    ENDLOOP.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT =
    IMPORTING
    RETURN =
    BY VENKAT

  • Activating 'change documents' for notification item class 015

    Dear Experts,
    Kindly help me in activating  'change documents' for notification item class 015.
    Thanks and Regards,
    R N Sabat

    Hi R N Sabat
    The creation of change documents for the classification has to be
    activated for every class type. Go please to the customization of the
    appropriate class type:
    Cross-Application Components
    -> Classification System
      -> Classes
       -> Maintain Object Types and Class Types
    You will find there a flag to activate change documents.
    As a precondition you'll have to activate the flag 'Multiple objects
    allowed' before. If you already have classified objects
    for this class type these classifications has to be converted before.
    For the conversion of already existing classifications use please report
    RCCLUKA2. It processes the conversion and sets the flag 'Multiple
    objects allowed'. Regard please the documentation of report RCCLUKA2.
    Thereafter you'll be able to activate change documents for this class
    type.
    Please check the 2 notes :
    80907 Setting the several objs.for each class type indctr
    65124 Classification Change Documents
    If you have any questions , please let me know .
    Enda.

  • Article Change Documents for Custom Fields

    Hi,
    We have lot of custom fields defined in the article master. When the custom fields are changed through the online transaction, the changes are recorded in the change document tables (CDHDR / CDPOS). If the changes are made through the "BAPI_MATERIAL_MAINTAINDATA_RT" the changes are not getting recorded in the change document tables and hence they cannot be viewed under "Environment -> Display Changes". Lately, this is causing big issues as users are using the custom attributes more seriously now..and we're having issues tracing back the changes...Users do not use online transactions to make the changes..The changes are submitted through the portal which are then submitted through the ARTMAS IDOC which in turn calls the BAPI....
    We want to activate the change document functionality through IDOCs/BAPI....Is it configurable or has to be coded somewhere in the BAPI where it generates the custom segments for the custom fields....
    Any help would be greatly appreciated
    Thanks,
    Sri

    Hi,
            You can use txn BD51 in which you can specify "BAPI_MATERIAL_MAINTAINDATA_RT" and use "o" as Input without checking the Dialog allowed option.
    I assume that you have already done the relevant settings for the change pointers for message type ARTMAS( BD50) and activate change poiinter for relevant document changes (in Txn BD52 by maintaining the relevant Object - MAT_FULL,Table name - MARA and ZZ fields)
    Hope this helps,
    Best Regards,
    Aram.

  • Report for abserving changes made to the customer master and moniter

    Report for abserving changes made to the customer master and moniter and detail
    Please send with t. code.

    Hi Dhari,
    Well the requirement seems very simple but its not as simple as it looks.
    i have an idea not sure whether it gonna work or not. you need to build a history cube as if i understand your requirement then for any selected period you wanna see the change in wage type or pay rate for each employee if any.
    1. pick up an cube that builds on emp transaction data.
    2. add the 0empoyee Md, wage type and pay rate from MD to the cube and fill the cube
    3.so now every day or in scheduled time interval the MD will load and the corresponding the TD will be loaded to the cube.
    4. create a info object say indicator and add it to the cube
    5.while loading the data to the cube everyday in tranformation check if for same employee there is a change or not in the wage type and pay rate. If so set the indicator to 1.
    4.now build one more cube for holding the changed records from this cube and call it say zhrchange
    5. now pull the date, year and related emplyee information for the emplyee to the zhrchange for those with indicator 1.
    6. before the next load happen, rememrbe to set the indicator to 0 before checking the conditoin in the transformation routine , so that only if the conditoin satisfy then only it will be 1 else it will be 0.
    now the cube zhrchange has all the changed records with time stamp and you can base your query on that to get the changed values in specific time period
    hope this helps.

  • Creation of Change document for HR Assignemnt Infotype in Transaction- CR02

    Hi,
       I have to create change document for HR Assignment in Transaction CR02.
    I have gone thru the documentation available in SAP help.
    Please help me if anybody has worked on it.
    Thanks & Regards,
    Alok.

    Hi Raja,
    I didn't quite understand what you mean by creating/changing data using transaction codes, because within SAP MDM 3.0 you are in a portal environnment and don't work with transaction codes.
    General remark: Information on the up-to-date MDM 5.5 is provided in the Service Marketplace. For an overview of MDM 5.5, see also http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/mdm/capabilities provided with sap mdm 5.5.pdf.
    Kind regards, Markus

  • Change documents for created for Customer Master

    An existing program makes changes to the Customer master table KNA1. The changes are made at the table level using the UPDATE command. Since the changes are being made at table level, the change documents are not created.
    I need to create IDocs for all changes. So the question is, how to create change documents for changes to the particular fields being UPDATEd in the report program.
    I understand that a BDC program on XD01 screen should have been the best way for this, but I'm here to break-fix and trying to identify solutions with least development effort.

    Hi ganadeep,
    When an application makes any changes to an object it wrties change documents which are stored in the table CDHDR and CDPOS for each change made.
    BDCP table holds the change pointers which point to the change documents in the  CDHDR table.
    Regards
    Parag

Maybe you are looking for