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: 

How to make change in CDHDR table

Former Member
0 Kudos

Hi Friends,

I have a specific requirement from customer, where we have to

modify the value of the field USERNAME in table CDHDR.

Since it's a change document header table and gets updated automatically, direct update is not the

correct solution.

But I am not able to find any relevant FM/BAPI/Exit, to modify this table.

Kindly let me know, if anyone has done any changes to this table and how.

Thanks,

Pradeep

11 REPLIES 11

raymond_giuseppi
Active Contributor
0 Kudos

This is a log, you should not be able to change it  by legitimate or even legal ways...

(Perform some search on the "Audit" and/or "Security" / "Authorizations" keywords...)


Also you looked for FM/BAPI/Exit, are you trying to change already existing records (BAPI/FM) or during creation of change document (Exit/BAdI/Enhancement) ?


Regards,

Raymond

0 Kudos

Yes...we need to modify few existing records for some transactions...

Pradeep

0 Kudos

So there are no tools to update a log table, only "wild" open-sql (or even native sql.) AT YOUR OWN RISK in case of future audit. (Did you think on associated fields [AE,ER,..]NAM in main application tables.)

Regards,

Raymond

former_member201275
Active Contributor
0 Kudos

if you want to change the username value that already exists in the table then I don't see any other way than direct update. (That said, this is not a good idea to change this table)

If you want to change your processes in future that that when change is generated a different username is used then you can find a badi for this by putting a breakpoint in CL_EXITHANDLER.

Your question is not 100% clear though.

Former Member
0 Kudos

Hi all,

Just addition to my situation:

We have to edit the existing records in table CDHDR field Username for few transaction codes.

Thanks,

Pradeep

0 Kudos

May i ask why?

If it is because, when you are running a report on this table and for a specific object you want a specific username, then i would look into find a badi for the specific report.

0 Kudos

Hi,

There are few workflow for standard objects like vendor creation and change (XK01/02) and a bespoke workflow for which the customer want to edit the username.

These workflow runs in background and a default username comes...we need to change that.

Thanks,

Pradeep

0 Kudos

Then you should amend the workflow, as it is bespoke anyway, and provide a mapping for the username field.

Juwin
Active Contributor
0 Kudos

You shouldn't change CDHDR directly. Some BAPIs have importing parameters as USERNAME and SAP takes care of populating that user name into CDHDR. Check if your BAPI have such a field. BTW, Which BAPI are you using to update Vendors?

Thanks,

Juwin

hitesh_gabani
Participant
0 Kudos

Hi Pradeep,

1) You can create Maintenance View for the table CDHDR.

                                   OR

2) Create ALV Report for edit the existing records in table CDHDR field Username.

Regards,

Hitesh

Jelena
Active Contributor
0 Kudos

In addition to Raymond's accurate answers - I can't imagine a business scenario where this would be a legitimate need. These are audit documents, so, as correctly pointed out, in many cases such modification would be frowned upon by the auditors to say the least.

The only purpose of the change documents is to provide change tracking for audit, so fiddling with this information would defeat the purpose completely. Naturally, you will not find any FM or BAPI for such modification for this exact reason.

To me such requirement seems capricious at best and illegal at worst.