Skip to Content
0

CDPOS initial values when CHNGIND = 'I'.

Feb 27, 2017 at 11:34 PM

98

avatar image

Hello ABAPers, I'm trying to write a report showing the changes of a particular record. I would like to show the initial values and all the subsequent changes. The changes are pretty easy and obvious. The initial record in CDPOS is recorded as FNAME = KEY and chngind = 'I'. If I catch this prior to values being changed, then I can capture the original values. Is there a function module that does this for me?

In the meantime I have tried to do a dynamic select using the TABNAME and the corresponding TABKEY by using "ASSIGN wa_ref->* TO <wa>".... Im getting a short dump when assigning the TABKEY value to <wa>. UC_OBJECTS_NOT_CONVERTIBLE.

Any way that works is fine with me...any suggestions?

10 |10000 characters needed characters left characters exceeded

You really need to share your code. Just the relevant parts please,

0

Matthew, I move the reference of a structure of the table in CDPOS to a field symbol <wa>. I have verified that the structure is correct at this point.

Then I simply move my it_cdpos-tabkey to <wa>. This is where I get the UC_OJBECTS_NOT_CONVERTIBLE.

But, the short dump only occurs if the table is MARA ( So far in my testing ).

The follow tables work great: KNA1, KNB1, KNBK, KNVI, KNVP, KNVV, LFA1, LFB1, LFBK, LFM1, WYT3.

THANKS

Jayden

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Raymond Giuseppi
Feb 28, 2017 at 06:48 AM
0

AFAIK the Initial records values 'I' are not saved in change document. IMHO you should process the other way, first read current values from database, and then change documents to determine previous values. Note that most of the time 'D' delete change document wont save data either, if a flag was not set in SCDO for the change object generation.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Raymond, thanks for your response. I'm trying to go forward by using ABAP. See my pseudo code above. Do you have any idea why I would only receive this error on the MARA table?

0

Post your actual code or explain how you defined and assigned wa_ref and <wa>.
Hint: You could also use some FM like CHANGEDOCU_KEY_CHAR2ANY and CHANGEDOCU_KEY_ANY2CHAR to convert the TABKEY value from/to table structure fields.

1