‎2008 May 29 8:44 AM
Hello all,
If anybody have screen-exit documentation then pls send it .
Thanks.
‎2008 May 29 9:00 AM
Hi,
Step by step procedure for creating Screen Exits
PART A: Search for the screen exit.
1. A screen exit is a way to add a sub-screen and corresponding functionality to an SAP transaction. The first step is to navigate to the screen where you want to attach menu exit.
2. Go to the field list of that screen through system -> status or F1 -> Technical details and look for fields that have subscreen as the field type for that particular screen. These are the area's on the main screen which can be enhanced.
PART B: Creating your own subscreen.
3. Identify the enhancement and its component that has the provision for creating the screen exit for that particular screen.
Note A: To know more about how to identify the enhancement, refer to the document on Locating User Exits.
Note B: All SAP provided subscreenu2019s may not have the scope for enhancement. There are a limited number of transactions which has scope for screen exit. Refer to Annexure A for details.
4. Include the Enhancement in your own project through transaction CMOD.
5. Go to Enhancement Components and double click on the component name.
6. It will take you to the screen attributes for that particular subscreen.
u2022 The screen type should be subscreen.
u2022 Maintain the size of the subscreen through Lines/Columns attribute. This should correspond to the size of the subscreen mentioned in the main SAP screen.
u2022 The development class for the subscreen should be the development class for the project.
7. Create the subscreen using the fullscreen editor.
8. You can add your own modules in the subscreenu2019s flow logic. However, one has to be careful regarding data transfer between the main screen and the subscreen. For more details refer to R/3 On-line Help.
9. Generate the screen.
PART C: Activating the project
10. Use the back button to navigate back to the project enhancement main screen.
11. Activate the project.
Locating User Exits
Before you can add functionality to a SAP system, you need to be able to locate the appropriate user exits. SAP has provided around 2000 user exits.
Searching from transaction CMOD
Searching from the Application Hierarchy
Making your own customized search
Keep in mind that you must first search for an enhancement. Once you find an enhancement, you can display its components -- the actual user exits. Then you need to include the enhancement containing the required user exit as a component in your own project.
Method #1: Using Transaction CMOD
u2022 Transaction CMOD contains search functionality to help locate enhancements.
u2022 Selecting the "Utilities -> SAP enhancements" menu path in transaction CMOD will take you to an enhancement selection screen .
u2022 You can limit the search for enhancements based on:
Enhancement name
Development class
u2022 After clicking on the u2018Executeu2019 pushbutton (or u2018F8u2019) on the selection screen, the system will display a listing of the development classes that contain enhancements (see graphic above).
u2022 From this listing, you can double-click a development class to display its enhancements.
u2022 If you have clicked on the u2018Display componentsu2019 pushbutton on the selection screen (see graphic on previous page), the components of each enhancement will automatically be displayed.
Remark: To use this search method one must either know the part of the enhancement name or the development class. But if one looks at SAPu2019s naming convention for user exits (see note below), the screen numbers/program names/ function codes/etc are contained in the components name and there is no scope for that in selection options. Also one cannot restrict the search to only one type of exit.
Method #2: Using SAP Application Hierarchy
u2022 Selecting the "Overview -> Applic. hierarchy -> SAP" menu path in the ABAP/4 Development Workbench will take you to a listing of all standard SAP applications and components .
u2022 To locate a user exit for a particular application, follow these steps
from the SAP Application Hierarchy:
u2022 Select the appropriate application by single clicking on it.
u2022 Choose the "Edit Sel./desel. subtree" menu path.
u2022 Click on the u2018Repository Infosys.u2019 pushbutton.
u2022 This will take you to the ABAP/4 Repository Information System.
u2022 Double click on the u2018Environmentu2019 branch.
u2022 Double click on the u2018Customer enhancementu2019 branch.
u2022 Double-click on the u2018Customer exitu2019 branch.
u2022 This will take you to the customer exit (or enhancement) selection screen with the appropriate development class for the application selecting on the Application Hierarchy.
u2022 Click on the u2018Executeu2019 pushbutton.
u2022 This will take you to a listing of all enhancements that meet the selection criteria.
From this listing, you can display the components of each enhancement and the documentation. You will be taken automatically to transaction SMOD from the ABAP/4 Repository Information System.
Remark: To use this one must have knowledge about the application hierarchy to which that particular enhancement belongs. Also one has to explode individual enhancements to identify weather the component is contained in that enhancement.
Like previous method, there is no scope for selection option on the components name.
Method #3: Writing a small report program
The details about projects, enhancements and components are contained in two SAP tables:
MODSAP: containing enhancement name, type of exit and component
MODACT: containing project name and enhancements
Thus by writing a report program to retrieve data from these two tables, you can customize your search requirements. Code for one such sample program is attached in annexure A and the corresponding transaction code to execute this program is YSMD .
Using this you can list all components that match a particular string like the program name or the function code as well as search for only one type of exit.
NOTE: SAPu2019s naming convention for user exits-
u2022 Program/Function exits : EXIT_AAAAAAAA_nnn where
AAAAAAAA stands for the program name which contains the exit and
nnn is a SAP assigned number starting from 001
u2022 Menu exits : AAAAAAAA+XXX where
AAAAAAAA stands for the program name which contains the exit and
+XXX is the name of the function code contained in the menu item
u2022 Screen Exits : AAAAAAAA_nnnn_BBBBBBBB_CCCCCCCC_mmmm where
AAAAAAAA : calling program name
nnnn : calling screen number
BBBBBBBB : area
CCCCCCCC : called program name
mmmm : called screen number
Source Code to find User Exits 1
************************************************************************
u2022 REPORT YSMOD2
*
u2022 SELECTION TEXTS : INPUT1 -
> Enter search term for Trxn.
u2022 INPUT2 -
> Enter type of exit
************************************************************************
REPORT YSMOD2 .
TABLES: MODSAP, MODACT, TSTC.
PARAMETERS: INPUT1 LIKE TSTC-TCODE DEFAULT ' ',
INPUT2 LIKE MODSAP-TYP DEFAULT ' '.
DATA: SEARCH1(6),
SEARCH2(3),
SEARCH3 LIKE MODSAP-MEMBER.
DATA : FIRST_ROW VALUE 'Y'.
CONCATENATE: '%' INPUT1 '%' INTO SEARCH1,
'%' INPUT2 INTO SEARCH2.
SELECT * FROM TSTC WHERE TCODE LIKE SEARCH1.
FIRST_ROW = 'Y'.
CHECK TSTC-PGMNA NE SPACE.
CONCATENATE '%' TSTC-PGMNA '%' INTO SEARCH3.
SELECT * FROM MODSAP WHERE TYP LIKE SEARCH2
AND MEMBER LIKE SEARCH3.
SELECT SINGLE * FROM MODACT WHERE MEMBER = MODSAP-NAME.
IF FIRST_ROW EQ 'Y'.
WRITE: /0 TSTC-TCODE, 6 TSTC-PGMNA, 16 MODSAP-NAME, 32 MODSAP-TYP,
45 MODSAP-MEMBER, 70 MODACT-NAME.
FIRST_ROW = 'N'.
ELSE.
WRITE: /16 MODSAP-NAME, 32 MODSAP-TYP, 45 MODSAP-MEMBER, 70 MODACT-NAME.
ENDIF.
CLEAR : MODSAP, MODACT.
ENDSELECT.
IF SY-SUBRC NE 0.
WRITE : /0 TSTC-TCODE, 6 TSTC-PGMNA, 30 'No exits found'.
ENDIF.
CLEAR TSTC.
ENDSELECT.
END-OF-SELECTION.
CLEAR: SEARCH1, SEARCH2, SEARCH3.
Source Code to Locate User Exits
************************************************************************
u2022 REPORT YSMOD
*
u2022 SELECTION TEXTS : INPUT1 -
> Enter search term for Enhancmn
u2022 INPUT2 -
> Enter type of exit
u2022 INPUT3 -
> Enter search term for componen
************************************************************************
REPORT YSMOD .
TABLES: MODSAP, MODACT.
PARAMETERS: INPUT1 LIKE MODSAP-NAME DEFAULT ' ',
INPUT2 LIKE MODSAP-TYP DEFAULT ' ',
INPUT3 LIKE MODSAP-MEMBER DEFAULT ' '.
DATA: SEARCH1 LIKE MODSAP-NAME,
SEARCH2(3), " like modsap-typ,
SEARCH3 LIKE MODSAP-MEMBER.
CONCATENATE: '%' INPUT1 '%' INTO SEARCH1,
'%' INPUT2 INTO SEARCH2,
'%' INPUT3 '%' INTO SEARCH3.
SELECT * FROM MODSAP WHERE NAME LIKE SEARCH1
AND TYP LIKE SEARCH2
AND MEMBER LIKE SEARCH3.
SELECT SINGLE * FROM MODACT WHERE MEMBER = MODSAP-NAME.
WRITE: /10 MODSAP-NAME, 30 MODSAP-TYP, 45 MODSAP-MEMBER, 70 MODACT-NAME.
CLEAR : MODSAP, MODACT.
ENDSELECT.
IF SY-SUBRC NE 0.
WRITE : /'Not found'.
ENDIF.
END-OF-SELECTION.
CLEAR: SEARCH1, SEARCH2, SEARCH3.
Easiest way is to create a subscreen and embed this in your dynpro.
report ztest_0001 .
tables: mara.
Custom Selection Screen 1010
selection-screen begin of screen 1010 as subscreen.
selection-screen begin of block b1 with frame title text-001.
parameters: p_rad1 radiobutton group grp1 default 'X',
p_rad2 radiobutton group grp1,
p_rad3 radiobutton group grp1.
select-options: s_matnr for mara-matnr,
s_matkl for mara-matkl,
s_mtart for mara-mtart.
selection-screen end of block b1.
selection-screen end of screen 1010.
start-of-selection.
call screen 100.
&----
*& Module STATUS_0100 OUTPUT
&----
module status_0100 output.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
endmodule.
&----
*& Module USER_COMMAND_0100 INPUT
&----
module user_command_0100 input.
endmodule.
Screen screen 100 with a subscreen area called "subscreen_1010"
Screen Flow Logic follows
*process before output.
*
module status_0100.
*
call subscreen subscreen_1010 including sy-repid '1010'.
*
*process after input.
*
call subscreen subscreen_1010 .
*
module user_command_0100.
Checkout the FM`S in SE37
/BKC/RFC_GET_TABLE_SIZE
/SDF/INF_TOP_TABLES
/SDF/MSS_TEXT_IMAGE_FIELDS
GET_TABLE_SIZE_DB4
GET_TABLE_SIZE_DB6
MSS_GET_DB_SIZE_DETAILS
MSS_GET_SCHEMA_SIZE_INFO
MSS_GET_TABLE_SIZE_INFO
SFMSS_SIZE
GET_TABLE_SIZE_MSS
When you look into se16 you just get the number of rows for this client, while db02 shows the table size over all clients. Therefore the tables size didn't match my calculations.
Thanks
Sarada
‎2008 May 29 9:16 AM
Hi
see this link for the clear idea
http://wiki.ittoolbox.com/index.php/Implement_a_screen_exit_to_a_standard_SAP_transaction
and
http://help.sap.com/saphelp_nw04/helpdata/en/c8/19763443b111d1896f0000e8322d00/content.htm
http://help.sap.com/saphelp_nw70/helpdata/en/c8/19763443b111d1896f0000e8322d00/content.htm
‎2008 May 29 9:52 AM
Hi busam nandana ,
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
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 screenu2019s flow logic.*
Function Module Exits
For implementing screen exits refer to the following link.[http://www.saptechnical.com/Tutorials/ExitsBADIs/ExitsMain.htm]
Revert back for any further queries
Reward if helpful.
For material do send ur yahoo or gmail id.
Thanks,
Surya Pydikondala.
‎2008 May 29 12:04 PM
Hi Nandana,
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 screens flow logic.
the tcode is cmod...
1.From the main screen of the Project management transaction, proceed as follows:
Select Enhancement components and choose Change.
2.Choose Edit component.
3.Choose the screen exit and double click on it
4.Create your subscreen using the Screen Painter.
5.Design your screen to be added to the standard screen and activate the particular screen and return back to the flow logic .
6.Choose the PAI and PBO to write down the logic.
7.Generate your screen and choose Back (the green arrow) to return to the Project management transaction.
8.Go to the transaction ME22 to view the customer defined screen exit.
9.Enter the purchase order number and press Enter.
10.Go to the menu header --> Details.
11.Purchase number is visible on the standard screen
check the following link,
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
You can go through
www.saptechnical.com also. There you can find step by step procedures for screen exits.
Reward points if useful.
Thanks,
Swamy Kunche
‎2008 May 30 11:49 AM
USER EXIT (SAP Enhancement)
________________________________________
User exit is a functionality provided by SAP to add custom validation or enhancements to existing SAP transaction. Every module pool has customer function FORM in PBO and PAI. This form is basically a function that has an INCLUDE object, for eg. INCLUDE ZXPADU01. User can include enhancements or source code, that will be triggered during execution of this transaction.
For eg. all HR infotype program (module pool) starts with the name MPnnnnnn. So infotype 0001 module pool name will be MP000000. Search for string 'customer_function' and you will find two FORM under each module pool. PERFORM customer_function_pbo(sapfp50m) and PERFORM customer_function_pai(sapfp50m). Place your cursor on 'customer_function' and double click. It will take you to 'FORM customer_function_pbo'. In this form you should see a CALL CUSTOMER-FUNCTION '001' function module. Double click on '001' and you can see SAP has provided an INCLUDE object, for eg. INCLUDE ZXPADU01. You can add your logic in this object ZXPADU01 and at runtime when you enter data in the respective infotype for eg. 0000, the validation included in the object will be executed.
Execute transaction CMOD to define Project that contains User Exit.
Here is an example of HR Benefit USER EXIT:
Enter Project name, for eg. ZBEN0003, select option 'Enhancement assignment' and enter for eg. PBEN0003 (name of SAP enhancement object). Click on 'Components' button and the screen will display 'EXIT_SAPLHRBEN00FEATURE_003'. Double click on this object and it will take you to FUNCTION EXIT_SAPLHRBEN00FEATURE_003. There will be an INCLUDE object starting with name 'Z' in this function module that you can update with your custom logic.