‎2008 May 31 1:07 PM
Dear Friends,
i Have gone through the eight steps for creating Field Exit.
Step 1: Determine Data Element
Step 2: Go To Field Exit Transaction
Step 3: Create Field Exit
Step 4: Create Function Module
Step 5: Code Function Module
Step 6: Activate Function Module
Step 7: Assign Program/Screen
Step 8: Activate Field Exit
Could any one give me an example by taking a data element and showing the code as well.
Thx Essam
‎2008 Jun 01 4:23 PM
Hi Khan,
Please go through this link.,
Here you will find all the detailed format of the example for field exit.
http://www.saptechnical.com/Tutorials/ExitsBADIs/MK01/FieldExit.htm
Just try this. You will get it or else you please revert back if u had any queries.
Reward points if useful.
Cheers,
Swamy Kunche
‎2008 Jun 02 6:07 AM
Hi Khan,
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(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