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: 

Enhancements

Former Member
0 Kudos

What is screen exit, user exit, etc, are these the part of enhancements? Can anyone brief those exits mentioned above?

1 ACCEPTED SOLUTION

dani_mn
Active Contributor
0 Kudos

These two are enhancement techniques.

USER EXIT.

Its more like a modification sap has provided some includes in standard programs starting with z.

customer can fill these includes with own logic.

SCREEN EXIT.

Screen exit is provided with in screen. A subscreen area is reserved for enhancements. and calls to subscreen are provided in PBO and PAI modules.

You can add your fields into this area. system takes care of the rest.

Regards,

Wasim Ahmed

9 REPLIES 9

dani_mn
Active Contributor
0 Kudos

These two are enhancement techniques.

USER EXIT.

Its more like a modification sap has provided some includes in standard programs starting with z.

customer can fill these includes with own logic.

SCREEN EXIT.

Screen exit is provided with in screen. A subscreen area is reserved for enhancements. and calls to subscreen are provided in PBO and PAI modules.

You can add your fields into this area. system takes care of the rest.

Regards,

Wasim Ahmed

Former Member
0 Kudos

SAP creates customer exits with transaction SMOD. From these customer exits, customers then use transaction CMOD to choose the enhancements they want to process, assign them to enhancement projects, edit the components, and activate the relevant projects.

Types of Exits

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

Menu Exits

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.

Screen Exits

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.

Function Module Exits

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 pulldown 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’.

An add-on project contains a series of exits, as well as the add-ons that you develop to attach to these exits (like menu entries or function modules). To create an add-on project from within the ABAP Workbench menu, choose Utilities ® Enhancements ® Project management.

Before you begin defining a project, you need to decide which application, application component, or specific standard transaction you would like to add your own functionality to. Give your project a name that indicates the type of functions it contains and that shows which transactions are affected. It may be useful to agree upon a company-wide naming convention for enhancement projects.

There are two factors you need to keep in mind when you create an add-on project. First, you can include an SAP enhancement package and the customer exits it contains in one project only. The same SAP enhancement may not appear in two separate customer projects.

Second, in order to make your add-ons, such as menu items or screen fields, appear in standard R/3 applications, you must activate your add-on project. When you activate a project, all of the add-ons created within this project are activated as well. For this reason, you should ensure that the exits you include in your project contain functions that can be activated simultaneously. It is not possible to activate exits individually.

After you have specified the name of your new project, proceed as follows:

Choose Create.

Describe the nature of the project by providing a short descriptive text.

Choose Save.

The system then prompts you to assign a change request. This assignment allows you to transport the project and its components into a productive system once you have completed it.

Specify which SAP enhancement packages you want to include in your project by choosing SAP enhancements.

Enter the names of these SAP enhancements in the spaces provided.

You should choose enhancement packages that logically belong together. For example, if you are planning to use several enhancements that deal with Materials Management modules, you can include all of these enhancements in the same project. If you are working on enhancements that deal with different applications, or if the enhancements are not logically related, you should include these enhancements in separate projects.

Once you have identified the SAP enhancements you want to include in your project, you can begin adding your own functions to the exits offered in the enhancements. To display the individual components of the SAP enhancements, return to the main screen of the Project Management transaction and choose Enhancement components The system displays all of the exits included in the enhancements assigned to your project.

After you have attached add-on functionality to the exits in your project, you need to activate the project. Activating a project turns on all your add-ons. You also need to activate your project after you have transported it from a development system into a productive system.

When you activate your project, the system turns on all add-ons that the project contains. You cannot activate individual add-ons separately. To activate an add-on project, proceed as follows:

Call the Project management transaction.

Choose Activate project.

The system displays a message confirming that the project was activated.

You can now call up any standard SAP transaction that contains an exit you used in your add-on project. The newly added add-on function(s) should appear.

If you need to make changes to any of your add-ons, you must first deactivate the project that contains that add-on. Deactivating a project turns off all of that project’s add-ons. To deactivate an add-on project, proceed as follows:

Call the Project management transaction.

Choose Deactivate.

The system confirms that the project was deactivated.

Once the project is turned off, you can make changes to the project’s add-ons or build new functions and attach them to other exits in the project.

Former Member
0 Kudos

Hi,

Gimme your email ID, will forward you a good document to understand these stuffs with example.

Regs,

Venkat Ramanan

