Hi folks,
Toady short tutorial about extending the decision tree in the process chain. As you probably know decision three blocks can be extended. In our example, we want to run delta info package in everyday processing, and depending on our customizing perform a full load.


Basically, if the value of param ISIP in our customer table is set to DELTA, we want to execute the delta info package. If param will be set to the FULL, execute ISIP in full mode.
Mainly object used to achieve our goal is BAPI: RSAR_CONNECTOR, where we need to create the function, which can be later used in formula:

Lets go to se18, and create new implementation

The best idea now is to NOT ACTIVATE this implementation before fully fill implementing the class. Let’s just double click on the class name

Basic class should look like below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
class ZCL_IM_ISIP_CUST definition public final create public . public section. interfaces IF_EX_RSAR_CONNECTOR . class-methods CHECK_CUST importing !IV_CUST_ID type STRING returning value(RV_RUN_MODE) type STRING . PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS ZCL_IM_ISIP_CUST IMPLEMENTATION. METHOD check_cust. SELECT SINGLE param FROM zexcust WHERE id = @iv_cust_id INTO @rv_run_mode. ENDMETHOD. METHOD if_ex_rsar_connector~get. DATA: ls_cust_function TYPE sfbeoprnd. CASE i_key. WHEN 'CUSTOM'. CLEAR ls_cust_function. ls_cust_function-tech_name = 'C_CHECK_CUST'. ls_cust_function-descriptn = 'Check cust table to define correct ISIP'. ls_cust_function-class = 'ZCL_IM_ISIP_CUST'. ls_cust_function-method = 'CHECK_CUST'. APPEND ls_cust_function TO c_operands. ENDCASE. ENDMETHOD. ENDCLASS. |
After using our new function C_CHECK_CUST in the process chain, we get desired result
