Ansicht
Dokumentation

OHAIT_F24010 - Enable user exit for 770

OHAIT_F24010 - Enable user exit for 770

Vendor Master (General Section)   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

From the main program you go to a software level where you can store the ABAP code.

The function exits enable the customer to implement further logics in a program.

Furthermore, the function groups will be able to contain sub-programs which can be called up, if necessary, but which cannot be changed.

It is the customer who creates the function module coding and, if necessary, the text elements for the function group.

The ABAP coding will be activated only following the activation by the customer of the project containing the function exit as a component. Before this operation, the function exits do not affect the transaction in any way.

Since for the function groups containing the function exits the responsibility is shared by SAP and the customer, not all that is allowed for the internal function groups is also allowed for them: therefore the components created by SAP cannot be changed by the customer. In particular, it is not possible to copy, delete, rename and reassign the function modules, nor change their interface, administration and documentation.

The customizing action consists of establishing where the function exit is placed in the main program and which data must be imported/exported through the interface.

More details about the function exit functionality are included in the relevant documentation.

Furthermore the SAP customizer defines where the function exits are called, and which data is transferred within a program, by creating the relevant function modules with short texts, interfaces and documentation.

More precisely:

16 user exits have been identified for the 770 form. These are listed starting from the CMOD transaction, running the program HRPYIT01 (choosing as sub-objects the "SAP enhancements") and displaying its components.

The various function exits components are grouped and supplied by SAP. A SAP enhancement can be made up, for example, of the function exits for the data transfer. The customer selects the required SAP enhancements, groups them in projects, edits the components and then activates the projects.

-> Creation of a project

First of all it is necessary to name the project. In order to find the project easily, it is advisable to choose a name including the transaction or module pool name. By pressing the function key "Create" you go to an attribute screen where you can enter a brief description of the project. If you choose an already existing name for the project, an error message is displayed. By entering * as a name, you will be able to display a list of all the projects created until now. After saving (F11) you should enter a correction number (see "Corrections/Transfer").

-> Assignment of SAP enhancements to a project

In the initial screen, select "SAP enhancements" and then click on "Change" (or select the function "Components" in the attribute screen). In the following screen you will be able to specify the name of the SAP enhancements. Through the function "Search for the enhancements" you can display (possibly with the restrictions carried out in the following dialog box and as far as the components are concerned) the SAP enhancements available in the system and that can be included in the project. The enhancements which have been selected and included in the project will no longer be available for other projects.

-> Reprocessing of the enhancement components

In order to reprocess the components of a SAP enhancement, select "Enhancements components" and click on "Change". Placing the cursor on a function exit, you go to the ABAP editor where you can enter your own coding. To change a menu item, place the cursor on it. By placing the cursor on a screen area and clicking on "Change component" you will be able to create and configure the screen to be included.

To reprocess the function exits, consider what follows:

Although for the main program SAPLXaaa you can create screens, text elements etc., you cannot change the program, since it has been created by SAP.

The program also contains the include ZXaaaZZZ which is created and reprocessed by the customer. The includes LXaaaTOP, LXaaaUnn contain the includes ZXaaaTOP, ZXaaaUnn, which do not exist in the SAP program and thus are created and reprocessed by the customer.

Since in the instruction FUNCTION-POOL of the include LXaaaTOP a definition is necessary, the message identity should be specified within the message output: MESSAGE E000(ID).

The function exit source code is contained in the include LXaaaUnn which can only be displayed. This contains the include ZXaaaUnn. By double-clicking on the include name, you can display its source code and then click on the relevant push button to go to the "change" mode and enter the coding.

Of course, the includes ZXaaaUnn can be reprocessed also "directly" through the SE38 transaction. Since they are included in a function module, they cannot contain any event (subprograms, modules, etc.).

You can store global data: the include LXaaaTOP contains the include ZXaaaTOP where you can create data declarations (the data created during the navigation are automatically stored in the include ZXaaaTOP).

If the function exit interfaces for the data transfer are not global, you need to include the required fields in the global fields in order to make them known within a function group.

For your own includes stick to the name assignment rules (first five characters: ZXaaa) and make sure that they are not contained in the main program SAPLXaaa but in ZXaaaXXX. This condition is automatically met if the includes have been created during the navigation.

Some SAP example-coding can already be found in the function modules. If necessary, they can be copied to the ZXaaaUnn include belonging to the function module through CMOD. In case of customer changes, the SAP coding is added at the end. Furthermore, the function group can contain subroutines created by SAP, which can be called up in case of need and cannot be changed by the customer. Refer to the SAP documentation to check if there are example codings or subroutines, and in which cases they can be used.

Since during the reprocessing the project is not usually active, the SAP transactions considered remain unchanged.

->Project activation

In this project phase all the components and the project status become active. Simultaneously, all the programs containing the project components are generated (only when starting). When you start the transactions you display the enhancements. Using the function "Deactivate" you can deactivate the project. If you cancel the activation/deactivation function, the project status remains unchanged and it can contain both active and non-active elements. To set the project to a consistent status again, repeat the activation/deactivation functions.

For the function exits there will be an example-coding created by SAP which can be changed, if necessary. activation/deactivation functions.

Further notes

For the function exits there will be an example-coding created by SAP which can be changed, if necessary.






TXBHW - Original Tax Base Amount in Local Currency   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 7602 Date: 20240523 Time: 195857     sap01-206 ( 159 ms )