How to find SAP enhancement

Source: Internet
Author: User

How to find enhancements in SAP
Method one, using Tcode to find reinforcement (second generation enhancement)

Execute a program (attached to the source code), enter the program you need to enhance the tcode at the selection screen, and after execution, a list will appear, where there is a great majority of smod enhancements on how to enhance this.

Click inside to manually find the enhancements you need.

This is the second generation of enhanced

Method two, using the system function to find


Modx_function_active_check


Add a breakpoint at the end of this function's code. Perform tcode that need to be enhanced, and automatically jump into the debug interface if there is an enhancement. In the debug interface, look at the F_tab field, which shows the smod is a list of all the enhancements to this tcode. These enhancements are all part of the Exit_xxxxxx_xxx form.

As for how to see which smod this enhancement belongs to, you can check the MODSAP table (SAP enhancements) yourself.

This is the second generation of enhancements.

There are also some function for reference:

[1]. Dynp_values_read

[2]. Modx_all_active_menuentries (Menu enhancement)

[3]. Modx_function_active_check (export function Enhancement)

[4]. Modx_menuentry_active_check (menu enhancement)

[5]. Modx_subscreen_active_check (screen boost)

These are used in the same way as above, and can be enhanced for a variety of situations.

Method Three, from the program code to find

In the need for enhanced transactions, open system--status, double-click into program, view all the subroutines, focus on all the shape userexit_*******, by description to determine the appropriate need to enhance the form. This is the first generation of enhancements.

Method Four, for the enhancement of Badi

1. The information of the Badi object is stored in the four tables Sxs_inter, Sxc_exit, Sxc_class and sxc_attr.

2, the SAP program will call Cl_exithandler=>get_instance to determine whether the object exists, and return to the instance, in fact Get_instance is the above several tables and their views (V_ext_imp and V_ext_ ACT) for querying and searching.

3, based on this mechanism, I check with ST05 to monitor a tcode to track, and then choose to find out about the above several tables and views of the operation, you can get related badi.

4, Se18 find interface, SE19 implementation interface can realize user enhancement.

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

First of all to explain what is the export, as the name implies, is a part of the process of implementation to the last must be a program.

Why would there be an exit? Because the normal business system does not meet the actual requirements, you can add some functions in the export to meet the requirements, which is why it is called enhancement. I feel like it's patched to the OS.

Export in SAP is the last function or function module that the standard program will call, and the input of this function or function module is already defined by SAP.

The SAP Export program you write will be retained when the system is upgraded, and will be overwritten if the change standard program is upgraded in the SAP system.

Here's a look at when you need to use exports and types of exports:

1: In the business inspection, such as in a factory delivery, can be set in a location to ship only use a certain type of movement.

2: When the need for interface enhancement, such as the user to a field requirements, but the end user does not follow the specification, this can also be automatically converted in the export, some modules can even customize the database field, and can be added to the export field input. Other modules can check the input data, and even realize the function of automatic substitution.

3: When there is irregular business, such as the price of a certain condition, you can set the table from its own defined by a certain criteria to take a value

4: Search Help for export, can be to SAP standard search Help do permission control.

Wait a minute.

SAP has four types of basic user exports:

1. Menu Exit-menu Exits

Define your own menu

2. Screen Exit-screen Exits

Define your own screen

3. Function Module Exit-function module Exits

Adding features to SAP applications

4. Keyword Export-keyword Exits

Adds a document to the keyword data element in the ABAP/4 dictionary. The result is that your customized documentation appears when you press F1 at the fields where you use these data elements

Since exports are pre-defined by SAP, how do you find the exit you need?

1: Can be configured through the help of the document and the SAP Library to find the export of business systems, the SAP library in the ' Implementation Guide ' to look for exports, on the left side of the configuration function execution button generally have a document describing the relevant export.

2: In order to facilitate we put all the export names and their descriptions are listed behind the article.

The following details how to write the export process:

In order to manage the modification of the export process, SAP provides a transaction specifically designed to manage the export process, the transaction code is CMOD.

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

SAP has a total of three generations of user exports:

