‎2017 Feb 27 11:34 PM
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?
‎2017 Feb 28 6:36 AM
You really need to share your code. Just the relevant parts please,
‎2017 Feb 28 6:48 AM
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.
‎2017 Feb 28 4:05 PM
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?
‎2017 Mar 01 6:33 AM
‎2017 Feb 28 4:04 PM
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