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: 

Field Validation for ME21N

Former Member
0 Kudos

Hi All,

I would like to ask which user-exit can be used for data checking for the inputs when creating a purchase order using ME21N. I would like to prompt an error message in case the user has enter a wrong value for the field. Thanks.

Thanks.

4 REPLIES 4

Former Member
0 Kudos

Hi,

Go to smod go to f4 help put ME as development class you would get the list of exit that would be called in ME21N. check the same.

You can also use ME_PO_BADI_CUST. BADI.

You can use Exit MM06E005 exit, fm EXIT_SAPMM06E_012 like below:


CASE OK_CODE.
 
  WHEN 'MECHECKDOC' or 'MESAVE'. 
then put your checks

Regards,

Himanshu

former_member262988
Active Contributor
0 Kudos

Hi,

Use the badi ME_PROCESS_PO_CUST ...in that PROCESS_ITEM and PROCESS_HEADER methods..

Thanks,

Shailaja Ainala.

Former Member
0 Kudos

Hi,

Use this Exit

MM06E005 // Customer fields in purchasing document

u can find the function modules inside it.

make use of them according to ur requirement..

EXIT_SAPMM06E_006 // write ur logic here

EXIT_SAPMM06E_007

EXIT_SAPMM06E_008

Regards

Kiran

Former Member
0 Kudos

Hi,

As said above, you can do your checks in the below exit: EXIT_SAPMM06E_012

But you need to take care of Create/Change/Display transactions as if you are aware that each of the transactions have the Toggle button where in you can directly change values in ME23N also. Hence in addition to SY-TCODE check, you need to check the value in I_TRTYP parameter of the exit.

I_TRTYP = A/V/H (create/change/display). Please check exact values in debugging.

Hope this helps

Regards

Shiva