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 to enhance the transaction inside, open system--"status, double-click into program, see all the subroutines, focus on all the shape userexit_*******This, by description, determines the appropriate form to be enhanced. This is the first generation of enhancements.
Method Four, for the enhancement of Badi
Transfer from online
1, Badi object information is stored in the four tables Sxs_inter, Sxc_exit, Sxc_class, and sxc_attr.
2, SAP program will call cl_exithandler=>Get_instance to determine if an object exists and returns an instance, in fact get_instance queries and searches for the above tables and their views (V_ext_imp and V_ext_act).
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 Lookup 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 a business check, such as in a factory delivery, can be set in a location to be shipped can only use some type of movement.
2: When an interface enhancement is required, such as when a user is required to capitalize on a field, 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 add field input in the export. Other modules can check the input data, and even realize the function of automatic substitution.
3: When you have irregular business, such as pricing by a certain condition, you can set the value by a certain condition from the table you define.
4: Search for help exits, and you can control access to SAP standard search Help.
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 Export-FunctionModuleExits
Adding features to SAP applications
4. Keyword Export-Keyword Exits
In abap/4 a keyword data element in the dictionary to add a document. 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: You can find the export of the business system through the help of the configuration document and the SAP Library, the SAP library looks for the exit in the ' Implementation Guide ', and there is a description document on the left side of the configuration function execution button, which describes the relevant exits.
2: To facilitate our listing of all export names and their descriptions at the back of 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, the 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 the customer-FUNCTION, it is accomplished through smod and cmod.
3, third-generation
The third generation of user exports provided by SAP is Badi, and his call is calledMETHOD(instance), (the related tcode is SE18 and SE19), you can find Exit_handler by badi the word.
For first-generation enhancements, you can find enhancements in the following ways:
Open the program that you want to enhance, and click Display on the toolbar.ObjectList button, select Subroutines, find the subroutine that begins 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)
Use SE37 to search for exit*Most of the functions are used for exit, usually containing a Z-start
The program. SE16 Query Tfdir (function table) input exit*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 exitfunction, sometimes it is difficult to query the relevant enhancement when you can use the following program to activate the export function.
ReportZactexitfun.
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‘.
** * It is also possible to 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->functionModuleTable
[2]. modsap->SAP Enhancement Table
[3]. Tsdir->dynpro areasPagerCUSTOMER subscreen (screen boost)
[4]. cuatexts-> GUIInterface: 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.1Smod contains specific enhancements, while Cmod is an enhancement that contains a set of Smod written.
1.2 User exits (FunctionModuleExits) is an export provided by SAP, and its naming rules are as follows:
Exit_<program name><3 Digit Suffix>
Example:
SD VA01 transaction, the corresponding program is sapmv45a, you will find in the program (with call customer-function string) The following code:
PagerCustomer-function‘003‘
Exporting
Xvbak =Vbak
Xvbuk =Vbuk
Xkomk =Tkomk
Importing
LVF_SUBRC =Lvf_subrc
Tables
XVBFA =Xvbfa
XVBAP =Xvbap
Xvbup =Xvbup.
Then exit callsfunctionThe module name is: exit_sapmv45a_003
2, try Smod first to build an SAP enhancement
2.1, select an enhancement, such as: SDVFX001, click Modify, enter 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, using Cmod to build an enhanced project
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, enter an enhanced name such as: SDVFX001
3.4, save, and exit;
4, using Cmod will enhance the project activation, then Gaocheng.
How to find
*Determine if there is a corresponding enhanced definition (SMOD)
SelectSingleName
From Modsapa
Into mod0-Name
WHERE name =‘PPCO0002‘.
If SY-SUBRC =0.
endif.
SelectSingle *
From Tadir
Into ps_tadir_db
where Pgmid =‘R3tr‘
andObject =‘Smod‘
and obj_name =‘PPCO0002‘.
*Determine if there is a definition for the corresponding enhanced item (CMOD)
SELECTSingle nameFrom 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
SelectSingleMigrated Badi_def into (migrated, exit_name)
From Modsapa WHERE name =ModName.
If SY-SUBRC =0and 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 the relevant report)
How to find enhancements in SAP