Enhancing CRM Action Container
CRM Actions are really usefull functionality when we need running some codes in specific conditions. We have lots of options on customize conditions.
CRM consultants are of course familier with action customizing.
We are defining our action profiles then defining conditions. We can define start or schedule conditon. System is allowing standart parameters based on object type.
But what if we have z-fields and we want to use these fields in condition?
We will do below steps:
1- Create your parameter in condition definition page.
It’s really easy to define new parameter. There is a create button bottom right side.
You can use order structure and field as reference.
After defining your parameter you can use this parameter in your condition.
2- Create an implementation on badi CONTAINER_PPF to set your parameter.
This badi has a filter on business object (eg:BUS2000116 for CRM service process)
Here some code patterns,
* ——- Get the order GUID ———-
call method ci_container->get_value
exporting
element_name = ‘BUSINESSOBJECT’
importing
data = ls_object.
lv_guid = ls_object–instid.
append lv_guid to lv_headerguid.
* —– Get the Parameters from container
call method ci_parameter->get_values
receiving
values = lt_value.
you can use ‘CRM_ORDER_READ’ function to read order details.
and finally you can set a specific custom field. It’s important element name should be your parameter name.
call method ci_parameter->set_value
exporting
element_name = ‘Z_DAGITIMSIRKETI’
data = ls_orderadm_h–zzafld000060
receiving
retcode = lv_return.
Thanks!!!
Hi Yunus,
there are three SAP standard solutions to enhance PPF Action conditions. Using BADI CONTAINER PPF is one of them. Using BADI EVAL_SCHEDCOND_PPF or EVAL_STARTCOND_PPF is another solution.
However, the most simplest solution is to enhance the BOR object providing context sensitive attributes which can be combined and evalutated. In most cases the enhancement can be done without development. In my opinion this solution is the most consultant friendly one. Because I could not find any guide explaining this solution in a good and development free manner, I created an own one. Please be free to use it too.
http://www.hybrid-eichhoernchen.de/ppf-action-condition-enhancement/
Kind regards,
Peter
Hi Peter,
Thanks for your very well documented alternative method.
Kind Regards,