‎2009 Feb 14 5:38 AM
Hi all ,
I have a db table ZTEST .The change document in data element level is checked for the field of ZTEST.
I have created Change object for that table also and now I am changing records (modifying) and adding new entries from SE16 .
But the New Value and Old Value fields of CDPOS for that object is empty.
Please tell me why this changes are not reflected on the CDPOS ?
Thanks
Pinaki Mukherjee
‎2009 Feb 14 6:12 AM
‎2009 Feb 14 6:12 AM
‎2009 Feb 14 8:40 AM
‎2009 Feb 14 8:48 AM
Hi,
Just follow the steps..
After checking the dataelement u need to go to transaction SCDO and there click on create and on Change doc. object w/o namespace give name space name must starts with z or y and follow the steps..
when u get into that, on name of table tab--> mention u r table name-> and check mark on Doc. for individual fields at delete--> click on insert entries->save it--> click on back button->u will see some objects list-->seelct u r object->then click on generate update programm->and give u r own function group->click on generate--->list screen will appear ->click on SAVE-->
then goto transaction SE16----->write CDPOS ->press enter>in object value field -
> mention created object name (eg: Ztest)--->F8....
U can find the changed values over there
Regards
Kiran
‎2009 Feb 14 8:51 AM
Hi,
or else use this FM to get the changed field value...
I think it can resolve u r problem...
CHANGEDOCUMENT_READ_POSITIONS
Get the details of a change document, and store them in an internal table. This will tell you whether a field was changed, deleted, or updated.
Regards
Kiran
‎2009 Feb 14 8:53 AM
Hi,
Use the above FM like this,..
Thsi si an example....U need to call this FM inside a loop...
LOOP AT lt_cdhdr WHERE udate IN s_aedat.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = lt_cdhdr-changenr
TABLES
editpos = lt_editpos.
LOOP AT lt_editpos WHERE fname = 'LOEKZ'
AND f_new = 'L'.
p_desc = text-r01. " Cancel Contract
ENDLOOP.
Regards
Kiran
‎2009 Feb 14 9:01 AM
Hi,
Go through this link...it will give u diagramatic representation to create change document object
It really helps...
https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/change+document
Regards
Kiran
‎2009 Mar 17 5:37 AM