Hi friends,
I am working on a very simple requirement.
I have a custom field A (drop down with 4 values).
1
2
3
4
If I select the value 1 in drop down, the field B(which is again a custom drop down field) should be mandatory. If I select any other values like 2,3 or 4, Field B shouldn't be mandatory. I followed the typical approach of making mandatory via get_p with following coding.
WHEN if_bsp_wd_model_setter_getter~fp_input_mandatory.
IF lv_field_active = '1'.
rv_value = abap_true.
ELSE.
rv_value = abap_false.
ENDIF.
It's working fine to make it mandatory. However, If I choose some other value again, it's not setting the field to non mandatory in the first step. If I allow one more server round trip by clicking on some other fields or choose any other value in the drop down, it's non mandatory.
Eg.
I choose value 1 ->Field B mandatory.
I choose value 2 -> Field B mandatory again(not expected)
I click on some other fields which have server round trip or I choose value 3 ->Field not mandatory.
What is the reason it's not working in the first step?.
I could achieve the functionality via iterator class though, need to know the reason here.
Thanks,
Faisal