‎2011 May 19 7:50 AM
Hi all,
I wanted to maintain the change log so i created the write document using transcation scdo...
everything was fine but the change was not stored...
The problem is in this function module which is called inside the write document..
CALL FUNCTION 'CHANGEDOCUMENT_CLOSE'
EXPORTING
OBJECTCLASS = 'ZRP'
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.
Here i am getting Exception 4------> NO_POSITION_FOUND..???? Any idea why is this happening and how to overcome this..
Thanks in advance,
Vishesh.
‎2011 May 19 8:15 AM
Hi,
You need to set the change document flag in the data element.
Check you have followed all the steps in crearting the change documents using SCDO.
"
To use the change document functionality in your application, proceed as follows:
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.
" as per sap documentation
http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa015b493111d182b70000e829fbfe/frameset.htm
Regards,
Satish Kanteti
‎2011 May 19 9:53 AM
Hi Satish ,
Ya i have done all the steps that you have mentioned... but still no result its not working..
Any other idea...???
Thanks,
Vishesh.
‎2011 May 19 10:29 AM
‎2011 May 19 10:45 AM
Hi satish,
Thanks for ua help but, the thread link which you sent was for SINGLE_CASE and mine is MULTIPLE_CASE like this...
CALL FUNCTION 'CHANGEDOCUMENT_MULTIPLE_CASE'
EXPORTING
TABLENAME = 'ZRM_PHASE_ACT'
CHANGE_INDICATOR = UPD_ZRM_PHASE_ACT
DOCU_DELETE = 'X'
TABLES
TABLE_OLD = YZRM_PHASE_ACT
TABLE_NEW = XZRM_PHASE_ACT
EXCEPTIONS
NAMETAB_ERROR = 1
OPEN_MISSING = 2
POSITION_INSERT_FAILED = 3
OTHERS = 4.
This modules is working fine and no exception are raised here...
It was recording the log till yesterday evening but it stoppede from morning onwards..
Thanks,
Vishesh
‎2011 May 19 8:15 AM
Hi,
You can use the table CDHDR(Change document header) & CDPOS (Change document items) where enteries about the changes made use to get stored.
Regards,
Rickky