
data: lo_factory type ref to if_fdt_factory,
c_test_app_id type fdt_uuid,
lo_query type ref to if_fdt_query,
lt_ids type if_fdt_types=>ts_object_id,
ls_ids type if_fdt_types=>id.
types:
lt_ids type sorted table of if_fdt_types=>id
with unique default key .
data: lo_fdt_query type ref to if_fdt_query.
clear lt_ids.
call method cl_fdt_query=>get_instance
receiving
ro_query = lo_fdt_query.
* get application id
call method lo_fdt_query->get_ids
exporting
iv_name = 'OPD_V3_BILLING_DOCUMENT'
importing
ets_object_id = lt_ids.
read table lt_ids into ls_ids index 1.
"get factory for application
lo_factory = cl_fdt_factory=>get_instance( exporting iv_application_id = ls_ids ).
* returning c_test_app_id = lo_factory ).
lo_query = lo_factory->get_query( iv_object_type = if_fdt_constants=>gc_object_type_function ).
lo_query->get_ids(
exporting
iv_name = 'FUNC_CHANNEL'
importing
ets_object_id = lt_ids ).
read table lt_ids into ls_ids index 1.
if sy-subrc = 0.
gv_channel_id = ls_ids.
else.
* Move to error table
endif.
lo_context->set_value( iv_name = 'OUTPUT_TYPE' ia_value = lv_form ).
lo_context->set_value( iv_name = 'ROLE' ia_value = lv_role ).
lo_context->set_value( iv_name = 'BUSINESS_PARTNER_ID' ia_value = lv_kunnr ).
lv_function_id = gv_channel_id.
try.
data lt_abap_parbind type abap_parmbind_tab.
data _v_timestamp2 type if_fdt_types=>timestamp.
field-symbols <fs_any> type any.
clear lr_data.
get reference of lt_out into lr_data.
****************************************************************************************************
* Trigger function processing
****************************************************************************************************
assign lr_data->* to <fs_any>.
call method cl_fdt_function_process=>process
exporting
iv_function_id = lv_function_id
iv_timestamp = _v_timestamp2
io_context = lo_context
importing
ea_result = <fs_any>
changing
ct_name_value = lt_abap_parbind.
lt_out = <fs_any>.
read table lt_out into ls_out
with key exclusive_ind = abap_true.
if sy-subrc = 0 and
ls_out-channel = 'EMAIL'.
gv_print = abap_false.
else.
gv_print = abap_true.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
3 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |