Change Document program Generation

Hi all,
We are trying to capture changes to several ECC tables. We want to capture any change to that table. We want to know what kind of change (Insert, delete or update) and then the key of the record that has changed. Our goal is to capture the most updated information from a table after a change.  In order to achieve that we are using a process in which change document objects are created and changes are logged as change document in CDHDR and CDPOS tables. I have generated a program to extract data from CDPOS and CDHDR table. The following link describes the whole process of change log enablement
http://help.sap.com/saphelp_nw2004s/helpdata/en/2a/fa015b493111d182b70000e829fbfe/frameset.htm
a. Created a Change Document Object /TEST/ZXXXXXXXXXXXXX using transaction SCDO and assigned the tables to that Object.
Following function modules and generated parts are automatically generated, followed the above SAP Help document.
Include programs and function modules
Data declaration, TOP...................... /TEST/FZXXXXXXXXXXXXCDT
        Consisting of............................. /TEST/FZXXXXXXXXXXXXCDF
           and....................................... /TEST/FZXXXXXXXXXXXXCDV
Update function module..................... /TEST/ZXXXXXXXXXXXX_WRITE_DOCUMENT
Call updates function module................ /TEST/FZXXXXXXXXXXXXXCDC
I have included the generated /TEST/FZXXXXXXXXXXXXXCDT and /TEST/FZXXXXXXXXXXXXXCDC
to the main program of function module SAPLZxxxxx.  But I am getting syntax error in the Include /TEST/FZXXXXXXXXXXXXXCDC xxxxxx variable is not in the main program.
I need some help on this:
a.       As per SAP response what steps are left?
b.       Is there any other configuration step that we need to perform? The attached document talks about transactions SWED, SWEC and SWO1 in appendix D: Connecting Change document to work flow. We would like to understand if it will be relevant to our enablement work or can we by pass this and still be able to enable the change document logging for our tables
Any help is greatly appreciated...
Thanks,
Mili.

Instead of the main program SAPLxxx, try to put include /TEST/FZXXXXXXXXXXXXXCDT  into the TOP include of the main program. TOP include porgram name would be like LxxxxTOP. Try to compile it again.
Regards,
Naimesh Patel

