screen exits
Post on 13-Nov-2014
173 Views
Preview:
TRANSCRIPT
1
Screen Exits
2
• Screen exits refer to areas of a main screen reserved by SAP developers for customers to design their own screens as customer exits. In these areas you can display/ enter your own data.
Definition
3
• Knowing when to apply Screen exits.• Using an enhancement consisting of Screen exit along
with a Program Exit.
Objectives
4
Screen Exits
SAP Customer
Field 1
Field 2
Field 1
Field 2
Field x
Field y
Field z
5
Subscreens
R
P. O. box
Fax no.
Name
Phone no.
System HelpSAP R/3
Last name
abcd
System HelpSAP R/3
Last name Meyer
abcdName Klaus
Phone no. 45678
System HelpSAP R/3
Last name Meyer
abcdP. O. box 11334
Fax no. 67890
200
300 300
200
6
Defining Screen Exits
PROCESS BEFORE OUTPUT....CALL CUSTOMER-SUBSCREEN abcd INCLUDING 'SAPLXYYZ' '0444'....
Program:Program: SAPLXyyz SAPLXyyzScreen:Screen: 04440444
Customer field 1
Customer field 2
System HelpSAP R/3
Subscreen areaSubscreen areaabcdabcd
Program:Program: SAPMabbc SAPMabbcScreen:Screen: 1234 1234
SAP
Customer
7
Calling Subscreens
SAP Customer
Program:Program: SAPMabbc SAPMabbc Screen:Screen: .... ....
PROCESS BEFORE OUTPUT.PROCESS BEFORE OUTPUT.......CALL CUSTOMERCALL CUSTOMER -SUBSCREEN -SUBSCREEN abcdabcd INCLUDINGINCLUDING 'SAPLXYYZ''SAPLXYYZ' '0444''0444' ........PROCESS AFTER INPUT.PROCESS AFTER INPUT.......CALL CUSTOMER-SUBSCREEN CALL CUSTOMER-SUBSCREEN abcd.abcd.
PROCESS BEFORE OUTPUT.
PROCESS AFTER INPUT.
Program: SAPLXyyz Screen: 0444
System HelpSAP R/3
Subscreen areaSubscreen areaabcdabcd
Field y
Field z
8
Transporting Data to Subscreens
SAP Customer
Program sapmabbc.Program sapmabbc.DATA: DATA: f1f1 LIKE LIKE ...... , , f2f2 ...... . .......MODULE MODULE export_data.export_data.......CALL CUSTOMERCALL CUSTOMER --FUNCTION '001'FUNCTION '001' EXPORTING e01 = f1 EXPORTING e01 = f1 e02 e02 = = f2.f2.......ENDMODULE.ENDMODULE.
FUNCTION-POOL Xyyz .DATA: g1 LIKE ... , g2 ... ....FUNCTION exit_sapmabbc _001.... MOVE e01 TO g1 . MOVE e02 TO g2 ....ENDFUNCTION.
MODULE a OUTPUT.... MOVE g1 TO .......
InterfaceInterface
e01e01
e02e02
..
..
..
PROCESS BEFORE OUTPUT.PROCESS BEFORE OUTPUT.......MODULE MODULE export_data.export_data.CALL CUSTOMER-CALL CUSTOMER- SUBSCREEN SUBSCREEN abcdabcd INCUDING 'SAPLXYYZ' '0444'INCUDING 'SAPLXYYZ' '0444' ..
PROCESS BEFORE OUTPUT. MODULE a. MODULE b.
9
Transporting Data from Subscreens
R
SAP Customer
ProgramProgram sapmabbc.sapmabbc.DATADATA h1h1 LIKE LIKE ...... , , h2 h2 .............. MODULEMODULE import_data.import_data.......CALLCALL CUSTOMER-FUNCTION '002' CUSTOMER-FUNCTION '002' IMPORTING IMPORTING i01i01 = = h1h1 i02 i02 = = h2 h2 ......ENDMODULE.ENDMODULE.
FUNCTION-POOL Xyyz .DATA k1 LIKE ... , k2 ......FUNCTION exit_sapmabbc _002.... MOVE k1 TO i01 . MOVE k2 TO i02 ....ENDFUNCTION.
MODULE m.... k1 = .......
InterfaceInterface
i01i01
i02i02
..
..
..
PROCESS AFTER INPUT.PROCESS AFTER INPUT.......CALLCALL CUSTOMER-SUBSCREEN CUSTOMER-SUBSCREEN abcd.abcd.MODULE MODULE import_data.import_data.
PROCESS AFTER INPUT.... MODULE m. MODULE n....
10
• The subscreen screen is called in the processing logic of the main screen with the instruction ‘Call CUSTOMER-
SUBSCREEN’. This call is inactive and will be skipped when the screen is processed until the customer has activated the relative enhancement screen.
Activation
11
To Summarise
Data transfer
Customerprocessing
CustomerCustomersubscreensubscreen
Interface
System HelpSAP R/3
Subscreen area
12
We will be working with the enhancement ‘MM06E005’ it has several screen exits but we will be working with the first screen ‘SAPMM06E’ screen no ‘101’ which will be calling the sub screen ‘SAPLXM06’ screen no ‘101’ which is not existing and has to be created.
Example
13
Transaction Code
‘CMOD’
14
Create a Project
15
Enter the short text and select
Enhancement
assignment
from the menu or Application Tool Bar
16
Enter the Enhancement Name and save the project.
Note : at any particular point any enhancement can belong to only one Project
17
we will display customer no in sub screen area and display it using ME23 transaction
(screen shot taken from smod transaction)
This is where we will be
working with
18
• Points to be noted while coding• 1) the global data of the calling module pool is not known to the
function groups belonging to the subscreen.• 2) The function modules belonging to the program exists lie in the
same function group as the subscreen screen.
19
• PBO (main) PBO (sub)
• PAI (main) PAI (sub)
(YOU) Transfer the data to the subscreenCALL SUBSCREEN
Displays the data in
subscreen
(YOU) Transfer the data to the main program
CALL SUBSCREEN
Process the data received from the
subscreen
20
Go to SE51 and create a new subscreen
‘SAPLXM06’ with screen no ‘0101’
21
Just add the field EKKO-KUNNR and save it
To display the data here we will have to export the data in the main program to memory and then import it from memory into the subscreen
22
Go to SE51 and display the main screen
‘SAPMM06E’ with screen no ‘0101’
23
Here we have to code for transferring data to the subscreen for display
24
25
Double click on the user exit
EXIT_SAPMM06E_006
26
Double click on the include ‘ZXM06U36’
27
It will ask u to create a new object
Click ‘YES’
28
Write Your code here
i.e. export it to memory
Generate it and go back
29
Since I am trying to export EKKO-EBELN to I have declare this in the function pool which is of the same name as the subscreen I.e ‘SAPLXM06’
Go to se38 and give the program name as ‘SAPLXM06’ and display it
30
Since we are trying to declare the data double click on the include ‘LXM06TOP ’
31
Double click on the include ‘ZXM066TOP’
32
Now do your declaration here and generate it.
Once this part is done go back to the flow logic of your subscreen which you have created
33
Write your code in the PBO write a new module pool or use the existing
MODULE STATUS_0101.
(double click on the module
34
Type in your code here and generate
(i.e import your data here)
And go back to your flow logic
35
Generate your flow logic here
Go to your project and activate it
36
Thank You
top related