I read something about the ok-code but I cant really understand how it works and how I have to implement it.
I tried implementing a MODULE in the PAI for my Buttons but they are not working either.
MODULE test INPUT.
case sy-ucomm.
when 'BTN_01'.
call screen 0.
endcase.
ENDMODULE.
Thanks!
SOLVED
MODULE status_9000 OUTPUT.
SET PF-STATUS 'STATUS9000'.
SET TITLEBAR 'TITLE9000'.
ENDMODULE.
I had to create a PF-STATUS for my screen (i named it 'STATUS9000'). Functionbuttons-> Symbols-> Set Exit-Button FNCT-CODE EXIT
MODULE user_command_9100 INPUT.
ok_code = sy-ucomm.
CASE ok_code.
*now if you click the red exit-button (which we gave a fnct-code[exit]) the ok_code has 'EXIT' as his value.
WHEN 'BACK'.
LEAVE TO SCREEN 9000.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN OTHERS.
ENDCASE.
ENDMODULE.
ok-code = 'EXIT' after we pressed the exit-button, so we are going to leave the program.