Skip to Content

Solution for action getting processed twice in ICWC

Action gets executed twice in ICWC if it is scheduled during saving the document. The action will get executed once when the document is saved and second on moving to the action view of the document. The solution is to prevent execution of the action twice in ICWC by adding a new schedule condition for the action and setting the condition in the web client views as explained below

Action in action profile with scheduled condition as during saving the document is shown below

image

Step 1: : In SPRO, CRM->Basic Functions->Actions->Actions in Transactions->Change Actions and Conditions, Click on Define Conditions and select the above action. Go to Schedule condition tab

image

Step 2: : Enter the name of the schedule condition as After_Save and then click on Edit Condition. In the new view, enter the name as After_Save. Click on the create button and add the new attribute Is_Saved as shown below

image

Step 3: : After adding the new attribute, click on the Condition Definition view and add new schedule condition as shown below

image

Step 4: : Save the changes. The action will always get executes unless the value of the attribute Is_Saved is changed to a different value.

image

Step 5: : Copy the standard views SrvTHead and SrvTAction to custom BSP application

image

Step 6: : Inherit the controller classes CL_CRM_IC_SRVTHEAD_IMP2 and CL_CRM_IC_SRVTACTION_IMP2 of the copied standard views

Step 7: : Add a new static attribute GT_SAVED of type Char 1 in the inherited controller class of the view SrvTHead

Attribute

Type

GT_SAVED

C

Step 8: Redefine EH_ONSAVE method of the inherited controller class of the view SrvTHead

Step 9: : Add a new static attribute GT_SAVED of type Char 1 in the inherited controller class of the view SrvTAction

Attribute

Type

GT_SAVED

C

Step 10: Redefine IF_CRM_IC_EVENT_LISTENER~HANDLE_EVENT method of the inherited controller class of the view SrvTAction

Step 11: Createa new BAdI implementation for BAdI CONTAINER_PPF

In the new BAdI implementaiton, in the interface method MODIFY_CONTAINER, set the value of the paramter IS_SAVED as Y if the attribute GT_SAVED OF the inherited controller class of SrvTAction is set as X

 

On implementing the above solution, action scheduled during saving will not get executed twice in ICWC
To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply