Fill parameter value for CRM document Action

Problem: you have a custom parameter in your Action conditions and you want to fill it with a value.

Solution: SAP CRM is one of the easiest systems to enhance. This issue can also be solved very easily.

All you need to do is create an implementation of a BADI called CONTAINER_PPF. In this implementation, in method IF_EX_CONTAINER_PPF~MODIFY_CONTAINER you can modify the parameter or the container itself.

To modify parameter simply use code as shown below.

DATA:
  lv_return TYPE sy-subrc.
 
CALL METHOD ci_parameter->set_value
  EXPORTING
    element_name = 'PARAMETER_NAME'
    data         = 'PARAMETER_VALUE'
  RECEIVING
    retcode      = lv_return.
DATA:
  lv_return TYPE sy-subrc.

CALL METHOD ci_parameter->set_value
  EXPORTING
    element_name = 'PARAMETER_NAME'
    data         = 'PARAMETER_VALUE'
  RECEIVING
    retcode      = lv_return.

Just remember, to put correct document type in the filter of your BADI implementation.

Komentowanie jest zakończone.