Similar Messages

  • Change Pointers - adding a new field to existing Change Document

    Hi,
    We have a requirement to capture the changes made to the Material object through the transaction C223. The changes to field MKAL-PRFG_F have to be captured.
    There is an exisitng Change Document Object - MATERIAL. This is included in Message Type MATMAS. These are the steps we have done:
    1. In SCDO - added the Z structure to the Change Document Object - Material. [Z structure contains the field MKAL-PRFG_F. Change pointer option is checked for this Data element.
    2. Created a Z Message Type with reference as MATMAS.
    3. In BD52 - we have listed the fields for the new Z Message Type created.
    4. The Change Pointers - reactivated after the steps are done.
    The changes to the field MKAL-PRFG_F through C223 Tcode are not recorded in BDCPV table.
    Have we missed any steps here?
    Thanks,
    Pallavi

    HI,
    I don't think a new zmessage type is required in this case.. is the structure added to MARA table??The change document programs are there which triggers the iodcs... In SCDO transaction code , click on generation info for MATERIAL.. You will find the includes. The FM MATERIAL_WRITE_DOCUMENT creates entries in CDHDR and CDPOS, if we maintain entries in BD52 , the entries wil be written in BDCP and BDCPS tables.
    Try to add your structure in MARA table as append strucre and then you can debug the IDOC from WE19 and use the FM "MASTERIDOC_CREATE_SMD_MATMAS" and then you also need to switch on Update Debugging on, to debug the changes in update FM   MATERIAL_WRITE_DOCUMENT.
    Please see if the change is reflected or not....
    ELSE.
    may be you need to create a new entry in SCDO and do all the ALE configurations for change pointers.
    Please find the link for change pointers and also you can get lot of information on change pointers in SCN.
    http://help.sap.com/saphelp_nw70/helpdata/EN/12/83e03c19758e71e10000000a114084/content.htm
    Regards,
    Nagaraj

  • Regarding change document generation

    Hi,
    In t-code SCDO, for one object class STUE_V I have added one new table MAST and generated the same.  But while I execute my t-code CS01, the same is not appearing in exporting parameters in the standard program where it is calling my generated fucntion module.
    Hence it is giving dump.  This is part of BOMMAT idoc change pointer creation.
    Could someone shed some light on this as I am really stuck here.

    Hi
    Have you tried generating after adding the table in the class ? This is more a generation issue. Might be the include LCSVBF30 has not got properly generated.
    What I feel is if you are adding a table to a standard class then you must also change the code yourself and SAP is not changing the where used list of the update function calls.
    Refer
    http://www.scribd.com/doc/12627676/Logging-Using-Change-Document
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa015b493111d182b70000e829fbfe/frameset.htm
    http://wiki.sdn.sap.com/wiki/display/ABAP/Change+Document
    note - 0000391833  -  No change documents for object dependencies change
    Regards
    Vijay

  • How to change my 4th generation iPod with 5th generation iPod under exchange program

    how to change my 4th generation iPod with 5th generation iPod under exchange program in uae?

    Apple does not have such an exchange program.  There is a general "recycling" program
    http://www.apple.com/recycling/ipod-cell-phone/
    (see International link in the right column)

  • Issue in generation of Change Document - ChaRM

    Dear All,
    We are implementing ChaRM, I have copied the standard transaction type to z.
    I am able to create request for change with transaction type zmcr but when the normal change or urgent change document are created they have standard transaction type.
    I have made the changes in SPRO (Defining copy control of transaction type) but still document are getting generated with standard transaction type.
    Please attached document of copying control.
    Thanks in advance
    Regards
    Sushant

    I have removed zmcr - smmj but now the change document is not getting generated. Please see the screen shot attached.
    Regards
    Sushant

  • 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

  • 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

  • Change document

    I learn the procedure for change document from sap hlep:
    1.Define change document object
    2.Set change document flag
    3.Generate update and INCLUDE objects
    4.Integrating the functionality into the program
    5.Writing the fields in the program
    I'm confuse about step 4 & 5. Can any guys tell me how to achieve them?
    Thanks a lot
    --Alex Miao

    Hi Alex,
    The entries into the table CDHDR and CDPOS are not made just because of making the change document active in the data element of the corresponding field.
    We need to first create a change document object using the transaction SCDO for the corresponding fields and tables. Now upon generation, you would get a couple of includes and a function module.
    Now, in your program, if you want to have entries in CDHDR and CDPOS for the database changes you make, you need to include the programs generated in SCDO and call the function module after every INSERT,MODIFY or DELETE. Without which the entries will not be made in CDHDR and CDPOS.
    Souce: http://www.****************

  • Change Documents : Enabling

    Hi,
    I have a table which is a part of Change documents Object in SCDO object. but none of the fields for this table is enabled for change documents (the tab further characterisitcs of the data element has a field Change Document which is disbaled).
    Will just enabling this, set this ready for creation of change documents in the table CDHDR.
    I actually tried this on a Z object and it did not work.
    I created a table, set it up in SCDO transaction. And even enabeld change doucment for this data element.
    Can somebody help ?
    Should there be some coding ? Should i run trigger some program ?
    Prashanth.

    Hi,
    In your custom program, after saving all the details into the table(after commit work).
    you have to call function module which was generated by SCDO.
    Prerequisites: In Data element, flag need to be set.
    Make sure while generation of function modules in scdo, you should get
                    X<TABLENAME>  indicates new values
                    Y<TABLENAME> indicates old values
    In case you are inserting new record. you need to pass object_change_indicator 'I'.
    In case you are modifing the existing record. you need to pass object_change _indicator 'U'.
    Find below the sample code
          CALL FUNCTION 'XXXX_WRITE_DOCUMENT'
                 EXPORTING
                    OBJECTID                        = c_cd_item_change_document(object id created in SCDO)
                    TCODE                           = Sy-Tcode
                    UTIME                           = Sy-Uzeit
                    UDATE                           = Sy-Datum
                    USERNAME                        = Sy-Uname
                  PLANNED_CHANGE_NUMBER           = ' '
                    OBJECT_CHANGE_INDICATOR         = c_Ci_Update ('U')
                    PLANNED_OR_REAL_CHANGES         = c_Ci_Real_Changes ('R')
                  NO_CHANGE_POINTERS              = ' '
                    UPD_ICDTXT_ZFSEI03_CLAIMS       = c_Ci_Update
                    UPD_ZFSEI03_CLAIMS              = c_Ci_Update
               IMPORTING
                  CHANGENUMBER                    =
                 TABLES
                    ICDTXT_ZFSEI03_CLAIMS           = t_Text_Changes
                    XZFSEI03_CLAIMS                 = Pt_Claims_New_Values
                    YZFSEI03_CLAIMS                 = Pt_Claims_Old_Values.
            IF SY-SUBRC <> c_Ex_No_Errors.
               MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                       WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
    Thanks

  • SAP Query - Report program generation

    Hello all,
    Now I'm developing SAP queries through Tr-cd:SQ01.
    As you know, every time (re)defining queries, we have to (re)generate the selection screen report programs, containing the input parameter for output format along with other input parameters.
    The problems are:
    1.
    I CAN select other layout formats on the selection screen in one system(Dev System) when I define the output format as "SAP List Viewer" in Tr-cd:SQ01 and generate the report program  (,while I CANNOT select other layout formats on another system, QA System.)
    2.
    When selecting other formats than "SAP List Viewer"
    in Tr-cd:SQ01, so difference between these two systems, that is, I can select all formats options on the selection screen.
    3.
    After redefining the formats as "SAP List Viewer" on the QA System, We CANNOT select other layout formats again while I remain to be able to select all options on the DEV system.
    I think the report program generation function in QA system operates normally, while there is somthing wrong with DEV system.
    Do you have any idea about this phenomenon?

    Hello Thomas, I appreciate your quick response and apologize for my late reply.
    After recieving your sugestion I continued process of trial & error only to find that the setting to generate the report program had been changed to old one for some reason.
    You can change the setting in the following way:
    Tr-cd:SQ02
    Settings -> Global Settings
    Check (or Uncheck) the box of "Always use the old report structure."

  • F150 dunning- create change documents in FI journal

    hi all,
    when running F150 in update mode the dunning information is updated in the FI posting.
    however, no change documents are created for the FI posting.
    Is this possible to achieve and how?
    If I change dunning fields manually via FB02 I get the change document for those fields. I would like to get this also for the F150 program execution.
    Thanks in advance
    Hein

    Hi,
    maybe SAPNET note 609773 is helpful (depending on your SAP Release).
    best regards, Christian

  • Problem in multiple item for change document objects

    hi gurus,
    I have created change document object in tcode SCDO . It had giveN function module /TMW/CHG_OBJ1_WRITE_DOCUMENT.
    CDPOS AND CDHDR tables are updated with changed data. now i am trying to display all old and new data in se38 program.
    here my problem is when ever i changed multiple  item data , my program showing first item details only . I need to show all item data when ever i changed parallel . please help me where is my problem .
    thank you

    I think this is issue with function module generated thru SCDO Please check in your function module inside that the following function modules are used
    CALL FUNCTION 'CHANGEDOCUMENT_OPEN'
    CALL FUNCTION 'CHANGEDOCUMENT_MULTIPLE_CASE'
    CALL FUNCTION 'CHANGEDOCUMENT_CLOSE'
    if not then there may be issue with SCDO

  • Problem while creating change document

    hi all
    i am creating change document for master data like project type , project applicant
    but i am unable to complete it as i am very new to ABAP
    can any one give me step-by-step procedure to do the same?
    I have followed the procedure given in sap Liabrary i.e.
    1 -  Define the change document object
    2 -  Check in the Dictionary, whether the data elements of the fields which are to
          be logged are flagged appropriately.
    3 -  Generate the update.
    4 -  Program the appropriate calls in your program.
    But then i got stucked on point 4...what exactly I need to do in that?
    Regards
    Sheetal

    Hi,
    The table you have used is having the key which comprises both MANDT and ID. However, while writing the code you must have used only the ID. The system takes MANDT and ID both as the key fields.
    This may be the reason of the error you are encountering.
    Thanks,
    Jyoti

  • WHAT IS USE OF CHANGE DOCUMENT FIELD?

    HI experts,
    go like this,
      mara->matnr->dataelement of matnr->further charecteristics ->change document
    in this if we select change document field what will be occured , if we deselect   thatfield what will be the changes and where will be reflected that changes.
      thanks,

    Hi,
    It is used as an Indicator for writing change documents
    <b>Use</b>
    This flag is used to create change documents for business objects.
    You can create a change document object for a business object. This change document object contains the tables in which the data of the business object is stored. Function modules that are called in the corresponding application programs and that log the changes at runtime can be generated from the change document object.
    Logging only takes place if the fields whose contents were changed refer to a data element that was flagged as relevant for the change document.
    You can go to the maintenance screen for change documents from the initial screen of the ABAP Workbench with Development -> Other tools -> Change documents.
    Regards,
    Padmam.

  • How to use change document for AUSP table in MM02?

    Hi All,
    I am working with MM02. When I change the characteristic value in classification view, I want that change to be logged in CDHDR table.
    I have created a change document object for AUSP table and generated update program for that. Now that program needs to be called in some <b>badi</b> or <b>exit</b> which can be called upon saving in MM02 after changing the values in classification view.
    Can anybody give me some idea where can I call that program.
    Any help wud be appreciated.
    Regards,
    Pragya

    Hi
    You have 2 possible solutions to meet this requirement.
    Option 1: Implement point # 3 of SAP OSS Note 943559
    Option 2: This is a workaround solution to skip standard SAP check for activation of change documents of Classification system and allow entries to be written into CDHDR and CDPOS table through MM01 / MM02 / CL20N tcode
    Solution: Implement an implicit enhancement inside include program 'LCLVFF10', at end of subroutine 'FILL_REDUN' i.e. line number '337'.
    Here modify the entry of table 'REDUN' where OBTAB = 'MARA' and set the flag 'AEBLGZUORD' equal 'X'. This will activate the change document creation for Change Object 'CLASSIFY' in CDHDR and CDPOS tables.
    Sample Code
    LOOP AT redun WHERE obtab EQ 'MARA'.
           redun-aeblgzuord = 'X'.
    ENDLOOP.

Maybe you are looking for

  • Kxml and NanoXml

    Hi! I wonder if anyone used this API on the client side, i.e., has someone use this as an extension of MIDP??? How?? Can you put this jar on some J2ME compliant device and use it in many other applications??? I'd really appreciate some hint about thi

  • RRI Problem in EP - An error occurred with the report to report interface

    I have a problem with a template: In standalone the RRI call works, in EP the same template fails with "An error occurred with the report to report interface during the jump" and details "Notification Number BRAIN 192" The JS-code is:  SAPBWOpenURL(t

  • How to config BI java/ portal in java stack to communicate to ABAP stack

    Please help. Points guaranteed.

  • Problème numéro de série révoqué

    Bonjour, En voulant réinstaller ma suite adobe cs6 adobe m'indique que ma version est révoqué? Comment faire. C'est une version mac, et j'ai la boite d'origine avec le serial. Tout est ok, alors pourquoi adobe me bloque ?

  • Kinds of packages.......???

    Hi, In java we are using basically four types of packages .. like java.. javax.. com... org... why sun separate the com and org packages from the java,javax.......?? and what is the real functionalities and the difference among them..... can anybody