Screen Exits

1

Definition
• 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.

2

Objectives
• Knowing when to apply Screen exits. • Using an enhancement consisting of Screen exit along with a Program Exit.

3

Screen Exits

SAP

Customer

Field Field

1 2

Field Field Field Field

1 2 x y

Field

z

4

Subscreens

SAP R/3

Name Phone no.
SAP R/3 System Help
      

System Help
      

200

Last name Name

Meyer Klaus

Last name

Phone no.

abcd 45678
SAP R/3
   

200

abcd
P. O. box Fax no.
300

System Help
  

Last name P. O. box Fax no.

Meyer 11334
R

abcd 67890

300

5

Defining Screen Exits

SAP R/3 System Help
      

Customer

Program: Screen:

SAPMabbc 1234 Customer field Subscreen area abcd Customer field 2 1

SAP
PROCESS BEFORE OUTPUT. ... CALL CUSTOMER-SUBSCREEN abcd INCLUDING 'SAPLXYYZ' '0444'. ...

Program: Screen:

SAPLXyyz 0444

6

Calling Subscreens

SAP
SAP R/3 System Help
      

Customer

Field y Field z Subscreen area abcd Program: SAPMabbc Screen: .... Program: SAPLXyyz Screen: 0444

PROCESS BEFORE OUTPUT. ... CALL CUSTOMER -SUBSCREEN INCLUDING 'SAPLXYYZ' ... PROCESS AFTER INPUT. ... CALL CUSTOMER-SUBSCREEN

PROCESS BEFORE OUTPUT. abcd '0444' . PROCESS AFTER INPUT. abcd.

7

Transporting Data to Subscreens

SAP
PROCESS BEFORE OUTPUT. ... MODULE export_data. abcd CALL CUSTOMER- SUBSCREEN INCUDING 'SAPLXYYZ' '0444' .

Customer
PROCESS BEFORE OUTPUT. MODULE a. MODULE b.

Program sapmabbc. DATA: f1 LIKE ... , f2 ... . ... MODULE export_data. ... CALL CUSTOMER - FUNCTION '001' EXPORTING e01 = f1 e02 = f2. ... ENDMODULE.

Interface

e01 e02
. . .

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 ... .

8

Transporting Data from Subscreens
SAP
PROCESS AFTER INPUT. ... CALL CUSTOMER-SUBSCREEN MODULE import_data. abcd.

Customer
PROCESS AFTER ... MODULE m. MODULE n. ... INPUT.

Program sapmabbc. DATA h1 LIKE ... , h2 ... . ... MODULE import_data. ... CALL CUSTOMER-FUNCTION '002' IMPORTING i01 = h1 i02 = h2 ... ENDMODULE.

Interface

i01 i02

FUNCTION-POOL Xyyz . DATA k1 LIKE ... , k2 ... ... FUNCTION exit_sapmabbc _002. ... MOVE k1 TO i01 . MOVE k2 TO i02 . ... ENDFUNCTION. MODULE m. ... k1 = ... . ...

. . .

R

9

Activation
• The subscreen screen is called in the processing logic of the main screen with the instruction ‘Call CUSTOMERSUBSCREEN’. This call is inactive and will be skipped when the screen is processed until the customer has activated the relative enhancement screen.

10

To Summarise
Customer subscreen Customer processing

Interface Data transfer
      

SAP R/3
System Help

Subscreen area

11

Example
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.

12

Transaction Code ‘CMOD’

13

Create a Project

14

Enter the short text and select
Enhancement assignment

from the menu or Application Tool Bar
15

Enter the Enhancement Name and save the project.

Note : at any particular point any enhancement can belong to only one Project

16

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
17

• •

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.

18

• PBO (main) (YOU) Transfer the data to the subscreen • PAI (main)
CALL SUBSCREEN

PBO (sub) Displays the data in subscreen PAI (sub)
(YOU) Transfer

CALL SUBSCREEN

Process the data received from the subscreen

the data to the main program
19

Go to SE51 and create a new subscreen ‘SAPLXM06’ with screen no ‘0101’

20

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

21

Go to SE51 and display the main screen ‘SAPMM06E’ with screen no ‘0101’

22

Here we have to code for transferring data to the subscreen for display

23

24

Double click on the user exit
EXIT_SAPMM06E_006

25

Double click on the include
‘ZXM06U36 ’

26

It will ask u to create a new object

Click ‘YES’

27

Write Your code here i.e. export it to memory Generate it and go back

28

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

29

Since we are trying to declare the data double click on the include ‘LXM06TOP ’

30

Double click on the include
‘ZXM066TOP’

31

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

32

Write your code in the PBO write a new module pool or use the existing MODULE STATUS_0101. (double click on the module

33

Type in your code here and generate (i.e import your data here) And go back to your flow logic

34

Generate your flow logic here

Go to your project and activate it
35

Thank You

36

Sign up to vote on this title
UsefulNot useful