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: 

Validation for field MATNR in transaction VA01

0 Kudos
549

Dear Friends,

We have a requirement where we will maintain certain customers in z table (condition type Z902). If user is entering material in the field 'MATNR' in transaction VA01 and if that customer is maintained then we want to give error message that " New functionality is activated and please enter material in the field KDMAT (Customer material number). For new functionality, we are maintaining that material with condition type Z902 and table KOTD902 and same time we are keeping expiry date with old value with earlier condition type z508 and table KOTD508. I tried all user exits but not able to proceed.

3 REPLIES 3

madhu_vadlamani
Active Contributor
0 Kudos
233

Hi ,

Did you checked with USEREXIT_CHECK_VBAP.This will only trigger line item wise.

Reagrds,

Madhu

0 Kudos
233

Yes i have tried USEREXIT_CHECK_VBAP. We have purposely set the expiry date of the material with old date as 12 july in old condition type Z508, table kotd508. and maintained it with new condition type Z902, table kotd902 with future date. Now after entering that material in MATNR field, it is giving message as " Material 477050-2090 is not defined for sales org.1000, distr.chan.10". Since my new functionality is active now, i want to give error message even before this message telling to put that material in KDMAT (cust mterial number) field. but in USEREXIT_CHECK_VBAP i am not getting any value in field vbap-matnr to do validation.

0 Kudos
233

Hi,

As far as i know there is a standard functionality in SAP which will fill the KDMAT field when a material number is given in VA01 while creating the sales order. But you need to maintain these specific values at some place in some transaction for customer material. Pls check with fucntional and get the details about it.

Thanks,

Venkatesh.