Message was edited by: Venkat Ramanan Natarajan

0 Kudos

ved_vishwa@rediffmail.com

Former Member
0 Kudos

Hi Viswanath,

Screen exits are exits that allow you to use a reserved part of the screen (A subscreen) to display or input data.

It is determined be SAP where the sub screen will be displayed.

The syntax is: CALL CUSTOMER-SUBSCREEN

The screen exit is not processed untill the corresponding subscreen has been created in an enhancement project, and the project has been activated.

Note:

Function codes are only processed in the main screens flow logic

You are not allowed to enter a name for the subscreens command field

You are not allowed to define GUI stauses

You are not allowed to enter a value for Next screen

The global data of the program is not available for the subscreen. Data for the subscreen is provided by function modules. These function modules belongs to the same function group as the subscreen

Subscreens are edited with transaction CMOD. When you activate a project containg subscreens, the calling screen is regenerated and the subscreen is displayed next time you display the calling screen

The developer must create the subscreen and the corresponding PBO and PAI modules

How to identify screen exits

Look after CALL CUSTOMER-SUBSCREEN in the screenprogram of the screen you want to modify.

Use transaction CMOD menu Utillities -> SAP enhancements to search for screen exits

MENU EXITS

Menu exits allow you to add your own functionallity to menus. Menu exits are implemented by SAP, and are reserved menu entries in the GUI interface. The developer can add his/her own text and logic for the menu.

Function codes for menu exits all start with "+"

Example

We want to create a new menu item in the Office menu. The text for the menu should be "Run ZTEST", and the menu will

run report ZTEST.

Goto transaction SE43 Area Menu Maintenance

In Area Menu Paramenter type 'S000' (S triple Zero)

Select Change and ignore all the warning screens

Expand the office menu. In the buttom of the office tree you will find a menu named "Customer function"

Double click on the text. In the pop-up screen change the text to "Run ZTEST". Note that the trsnaction code is +C01

Goto transaction SE93 and create transaction +C01 that calls report ZTEST.

Now you will se the menu displayed in the office tree. If you delete transaction +C01 again, the new menu will dissapear.

USER EXITS

User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a functionmodule. The code for the function module is writeen by the developer. You are not writing the code directly in the function module, but in the include that is implemented in the function module.

The naming standard of function modules for functionmodule exits is: EXIT_<program name><3 digit suffix>

The call to a functionmodule exit is implemented as: CALL CUSTOMER.-FUNCTION ❤️ digit suffix>

Example:

The program for transaction VA01 Create salesorder is SAPMV45A

If you search for CALL CUSTOMER-FUNCTION i program SAPMV45A you will find ( Among other user exits):

CALL CUSTOMER-FUNCTION '003'

exporting

xvbak = vbak

xvbuk = vbuk

xkomk = tkomk

importing

lvf_subrc = lvf_subrc

tables

xvbfa = xvbfa

xvbap = xvbap

xvbup = xvbup.

The exit calls function module EXIT_SAPMV45A_003

2. How to find user exits

Display the program where you are searching for and exit and search for CALL CUSTOMER-EXIT

If you know the Exit name, go to transaction CMOD. Choose menu Utillities->SAP Enhancements. Enter the exit name and press enter.

You will now come to a screen that shows the function module exits for the exit.

3. Using Project management of SAP Enhancements

We want to create a project to enahance trasnaction VA01

Go to transaction CMOD

Create a project called ZVA01

Choose the Enhancement assign radio button and press the Change button

In the first column enter V45A0002 Predefine sold-to party in sales document . Note that an enhancement can only be used i 1 project. If the enhancement is allready in use, and error message will be displayed

Press Save

Press Components. You can now see that enhancement uses user exit EXIT_SAPMV45A_002. Double click on the exit.

Now the function module is displayed. Double click on include ZXVVAU04 in the function module

Insert the following code into the include: E_KUNNR = '2155'.

Activate the include program. Go back to CMOD and activate the project.

Goto transaction VA01 and craete a salesorder. Note that Sold-to-party now automatically is "2155"

Regards,

Mukesh Kumar

Former Member
0 Kudos

Hi,

Check your email ID.

Regs,

Venkat Ramanan

Former Member
0 Kudos

Hai Vishwanath

Check the following Document

User Exits

Screen exits are exits that allow you to use a reserved part of the screen (A subscreen) to display or input data.

