Hi Arihant,
I hope you have created a custom implementation for this BADI.
Please check below points:
- In your BADI implementaiton, inside method PREPARE_RULE_CONTEXT you might be calling a method similar to READ_MATERIAL, may be READ_MARCFRGTR in this case for reading the MARC information. Please check whether correct structure is passed to it while creating the data reference. It should be if_mdg_bs_mat_gen_c=>gc_fieldname_marcfrgtr and not if_mdg_bs_mat_gen_c=>gc_fieldname_material
CALL METHOD lr_model->create_data_reference
EXPORTING
i_fieldname = if_mdg_bs_mat_gen_c=>gc_fieldname_marcfrgtr
i_struct = lr_model->gc_struct_key_attr
if_table = abap_true
i_tabtype = lr_model->gc_tabtype_sorted
IMPORTING
er_data = lr_data.
- While filling out the return table inside method PREPARE_RULE_CONTEXT, for getting the element id make sure you are passing right value (same name as created data object in BRF+ with caps). For ex:
get_element_id(
EXPORTING
iv_cr_type = lv_crequest-usmd_creq_type
iv_name = 'CASMARCFT'
IMPORTING
ev_brf_expr_id = lv_brf_expr_id ).
- Check whether step 4.3.4 is done as mentioned in the link