Error in multiple operation with change document object for custom table

hi all,
I have developed a change document object for a custom table ZTEST and developed a report program for insertion, updation & deletion..everything works fine if I do only once ie. if I created only 1 entries. If I created 2 new entries , I am getting an Error "DUPREC:POS&Z3RL_TAB&Z3RL_TAB" and EXIT the transaction.
why I am getting this error??? is it not possible to do multiple operation with the change document???
kindly help.
Edited by: JaiKarthik on Apr 7, 2010 6:20 AM

   LOOP AT ts_mod INTO wa_mod.
            READ TABLE <i_itab> INTO <wa_tab> INDEX wa_mod-row.
* Select the existing entries in table Z3RL for change history
                SELECT SINGLE * FROM z3rl
                       INTO wa_z3rl
                       WHERE vkorg   = <wa_tab>+3(4)
                       AND   zzkunnr = <wa_tab>+7(10).
* Move the old entries
                IF sy-subrc = 0.
                  CLEAR ls_z3rl.
                  ls_z3rl = wa_z3rl.
                ENDIF.
* Update the table
             MODIFY (viewname) FROM <wa_tab>.
               CLEAR wa_z3rl.
                wa_z3rl-mandt      = <wa_tab>+0(3).
                wa_z3rl-vkorg      = <wa_tab>+3(4).
                wa_z3rl-zzkunnr    = <wa_tab>+7(10).
* Populate change tables
                CLEAR wa_change.
                wa_change-teilobjid = 'Z3RL'.
                wa_change-textart = 'TEST_2'.
                wa_change-textspr = 'EN'.
                wa_change-updkz = 'U'.
                APPEND wa_change TO ts_change.
*call the fM to log the values in CDHDR table.
                CALL FUNCTION 'Z3RL_WRITE_DOCUMENT'
                  EXPORTING
                    objectid                 = 'Z3RL'
                    tcode                    = sy-tcode
                    utime                    = sy-uzeit
                    udate                    = sy-datum
                    username                 = sy-uname
                    planned_change_number    = ' '
                    object_change_indicator  = 'U'
                    planned_or_real_changes  = 'U'
                    no_change_pointers       = 'U'
                    upd_icdtxt_z3rl= 'U'
                    n_z3rl= wa_z3rl
                    o_z3rl        = ls_z3rl
                    upd_z3rl= 'U'
                    lv_opt                   = ' '
                  TABLES
                    icdtxt_z3rl= ts_change.
            CLEAR : wa_mod, <wa_tab>.
          ENDLOOP.
Edited by: JaiKarthik on Apr 7, 2010 6:49 AM

