Enhancements:-
Enhancement is a process of enhancing the SAP transactions by adding additional features without disturbing the existing functionality.
these additional features are specific to clients.
- Userexits:
- Customer Exits:
- BADIs (Business Add ins:
- we can add additional features to the SAP transaction only if it's enhanceable.
- To enhance any sap transaction first we need to check whether the transaction is enhanceable or not.
- If it is enhanceable we need to identify the additional plugins provided by SAP.
- These Plugins are different types.
Procedural Approach
Userexits:- We use Subroutines
for Userexits.
Customer exits: We use functional module.
|
Object oriented Approach
BADIs we use methods.
Enhancement Framework.
|
Userexits:- First enhancement provided by SAP to execute custom code in between the standard SAP control flow.
ex:- MV45AFZZ include in sales order processing.
There are four types user exits.
- Function exit.
- Menu eixit.
- Screen exit.
- Field exit.
Customer Exits:- It's a enhancement technique implemented is procedural oriented approach.
they are implemented inside a custom include (Zee Include). this include exits as part of a standard function module provided by SAP.
Types of Customer exits:
- Function exits
- Menu exits
- Screen exits
Customer exits are better than User exits.
Implemented by using Function Module and has well defined parameter Interface.
Maintenance is easier than userexits.
Function Exits:- They are used for providing additional validation in the standard sap transaction. (Function exits to enhance the Program)
Menu Exits:- They are used for providing additional menu items in the standard menu's of SAP transactions.
Screen Exits:- They are used for adding additional fields in the standard SAP transactions.
(Screen Exits & Menu Exits Enhance the front end)
(Note:- The Base for menu exits & Screen exits is function exits i.e , they are implemented inside the function exits.)
How to Identify the Customer Exits
Procedure 1:-
- Identify the main program of the SAP transaction.
- Identify the Package of the Main program.
- Using 'SMOD' or SE84 Search Customer Exits.
- If available , Identify the Component and read the documentation to understand the procedure of implementation.
Procedure 2:-
- In the Main Program , search for the String 'Call Customer function'.
- Sap uses a string or statement called Customer-Function to trigger a customer-exit.
- Whenever a customer exit is triggered SAP exits the corresponding active implementation.
- this implementation are done inside the project Using T-code CMOD.
- Customer exits always support Single Implementation i.e, a customer exit enhancement can be assigned only to a single Project at any point of time this is the one of the drawback's of customer exits compare to BADI.
Identify the Enhancement Name:-
(1) Go to SE93--> XD01--->Program Name--->SAPMF02D --->Double click---> Go To---> Attributes--->It'll Show the Package name.
(2) Then Go to T-code - SMOD
(2) Then Go to T-code - SMOD
In enhancement field (F4) and click on INFORMATION SYSTEM give the Package name & enter
we will get Enhancement Name.
To Implement:-
Go to CMOD Give the project Name Click create and Give description and click on ENHANCEMENT Assign give the enhancement name and click on Components.
Screen Enhancement Using Screen Exits:
- As part of screen enhancement we can additional fields on the standard SAP transaction.
- These additional fields cannot directly be added on the Stanadard transaction.
- They must be added in the subscreen area provided by SAP.
- As part of screen exits SAP provides two function exits.
1. PBO
2.PAI
PBO function exits is used for transferning the default values fom program to screen.
PAI function exits is used for transfer the value from screen to program.
As part of every screen exit the additional fields which needs to be added on the filed must be first added to corresponding table. this can be done by using APPEND STRUCTURE or customer include provided part of the table.
Syntax for calling Subscreens
including
Ex:- customer include :- 'CI........'
Transaction MP01 (Approved manufactures parts list)
check for the package name & program name.
In SE80--->Objects--->enhancement--->customer exits---->enhancements---->give package name---->& F8 take the first enhancement name in CMOD see whether screen exits is there or not.
collect all the screen names & no.
Go to SE51 & provides the program name and screen no, and click on Attribute see whether is normal screen or subscreen.
If it is Subscreen we can add fields.
Procedure:
Screen field Names APML-ZZMATKL.
Procedure:
- Identify the additional Fields MATKL , MTART.
- Add the Aditional Fields in the Standard table AMPL
- Go to SE11 give table name AMPL and see the include if not their with Append include by yourself add the field in Include.
- Place the additional fields on the Subscreen provided by SAP , In SE51 give the program name and Screen No. where u identified the Screen Exits give those name and click on change design the screen.
- Implement the PBO and PAI Function Exits.
Screen field Names APML-ZZMATKL.
Requirements:
When we create the customer one pop up window will open to save the Customer data.
Go to Se93
Give the transaction code- XD01
Click on Program - SAPMF02D Double click
Go to Attribute- Find the Pkg- VS
Now
Go to T-code- SMOD
Enhancement press F4.
Give the Pkg name VS and enter
How to Enhance
the standard Class .
Goto
to Class SE24 give Class name CL_WDR_FLIGHTS
Display
mode go CLass --> Enhancement
Enhancement
Implementation - Zenhancement_CLASS
Short
Discription- Enhancement class WDR Flights
Enter
Write
the method GET_DATA_NEW
Click
on Parameter
DATA
Changing type ANY TABLE
ROW_COUNT
IMPORTING TYPE i
TAB_NAME
IMPORTING TYPE STRING.
Enter
the source code in the method
method
get_data_new .
if row_count is initial.
select * from (tab_name) into corresponding fields of table data
up to 100 rows.
else.
select * from (tab_name) into corresponding fields of
table data
up to row_count rows.
endif.
endmethod..
|
Create
the report program in SE38.
& Report ZENHANCE_TEST
*& DEMO FOR ENHANCING THE STANDARD CLASS.
REPORT ZENHANCE_TEST.
* TYPE DECLARATIONS
DATA : TABLE TYPE STRING,
ROW_COUNT TYPE I,
DATA_OUT TYPE TABLE OF SFLIGHT,
W_OUT LIKE LINE OF DATA_OUT.
* Calling the Enhanced
class and Enhanced methods.
CALL METHOD
CL_WDR_FLIGHTS=>GET_DATA_NEW
EXPORTING
* ROW_COUNT =
TAB_NAME
= 'SFLIGHT'
CHANGING
DATA
= DATA_OUT.
LOOP AT DATA_OUT INTO
W_OUT.
WRITE :/ W_OUT-CARRID,
W_OUT-FLDATE.
ENDLOOP.
Execute the
program.
|
No comments:
Post a Comment