Hi,
Please check if you have defined okcode in your screen elements.
Like you see SSCRFIELDS-UCOMM against OK type, set "okcode" in place of it as you are using variable name "okcode" in your program to check the function code being triggered.
And if it still doesnt work then try the below steps
Please follow the following steps :
- Go to the Menu editor for the status of your report
- OR Open your report > Click on object list icon on the application toolbar > From the objects expand folder GUI Status > double click on the status
- OR press CTRL + SHIFT + F5.
- Now, once the status is displayed do this for both i.e BACK and EXIT buttons > Double click on the button > Set Function type field to 'E'.
- Create a seperate PAI module with addition AT EXIT-COMMAND e.g MODULE abcd AT EXIT-COMMAND
- write the logic you provided for the buttons in this module.
Regards,
Ashish