CRM and CX Blogs by Members
Find insights on SAP customer relationship management and customer experience products in blog posts from community members. Post your own perspective today!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos
Problem Statement


I encountered a situation recently where even if the Configured Condition were met by the Transaction Type(CRM Service Orders in our case) to trigger PPF Actions, it was not triggering the PPF Action as was expected.

Going into the business aspect of this problem there was a need that the functionality in the PPF Action(notification to appropriate stakeholders) be triggered even if the changes were not directly made to CRMD_ORDERADM_H. The changes to the orders and related objects are generally made by end users using a custom ABAP report.

Analysis:

After doing some debugging and looking at how things work, I realized that if no change in data is made to CRMD_ORDERADM_H, the PPF Actions are not triggered even if we make calls to 'CRM_ORDER_MAINTAIN','BAPI_ACTIVITYCRM_SAVE' and 'BAPI_TRANSACTION_COMMIT' and the Conditions configured in IMG are met.
( SPRO -> Customer Relationship Management -> Basic Functions -> Actions -> Actions in Transaction )
Working on to find a solution, I was browsing through the table CRMD_ORDERADM_H,where I came across the field ORDERADM_H_DUMMY which led me to thinking of making use of something in lines of DUMMY field. That way I could make changes to the dummy field and let SAP standard codes call the PPF Actions which would then serve my purpose.

Solution:

Below are the steps I did to get the PPF Actions triggered,

  • Created a ZZDUMMY_FIELD(char 1) in CRMD_ORDERADM_H by using the WebUI  Enhance Application. (Didn’t make use of ORDERADM_H_DUMMY to be on safer side as it’s a field provided by SAP and I might not have full control of how SAP can make use of it in future.)

  • Read the CRMD_ORDERADM_H data for the given Transaction using FM CRM_ORDERADM_H_READ_OB in the code.

  • Checked the value of the newly created ZZDUMMY_FIELD

  • Modified the values of this dummy field with some arbitrary values. Used following logic in my case.
    CASE ls_orderadm_h-zzdummy_field.
    WHEN 'X'.
    ls_orderadm_h-zzdummy_field = 'Y'.
    WHEN 'Y'.
    ls_orderadm_h-zzdummy_field = 'X'.
    WHEN OTHERS.
    ls_orderadm_h-zzdummy_field = 'X'.
    ENDCASE.
    (It’s up to you as to how you want to modify dummy field values.)

  • Call relevant Function Modules 'CRM_ORDER_MAINTAIN','BAPI_ACTIVITYCRM_SAVE' and 'BAPI_TRANSACTION_COMMIT' to maintain the data which then eventually calls the PPF Action.


 

P.S.
I started off with ORDERADM_H_DUMMY initially to check for the feasibility of my approach and this also worked fine.