Application Development and Automation 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: 
Read only

How to alter change history for updating table but000?

Former Member
0 Kudos
1,019

Hi All,

An idoc which is updating the but000 table on creation of a Business Partner doesn't have fields corresponding to the following but000 fields :CRUSR and CHUSR. As a workaround I added two Z fields using EEWB and copied the value of these two z fields but000-crusr and but000-chusr. The fields in the table are updated just fine but the change log still shows the change user as the system generated user name e.g RFCDC1_10001. Is there any way to change this change log with the values being populated into but000-crusr and but000-chusr?

Thanks in advance!!

Regards

Rahul

4 REPLIES 4
Read only

former_member217544
Active Contributor
0 Kudos
673

Hi Rahul,

Try to change sy-uname value with  but000-crusr / but000-chusr before updating the records. Check if this works.

Regards,

Swarna

Read only

0 Kudos
673

Hi Swarna,

Thanks for the prompt reply.

After adding the two fields through EEWB, the two z fields (ZZCRUSR and ZZCHUSR) are created in both but000 table and the idoc. So the fields in the idoc are mapped to these z fields in but000.

The fields but000-crusr and but000-chusr are updated(initially they hold something like RFCDC1_10001 and these are then manually changed to a username) after the entry has been created in but000. So, before updating these two fields manually, the change log has already been created. I need a way to alter that change log.

Can you suggest something?

Thanks in Adavance

Regards

Rahul

Read only

Former Member
0 Kudos
673

This message was moderated.

Read only

0 Kudos
673

Hi,

Try using the Bapi :BAPI_USER_GET_DETAIL in the posting FM for IDOC.There you can whether the user is a background user or foreground .Then you can try to set the username using the sy-uname.Otherwise, you will have to look for implicit enhancement point , within the code, where actually the change log is prepared.

BR,

NITIN