It is determined be SAP where the sub screen will be displayed.

The syntax is: CALL CUSTOMER-SUBSCREEN

The screen exit is not processed untill the corresponding subscreen has been created in an enhancement project,

and the project has been activated.

Note:

Function codes are only processed in the main screens flow logic

You are not allowed to enter a name for the subscreens command field

You are not allowed to define GUI stauses

You are not allowed to enter a value for Next screen

The global data of the program is not available for the subscreen. Data for the subscreen is provided by function modules.

These function modules belongs to the same function group as the subscreen Subscreens are edited with transaction CMOD.

When you activate a project containg subscreens, the calling screen is regenerated and the subscreen is displayed next

time you display the calling screen

The developer must create the subscreen and the corresponding PBO and PAI modules

How to identify screen exits

Look after CALL CUSTOMER-SUBSCREEN in the screenprogram of the screen you want to modify.

Use transaction CMOD menu Utillities -> SAP enhancements to search for screen exits

MENU EXITS

Menu exits allow you to add your own functionallity to menus. Menu exits are implemented by SAP, and are reserved menu

entries in the GUI interface. The developer can add his/her own text and logic for the menu.

Function codes for menu exits all start with "+"

Example

We want to create a new menu item in the Office menu. The text for the menu should be "Run ZTEST", and the menu will

run report ZTEST.

Goto transaction SE43 Area Menu Maintenance

In Area Menu Paramenter type 'S000' (S triple Zero)

Select Change and ignore all the warning screens

Expand the office menu. In the buttom of the office tree you will find a menu named "Customer function"

Double click on the text. In the pop-up screen change the text to "Run ZTEST". Note that the trsnaction code is +C01

Goto transaction SE93 and create transaction +C01 that calls report ZTEST.

Now you will se the menu displayed in the office tree. If you delete transaction +C01 again, the new menu will dissapear.

USER EXITS

User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a functionmodule.

The code for the function module is writeen by the developer. You are not writing the code directly in the function module,

but in the include that is implemented in the function module.

The naming standard of function modules for functionmodule exits is: EXIT_<program name><3 digit suffix>

The call to a functionmodule exit is implemented as: CALL CUSTOMER.-FUNCTION ❤️ digit suffix>

Example:

The program for transaction VA01 Create salesorder is SAPMV45A

If you search for CALL CUSTOMER-FUNCTION i program SAPMV45A you will find ( Among other user exits):

CALL CUSTOMER-FUNCTION '003'

exporting

xvbak = vbak

xvbuk = vbuk

xkomk = tkomk

importing

lvf_subrc = lvf_subrc

tables

xvbfa = xvbfa

xvbap = xvbap

xvbup = xvbup.

The exit calls function module EXIT_SAPMV45A_003

2. How to find user exits

Display the program where you are searching for and exit and search for CALL CUSTOMER-EXIT

If you know the Exit name, go to transaction CMOD. Choose menu Utillities->SAP Enhancements.

Enter the exit name and press enter.

You will now come to a screen that shows the function module exits for the exit.

3. Using Project management of SAP Enhancements

We want to create a project to enahance trasnaction VA01

Go to transaction CMOD

Create a project called ZVA01

Choose the Enhancement assign radio button and press the Change button

In the first column enter V45A0002 Predefine sold-to party in sales document . Note that an enhancement can only

be used i 1 project. If the enhancement is allready in use, and error message will be displayed

Press Save

Press Components. You can now see that enhancement uses user exit EXIT_SAPMV45A_002. Double click on the exit.

Now the function module is displayed. Double click on include ZXVVAU04 in the function module

Insert the following code into the include: E_KUNNR = '2155'.

Activate the include program. Go back to CMOD and activate the project.

Goto transaction VA01 and craete a salesorder. Note that Sold-to-party now automatically is "2155"

Have look at this links

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf

http://www.sapgenie.com/abap/ole.htm

http://help.sap.com/saphelp_46c/helpdata/en/59/ae3f2e488f11d189490000e829fbbd/frameset.htm

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf

For User Exit Finding

Go to se93 and give the tcode to find the main program associated to it.

Go to se38 and give the main program.

Find the package associated to it.Go to->Object Directory Entry.

Go to smod transaction.

Press f4.

Press Information System Button.

Give the Project(Dev Class).

Press enter.

Find the enhancements associated

For User Exit System Table

1. MODSAP & MODSAPT is the table.

