Change documents for customer Z table - serious help wanted

Hi all,
I am no beginner and I don't expect any comments from beginners.
Situation: My customer wants to replace the material valuation transactions MRN1 MRN2 MRN3 due to bad performance and locking problems with own developed programs.
The valuation results will be stored in a customer Z-Table on a monthly base. For auditing and transparency purposes, this Z-table has to get a change object and the update routines will have to write change documents.
Due to the expected size of the new Z-table, it is not advisable to simply switsch on table logging.
In this huge project (and in none I participated!) nobody ever implemented the change document process for a Z-table. <b>BUT EVERYBODY CAN TELL YOU THI IS NO PROBLEM AT ALL.</b>
I read some documentation at SAP and serached for threads or blogs here. I could not find anything desribing that in depth.
So before I start, I'd be happy to get some hints from people who created own change documents and implemented the process. Links to documentation and other helpful pages are also welcome.
If I can keep the process simple, I'd like to create a BLOG on this - because I think, in the future it will get more and more difficult to pass the auditing process with undocumented features and uncontrolled table changes.
TIA.
Regards,
Clemens

Hi,
Please check this thread.
http://www.sapdevelopment.co.uk/tips/changedoc/cd_createch.htm
Once you create your change document object using generate update pgm option then  please check the WRITE document fm.
I have done this long back i am updating CDHDR and CDPOS for 2 table YATT and YATTPLANTS. Here YATT have single record (header table) and YATTPLANTS have multiple records (item table)
function yatt_write_document           .
  call function 'CHANGEDOCUMENT_OPEN'
    exporting
      objectclass             = 'YATT           '
      objectid                = objectid
      planned_change_number   = planned_change_number
      planned_or_real_changes = planned_or_real_changes
    exceptions
      sequence_invalid        = 1
      others                  = 2.
  case sy-subrc.
    when 0.                                   "ok.
    when 1. message a600 with 'SEQUENCE INVALID'.
    when 2. message a600 with 'OPEN ERROR'.
  endcase.
if upd_yctc                           ne space.
   call function 'CHANGEDOCUMENT_SINGLE_CASE'
     exporting
       tablename              = 'YATT                          '
       workarea_old           = o_yatt
       workarea_new           = n_yatt
        change_indicator       = upd_yattc
        docu_delete            = 'X'
     exceptions
       nametab_error          = 1
       open_missing           = 2
       position_insert_failed = 3
       others                 = 4.
    case sy-subrc.
      when 0.                                "ok.
      when 1. message a600 with 'NAMETAB-ERROR'.
      when 2. message a600 with 'OPEN MISSING'.
      when 3. message a600 with 'INSERT ERROR'.
      when 4. message a600 with 'SINGLE ERROR'.
    endcase.
  endif.
  if upd_yctcauthplnts                  ne space.
    call function 'CHANGEDOCUMENT_MULTIPLE_CASE'
      exporting
        tablename              = 'YATTPLANTS                 '
        change_indicator       = upd_yattplants
        docu_delete            = 'X'
      tables
        table_old              = yyattplants
        table_new              = xyattplants
     exceptions
       nametab_error          = 1
       open_missing           = 2
       position_insert_failed = 3
       others                 = 4.
    case sy-subrc.
      when 0.                                "ok.
      when 1. message a600 with 'NAMETAB-ERROR'.
      when 2. message a600 with 'OPEN MISSING'.
      when 3. message a600 with 'INSERT ERROR'.
      when 4. message a600 with 'MULTIPLE ERROR'.
    endcase.
  endif.
  call function 'CHANGEDOCUMENT_CLOSE'
    exporting
      objectclass             = 'YATT           '
      objectid                = objectid
      date_of_change          = udate
      time_of_change          = utime
      tcode                   = tcode
      username                = username
      object_change_indicator = object_change_indicator
      no_change_pointers      = no_change_pointers
    exceptions
      header_insert_failed    = 1
      object_invalid          = 2
      open_missing            = 3
      no_position_inserted    = 4
      others                  = 5.
  case sy-subrc.
    when 0.                                   "ok.
    when 1. message a600 with 'INSERT HEADER FAILED'.
    when 2. message a600 with 'OBJECT INVALID'.
    when 3. message a600 with 'OPEN MISSING'.
*    WHEN 4. MESSAGE A600 WITH 'NO_POSITION_INSERTED'.
* do not abort, if positions are not inserted!!!
    when 5. message a600 with 'CLOSE ERROR'.
  endcase.