Similar Messages

  • How to set-up change document object for deliveries??

    Hi experts ,
    kindly help me with this config , I did some researched and none of them have solve my problem.
    i need to know on how to set-up a change document object for delivery documents.
    Change document object LIEFERUNG is not available in transaction SWED.
    How will I add this change document object in SWED?

    hi ,
    im wondering why even the existing object VERKBELEG is not being triggered?
    would you know any reason for this?

  • Error while TOC created when change document  approvle for UNIT testing

    Hi All,
    During change document approval for unit testing, we are getting error, when I checked in detail, it is giving error for transport of copies error as below
    it seems to be getting locked with original transport,
    also I can't see change in transport of copies
    Does someone has any idea?
    Dinesh

    Hello Dinesh,
    Perhaps the tasks of the Transport Request were not released.
    Try to release the tasks only (from your DEV system), then choose action "Pass normal change to test". This will generate a ToC to be transported into your QAS.
    Then from the Task List, you can schedule the background job to import the ToC into QAS system.
    Regards,
    Daniel

  • Error releasing transport request for change document object

    Hi Gurus,
    I created a new change document object for a Z-table. When i try to release the transport request in the development system it terminated with a message "Export application-defined objects       17.12.2009 11:07:45 Not yet executed". The transport request continued to be in the "Release started" status and i am not able to release it.
    I checked in the co file & data file directory for this request, The co file is available but the data file is not created.
    Could you please let me know how to solve this?
    Regards,
    Immanuel.

    It was a problem with some basis settings. Was rectified by the basis team.

  • 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

  • How to use change document object ?

    Friends,
    I am learning to use the Change Document object for one of my Z table. I have created a change doc object using SCDO. I have now written a test report in which i am issuing the SELECT statement for fetching old and new values from the Z table and passing them to the FM generated by SCDO.
    I am not able to see the changes in the CDHDR and CDPOS tables. I am doubtful abt the values being passed to the FM. Here are the values i am passing:
    CALL FUNCTION 'YTEST_WRITE_DOCUMENT'
      EXPORTING
        objectid                      = 'YTEST'
        tcode                         = 'se38'
        utime                         = sy-uzeit
        udate                         = sy-datum
        username                      = sy-uname
      PLANNED_CHANGE_NUMBER         = ' '
       OBJECT_CHANGE_INDICATOR        = 'U'
      PLANNED_OR_REAL_CHANGES       = ' '
      NO_CHANGE_POINTERS            = ' '
       UPD_ICDTXT_YTEST               = 'U'
        n_ztest_cle                   = wa_ztest_cle
        o_o_ztest_cle                 = o_ztest_cle
      UPD_ZTEST_CLE                 = ' '
      tables
        icdtxt_ytest                  = itab_cdtxt.
    Is the object ID the same as the Change Document Object name ??
    Please help.
    Thanks,
    Ram.

    Well, i found a way out for the problem i was facing. I was not setting the "UPD_ZTEST_CLE " FM parameter. When i set it to 'U', the changes got reflected in the CDHDR and CDPOS tables.
    Can i reward myself as i solved this by myself ???

  • How to get terminal address along with Change document header

    Dear All
    My client want a report of the frequencies of a sales document changes along with terminal address. In table CDHDR i can get user name, date, t-code but not the terminal address. So requesting to guide me of how to get the terminal address from which terminal the document has been updated.
    Appropriate answer will be rewarded.
    Regards
    Kingshuk
    Edited by: Kings_Roy on May 31, 2010 11:02 AM

    I don't think this information is kept in change documents.  So for the change documents that are already created, you cannot get this information.
    For future however you can do some code changes to get this information.
    Function module TH_USER_INFO can return terminal name as well as IP address for a given client and user.
    All you have to do is either store this additional information along with change documents. For this i think you can check the FMs that are writing SD change documents. 
    OR
    You can use user exit exit SUSR0001 (User exit after logon to SAP System) to call this Function (TH_USER_INFO) at user logon and store this info in a Z table. Later when you are reading change documents, you can get user name, date time from change document and search this Z table for respective user Terminal name and IP Address.
    This is not a complete solution but i hope it will direct you to a solution.
    cheers.

  • Change Document Object - SCDO

    I have created a new Change Document Object for a Z table(say ZXXX). When Generating Update program for this change document, a new structure is generated VZXXX that has ZXXX as include. This structure does not have a Package assigned to it and therefore can not be transported.
    Does anyone has encountered this problem? Any urgent help is appreciated.
    Thanks
    Amit.

    Hi,
    try report RSWBO052 to change device class
    A.

  • Regarding change document objects

    hi to all,
               I created  one change document object for one transaction say /tmw/tmw . Now I am trying to make changes in /tmw/tmw . table cdhdr and cdpos table are not updating anymore. but cdhdr and cdpos table are updating while passing data to function module /TMW/CHG_OBJ1_WRITE_DOCUMENT in se38 program. MY problem is tables are not updating while make changes in transaction(/tmw/tmw) screen . please help me .
    thanks in advance
    Edited by: mohankumarreddy on Jan 4, 2010 10:22 AM

    The transaction you are using must contain the write document function modules.
    steps:
    1. Create the change document. (Use the transaction SCD0.)
    2. Activate the change document for the object. (Use data element maintenance: transaction SE11.)
    3. Generate an update for the object. (Use the transaction SCD0.)
    4. Insert the appropriate calls in the corresponding programs     "<----
    Your write document will be havng fm's like CHANGEDOCUMENT_OPEN etc.
    The same must be incorporated in your transaction also.
    check sap help
    link:[http://help.sap.com/saphelp_nw2004s/helpdata/en/2a/fa015b493111d182b70000e829fbfe/content.htm]

  • 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

  • How to create the change document functionality for a dependent objects?

    May I please know how to create the change document functionality for a dependent objects?
    I have done it follow the same process as for business process objects. But when i try to test it in BOBT, there is no records under "FIELD_CHANGE_WITH_FILTER". It seems the change hasn't been recorded.
    If the way I did to create change document for dependent object is correct, please also kindly advise the possibilities for why there is no record during testing.
    thanks in advance.

    I also have some doubts about the business object.In this case,one abstract BO hase a subnode wihich is root extended.I added the change document for this node under the category "root_extended" and then tested the function in BOBT.I got some error message "can't find the root key".Shall i redefine the method /BOFU/IF_CDO_CREATION~IS_CDO_CREATION_ACTIVE so as to solve the problem?
    Thx.

  • Triggering BO from Change document object..

    Hi Experts,
    I had a problem triggering custom Business object from custom Changed document object..
    The scenario is like this...
      ' I had created a simple business object with key field as MATNR..
      and a changed document in SCDO transaction.. I had also maintained the event linkage with the Changed document object in SWEC transaction and mode Is CHANGE...
    The thing is if i change the existing material, then, my change document object has to trigger and in turn it should trigger my Business object....
    This had happened if i use the standard changed document object 'MATERIAL' but not with custom changed document object'.
    So i would be glad if any one help me how to trigger the custom Business object with the custom changed document object.
    Any help would be appreciated.
    Regards
    Narin Nandivada.

    Solved by myself

  • Change Document Object

    I'm supposed to catch changes to my custom table with a Change Document Object. I know that this creates a series of includes that I need to put on my program and a function module which I would use to catch the change. My question is, is there any example of a standard program that implements how I should work with this change document object?

    Thanks for the link but I've been through every tutorial in that page. I just want to see it implemented on some standard program or something so I can visually see how it works.

  • Transporting Change document Object from development to quality

    Hi All,
    I have created a change document object from SCDO for my custom table. Now I want to transport this object from development server to quality server.
    As while creating Objects some enteries are made into standard table CDHDR and CDPOS which is client dependant so how to work this object on another client.
    Do I need to create seperate objects on quality server and then on production server?
    Thanks

    Hi Kiran,
    use transport connection to collect the objects to request, rsa1->transprot connection.
    use infocube as starting point to collect objects, left side choose 'object type', middle frame choose 'infocube' expand 'select objects', locate/search your infocube' and 'transfer', it will go to right side.
    in right up, there are buttons, click 'mode' and choose manual, and grouping 'only necessary objects', and execute, this will collect infocube and required objects like infoobjects, infoarea, etc.
    after that change grouping 'in dataflow before' and execute, this will collect update rules, ods, infosource, transfer rules, datasource assigned etc.
    remember to assign source system, click yellow box with X icon and mark the source system.
    after that use grouping 'in dataflow afterwards' to collect query, web template, role etc.
    take a look transport docs
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3010ba90-0201-0010-2896-e58547c6757e
    http://help.sap.com/saphelp_nw2004s/helpdata/en/0b/5ee7377a98c17fe10000009b38f842/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e883de94-0501-0010-7d95-de5ffa503a86
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b5/1d733b73a8f706e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/57/38e1824eb711d182bf0000e829fbfe/frameset.htm
    Re: Transport Organizer---
    transport query (bex objects)
    http://help.sap.com/saphelp_nw2004s/helpdata/en/38/5ee7377a98c17fe10000009b38f842/frameset.htm
    hope this helps.
    (Courtesy AHP from Re: transport)
    Bye
    Dinesh

  • Outlook 2013 Exchange 2013 Address Book Error 0x8004010F : The operation failed. An object cannot be found.

    Hi,
    We have Exchange 2013 running in our network, and are using Outlook 2013 on all PCs. We added some users several weeks ago, and they are not showing up in the Address Book. When we try to download the Address Book in Outlook, we receive the error 0x8004010F
    : The operation failed. An object cannot be found.
    Please let me know how I can start to troubleshoot this.
    Regards,
    Chris

    Hi
    There is a multiple reason to receive an error 0x8004010f, it is just a generic MAPI error.
    Let’s check all settings are configured the way it is supposed to be: -
    1.    Make sure the authentication setting is set up properly by using this command: -
    Get-OabVirtualDirectory -ADPropertiesOnly | ft Identity, *Auth* -AutoSize
    2.    Check URL’S are configured properly: -
    Get-OabVirtualDirectory -ADPropertiesOnly | ft Identity, *url* -AutoSize
    3.    Check the location of OAB: -
    C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\OAB
    4.    Now find out the location of the database on which the Arbitration mailbox resides: -
    Get-Mailbox -Arbitration | where {$_.PersistedCapabilities -like “*OAB*”} | ft Name, Servername, Database
    Get-MailboxDatabaseCopyStatus MGUxxx
    5.    It is also important to ensure all database has the OAB set up properly for this use CMDLET: -
    Get-MailboxDatabase | Ft Name, *book*
    6.    If one or more database does not have OAB setup, then use CMDLET to set OAB for it: -
    Get-Mailboxdatabase | Set-MailboxDatabase -OfflineAddressBook “Default Offline Address Book”
    7.    If the issue is affecting only one or specific set of users, then check they have an OAB specified on their account: -
    Get-Mailbox abc.xyz | fl Name, OfflineAddressBook,Database
    Please correct me if the information that I am having is wrong.
    Reply awaited.
    Thanks and regards
     Ashish@S  
    Ashish@V

Maybe you are looking for