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

CHANGEDOCUMENT_CLOSE function problem - NO_POSITION_INSERTED

Former Member
0 Likes
3,926

Hi,

I have to do a logged change for ASMD table. Unfortunately, my ECC 4.6 has no BAPI for service changes - so I've decided to change the records manually and save change documents along with it.

I went through the procedure as advised, and that was:

(enqueue)

1) CHANGEDOCUMENT_OPEN

2) CHANGEDOCUMENT_SINGLE_CASE

3) CHANGEDOCUMENT_CLOSE

(dequeue)

and so:

1) works fine

2) is fine as well

3) CHANGEDOCUMENT_CLOSE returns 4, which corresponds to 'NO_POSITION_INSERTED', though the former function call (2) says it had been done... now that's confusing

The code where the program stops in CHANGEDOCUMENT_CLOSE looks as follows:


IF anz_insert = 0. " <= checked positive - so the positions number is zero
* Es wurden keine Positionen erfasst 
CLEAR: aendnr, sequence. 
MESSAGE e327 WITH 'NO_POSITION_INSERTED' 'CDOK' 
RAISING no_position_inserted. 
ENDIF. 

There is always an option of creating an extra table just for tracking changes of services but the above method seems more elegant

Thanks for any help on that.

Marcin

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
2,010

One poosbile error will be due to in fm CHANGEDOCUMENT_SINGLE_CASE any duplicate rows with same key

2 REPLIES 2
Read only

former_member194669
Active Contributor
0 Likes
2,011

One poosbile error will be due to in fm CHANGEDOCUMENT_SINGLE_CASE any duplicate rows with same key

Read only

0 Likes
2,010

Hi,

It was true - I mixed the sequence - change documents were created after writing, and I tried to insert document with the same key.

Thanks,

Marcin