endfunction.

Similar Messages

  • Creating a custom change document for a standard table field

    Hi
    Is it possible to create a change document for a field in a standard table?
    I have searched the forum and only found threads about creating change document to a custom table.
    Will the creation of change documents to a standard SAP table be a modification?
    Thanks.
    Regards
    Sowbhagya.L

    Yes it will be a modification on standard table, but you can always create change document for any field by assigning it to custom change object.
    Regards,
    Krishna.

  • 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 

  • Creating Change Document for Custom Field in Table PROJ

    Hi,
    We have a few Custom Fields in Table PROJ.
    What needs to be done so that every time a particular custom field  is changed, change document in table CDHDR and CDPOS are created.
    Regards,
    Tarun Bahal

    Hi Tarun,
    Please refer [Link1|https://help.sap.com/saphelp_nwmobile71/helpdata/en/2a/fa018f493111d182b70000e829fbfe/content.htm] & [Link2|http://help.sap.com/saphelp_erp2005/helpdata/en/db/7a2a40ce93185de10000000a1550b0/content.htm]
    Hope this helps!
    Regards
    Shital

  • 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.

  • Change documents for a Z table

    Hi,
    We have a Ztable with 4 fields, Due to some business reasons.. . We have given access to users for changing the contents of the table. Now For audit purpose Customer wants to track the changes made to the table. I came know that this can be achieved by using the change documents concept. I am little confused in using this concept. After clicking on the generate update program, system will ask us to give an include name and functiona group. After giving these two system will create include object as <change document object>_write_document. This Include inturn calls some more includes like F<K4>CDC,F<K4>CDT,F<K4>CDF,F<K4>CDV.
    Here my questions are
    1. Wher do we need to write our owncoding for capturing the changes?
    2. is it possible to share the sample code starting from the First Include <changedocument>_Write_Document to ending.
    3. Does this change document functionality will be called automoatically when we use Transaction SM30(Table maintainance) for changing the contents of the tables?
    4. What is the difference between single case and Multiple case. My scenario falls into single/Multiple?
    Awaiiting for all the expert responses
    Thanks and Best Regards
    Jagadeesh Ambati

    Hi Srinivas,
    you can activate in DDIC that your entry changes will be logged.
    Go to SE11 -> Your Tablenname -> CHANGE
    Button TechnicalSettings -> Activate checkbox Log data changes.
    From now on any chenge will be logged in table DBTABLOG.
    Kind Regards
    Henner

  • Changed document for custom fields

    Hi All,
    For business transactions we can see <b>changed documents</b> under <b>Extras</b> menu.
    I have custom tabs & custom fields in business transaction. We need to see the custom field changes by value & user in the above menu. Is it possible? how?
    thanks,
    Bhushan

    Hi Murlidhar,
    My question is related to SAP CRM. The notes you suggested are not for CRM.
    Others, do you have any idea how to add/show records in "Extras-> Change Documents" of business transactions like Sales order, activities for custom fields not using EEWB.
    thanks,
    Bhushan

  • Activating change documents for standard tables

    Hi all,
    Can someone please tell me how I can activate change documents for a standard table.
    I created a change document object in SCDO and included the standard table I am working with. This table does not have "LOG DATA CHANGES' enabled in its technical settings. I checked the data element of the field I am interested in and it has "Change Document" enabled.
    Is there any way to activate change documents for a std table without writing code to create change documents? 
    Thanks.

    Hi,
    Check this transaction SCU3, this is to activate the change logs for the tables.
    Regards,
    Satish

  • 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

  • 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

  • Table to look for change documents for users

    Hi friends,
    Is there any standard table to look for change documents for a user?change document through SUIM does not give the correct log.
    Thanks for you support.

    Julius
    Looking at another of Tracy's other post (http://scn.sap.com/thread/3598947) she's trying to use ACL. Hence needing to know the tables to write joins/queries to hit tables within ACL
    I've seen ACL used and have had the fun experience of Auditors using Google to find tables to perform checks on without context of what has actually been implemented in their particular system.
    Regards
    Colleen

  • Using a change document for Z table maintenance generatro to log changes

    Hi Forum,
    I have created a a change document for one of the Z tables now I want to use it in the table maintenance generator of this table so that any changes made to this table using maintenance generator are logged in table CDHDR and CDPOS.
    I am using the event 02     After saving the data in the database
    and have created a new FORM..ENDFORM for this event and it is working fine till here.
    But I am unable to find any table or structure where the information of the action performed in maintenance generator is kept for eg. what action was performed like add, delete or change and on how many records and contents of those records.
    I can update the tables CDHDR and CDPOS only if I have the above information.
    Please guide me as to where can I find all this information within the maintenenace generator program?
    Thank you,
    Anubhav

    Hello Anubhav,
    Are you calling the change document function module in your save event ? The function module needs to be first created using SCDO for your Z table, select the fields on which you want to track the changes.  Auto generate the programs for this change object. Once the FM is generated, you will have to call this FM in your SM30 event.
    The change document tracking also needs to be enabled at the data element level..
    Regards,
    Jay

  • Need to create a Change document for tracking Purpose on standard table

    Hi Experts,
    I am updating a field in standard table so need to create a change document for tracking the changes being done on the field.
    I created the change Document with transaction SCDO but I am stuck at point - How to call that in the report program to enable the change document.
    Please advice.
    Thanks!!

    Hi
    U can assign your transaction to Z-report like this:
    PARAMETERS: TAB1 RADIOBUTTON GROUP R1 DEFAULT 'X',
                TAB2 RADIOBUTTON GROUP R1,
                TAB3 RADIOBUTTON GROUP R1.
    DATA: TABNAME TYPE TABNAME.
    START-OF-SELECTION.
      CASE 'X'.
        WHEN TAB1. TABNAME = 'BSID'.
        WHEN TAB2. TABNAME = 'BSAD'.
        WHEN TAB3. TABNAME = 'BKPF'.
      ENDCASE.
      CALL FUNCTION 'RS_TABLE_LIST_CREATE'
        EXPORTING
          TABLE_NAME               = TABNAME
    *   ACTION                   = 'ANZE'
    *   WITHOUT_SUBMIT           = ' '
    *   GENERATION_FORCED        =
    *   NEW_SEL                  =
    *   NO_STRUCTURE_CHECK       = ' '
    *   DATA_EXIT                = ' '
    * IMPORTING
    *   PROGNAME                 =
    * TABLES
    *   SELTAB                   =
       EXCEPTIONS
         TABLE_IS_STRUCTURE       = 1
         TABLE_NOT_EXISTS         = 2
         DB_NOT_EXISTS            = 3
         NO_PERMISSION            = 4
         NO_CHANGE_ALLOWED        = 5
         OTHERS                   = 6
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

  • 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 ...

  • Change Log for Custom fields

    Hi All,
    I need the change log for custom fields added in BP transaction codes.
    Basically, for tracking the changes of master data in CDHDR and CDPOS tables we will enable the checkbox of dataelement related to custom field.
    As for SAP fields in BP transaction code the change history is reflecting in CDHDR/CDPOS tables. i have enabled that for custom fields added to BP transaction code but i could not see the change history for such fields.
    Please let us know if iam missing any other thing?

    Hi Amit Singh,
    Apart from clicking the checkbox in dataelement...
    There are some settings need to be done by BASIS
    and some settings and entries should be made in SCOD t-code
    create entriy for change document here..
    also hv a look on below links...
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2a/fa015b493111d182b70000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/db/7a2a40ce93185de10000000a1550b0/content.htm
    Custom Table values in CDPOS and CDHDR
    scdo
    wat do these fields in scdo stand for?
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7

Maybe you are looking for

  • CUP Request Audit Trail missing info about Mitigations & Risks

    Hi  All, We use  SAP GRC CUP 5.3 SP8 Patch 1. When provisioning an SAP account through the GRC solution, we notice that the Audit trail is missing any details about the risks &  mitigations that are applied to the request. Ideally we need to track th

  • Viewing QTs in Firefox

    I have links on my website to mp4 QTS. In Safari, when you click on the link the movie plays in a new window, however in Firefox the movie doesn't play-a window opens asking whether one wants to save the file. Does anyone know how I can get Firefox t

  • My Powerbook is dead, now what?

    I bought my Powerbook in June 2002. I have used this computer for so long but it started acting up and so for Christmas, "Santa" gave me an external drive and I backed everything up. This week, my laptop died. In a really horrible, nasty way. I start

  • When did video and 3D come out in Photoshop?

    When did video and 3D come out in Photoshop?

  • My i photo library has disappeared!!!

    This morning I realised that my I photo has disappeared. The message said "we can not open i photo because you have no more library" I tried to find it by the Research in the menu folder but it was not exist. So I went to: User/pictures:iphotolibrary