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: 

making field mandatory in ME21N

Former Member
0 Kudos

Hi All,

I need to make the Purch.Requisition field mandatory in the Purch.Order in ME21N.

it should be mandatory only for one specific company code and DOCtype.

( like, mandatory only for CompCode 3000 and doctype NB ).

the field name is MEPO1211-BANFN.

Should i be using some screen exit or BADI for this purcpose.

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Vinay,

You can use Methods PROCESS_ITEM and CHECK of BADI ME_PROCESS_PO_CUST to check/validate PO item data. In case the validation fails you can invalidate the data (by setting CH_FAILED = 'X' in method CHECK) or emit an error message stating that the field is mandatory.

This will prevent further processing until some value has been keyed in for that particular field.

Hope this helps.

Regards,

Abhisek.

3 REPLIES 3

P561888
Active Contributor
0 Kudos

Hi ,

Check any Exit is presented , if it then use, other wise go with BADI.

regards,

Bharani

Former Member
0 Kudos

Making PR mandatory based on Doc Type can be achieved via SPRO. The path is

SPRO>Materials Management>Purchasing>Purchase Order>Define Screen Layout at Document Level. Create a new field selection based on your exisiting field selection or modify your exisiting one. It depends on your requirement. Click on Reference data, item You would find PR and some radio buttons. Click the one for Reqd Entry. Save.

Once this is saved, go to SPRO>Materials Management>Purchasing>Purchase Order> Define Document Type. Enter the updated field selection from above in the document type row for which this change needs to be activated.

Hope this helps!

Thanks!

Former Member
0 Kudos

Hi Vinay,

You can use Methods PROCESS_ITEM and CHECK of BADI ME_PROCESS_PO_CUST to check/validate PO item data. In case the validation fails you can invalidate the data (by setting CH_FAILED = 'X' in method CHECK) or emit an error message stating that the field is mandatory.

This will prevent further processing until some value has been keyed in for that particular field.

Hope this helps.

Regards,

Abhisek.