‎2008 Jun 26 11:48 AM
Hi,
Can you please assist me.
I am trying to create a program but now the problem that I am having is that my program contains a two pushbuttons, according to the understanding I have, if you press the pushbutton the function code is stored in the ok_code, now the proble is whether I press the pushbutton or not there is nothing stored in the pushbuttons.
I have pasted the coding below, thanx alot for all the help.
REPORT Z_TEST.
DATA: INPUT(20) TYPE C, OUTPUT(20) TYPE C, OK_CODE TYPE SY-UCOMM,
SAVE_OK LIKE OK_CODE.
CALL SCREEN 100.
MODULE init_screen_100 OUTPUT.
CLEAR INPUT.
CLEAR OUTPUT.
CLEAR OK_CODE.
ENDMODULE.
MODULE user_command_0100 INPUT.
WRITE: OK_CODE.
SAVE_OK = OK_CODE.
CLEAR OK_CODE.
CASE SAVE_OK.
WHEN 'CANCEL_1'.
LEAVE PROGRAM.
WHEN 'LOGON_1'.
WRITE: 'THE USERNAME IS ', INPUT.
WRITE /.
WRITE: 'THE PASSWORD IS ', OUTPUT.
WHEN OTHERS.
WRITE: SAVE_OK.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE.
‎2008 Jun 26 11:50 AM
‎2008 Jun 26 11:50 AM
‎2008 Jun 26 11:51 AM
For the pust buttons defied, you need to specify Function code in the element attributes.
Then check this function code in SY-UCOMM.
‎2008 Jun 26 11:55 AM
Hi
Sy-ucomm will store the function codes.So where ever you are using ok_code, replace the same by sy-ucomm.
Reward points if it helps...