Application Development 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: 

modify existing oldvalue and newvalue in CDPOS

Former Member
0 Kudos

Hello,

I need to go back through existing change records in CDPOS for one table and modify any oldvalue and newvalue fields that are there, for data security purposes (i.e. mask sensitive data).

I have seen that there are existing function modules for reading the change tables and adding new records to the tables, but are there any for modifying existing records?

Can anyone point me in the right direction here?

Thank you,

James

1 ACCEPTED SOLUTION

ThomasZloch
Active Contributor
0 Kudos

I am not aware of such a function module, and I don't think there is any. These records are not supposed to be changed after creation, for security and auditing purposes. It's like changing history

You will probably have to update CDPOS-VALUE_OLD and CDPOS-VALUE_NEW with your own ABAP program logic.

Thomas

7 REPLIES 7

Former Member
0 Kudos

Hi,

if you know the changes in cdpos, use the tcode (which is shown in cdpos) to change

the values like you see in CDPOS (OLD-VALUE!).

Regards, Dieter

Former Member
0 Kudos

Ok, so I won't have a problem directly updating the records? I was told I couldn't do a select directly against the CDPOS table, that I had to use the function modules provided to read it. So I was wondering if I would have an issue directly accessing one of the records to update it. If I can do that it makes it simple. Thanks, I will try that and post back with the results.

0 Kudos

CDPOS is cluster table , so for updating you need to use fm


CALL FUNCTION 'CHANGEDOCUMENT_SINGLE_CASE'
EXPORTING
      change_indicator = 'U'
      DOCU_DELETE = 'X'
      REFAREA_NEW = STCT_NEW   " <<  pass new  values
      REFAREA_OLD = stct_old   " <<  pass old values

Former Member
0 Kudos

Will this allow me to alter existing change records in CDPOS?

I am not trying to record new changes to data in the master tables. I am trying to alter old change records to mask sensitive data.

For example if someone changed their credit card number last year, I want to find the related records in CDPOS and mask the card number. I do not want to make a change to the card number on the master table or record a new change document.

0 Kudos

Hi,

if you only want to about changes look into table CDHDR and CDPOS or us FM 'CHANGEDOCUMENT_READ'.

Regards, Dieter

ThomasZloch
Active Contributor
0 Kudos

I am not aware of such a function module, and I don't think there is any. These records are not supposed to be changed after creation, for security and auditing purposes. It's like changing history

You will probably have to update CDPOS-VALUE_OLD and CDPOS-VALUE_NEW with your own ABAP program logic.

Thomas

Former Member
0 Kudos

That's what I was thinking, but I wanted to make sure an update method didn't already exist before I wrote the code. Thanks!