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

Code for Exit

Former Member
0 Likes
526

I need to check whether material number (MATNR) exist in change number(AENNR) field when saving MM01 transaction, if it not there i needto raise the meesage, how to write this.

5 REPLIES 5
Read only

Former Member
0 Likes
505

Hi Donald,

Use MESSAGE statement to raise error.

Use MESSAGE E000(ZI) 'Change number does not exist for materil'.

Here E represents Error and ZI is the message class.

Thanks,

Vinay

Read only

0 Likes
505

Hey Vinay,

i know to raise Error message, iam asking about exit code.

Thanks,

Donald

Read only

ferry_lianto
Active Contributor
0 Likes
505

Hi,

Perhaps you can check table MAPL to link material number (MATNR) and change number (AENNR).

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
505

Hi Donald,

First get userexit where u can write the code

then in that userexit validate the material number with change number.

ALI

Read only

Former Member
0 Likes
505

Donald,

Here is the procedure:

1. Go to SMOD transaction and enter Enhancement of MM01.

2. Select proper EXIT (it's nothing but function module) and go the source code.

3. This EXIT will have 1 include program, double click and create Include, ignore the message.

4. Add your code for populating message here in include.

5. Save, check and Activate

5. At last activate your Enhancement.

6. Test using MM01.

I hope this will help you.

Regards,

Amey