Friday 2 September 2016

Example for Local Field Exits

Requirements

  • Create a field Exit for Data Element 'MATNR'  ( Material Number )which will restrict users from entering a Material Number 'DUST201' only at 'MM01' Transaction Code.


Steps:-

To find out the Program name and Screen Number : -
  • Go to Transaction Code MM01.

  • Click on System -> Status.
  • Pop-up will appear.
  • Copy the program name as well as Screen Number.




To find out the Data Element name.

  • Click on Material Input box and Click on F1 ( Documentation Help ).
  • Pop-up will appear.
  • Click on Technical Information.
  • Pop-up will appear.
  • Copy the Data Element name.



  • Go to Transaction Code CMOD.
  • Enter the Transaction Code PRFB.
  • Select the Data Element i.e MATNR and Click on " Assign Prog / Screen ".
  • Pop-up will appear.
  • Enter the Fld.Exit i.e A-Z , 0 - 9 .
  • Enter the program name and Screen Number.
  • Click on SAVE.



  • Automatically generates a Function Module.
  • Click on Create Button.
  • Pop-up will appear.

  • Click on Source Code Tab.
  • Enter the Logic.
  • Save -> Check -> Activate.
  • Click on Back.




  • Click on Back button.
  • Pop-up will appear.
  • Click on Continue.

  • Check the Status.

Test

  • Go to transaction code MM01.
  • Enter the material Number as DUST201 and required field entries.
  • Press Enter.
  • Check the Status bar.



Note : 

  1. For a Data Element we can create either Global Field Exit or Local  Field Exit. At a time any one will be in active state.
  2. For a Data Element we can create 36 Local Field Exits i.e 0-9 = 10 , A-Z = 26 , Total = 36.

No comments:

Post a Comment