Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Pushbuttons

Former Member
0 Likes
512

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
481

Use CASE SY-UCOMM

3 REPLIES 3
Read only

Former Member
0 Likes
482

Use CASE SY-UCOMM

Read only

Former Member
0 Likes
481

For the pust buttons defied, you need to specify Function code in the element attributes.

Then check this function code in SY-UCOMM.

Read only

former_member195383
Active Contributor
0 Likes
481

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...