Please follow the steps below to make it functional.
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. " DO NOTHING” endcase.
Functioncode is the code you set up and screennumber is the screen you want to call.