Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Implement BADI ME_PROCESS_PO_CUST

Former Member
0 Likes
2,908

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,938

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

2 REPLIES 2
Read only

Former Member
0 Likes
1,938

This message was moderated.

Read only

Former Member
0 Likes
1,939

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