Application Development 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: 

Documentation about Screen, Menu and Field Exits

Former Member
0 Kudos

Hi all!!

I need some documentation about Screen, Menu and Field Exits.

I´m very interested specially on steps by steps.

My mail is mmiguez@scpec.net.

Helpful posts will be rewarded.

Thanks in advance and regards,

Manuel.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

1)U can see MODSAP table for all exits

2) SMOD, CMOD

3) call customer function..

with these u can go forward.

8 REPLIES 8

Former Member
0 Kudos

Hi,

plz refer these threads......

***do rewards if usefull

vijay

Former Member
0 Kudos

1)U can see MODSAP table for all exits

2) SMOD, CMOD

3) call customer function..

with these u can go forward.

Former Member
0 Kudos

<b>Types of Exits </b>

There are several different types of user exits. Each of these exits acts as hooks where you can attach or "hang" your own add-ons.

<b>Menu Exits</b>

Menu exits add items to the pulldown menus in standard SAP applications. You can use these menu items to call up your own screens or to trigger entire add-on applications.

SAP creates menu exits by defining special menu items in the Menu Painter. These special entries have function codes that begin with "+" (a plus sign). You specify the menu item’s text when activating the item in an add-on project.

<b>Screen Exits</b>

Screen exits add fields to screens in R/3 applications. SAP creates screen exits by placing special subscreen areas on a standard R/3 screen and calling a customer subscreen from the standard screen’s flow logic.

<b>Function Module Exits </b>

Function module exits add functions to R/3 applications. Function module exits play a role in both menu and screen exits.

When you add a new menu item to a standard pull down menu, you use a function module exit to define the actions that should take place once your menu is activated.

Function module exits also control the data flow between standard programs and screen exit fields. SAP application developers create function module exits by writing calls to customer functions into the source code of standard R/3 programs.

These calls have the following syntax:

CALL CUSTOMER-FUNCTION ‘001’.

Field Exits

Field exits allow you to create your own programming logic for any data element in the Dictionary. You can use this logic to carry out checks, conversions, or business-related processing for any screen field. Example: The data element BBBNR identifies a company’s international location number. You might want to set up your R/3 System so that all international location numbers are larger than 100.

The field exit concept lets you create a special function module that contains this logic.

You assign the special function module to the data element BBBNR. You then assign the module to any programs and screens in which users can add new international location numbers. When you activate your field exit, the system automatically triggers your special routine whenever a user enters a company location number.

In 4.6c, you can use "RSMODPRF" program to create field exits.

An example of a user exits :-


MODULE user_exit_0001 INPUT  
    CASE okcode. 
        WHEN 'BACK OR EXIT'. 
            CASE sy-dynnr. 
                    WHEN '100'. 
                         SET SCREEN 0. 
                         LEAVE SCREEN. 
                    WHEN '200'. 
****************************************************************************** 
**** Note that you can write any code that satisfy your needs.                                                     **** 
**** But in this case, this was wrote as a sample code for reference sake.                                    **** 
**** And you can test it.                                                                                **** 
******************************************************************************  
                         SET SCREEN 100. 
                         LEAVE SCREEN. 
             ENDCASE. 
      ENDCASE. 

reward points if it is usefull..

Girish

0 Kudos

Thanks people!!

But I want some "step by step", examples,... specially for screen-exits.

0 Kudos

Hi Manuel,

For screen exit u can create it by creating a pf status and then within pf status u will find application toolbar and there u can select the exit button. for that also you need to code for that.

the sample code is as below for screen exit....

PROCESS AFTER INPUT.

MODULE exit_0100 AT EXIT-COMMAND.

***********************************************************

and code in exit module will be like

MODULE exit_0100 INPUT.

IF sy-ucomm = 'MNU_BACK' OR

sy-ucomm = 'MNU_CANCEL' OR

sy-ucomm = 'MNU_EXIT'.

LEAVE PROGRAM.

ENDIF.

ENDMODULE. " exit_0100 INPUT

For User Exit

1. Go to the screen>System>Status-->Program (Double

click this program. It will take you to the program.

2. Now, Goto-->Object Directory Entry.

3. Make a note the package name.

4. Now run the transactions SMOD, press F4 and enter the

above noted package, press enter.

5. It will display list of Exits.

6. Now go back to the initial screen SMOD.

7. Specify the exit name here and select the radio button

Components.

8. It will display four group boxes one for FM, second

for Fcodes, thrid for Screen areas and last for

includes.

9. Goto transaction CMOD, create a new project, and

click the button "Enhancement assignments" and

specify your enhancements that you got in SMOD.

10. Now bouble clikc the enhancement, it will take you to editor with some includes starting with Z, double clikc the include you want to edit and proceed.

Regards

Aneesh.

0 Kudos

Thank Aneesh,

I think I don´t explain my doubt clearly.

The 'Screen Exit' I say is a kind of User Exit.

Clarify me If I am wrong.

Thanks and regards,

Manuel

0 Kudos

Hi Manuel.

Check this link.

It will solve this problem.

http://www.sap-basis-abap.com/abap/difference-between-user-exits-screen-exits-field-exits.htm

Regards

Aneesh.