Unable to trigger the workflow for tcode XD01 using BOR when customer is created
My requirement is I need to trigger the workflow when ever customer is created in XD01.
I have already go through many post which have the answer but still iam not getting by following that.
Please give me clearly step by step procedure how to do because I am just a beginner for the Workflow.
I have done the follow things.. but still I am not able to achieve.
Step1 : Created a custom subtype (Z_KNA1) for KNA1 and created Zevent in the Z_KNA1.
Step2: Delegate Z_KNA1 TO KNA1.
Step3: In tcode SWEC created an entry like below.
step4: In tcode SWETYPV created an entry like below.
BOR--KNA1--Zevent --WFno-- typelinkage checked.
step5: In WF basicdata maintained the BOR and Zevent which i created in the start event with binding and everything.
When I created the Custer data in XD01 it is throwing Error. (if step3 maitained as above) No Entry I can find in SWEL.
Screenshot for tcode SM13 of the Error.
When I created the customer data in XD01 it is saving if step3 maintained as below Entry I can see in SWEL but workflow is not triggering.
Anand Babu V replied
Finally conclusion of this post!!!
1) If you want to trigger WF while customer creation use this BADI CUSTOMER_ADD_DATA and implemented the code in SAVE_DATA method.
Note: We wont get Customer no (Kunnr) in the Exit (EXIT_SAPMF02D_001) at the time of creation customer so using BADI.
2) If you want to trigger WF while changing the customer data (sensitive field) use the EXIT EXIT_SAPMF02D_001 because here you will get the changed data(senstive field)
so that you can validate the changed data field based on the past data of changed field from DB table.
If you found any changes after comparison you can trigger WF else no need to trigger.
Note: In BADI CUSTOMER_ADD_DATA you will not be getting the changed field value so using the EXIT.