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 ???
Similar Messages
-
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,
PragyaHi
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. -
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 -
Regarding Workflow trigerring using change document
Hi all,
I am trying to trigger a workflow using change document object.
I want that to trigger the workflow on the material master change through MM02.
I have created a business object ZBUS1001 and wanted that on change of material master
the custom change document object should call the workflow
I went through all the material avaialable over SDN ,but can not find a change object for change in material master through MM02 for std business object BUS1001.
Please tell me how to find one.
Please reply if any one of you have some solution.Hi,
Thanks for your reply.
I am using an existing change object - MATERIAL_N of Business Object - BUS1001 and the event
BASICMATERIALCHANGED.
I have mentioned the details in the tcode SWEC.
And even in the workflow i have given the start of event as the BUS1001 and event BASICMATERIALCHANGED.
But workflow not called .
Do we need to maintain an entry in SWED?
If yes then in function module column what we need to mention. -
Disadvantage of using change document
Hi all,
I am currently using triggering certain code (which is written in receiver fm in SWETYPV associated with an event) based on change documents using SWEC.
I just want to know are there any disadvantages associated with usage of change documents, creation of change document objects.
Pointers to any documentation on change documents would be helpful, I am aware on how to use change documents but I want to get in depth of what exactly happens behind the scenes.
Thanks.
кu03B1ятu03B9кI dont find any disadvantages with change documents.
http://help.sap.com/saphelp_nw2004s/helpdata/en/2a/fa015b493111d182b70000e829fbfe/frameset.htm -
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? -
Change Document Object ICDTXT_ include name
Hi fellow developers.
What is the purpose of each field in ICDTXT_<include name> when preparing to call the function F<include name>_WRITE_DOCUMENT? For example, I have an IT called ICDTXT_ZCD_CONFIG_CV and this is how I am filling the fields:
UPD_ICDTXT_ZCD_CONFIG_CV = UPD_Z00_CONFIG_CV.
wa_log_info-teilobjid = 'Producto'.
wa_log_info-textart = ' '.
wa_log_info-textspr = sy-langu.
wa_log_info-updkz = UPD_Z00_CONFIG_CV.
append wa_log_info to ICDTXT_ZCD_CONFIG_CV.
I am not sure at all what to set in textart. And teilobjid is the table key as far as I know. But I want to be sure I am doing this correctly.
Thank you for your time.Yes you must call the FM via the generated include in your update program, change document are programmatically managed. in the "SAVE" form use some CALL FUNCTION IN UPDATE TASK to call the FM that updates database and the FM that creates change documents - look at [Update Techniques|http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4cba79e11d1950f0000e82de14a/frameset.htm] and [BC414|http://www.sap.com/services/education]
- without programming you can fill DBTABLOG via SE11 options
- Also look at [Defining Change Document Objects|http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa018f493111d182b70000e829fbfe/frameset.htm] and [Integrating the functionality into the program|http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm]
Regards,
Raymond -
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
-
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?
ThanksHi 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 -
How to Use Transient View Objects to Store Session-level Global Variables
hi
Please consider section "40.8.5 How to Use Transient View Objects to Store Session-level Global Variables"
at http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcstatemgmt.htm#ADFFD19610
Based on this documentation I created the example application
at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.01.zip
It behaves as show in the screencast at http://screencast.com/t/qDvSQCgpvYdd
Its Application Module has a Transient View Object instance "MyEmployeesContextVOVI", as master for the child View Object instance "EmpInCtxJobVI".
On rollback the Transient View Object instance keeps its row and attribute values.
Also when passivation and activation is forced (using jbo.ampool.doampooling=false ) the Transient View Object instance seems to keep its row and attribute values.
questions:
- (q1) Why does the expression #{bindings.MyEmployeesContextVOVIIterator.dataControl.transactionDirty} evaluate as true when a Transient View Object instance attribute value is changed (as shown in screencast at http://screencast.com/t/qDvSQCgpvYdd )?
- (q2) What would be a robust approach to make a Transient View Object instance more self-contained, and manage itself to have only one single row (per instance) at all times (and as such removing the dependency on the Application Module prepareSession() as documented in "5. Create an empty row in the view object when a new user begins using the application module.")?
many thanks
Jan VerveckenThanks for your reply Frank.
q1) Does sample 90 help ? http://blogs.oracle.com/smuenchadf/examples/
Yes, the sample from Steve Muench does help, "90. Avoiding Dirtying the ADF Model Transaction When Transient Attributes are Set [10.1.3] "
at http://blogs.oracle.com/smuenchadf/examples/#90
It does point out a difference in marking transactions dirty by different layers of the framework, "... When any attribute's value is changed through an ADFM binding, the ADFM-layer transaction is marked as dirty. ...".
This can be illustrate with a small change in the example application
at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.02.zip
It now shows the result of both these expressions on the page ...
#{bindings.MyEmployeesContextVOVIIterator.dataControl.transactionDirty}
#{bindings.MyEmployeesContextVOVIIterator.dataControl.dataProvider.transaction.dirty}... where one can be true and the other false respectively.
See also the screencast at http://screencast.com/t/k8vgNqdKgD
Similar to the sample from Steve Muench, another modification to the example application introduces MyCustomADFBCDataControl
at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.03.zip
public class MyCustomADFBCDataControl
extends JUApplication
@Override
public void setTransactionModified()
ApplicationModule vApplicationModule = (ApplicationModule)getDataProvider();
Transaction vTransaction = vApplicationModule.getTransaction();
if (vTransaction.isDirty())
super.setTransactionModified();
}Resulting in what seems to be more consistent/expected transaction (dirty) information,
see also the screencast at http://screencast.com/t/756yCs1L1
Any feedback on why the ADF Model layer is so eager to mark a transaction dirty is always welcome.
Currently, question (q2) remains.
regards
Jan -
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 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 youI 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
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 AMThe 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] -
Track a field by using Change Documents
Hello,
Does anyone knows how to get the history changes of an Equipment Classification? (IE02 -> Click on Classification tab).
We have a requirement that needs to fetch an equipment number based on a classification change. Everytime a value changes on a particular classification (TEST_ID) we need to populate the corresponding equipment number affected in this update.
We are using "Change Documents" to track changes from the equipment master information but I have no idea how to track changes from the Classification information.
Any ideas would be highly appreciate it.
Thanks in advance,
-CCarstenDD wrote:
Hello,
I assume it is quite easy but I don't get it.
I have 2 tables ANTRAG and PERSON and I want to update
UPDATE ANTRAG SET SysKD = (SELECT DISTINCT PERSON.SysPERSON FROM PERSON WHERE PERSON.SysVM = ANTRAG.SysVK AND PERSON.SysVM > 0) WHERE ANTRAG.SysLS IN (11,12);
This delivers the error "subquery returns more than one row". I assume due to the fact that I have more than one record in ANTRAG which fullfills ANTRAG.SysLS IN (11,12).
PERSON.SysVM > 0 is needed because there are records in PERSON and ANTRAG with PERSON.SysVM = 0 and ANTRAG.SysVK = 0 (but not where ANTRAG.SysLS is in 11 or 12, these have all ANTRAG.SysVK > 0).
I have no clue how to get a single returnvalue out of the select statement.
Thanks for help
Regards
CarstenIt means that your subquery is returning more than one row of data so it can't set SysKD to just a single value.
That implies you have more than one distinct PERSON.sysPERSON value that matches the where clause.
Without your data, we can't help you any more than that.
Maybe you are looking for
-
How to delete some data from GLPCA table
Dear Friends, We have extracted some data in GLPCA table via the ECPA component. We want to delete these records ( Doc type and Posting date is known). However we do not want other data already existing the GLPCA to be deleted. Is there some Std SAP
-
How to use setLookAndFeel method?
May i know how to implement the UIManager.setLookAndFeel()? and can we write out our own look and feel themes? if possible, plz attach the codes for me, thx a lot
-
OK. Here's the story. I'm an amateur flash developer and i'm working on a project involving 3 scenes. Scene 1 = "Hall, Scene 2 = "Kitchen" and Scene 3 = "Garage". All is well and good. However, whenever i try to change the scene to "Kitchen" the enti
-
Where can I find the Java API doc for the OES PEP interfaces (OpenAZ API).
In the PepApiExample downlouded from Oracle web site at [PepApiExample |http://www.oracle.com/technetwork/middleware/id-mgmt/downloads/pepapiexample-1588440.zip], there are some Java API interfaces related OpenAZ API, but there is no the whole API do
-
The Wi Fi settings page on my phone says I am connectd to WiFi (my home network). However, when I try to connect to a website or collect emails it tells me that there is no internet connection. I have to keep my mobile data network switched off becau