1. First generation

SAP provides a sub-process of empty code, in which the user can add their own code to control their own needs. Such enhancements require modification of SAP's standard code.

Example: USEREXIT. In sapmv45a

2. Second generation

SAP provides customer-function, which is accomplished through smod and cmod.

3. Third generation

The third generation of user exports from SAP is Badi, which is called Call Method (instance), (related Tcode is SE18 and SE19) and can be found exit_handler by the word badi.

For first-generation enhancements, you can find enhancements in the following ways:

Open the program you want to enhance, click on the "Display Object List" button on the toolbar, select Subroutines, find the subroutine beginning with "UserExit", and find the user exit according to the comment document in front of the subroutine.

For second-generation enhancements, you can find enhancements in the following ways

User enhancements typically include the following 3 classes, as the name implies, to enhance the functionality that SAP may not provide (through background configuration is not possible).

1.E enhancement exits: is often said User_exit (user exit)

Functions that use SE37 to search for exit* are mostly used for exit, usually containing a Z-start.

The program. SE16 Query Tfdir (function table) input exit* is also available.

2.C GUI codes (GUI interface enhancement)

3. S subscreens (screen boost)

Enhancement is visible in table Modsap, and the Tfdir field mand (a value of C indicates that this exit function is activated). Using Smod (CMOD) Of course, you can activate the exit functions, Sometimes it is difficult to query the relevant enhancement when you can use the following program to activate the export function.

Report Zactexitfun.

Data ztfdir like Tfdir.

* Select Single * from Tfdir to Ztfdir

* Where FUNCNAME =

* ' exit_sapmm06e_013 '.

* Ztfdir-mand = ' C '.

* Update Tfdir from Ztfdir.

* Replace the exit_sapmm06e_013 with the actual required Exit Function name

Update Tfdir Set mand = ' C '.

where FUNcname = ' exit_sapmm06e_013 '.

Of course you can also SE16:MODSAP table enhancement input exit_sapmm06e_013 and then get enhancement name mm06e005 after using SMOD test to activate the Exit function.

Enhance related functions and tables


Function:


[1]. Dynp_values_read


[2]. Modx_all_active_menuentries (Menu enhancement)


[3]. Modx_function_active_check (export function Enhancement)


Since the reader may be exposed to the most user exit, in addition to the Appendix CD has a Find Zfindexit program (some exit use it can not be found), another direct and effective method is to use this function, SE37 set a breakpoint after the execution of Tcode if it has exit will call this function.


[4]. Modx_menuentry_active_check (menu enhancement)


[5]. Modx_subscreen_active_check (screen boost)


Table:


[1]. tfdir->function Module Table


[2]. MODSAP->SAP Enhancement table


[3]. Tsdir->dynpro areas Call CUSTOMER subscreen (screen boost)


[4]. cuatexts-> GUI Interface:menu texts Changed (GUI menu text enhancement)


