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 Functional code where you enter the functional code.

This will convert your button to functional trigger theOK 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. Below is the example

case sy-ucomm. " the ok code
  when 'Functioncode’.  
    call screen screennumber.
  when others.

 Functioncode is the code you set up and screennumber is the screen you want to call.

Vikyath Ram
Vikyath Ram

A born rival