‎2007 Dec 27 8:57 AM
Hi,
This is Surya from Vizag.Can anyone tell me step by step procedure for creating a screen exit for a standard application.
‎2007 Dec 28 12:00 AM
Surya,
Find below the simple steps for Screen exit enhancment.
Scenario is to add a new field to Sales order and make it non editable only for display mode.
Also add some checks if it is empty.
Code portions are given below in ITALICS
#1 : Create the new field in Database (what ever field you are trying to add in screen)
In this case add the field(ZFIELD) in VBAK (Include a structure and add the field to the structure)
Activate both the structure and table.
#2 Screen Changes - Goto SE51
In this eg Screen number 8309 of Program SAPMV45A
Go to Screen layout and create a field and assign it to ZFIELD
#3 In Flow Logic, PBO, Create a Module. Double click the module. Control now goes to MV45AOZZ.
write the following code there.
LOOP AT SCREEN.
IF SY-TCODE = 'VA03'.
SCREEN-INPUT = 0.
SCREEN-OUTPUT = 1.
MODIFY SCREEN.
ELSE.
IF VBAK-ZFIELD IS INITIAL.
SCREEN-REQUEST = 1.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
#4 Creating a new module ZCHECKFIELD in PAI of MV45AIZZ and Write the following code.
FIELD VBAK-ZFIELD MODULE ZCHECKFIELD ON INPUT
Double click the Module and write the following code
MODULE ZCHECKFIELD INPUT.
IF NOT VBAK-ZTEST IS INITIAL.
Raise some error or Do what ever you want to do.
ENDIF.
Hope this helps....
Vinodh Balakrishnan
‎2007 Dec 28 12:00 AM
Surya,
Find below the simple steps for Screen exit enhancment.
Scenario is to add a new field to Sales order and make it non editable only for display mode.
Also add some checks if it is empty.
Code portions are given below in ITALICS
#1 : Create the new field in Database (what ever field you are trying to add in screen)
In this case add the field(ZFIELD) in VBAK (Include a structure and add the field to the structure)
Activate both the structure and table.
#2 Screen Changes - Goto SE51
In this eg Screen number 8309 of Program SAPMV45A
Go to Screen layout and create a field and assign it to ZFIELD
#3 In Flow Logic, PBO, Create a Module. Double click the module. Control now goes to MV45AOZZ.
write the following code there.
LOOP AT SCREEN.
IF SY-TCODE = 'VA03'.
SCREEN-INPUT = 0.
SCREEN-OUTPUT = 1.
MODIFY SCREEN.
ELSE.
IF VBAK-ZFIELD IS INITIAL.
SCREEN-REQUEST = 1.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
#4 Creating a new module ZCHECKFIELD in PAI of MV45AIZZ and Write the following code.
FIELD VBAK-ZFIELD MODULE ZCHECKFIELD ON INPUT
Double click the Module and write the following code
MODULE ZCHECKFIELD INPUT.
IF NOT VBAK-ZTEST IS INITIAL.
Raise some error or Do what ever you want to do.
ENDIF.
Hope this helps....
Vinodh Balakrishnan
‎2007 Dec 28 12:34 AM
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...
Screen Exit is nothing but enhancing the screen like creating some more fields, subscreen and so on.
1. Go to the screen>System>Status-->Program (Double click this program. It will take you to the program)
2. Now, Goto-->Object Directory Entry.
3. Make a note the package name.
4. Now run the transactions SMOD, press F4 and enter theabove noted package, press enter.
5. It will display list of Exits.
6. Now go back to the initial screen SMOD.
7. Specify the exit name here and select the radio button Components.
8. It will display four group boxes one for FM, second for Fcodes, thrid for Screen areas and last for includes.
9. Goto transaction CMOD, create a new project, andclick the button "Enhancement assignments" and specify your enhancements that you got in SMOD.
10. Now bouble click the enhancement, it will take you to editor with some includes starting with Z, double clikc the include you want to edit and proceed.
Check this thread for step by step procedure to create Screen exit for XD01
Check the following link.
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=how%20to%20find%20screen%20exits&cat=sdn_all
Also check this thread too.
Regards,
Maha