Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Call screen on clicking the button in SAP ABAP
Please follow the steps below to make it functional ?
- First, open the screen painter
- Now, double click on the button you want to make functional
- Above Context Menu Form, you will find a field to enter Function code where you enter the functional code
This will convert your button to a functional trigger that sends the OK code which will run the dynpro PROCESS AFTER INPUT. Now add a PAI module to this dynpro which indicates the screen you want to call when the button is clicked.
Example
Below is an example of how to implement the PAI module to call a screen based on the function code ?
CASE sy-ucomm. " the ok code
WHEN 'FUNC_CODE'.
CALL SCREEN 200.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN OTHERS.
" DO NOTHING
ENDCASE.
In this example ?
-
FUNC_CODEis the function code you set up in the screen painter for your button -
200is the screen number you want to call when the button is clicked -
sy-ucommcontains the function code triggered by user interaction - The
CASEstatement handles different function codes that may be triggered
Conclusion
By assigning a function code to your button and implementing the corresponding PAI logic with CALL SCREEN, you can easily navigate between different screens in your SAP ABAP application when users click the button.
Advertisements
