Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Change Document

former_member186020
Participant
0 Likes
1,387

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.

5 REPLIES 5
Read only

Former Member
0 Likes
983

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

Read only

0 Likes
983

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.

Read only

0 Likes
983

Hi,

Please check the below link:

Might be you too have done the same.

Regards,

Satish Kanteti

Read only

0 Likes
983

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

Read only

Former Member
0 Likes
983

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