METHOD if_ex_ftr_customer_extent~evt_application_start.
IF concr_badi_implementation IS NOT BOUND.
concr_badi_implementation = /cobi/fce_cl_impl_factory=>get_instance( )->get_instance_for_transaction( pi_proxy_transaction ).
ENDIF.
concr_badi_implementation->evt_application_start( EXPORTING pi_proxy_transaction = pi_proxy_transaction
pi_proxy_messages = pi_proxy_messages
pi_proxy_fcode = pi_proxy_fcode
pi_proxy_fmod = pi_proxy_fmod
pi_cust_transaction = pi_cust_transaction
CHANGING pc_tab_badi_tabs = pc_tab_badi_tabs ).
ENDMETHOD.
METHOD if_ex_ftr_customer_extent~evt_transaction_save_check.
concr_badi_implementation->evt_transaction_save_check( pi_proxy_transaction = pi_proxy_transaction
pi_proxy_messages = pi_proxy_messages
pi_cust_transaction = pi_cust_transaction ).
ENDMETHOD.
METHOD get_instance_for_transaction.
SELECT product_category, product_type, transaction_type, company_code, classname FROM /cobi/fce_cfil INTO TABLE @DATA(found_entries)
WHERE ( product_category = @proxy_deal_data->a_transaction_ori-sanlf
AND product_type = @proxy_deal_data->a_transaction_ori-sgsart
AND transaction_type = @proxy_deal_data->a_transaction_ori-sfhaart
AND company_code = @proxy_deal_data->a_transaction_ori-bukrs )
OR ( product_category = @proxy_deal_data->a_transaction_ori-sanlf
AND product_type = @proxy_deal_data->a_transaction_ori-sgsart
AND transaction_type = @proxy_deal_data->a_transaction_ori-sfhaart
AND company_code = '' )
OR ( product_category = @proxy_deal_data->a_transaction_ori-sanlf
AND product_type = @proxy_deal_data->a_transaction_ori-sgsart
AND transaction_type = ''
AND company_code = '' )
OR ( product_category = @proxy_deal_data->a_transaction_ori-sanlf
AND product_type = ''
AND transaction_type = ''
AND company_code = '' )
OR ( product_category = ''
AND product_type = ''
AND transaction_type = ''
AND company_code = '' )
ORDER BY product_category DESCENDING,
product_type DESCENDING,
transaction_type DESCENDING,
company_code DESCENDING.
IF lines( found_entries ) > 0.
DATA(entry) = found_entries[ 1 ].
cl_abap_classdescr=>describe_by_name(
EXPORTING
p_name = entry-classname
RECEIVING
p_descr_ref = DATA(type_descriptor)
EXCEPTIONS
type_not_found = 1
OTHERS = 2 ).
IF sy-subrc = 0.
DATA potential_badi_impl TYPE REF TO object.
CREATE OBJECT potential_badi_impl TYPE (entry-classname).
IF potential_badi_impl IS INSTANCE OF if_ex_ftr_customer_extent.
instance ?= potential_badi_impl.
RETURN.
ENDIF.
ENDIF.
ENDIF.
"" If this line is reached customizing was not or wrongly maintained, therefore use null object to have system act as no BAdI is implemented
instance = NEW /cobi/fce_cl_cust_Ext_null( ).
ENDMETHOD.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.