0% found this document useful (0 votes)
377 views14 pages

Implementing Menu Exits and Screen Exits in CJ92 Transaction (PS Module)

Implementing Menu Exits and Screen Exits in CJ92 Transaction (PS Module)

Uploaded by

Rahul Gaikwad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
377 views14 pages

Implementing Menu Exits and Screen Exits in CJ92 Transaction (PS Module)

Implementing Menu Exits and Screen Exits in CJ92 Transaction (PS Module)

Uploaded by

Rahul Gaikwad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

I mpl ement i ng Menu Ex i t s and

Sc r een Ex i t s i n CJ 92 Tr ansac t i on
(PS Modul e)
Applies to:
ABAP UserExits. For more information, visit the ABAP homepage.
Summary
This tutorial shows how to implement Menu Exits and Screen Exits for transaction CJ 92 in PS Module. It
shows how to add new Menu item to the existing Menu and a new Screen with Custom Fields.

Author: Shaik Sajid
Company: Selligence Technologies Services Pvt. Ltd.
Created on: 10 J uly 2009
Author Bio
Shaik Sajid is a senior consultant working for Selligence Technologies Services Pvt. Ltd. He
has been involved in various projects as a technical consultant in ABAP.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 1
Implementing Menu Exits and Screen Exits in CJ92 Transaction (PS Module)
Table of Contents
Before Implementing User Exits ......................................................................................................................... 3
After Implementing User Exits ............................................................................................................................ 3
How to Implement Screen Exit and Menu Exit ................................................................................................... 4
Designing the Screen ......................................................................................................................................... 6
PBO in Function Exits ......................................................................................................................................... 9
PAI in Function Exits ........................................................................................................................................... 9
Menu Exit .......................................................................................................................................................... 10
Output ............................................................................................................................................................... 11
Related Content ................................................................................................................................................ 13
Disclaimer and Liability Notice .......................................................................................................................... 14

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 2
Implementing Menu Exits and Screen Exits in CJ92 Transaction (PS Module)
Before Implementing User Exits
Here for the purpose of demonstration, Menu Exits and Screen Exits would be implemented for the
transaction cj92 (Change Standard WBS belongs to PS Module).
Initially the Screen would appear as shown below.

After Implementing User Exits
After implementing the Screen & Menu Exit, the output would be as shown in the below screen.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 3
Implementing Menu Exits and Screen Exits in CJ92 Transaction (PS Module)
How to Implement Screen Exit and Menu Exit
Go to Transaction CMOD. Create a Project


Give Meaningful description to the Project. Then click on Enhancement Assignments.


Click on Components


SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 4
Implementing Menu Exits and Screen Exits in CJ92 Transaction (PS Module)


Here Exit
EXIT_SAPLCJ SS_002 acts as PBO
EXIT_SAPLCJ SS_003 acts as PAI

Here Menu Exit
SAPLCJ SS +CUD is used for the description to appear in the menu. +CUD acts as
Fcode (user command).
Here Screen Exit
SAPLXCN1 0300 - Here we add the screen elements.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 5
Implementing Menu Exits and Screen Exits in CJ92 Transaction (PS Module)
Designing the Screen
Double click on the Screen Exit. Select it as SubScreen.



SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 6
Implementing Menu Exits and Screen Exits in CJ92 Transaction (PS Module)
Click on Layout Button



SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 7
Implementing Menu Exits and Screen Exits in CJ92 Transaction (PS Module)
Now we need to declare these screen variables in the z top include.
For this click on display object list button as shown below.


Declare the Screen elements in the ZXCN1TOP include


SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 8
Implementing Menu Exits and Screen Exits in CJ92 Transaction (PS Module)
PBO in Function Exits
Now we write the code in EXIT_SAPLCJ SS_002 which will display the business area .
Double click on the Function exit EXIT_SAPLCJ SS_002 and then double click on the include
ZXCN1U13.This will create the include program.


Here SAP_PROJ S_IMP is an importing parameter of this function exit, which holds values of the main
program.
PAI in Function Exits
Now we write the code in EXIT_SAPLCJ SS_003 which will get processed on some action.
Double click on the Function exit EXIT_SAPLCJ SS_003 and then double click on the include ZXCN1U16.This
will create the include program. Here we fetch the Business area Description from the database table.


SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 9
Implementing Menu Exits and Screen Exits in CJ92 Transaction (PS Module)
Menu Exit
Now to call this screen. We need Menu Exit.
Double click on the menu exit.


Give the Description which should appear in the menu.


SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 10
Implementing Menu Exits and Screen Exits in CJ92 Transaction (PS Module)
Now activate the project.


Output
Now the output would be as below:
Because of Menu Exit, in the menu a new entry would appear (like Click Here) as shown below.


SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 11
Implementing Menu Exits and Screen Exits in CJ92 Transaction (PS Module)
Now a new screen (i.e., our custom screen) would appear. Now the PBO Function exit would get executed
and shows the following Screen.


After Pressing Enter, the PAI Function exit would get executed and shows the following Screen. To go back
to the main Screen we can press the button WBS Overview Button.



SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 12
Implementing Menu Exits and Screen Exits in CJ92 Transaction (PS Module)
Related Content
SAP Help Screen & Menu Exits
For more information, visit the ABAP homepage.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 13
Implementing Menu Exits and Screen Exits in CJ92 Transaction (PS Module)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
2009 SAP AG 14
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or
code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this
document.

You might also like