2. Where we can give the enhancement name.

3. Component type will be E

for getting the FMs.

E Function exit

S Screens

T Tables

C GUI code

Field Exit Creation

Step by step procedure for creating Field Exits

There are eight steps to creating a 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

Step 1: Determine Data Element

- Before you can begin adding the functionality for a field exit, you must know the corresponding data element.

- An easy way to determine the data element associated to a particular screen field is to:

Go the appropriate screen.

Position the cursor in the appropriate field.

Press eF1f for field-level help.

Click on the eTechnical infof pushbutton (or press eF9f) on the help dialog box.

On this Technical Information dialog box, the data element will be specified if the field is 'painted' from the ABAP/4 Dictionary.

Step 2: Go To Field Exit Transaction

- The transaction to create field exits is CMOD.

- You can use the menu path Tools -> ABAP/4 Workbench -> Utilities -> Enhancements -> Project management.

- From the initial screen of transaction CMOD, choose the Text enhancements -> Field exits menu path.

- After choosing this menu path, you will be taken to the field exits screen. From here, you can create a field exit.

NOTE : Even though you use transaction CMOD to maintain field exits, you do not need to create a project to activate field exits.

Step 3: Create Field Exit

- From the field exit screen of transaction CMOD, choose the Field exit -> Create menu path.

- After choosing this menu path, a dialog box will prompt you for the appropriate data element .

- Enter the data element name and click the eContinuef pushbutton.

- Now, you will be able to create the function module associated to the data elementfs field exit.

Step 4: Create Function Module

- You will automatically be taken to the Function Library (SE37) after entering a data element name and clicking the eContinuef pushbutton.

- In the eFunction modulef field, a function module name will be defaulted by the system based on the data element specified. This name will have the following convention:

FIELD_EXIT_<data element>

- You can add an identifier (an underscore followed by a single character ).

- The first function module for a data elementfs field exit must be created without an identifier.

- To create the function module, click on the eCreatef pushbutton, choose menu path Function module -> Create, or press eF5f.

- After choosing to create the function module, you will get the warning: "Function module name is reserved for SAP". This message is just a warning so a developer does not accidentally create a function module in the field exit name range. By pressing eEnterf, you will be able to go ahead and create the function module.

- Before coding the function module, you will have to specify the function modules attributes -- function group, application, and short text.

Step 5: Code Function Module

- From the function modulefs attributes screen, click on the eSource codef pushbutton or choose the Goto -> Function module menu path to the code of the function module.

- Here you will add your desired functionality for the field exit.

- Remember that field exitfs function module will have two parameters -- one importing parameter called "INPUT" and one exporting parameter called "OUTPUT". These parameters will be set up automatically by the system.

- You must remember to assign a value to the OUTPUT field. Even if the value does not change, it must be moved from the INPUT field to the OUTPUT field.

Step 6: Activate Function Module

- After coding the function module, you must remember to activate it.

- Use the Function module -> Activate menu path to activate the function module.

- At this point, you can return to the field exit transaction.

- You should be able to 'green arrow' back to this transaction.

- When you return to the field exit transaction, you will see an entry for the newly created field exit.

- At this point, the field exit is global. That is, it applies to all screens that use a particular data element. On any screen that uses the data element, the corresponding field exit function module will be triggered, once it is active.

- Also, the field exit will not be triggered yet because it is inactive.

Step 7: Assign Program/Screen

- This step is only needed if you want to make a field exit local.

- To make a field exit local, select the field exit and click on the eAssign prog./screenf pushbutton.

- In the dialog box , indicate the appropriate program name and screen number.

This information indicates that the field exit is local to the specified screen in the specified program.

- In the dialog box, you determine which function module gets executed for the field exit by specifying the identifier in the eFld. Exitf field.

- If this field is left blank, the function module triggered will be 'FIELD_EXIT_<data element>'.

- If a single-character identifier is entered into the field, the function module triggered will be 'FIELD_EXIT_<data element>_<identifier>'.

Step 8: Activate Field Exit

- The field exit must be active for it to be triggered by the system.

- Activate the field exit by choosing the Field exit -> Activate menu path.

- After assigning the field exit to a change request, its status will change to eActivef and it will be triggered automatically on the appropriate screen(s).

NOTE : In order to activate the field exit the profile parameter abap/fieldexit = YES must be set on all application servers

Thanks & regards

Sreenivasulu P