on 03-08-2013 1:14 PM
Hey Guys,
I am completely new in the MDG area.
I found the HowTo "Master Data Governance for Material: BADI USMD_SSW_RULE_CONTEXT_PREPARE to enhance User Determination". There it is described how to enhance the context via Enhancement Spot USMD_SSW_SERVICE_PROCESSOR and example implementation MDG_BS_MAT_BRF_CONTEXT_LABOR.
We have following situation: We need the 'plant' for the decision tables in BRF+. So we assumed that we can use the logic described in the howto (although the field 'labor' is used).
I implemented the BadI and tried it via debugging for the standard functionality (labor). Following problem: In method READ_MATERIAL (no change of standard implementation) in line 59 (lr_model->read_char_value after gc_fieldname_material and usmd0_cs_fld-crequest is set in lt_sel) there are no entries in <lt_data>.
Where could be the problem?
Further question: How is it possible to enhance the code to retrieve the plant values out of the Change request instead of 'labor'?
Thanks in advance.
Regards,
Tass.
Next issue: We have the requirement to generate a parallel processing for each plant entry in the user decision table. I tried to put several plant values in the BADI method prepare_rule_context -> lt_rule_context_value contains e.g. 2 plants. The BADI is called in method CL_USMD_WF_SSW-FIND_PATH_PROCESSOR. After the BADI call the method
cl_usmd_wf_ssw_rule_service=>process_dt_for_cr_type is called with the context_values. What happens there is that only the last entry is evaluated (plant is declared as element and so the context_value table is looped over and just the last entry is returned -> The decision table is read only for one plant and not for two).
I hope the issue is understandable. Any ideas? What we need is a possibility to select more entries from the decision table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
now the method read_material works. Following issue: For replicatet materials (real material number) the method worked fine. For intermediat material (starting with $) the method did not retreive any values. When the last call of lr_model->read_char_value is changed (parameter i_readmode to if_usmd_model_ext=>gc_readmode_all_inact) the method works for all situations.
Retreive the value for plant: The value can be retreived throught entity if_mdg_bs_mat_gen_c=>gc_fieldname_marcbasic
CALL METHOD lr_model->create_data_reference
EXPORTING
i_fieldname = if_mdg_bs_mat_gen_c=>gc_fieldname_marcbasic
i_struct = lr_model->gc_struct_key_attr
if_table = abap_true
i_tabtype = lr_model->gc_tabtype_sorted
IMPORTING
er_data = lr_data.
ASSIGN lr_data->* TO <lt_data>.
CLEAR lt_sel.
ls_sel-fieldname = if_mdg_bs_mat_gen_c=>gc_fieldname_material.
ls_sel-sign = lc_incl.
ls_sel-option = lc_equal.
ls_sel-low = lv_matnr.
INSERT ls_sel INTO TABLE lt_sel.
ls_sel-fieldname = usmd0_cs_fld-crequest.
ls_sel-low = iv_cr_number.
INSERT ls_sel INTO TABLE lt_sel.
CALL METHOD lr_model->read_char_value
EXPORTING
i_fieldname = if_mdg_bs_mat_gen_c=>gc_fieldname_marcbasic
it_sel = lt_sel
i_readmode = if_usmd_model_ext=>gc_readmode_all_inact
if_use_edtn_slice = abap_false
IMPORTING
et_data = <lt_data>.
Maybe there is still some fine tuning necessary but the global approach should be all right.
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ingo
Can it possible to replace LABOR with MTART in example implementation MDG_BS_MAT_BRF_CONTEXT_LABOR?
As per
For the interface method you can use the default coding from Example Enhancement Implementation MDG_BS_MAT_BRF_CONTEXT_LABOR (Add MARA-LABOR to BRF+ context), Implementing Class CL_MDG_BS_MAT_BRF_CONTEXT_LABO and methods IF_USMD_SSW_RULE_CNTX_PREPARE~PREPARE_RULE_CONTEXT, GET_ELEMENT_ID, READ_MATERIAL and READ_CREQUEST.
I tried that and able to add in decesion table but getting below error in custom BADI
Any suggestion?
Hi Ingo
I already raised seperate thread for this with all screen shot on Unable to find user agent from user agent decesion table
Can you porovide your comment on this thread?
Hi Tass,
As this BAdI is used only for extending the decision tables so you have to include your plant field into this BADI and for method read_material method you have to read the plant data in staging area via change request and matnerial no.
for the error mentioned above you have to give your entity type name instead of labour which you have created in data model like for plant as ZMARC.
and in importing parameter et_data you have to give variable which you declare for zmarc entity. for staging area.
Hope this helps.
Regards
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.