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

RSMODPRF

Former Member
0 Likes
1,127

Hi,

I want to validate one of the field in ME21n transaction .

How is it possible by using filed-exit(program RSMODPRF).

what are the prereqisition for filedexit.i have created filed exit for data element BEDNR .but it was not getting triggered whil i was executing trasaction me21n and entering the value.can u please help me in this regard.

Regards,

Sunil.K

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
686

Hi Sunil,

1.Enter the tcode SE38

2.In the ABAP Editor enter the program name RSMODPRF

3.Execute

4.Then you will get a screen with Data Element and Number of Field Exit

Here enter the Data Element(as per your requirement for example MATNR for material no.) and

enter 0 to 9 or A to Z in the second field(I am taking 0 in my example)

5. Execute

6.Then you will be navigated to the Function Builder screen(se37) with FM name FIELD_EXIT_MATNR_0

The FM name contains the Data Element(MATNR) and No. of Field Exit (0) (in this case)

7.Then click on CREATE.

8.Give the Fun. Grp name and SAVE

9.It will take youn to the Source code wherein ypu have to write the code asb per your requirement

For Example:

FUNCTION FIELD_EXIT_MATNR.

IF INPUT BETWEEN 125 AND 150.

MESSAGE E000(ZMM) WITH "Material not allowed".

ENDIF.

ENDFUNCTION.

10.Then if you try to enter the values in MM01 for Material no.,this effect comes into picture

If you enter Material no between 125 and 150 you will get "Material not allowed".

or

One more way to do this is goto tcode CMOD.

Enter PRFB in the command prompt and press ENTER

In the screen select the menu Field exit --> Create and follow the same procedure as above.

****Reward points if found useful

Regards,

Naresh

2 REPLIES 2
Read only

Former Member
0 Likes
687

Hi Sunil,

1.Enter the tcode SE38

2.In the ABAP Editor enter the program name RSMODPRF

3.Execute

4.Then you will get a screen with Data Element and Number of Field Exit

Here enter the Data Element(as per your requirement for example MATNR for material no.) and

enter 0 to 9 or A to Z in the second field(I am taking 0 in my example)

5. Execute

6.Then you will be navigated to the Function Builder screen(se37) with FM name FIELD_EXIT_MATNR_0

The FM name contains the Data Element(MATNR) and No. of Field Exit (0) (in this case)

7.Then click on CREATE.

8.Give the Fun. Grp name and SAVE

9.It will take youn to the Source code wherein ypu have to write the code asb per your requirement

For Example:

FUNCTION FIELD_EXIT_MATNR.

IF INPUT BETWEEN 125 AND 150.

MESSAGE E000(ZMM) WITH "Material not allowed".

ENDIF.

ENDFUNCTION.

10.Then if you try to enter the values in MM01 for Material no.,this effect comes into picture

If you enter Material no between 125 and 150 you will get "Material not allowed".

or

One more way to do this is goto tcode CMOD.

Enter PRFB in the command prompt and press ENTER

In the screen select the menu Field exit --> Create and follow the same procedure as above.

****Reward points if found useful

Regards,

Naresh