Close Sidebar close
Sapignite
  • SAP
  • Coding Challenges
  • Download
  • SAP Ignite Products

Subscribe & Follow

All product names on this web site are trademarks of the companies that own them. Sapignite.com is not affiliated with SAP AG in any way. SAP AG is the registered trademark holder of SAP, SAP R/3, mySAP, ABAP, xApps, NetWeaver, and other proprietary terms. The technical information on this site is verified to the greatest extent possible, however, any information found on this site is used at the site visitor's own risk. Sapignite.com reserves the right to correct any errors or omissions in any portion of this site at any time without obligation.

  • SAP
  • Coding Challenges
  • Download
  • SAP Ignite Products
Sapignite
Sapignite
    ABAP Enhancement SAP

    Tutorial on How to work with function module EXIT

    August 9, 2017

    Function module 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!!!!!!).

    1 Comment
    CALL CUSTOMER-FUNCTIONEXIT_SAPLSUSF_001function module exit CMOD SMODsap abap function module EXIT
    raju borda
    Raju is working with Technical areas like SAP ABAP, PI , Web design, JAVA , PBT, robotics as architect also functional areas like SCM , QM, MM , insurance . When he is not Doing above geeky things you might find him travelling , Cooking , dancing or drinking with friends :-) .
    • Tutorial on How to Work with field Exit

    • Tutorial on How to work with Menu EXIT

    You Might Also Like

    is sap going gold from blue ?

    July 4, 2017

    SAP Tips and tricks

    July 6, 2017

    My journey to ABAP Certification

    July 20, 2017

    1 Comment

  • Reply Karan Sharma April 25, 2019 at 9:12 am

    Sir I did the same but it didnt work. Are you sure you didnt miss anything here?

  • Leave a Reply Cancel Reply

Sign up for some exciting content

Recent Posts

  • How to prepare for SAP IBP Certification
  • What is SAP Leonardo ?
  • RoadMap UI Tutorial webdynpro for ABAP
  • Offline Adobe forms in WebDynPro for ABAP
  • MVC Architecture for Webdynpro for ABAP

Categories

  • ABAP
  • Android
  • Coding Challenges
  • Enhancement
  • featured
  • Interviews
  • Learning Hub
  • PI ( Process integration )
  • SAP
  • SAP HANA
  • Uncategorized
  • Webdynpro for ABAP
  • Webdynpro For ABAP