SAP CRM_FDT_RULE_EXECUTE Function Module for Execute Rule









CRM_FDT_RULE_EXECUTE is a standard crm fdt rule execute SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Execute Rule processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for crm fdt rule execute FM, simply by entering the name CRM_FDT_RULE_EXECUTE into the relevant SAP transaction such as SE37 or SE38.

Function Group: CRM_FDT_FG
Program Name: SAPLCRM_FDT_FG
Main Program: SAPLCRM_FDT_FG
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CRM_FDT_RULE_EXECUTE pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'CRM_FDT_RULE_EXECUTE'"Execute Rule
EXPORTING
* IV_APPL_ID = "Application ID/ Policy ID
IT_RULES = "Table type for guids
IT_CONTEXT = "Table for Rule context
* IV_TRIGGER_ACTION = "Boolean Variable (X=True, -=False, Space=Unknown)
* IV_RESOLVE_CONFLICT = "Boolean Variable (X=True, -=False, Space=Unknown)
* IT_CONFLICT_DATA = "Attribute name value
* IV_SIMULATE = "Boolean Variable (X=True, -=False, Space=Unknown)
* IV_EXECUTION_TYPE = '2' "Single-Character Flag

IMPORTING
ET_RULE_RESULT = "Rule Result Table
ET_ACTIONS = "Table Type for Actions return
ET_RULES_EXECUTED = "Table type for guids
ET_ERRORS = "Table type for Structure bapiret2
ET_ERROR_TAB = "Error table for Rule and Errors
.



IMPORTING Parameters details for CRM_FDT_RULE_EXECUTE

IV_APPL_ID - Application ID/ Policy ID

Data type: CRMDT_FDT_APPLID
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_RULES - Table type for guids

Data type: CRMT_FDT_GUIDS
Optional: No
Call by Reference: No ( called with pass by value option)

IT_CONTEXT - Table for Rule context

Data type: CRMT_FDT_RULE_CTXT
Optional: No
Call by Reference: No ( called with pass by value option)

IV_TRIGGER_ACTION - Boolean Variable (X=True, -=False, Space=Unknown)

Data type: BOOLEAN
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_RESOLVE_CONFLICT - Boolean Variable (X=True, -=False, Space=Unknown)

Data type: BOOLEAN
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_CONFLICT_DATA - Attribute name value

Data type: CRMT_ATTR_NAME_VALUE_T
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_SIMULATE - Boolean Variable (X=True, -=False, Space=Unknown)

Data type: BOOLEAN
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_EXECUTION_TYPE - Single-Character Flag

Data type: CHAR1
Default: '2'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for CRM_FDT_RULE_EXECUTE

ET_RULE_RESULT - Rule Result Table

Data type: CRMT_FDT_RULE_RSLT
Optional: No
Call by Reference: No ( called with pass by value option)

ET_ACTIONS - Table Type for Actions return

Data type: CRMT_FDT_ACTION_RET
Optional: No
Call by Reference: No ( called with pass by value option)

ET_RULES_EXECUTED - Table type for guids

Data type: CRMT_FDT_GUIDS
Optional: No
Call by Reference: No ( called with pass by value option)

ET_ERRORS - Table type for Structure bapiret2

Data type: CRMT_BAPIRET2
Optional: No
Call by Reference: No ( called with pass by value option)

ET_ERROR_TAB - Error table for Rule and Errors

Data type: CRMT_FDT_ERROR
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for CRM_FDT_RULE_EXECUTE Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_iv_appl_id  TYPE CRMDT_FDT_APPLID, "   
lv_et_rule_result  TYPE CRMT_FDT_RULE_RSLT, "   
lv_it_rules  TYPE CRMT_FDT_GUIDS, "   
lv_et_actions  TYPE CRMT_FDT_ACTION_RET, "   
lv_it_context  TYPE CRMT_FDT_RULE_CTXT, "   
lv_et_rules_executed  TYPE CRMT_FDT_GUIDS, "   
lv_et_errors  TYPE CRMT_BAPIRET2, "   
lv_iv_trigger_action  TYPE BOOLEAN, "   
lv_et_error_tab  TYPE CRMT_FDT_ERROR, "   
lv_iv_resolve_conflict  TYPE BOOLEAN, "   
lv_it_conflict_data  TYPE CRMT_ATTR_NAME_VALUE_T, "   
lv_iv_simulate  TYPE BOOLEAN, "   
lv_iv_execution_type  TYPE CHAR1. "   '2'

  CALL FUNCTION 'CRM_FDT_RULE_EXECUTE'  "Execute Rule
    EXPORTING
         IV_APPL_ID = lv_iv_appl_id
         IT_RULES = lv_it_rules
         IT_CONTEXT = lv_it_context
         IV_TRIGGER_ACTION = lv_iv_trigger_action
         IV_RESOLVE_CONFLICT = lv_iv_resolve_conflict
         IT_CONFLICT_DATA = lv_it_conflict_data
         IV_SIMULATE = lv_iv_simulate
         IV_EXECUTION_TYPE = lv_iv_execution_type
    IMPORTING
         ET_RULE_RESULT = lv_et_rule_result
         ET_ACTIONS = lv_et_actions
         ET_RULES_EXECUTED = lv_et_rules_executed
         ET_ERRORS = lv_et_errors
         ET_ERROR_TAB = lv_et_error_tab
. " CRM_FDT_RULE_EXECUTE




ABAP code using 7.40 inline data declarations to call FM CRM_FDT_RULE_EXECUTE

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
 
 
 
 
 
 
 
 
 
DATA(ld_iv_execution_type) = '2'.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!