Function module exit/Function EXIT is nothing but a function module with a Z include where you can put your code.
Function module EXIT is called using CALL CUSTOMER-FUNCTION ‘<XXX>’.syntax.
Where XXX is three digits no. So the Function module name looks like
EXIT_SAPLSUSF_XXX.
Scenario: Let’s take an example in that the requirement is to put a welcome message to user when he/she log in into SAP system.
Step 1:
Go to the transaction SMOD: use menu path utilitiesà find
And give the Package name as SUSR and execute it you can see the below component in it:

Step 2
We have SUSR0001 component. From the description of the component you can make out that this EXIT is called after user log in into SAP system so we can use it for our purpose.
Go to Transaction CMOD and create a Project named ZGUICHCK (you can give any name starting with Z ).

Step3
Click on the Enhancement Assignment to include the component into this project. Give our component SUSR0001 and click enter button.

Go to Components window (It will show all the exits included in this enhancement), in our case only one Function Exit will be shown.
Double click on the Function exit EXIT_SAPLSUSF_001.It will open Function module Editor. Double click on the INCLUDE ZXUSRU01.
Write down your welcome message here. you can use below code :
If sy-uname eq <userid>. Message ‘Welcome Sweet Heart’ type ‘I’. Endif.Now logout and log in again with <userid>. You will get the popup saying

(Note: Take care that <userid> is not your lady Boss!!!!!!).

















Nooruddin
Awesome Presentation….. Really a good one…. I got the clear Idea of using Funtion Module Exits. Thank you very much…..
sekar
This is really a good document where every options are explained clearly.Please continue this good work
Logeshwari Amavasai
This article gives clear picture about function module exit and its really informative for new learners,very nice.Keep going good work:)
sam
Hi
when i give SUSR0001 and click enter button.
i am getting the following ERROR message.
SAP enhancement SUSR0001 already belongs to project USRADMIN
Message no. ENHANCEMENT029
regards
SAM
Raj
Hi SAM,
As it says its already part of USRADMIN.
so you cant use it.try to use some OSS notes on the same.
Thanks
Eshant
Hi Raj,
Even I am getting the same thing as SAM. I am not sure how to proceed with this (OSS).
Please help!!
Regards,
Eshant
sangeetha
Hi,
Recently only i visited this site and found very very useful .I implemented the exit EXIT_SAPLSUSF_001 as explained above for my user-id, activated it and logged off.when i logged in , i didnt get the message. Is this becoz i saved it as local object?Pl clarify..
Raj
Hello ,
Saving as local object does not impact the execution.
Can you please Check whether
you have provided the perfect user id ( in caps )
If sy-uname eq .
Also Please check the Enhancement is active .
Get back if i am not clear or it does not work.
Thanks
Raj
SAP IGnite
sangeetha
ya u r right, i didnt activate the enhancement , activated only function exit .
Thanks for your reply.
srinivasaraju
Thankyou where much . I have idea in function exits
kabi
Hi Raj,
I tried everything as mentioned in the tutorial and activated everything,
but the message doesnot get displayed after I logged in.
Pls help