2013 Mar 22 6:18 AM
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
2013 Mar 22 6:28 AM
Hi Rahul,
Try to change sy-uname value with but000-crusr / but000-chusr before updating the records. Check if this works.
Regards,
Swarna
2013 Mar 22 7:49 AM
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
2013 Mar 28 10:21 AM
2013 Mar 28 12:13 PM
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