Application Development 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: 

Push Button not working

Former Member
0 Kudos
638

hi,

the pushbutton i created doesnt works.help me in this issue.the codings are,

SELECTION-SCREEN PUSHBUTTON /1(10) EXECUTE USER-COMMAND EXEC.

INITIALIZATION.

EXECUTE = 'PUSH'.

IF SSCRFIELD-UCOMM = 'EXEC'.

  • even tried with sy-ucomm = 'exec' not working.

PERFORM PRINT.

ENDIF.

FORM PRINT.

WRITE:/ 'TEST PRINT'.

ENDFORM.

7 REPLIES 7

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
152

Please try this.



SELECTION-SCREEN PUSHBUTTON /1(10) EXECUTE USER-COMMAND EXEC.

INITIALIZATION.
EXECUTE = 'PUSH'.

at selection-screen.

 case sy-ucomm.
   when 'EXEC'.
     PERFORM PRINT.
 endcase.

FORM PRINT.
    WRITE:/ 'TEST PRINT'.
ENDFORM. 

REgards,

RIch Heilman

0 Kudos
152

i tried this coding also but its still not working.can u try & reply me abt the issue,

Thank u

0 Kudos
152

Ok, how about this?



SELECTION-SCREEN PUSHBUTTON /1(10) EXECUTE USER-COMMAND EXEC.
 
INITIALIZATION.
EXECUTE = 'PUSH'.
 
at user-command.    "<---  How about this event?
 
 case sy-ucomm.
   when 'EXEC'.
     PERFORM PRINT.
 endcase.
 
FORM PRINT.
    WRITE:/ 'TEST PRINT'.
ENDFORM. 

Regards,

Rich Heilman

0 Kudos
152

HI,

I EVEN TRIED AT USER-COMMAND BUT ITS STILL NOT WORKING...CAN U HELP ME IN THIS ISSUE....IAM STUCK UP WITH THIS....

THANKS

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
152

Ok, just tested this out. It appears that there is some issue when doing list processing from the pushbutton. Here is one solution.



REPORT zrich_001.

TABLES: sscrfields.
SELECTION-SCREEN PUSHBUTTON /1(10) execute USER-COMMAND exec.

INITIALIZATION.
  execute = 'PUSH'.

AT SELECTION-SCREEN.

  CASE sy-ucomm.
    WHEN 'EXEC'.
      sscrfields-ucomm = 'ONLI'.

  ENDCASE.

START-OF-SELECTION.
  PERFORM print.

*&---------------------------------------------------------------------*
*&      Form  PRINT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM print.
  WRITE:/ 'TEST PRINT'.
ENDFORM.                    "PRINT

Regards,

RIch Heilman

0 Kudos
152

THANKS FOR SOLVING THE ISSUE..

0 Kudos
152

SSS IT WORKING NOW....NOW I COULD USE THIS IN MY MAIN PROG...

THANKS