Note that in order to ensure that an exit is actually applied, both the associated program (SE38) and exit functions must be activated (smod| CMOD, anyway is to ensure that tfdir-mandt= ' C ', with the program can also.





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


1.1 Smod contains specific enhancements, while Cmod is an enhancement that contains a set of Smod written.


1.2 User exits (Function module exits) is an export by SAP, with the following naming conventions:


Exit_<program name><3 Digit suffix>


Example:


SD VA01 transaction, the corresponding program is sapmv45a, you will find in the program (with the call Customer-function string) the following code:


Call customer-function ' 003 '


Exporting


Xvbak = Vbak


Xvbuk = Vbuk


Xkomk = Tkomk


Importing


LVF_SUBRC = LVF_SUBRC


Tables


XVBFA = XVBFA


XVBAP = XVBAP


Xvbup = Xvbup.


The name of the EXIT calls function module is: exit_sapmv45a_003





2, first try Smod build an SAP enhancement


2.1, choose an enhancement, such as: SDVFX001, click Modify, into the SAP enhanced maintenance screen;


2.2, click the "Components" button to enter the component Maintenance screen;


2.3, move the cursor to "function module name", enter the module name, such as: exit_saplv60b_001;


2.4, select the "Code modification" button to enter the function module;


2.5. Double-click the containing unit of the function module, enter the containing unit to add the custom code and activate the save;


3. Build an enhanced project using Cmod


3.1. Enter a custom project name and click "Create";


3.2, enter the enhancement project, select "Configuration Enhancement", enter the enhanced configuration screen;


3.3, input enhanced name such as: SDVFX001


3.4, save, and exit;


4, the use of Cmod will enhance the project activation, then Gaocheng.


How to find


* Determine if there is a corresponding enhanced definition (SMOD)


Select Single Name


From Modsapa


Into Mod0-name


where name = ' PPCO0002 '.


If SY-SUBRC = 0.


endif.


Select Single *


From Tadir


Into ps_tadir_db


where Pgmid = ' r3tr '


and object = ' Smod '


and obj_name = ' PPCO0002 '.


* Determine if there is a corresponding enhancement item definition (CMOD)


SELECT single name from modattr to Mod0-name


WHERE NAME = ' PPCO0002 ':


* Extract enhanced defined components (this can be used to reverse the enhanced definition)


SELECT * FROM Modsap


where name = ' PPCO0002 '.


* Determine if the enhancement is ported to the Badi implementation


*enhancement & have already been migrated in business add-in definition


Select Single migrated badi_def into (migrated, exit_name)


From Modsapa WHERE name = ModName.


If SY-SUBRC = 0 and migrated = seex_true.


Message s621 with ModName exit_name.


Check mode ne ' CHAM '.


endif.


Modtyp Type:


E: Function exit


S: Screen


T: Table


C:gui Code


SAP enhancements exist in the MODSAP table


* See function Mod_sap_member_text for enhanced components


* Get information about exiting the function module


Select Single * from Tftit


where "spras" = ' 1 ' and "FUNCNAME" = ' exit_saplcore_001 '


If SY-SUBRC = 0.


endif.


* A function worth learning


Mod_kun_activate (will operate related reports)


How to find enhancements in SAP

Method one, using Tcode to find reinforcement (second generation enhancement)

Execute a program (attached to the source code), enter the program you need to enhance the tcode at the selection screen, and after execution, a list will appear, where there is a great majority of smod enhancements on how to enhance this.

Click inside to manually find the enhancements you need.

This is the second generation of enhanced

Method two, using the system function to find

Modx_function_active_check

Add a breakpoint at the end of this function's code. Perform tcode that need to be enhanced, and automatically jump into the debug interface if there is an enhancement. In the debug interface, look at the F_tab field, which shows the smod is a list of all the enhancements to this tcode. These enhancements are all part of the Exit_xxxxxx_xxx form.

As for how to see which smod this enhancement belongs to, you can check the MODSAP table (SAP enhancements) yourself.

This is the second generation of enhancements.

There are also some function for reference:


[1]. Dynp_values_read

[2]. Modx_all_active_menuentries (Menu enhancement)

[3]. Modx_function_active_check (export function Enhancement)

[4]. Modx_menuentry_active_check (menu enhancement)

[5]. Modx_subscreen_active_check (screen boost)

These are used in the same way as above, and can be enhanced for a variety of situations.

Method Three, from the program code to find

In the need for enhanced transactions, open system--status, double-click into program, view all the subroutines, focus on all the shape userexit_*******, by description to determine the appropriate need to enhance the form. This is the first generation of enhancements.

Method Four, for the enhancement of Badi

1. The information of the Badi object is stored in the four tables Sxs_inter, Sxc_exit, Sxc_class and sxc_attr.

2, the SAP program will call Cl_exithandler=>get_instance to determine whether the object exists, and return to the instance, in fact Get_instance is the above several tables and their views (V_ext_imp and V_ext_ ACT) for querying and searching.

3, based on this mechanism, I check with ST05 to monitor a tcode to track, and then choose to find out about the above several tables and views of the operation, you can get related badi.

4, Se18 find interface, SE19 implementation interface can realize user enhancement.

*************************************************************************************************************** *********************
First of all to explain what is the export, as the name implies, is a part of the process of implementation to the last must be a program.

Why would there be an exit? Because the normal business system does not meet the actual requirements, you can add some functions in the export to meet the requirements, which is why it is called enhancement. I feel like it's patched to the OS.

Export in SAP is the last function or function module that the standard program will call, and the input of this function or function module is already defined by SAP.

The SAP Export program you write will be retained when the system is upgraded, and will be overwritten if the change standard program is upgraded in the SAP system.

Here's a look at when you need to use exports and types of exports:

1: In the business inspection, such as in a factory delivery, can be set in a location to ship only use a certain type of movement.

2: When the need for interface enhancement, such as the user to a field requirements, but the end user does not follow the specification, this can also be automatically converted in the export, some modules can even customize the database field, and can be added to the export field input. Other modules can check the input data, and even realize the function of automatic substitution.

3: When there is irregular business, such as the price of a certain condition, you can set the table from its own defined by a certain criteria to take a value

4: Search Help for export, can be to SAP standard search Help do permission control.

Wait a minute.

SAP has four types of basic user exports:

1. Menu Exit-menu Exits

Define your own menu

2. Screen Exit-screen Exits

Define your own screen

3. Function Module Exit-function module Exits

Adding features to SAP applications

4. Keyword Export-keyword Exits

Adds a document to the keyword data element in the ABAP/4 dictionary. The result is that your customized documentation appears when you press F1 at the fields where you use these data elements

Since exports are pre-defined by SAP, how do you find the exit you need?

1: Can be configured through the help of the document and the SAP Library to find the export of business systems, the SAP library in the ' Implementation Guide ' to look for exports, on the left side of the configuration function execution button generally have a document describing the relevant export.

2: In order to facilitate we put all the export names and their descriptions are listed behind the article.

The following details how to write the export process:

In order to manage the modification of the export process, SAP provides a transaction specifically designed to manage the export process, the transaction code is CMOD.

*************************************************************************************************************** *********************
SAP has a total of three generations of user exports:
1. First generation
SAP provides a sub-process of empty code, in which the user can add their own code to control their own needs. Such enhancements require modification of SAP's standard code.
Example: USEREXIT. In sapmv45a

2. Second generation
SAP provides customer-function, which is accomplished through smod and cmod.

3. Third generation
The third generation of user exports from SAP is Badi, which is called Call Method (instance), (related Tcode is SE18 and SE19) and can be found exit_handler by the word badi.

For first-generation enhancements, you can find enhancements in the following ways:
Open the program you want to enhance, click on the "Display Object List" button on the toolbar, select Subroutines, find the subroutine beginning with "UserExit", and find the user exit according to the comment document in front of the subroutine.

For second-generation enhancements, you can find enhancements in the following ways

User enhancements typically include the following 3 classes, as the name implies, to enhance the functionality that SAP may not provide (through background configuration is not possible).
1.E enhancement exits: is often said User_exit (user exit)
Functions that use SE37 to search for exit* are mostly used for exit, usually containing a Z-start.
The program. SE16 Query Tfdir (function table) input exit* is also available.
2.C GUI codes (GUI interface enhancement)
3. S subscreens (screen boost)
Enhancement is visible in table Modsap, and the Tfdir field mand (a value of C indicates that this exit function is activated). Using Smod (CMOD) Of course, you can activate the exit functions, Sometimes it is difficult to query the relevant enhancement when you can use the following program to activate the export function.

Report Zactexitfun.
Data ztfdir like Tfdir.
* Select Single * from Tfdir to Ztfdir
* Where FUNCNAME =
* ' exit_sapmm06e_013 '.
* Ztfdir-mand = ' C '.
* Update Tfdir from Ztfdir.
* Replace the exit_sapmm06e_013 with the actual required Exit Function name
Update Tfdir Set mand = ' C '.
where FUNcname = ' exit_sapmm06e_013 '.

Of course you can also SE16:MODSAP table enhancement input exit_sapmm06e_013 and then get enhancement name mm06e005 after using SMOD test to activate the Exit function.
Enhance related functions and tables
Function:
[1]. Dynp_values_read
[2]. Modx_all_active_menuentries (Menu enhancement)
[3]. Modx_function_active_check (export function Enhancement)
Since the reader may be exposed to the most user exit, in addition to the Appendix CD has a Find Zfindexit program (some exit use it can not be found), another direct and effective method is to use this function, SE37 set a breakpoint after the execution of Tcode if it has exit will call this function.
[4]. Modx_menuentry_active_check (menu enhancement)
[5]. Modx_subscreen_active_check (screen boost)
Table:
[1]. tfdir->function Module Table
[2]. MODSAP-&GT;SAP Enhancement table
[3]. Tsdir->dynpro areas Call CUSTOMER subscreen (screen boost)
[4]. cuatexts-> GUI Interface:menu texts Changed (GUI menu text enhancement)

Note that in order to ensure that an exit is actually applied, both the associated program (SE38) and exit functions must be activated (smod| CMOD, anyway is to ensure that tfdir-mandt= ' C ', with the program can also.
*************************************************************************************************************
1.1 Smod contains specific enhancements, while Cmod is an enhancement that contains a set of Smod written.
1.2 User exits (Function module exits) is an export by SAP, with the following naming conventions:
Exit_<program name><3 Digit suffix>
Example:
SD VA01 transaction, the corresponding program is sapmv45a, you will find in the program (with the call Customer-function string) the following code:
Call customer-function ' 003 '
Exporting
Xvbak = Vbak
Xvbuk = Vbuk
Xkomk = Tkomk
Importing
LVF_SUBRC = LVF_SUBRC
Tables
XVBFA = XVBFA
XVBAP = XVBAP
Xvbup = Xvbup.
The name of the EXIT calls function module is: exit_sapmv45a_003

2, first try Smod build an SAP enhancement
2.1, choose an enhancement, such as: SDVFX001, click Modify, into the SAP enhanced maintenance screen;
2.2, click the "Components" button to enter the component Maintenance screen;
2.3, move the cursor to "function module name", enter the module name, such as: exit_saplv60b_001;
2.4, select the "Code modification" button to enter the function module;
2.5. Double-click the containing unit of the function module, enter the containing unit to add the custom code and activate the save;

3. Build an enhanced project using Cmod
3.1. Enter a custom project name and click "Create";
3.2, enter the enhancement project, select "Configuration Enhancement", enter the enhanced configuration screen;
3.3, input enhanced name such as: SDVFX001
3.4, save, and exit;

4, the use of Cmod will enhance the project activation, then Gaocheng.

How to find
* Determine if there is a corresponding enhanced definition (SMOD)
Select Single Name
From Modsapa
Into Mod0-name
where name = ' PPCO0002 '.
If SY-SUBRC = 0.
endif.
Select Single *
From Tadir
Into ps_tadir_db
where Pgmid = ' r3tr '
and object = ' Smod '
and obj_name = ' PPCO0002 '.

* Determine if there is a corresponding enhancement item definition (CMOD)
SELECT single name from modattr to Mod0-name
WHERE NAME = ' PPCO0002 ':

* Extract enhanced defined components (this can be used to reverse the enhanced definition)
SELECT * FROM Modsap
where name = ' PPCO0002 '.

* Determine if the enhancement is ported to the Badi implementation
*enhancement & have already been migrated in business add-in definition
Select Single migrated badi_def into (migrated, exit_name)
From Modsapa WHERE name = ModName.
If SY-SUBRC = 0 and migrated = seex_true.
Message s621 with ModName exit_name.
Check mode ne ' CHAM '.
endif.

Modtyp Type:
E: Function exit
S: Screen
T: Table
C:gui Code
SAP enhancements exist in the MODSAP table

* See function Mod_sap_member_text for enhanced components
* Get information about exiting the function module
Select Single * from Tftit
where "spras" = ' 1 ' and "FUNCNAME" = ' exit_saplcore_001 '
If SY-SUBRC = 0.
endif.

* A function worth learning
Mod_kun_activate (will operate related reports)

How to find SAP enhancement

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.