07-01-2015 11:46 AM
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
07-01-2015 11:56 AM
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
07-01-2015 12:22 PM
Yes...we need to modify few existing records for some transactions...
Pradeep
07-01-2015 2:02 PM
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
07-01-2015 12:00 PM
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.
07-01-2015 12:03 PM
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
07-01-2015 12:19 PM
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.
07-01-2015 12:26 PM
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
07-01-2015 12:30 PM
Then you should amend the workflow, as it is bespoke anyway, and provide a mapping for the username field.
07-01-2015 2:11 PM
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
07-01-2015 12:18 PM
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
07-01-2015 7:31 PM
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.