Skip to Content

Customer Classification Implicit Commit changing to Customer General Data Screen

Hello,

I am currently facing a strange behavior in the customer master data. I enhanced the User exit CLFM0002 EXIT_SAPLCLFM_002 ZXCLFU02. A User Exit which is called before you save your customer classifications. I am writting a change pointer for a custom IDoc Type I created.

Now following scenario happens. I want to add a Classification which is then triggern the Change Pointer creation in the User Exit.

I go in the Transaction XD02 via Extras > Classifications and add my specific customer classification. This then triggering the Function Module CHANGE_POINTERS_CREATE_DIRECT. The Function Module itself makes an INSERT call to the database table BDCP2 but without an commit. Now when I go back to the general data screen, an implicit commit is somewhere called which then creates the entrie in the BDCP2 table without the data being saved. This causes now an issue when my background job reads the change pointers as in this moment my data is not saved.

I need this particular user exit as function modules are able to maintain the customer classifications without calling the customer master data. So therefore I cannot use only the Customer User Exit / Badis.

Does someone experienced this behavior before or is there a way I can avoid the change pointer creatin at this point?

Thanks for all your help,.

BR,

Andreas

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 13, 2017 at 05:24 PM

    This seems like a basic LUW question... Are you using IN UPDATE TASK?

    Otherwise it'd be very strange for a standard transaction to perform a COMMIT prematurely. Could there be another user exit gone wrong? Can you see where COMMIT is happening exactly? I'm afraid there is more troubleshooting to do in your system...

    P.S. There is a standard IDoc for the classifications, not sure why you need a custom one...

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Jelena,

      I used the User exit CLFM0002 EXIT_SAPLCLFM_002 ZXCLFU02 as it is possible to maintain the customer classifications with the Function Module BAPI_OBJCL_CHANGE. This Function Module does not call any BAdI's or User Exit from the Customer Master Data as it specificly changes the classifications. I didn't know that this User Exit will then be called by the Customer Change Transaction but it makes sense as you can save the customer classification via XD02 . That this User Exit does not call the commit immediately when switching screens makes also sense but somehow this does not apply to the function module I implemented.

      Just for your understanding. We are using SAP Hybris and as SAP Hybris does not have a proper way to save the customer classifications at the moment or using the standard classification IDoc at all, we created a new IDoc Message Type for our requirements. It is not the requirement to save the classification to a customer but rather than save those classifications to separte place in Hybris. So I had the idea, when user maintain this particular customer classification, I read it in the User Exit and create a change pointer so I am able to send then the required customer classifications to Hybris.

      I will try your approach and let you know if it solved the issue.

      Thanks for your help.

      BR,

      Andreas

  • Mar 22, 2017 at 05:16 AM

    Hi Andreas,

    Is there any reason you chose this customer exit rather than filtering the BDCP2 entries in BDCP_BEFORE_WRITE??

    Thanks & Regards,

    Rakshith Gore

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Rakshith,

      as I was using the Function Module BAPI_OBJCL_CHANGE, I was looking for a user exit which were called before the save of the customer classifications. Thats the reason I found the User exit CLFM0002 EXIT_SAPLCLFM_002 ZXCLFU02.

      But I understand your approach, I try if I can use your approach for my situtaion.

      Thanks for your help.

      BR,

      Andreas