Application Development 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: 

Disable PO Date in ME21n

Former Member
0 Kudos
261

Dear Experts,

I have to disable the purchase order date in the me21n.

My functional consultant already informed that he tried in the

screen variant, he is able to but problem is date which he has done

same date is showing in the me21n.

Can we do using any exit or BADI we can disable the po date.

Thanks and regards,

Zubera

4 REPLIES 4

Pragnesh_7se7
Participant
0 Kudos
91

Hi dear,

check badi ME_PROCESS_PO_CUST

raymond_giuseppi
Active Contributor
0 Kudos
91

Within BAdI ME_PROCESS_PO_CUST methods :

  • PROCESS_HEADER (and others) can force the date value
  • OPEN can initialize the field with your coded rules
  • FIELDSELECTION_HEADER can change fields attributes

Regards,

Raymond

0 Kudos
91

Hi - First check the solution mentioned by Raymond above.

If it's not working, please check below.

Create a implit enahcnement at the end of this function module MEPOBADI_FS_HEADER (just before    ENDFUNCTION).

1. declare data

    DATA: ,    w_header TYPE mepoheader,

                     w_fieldselection  TYPE mmpur_fs.

   CONSTANTS: c_202       TYPE mmpur_metafield  VALUE '202',

* Check the type group - MMFD in SE11 for meta field ( if 202 is not ok)

2 .   check header data

   IF im_header IS NOT INITIAL.

      CALL METHOD im_header->get_data

        RECEIVING

          re_data = w_header.

    ENDIF.

* Here you can check the header details from w_header

if your condition match.

3.    LOOP AT ch_fieldselection INTO  w_fieldselection

                                        WHERE metafield = c_202.

                    w_fieldselection-fieldstatus = '*' .  " Disable

* Similarly you can try code enable / required etc

                MODIFY ch_fieldselection FROM  w_fieldselection.

                CLEAR w_fieldselection.

              ENDLOOP.

Let us know, in case any further info

0 Kudos
91

Also you could mix the use of BAdI (to initialize/maintain date) and transaction/screen variant to protect it from user.

Regards,

Raymond