2016 Aug 09 12:13 PM
Good day,
I have implement the BADI ME_PROCESS_PO_CUST and put my code in the method FIELDSELECTION_ITEM works fine.
My requirement to disable/enable a standard input field in creation and change mode based on a certain condition in PO, but when change the mode of transaction from change to display the field still enable where It should be a disable field.
BR,
Ali
2016 Aug 09 2:05 PM
Ali, try the below code.
Declare constants as:
constants : lc_fldst_edit type mmpur_fieldstatus value '.', " Edit Allowed
lc_fldst_disp type mmpur_fieldstatus value '*', " Display Only
lc_fldst_req type mmpur_fieldstatus value '+', " Required
lc_fldst_hide type mmpur_fieldstatus value '-', " Hide
Declare a local DO:
data : lv_changeable type mmpur_bool.
* Check weather Purchase Order Changeable or not?
lv_changeable = im_header->is_changeable( ).
if lv_changeable eq 'X'. " PO in Change mode
loop at ch_fieldselection assigning <lf_field>.
if <lf_field>-metafield = '9000000035'. " Your specific field
" Based on your condition
<lf_field>-fieldstatus = lc_fldst_disp. " '*'
endif.
endloop.
endif.
Thanks,
Vikram.M
Good day,
I have implement the BADI ME_PROCESS_PO_CUST and put my code in the method FIELDSELECTION_ITEM works fine.
My requirement to disable/enable a standard input field in creation and change mode based on a certain condition in PO, but when change the mode of transaction from change to display the field still enable where It should be a disable field.
BR,
Ali
2016 Aug 09 1:06 PM
2016 Aug 09 2:05 PM
Ali, try the below code.
Declare constants as:
constants : lc_fldst_edit type mmpur_fieldstatus value '.', " Edit Allowed
lc_fldst_disp type mmpur_fieldstatus value '*', " Display Only
lc_fldst_req type mmpur_fieldstatus value '+', " Required
lc_fldst_hide type mmpur_fieldstatus value '-', " Hide
Declare a local DO:
data : lv_changeable type mmpur_bool.
* Check weather Purchase Order Changeable or not?
lv_changeable = im_header->is_changeable( ).
if lv_changeable eq 'X'. " PO in Change mode
loop at ch_fieldselection assigning <lf_field>.
if <lf_field>-metafield = '9000000035'. " Your specific field
" Based on your condition
<lf_field>-fieldstatus = lc_fldst_disp. " '*'
endif.
endloop.
endif.
Thanks,
Vikram.M
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |