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: 

multiple selection screen with pushbutton!!

former_member384574
Active Participant
0 Kudos

Hi everybody!!

I need an example of how can I make a multiple selection screen with differents pushbutton!! Initially, I've 3 buttons, and when I click on one of them I need to show another 3 differents pushbutton, but I don't know how can I make this, I've tried making 2 screen but I only get dumps, does anybody know how can I make this?

Thanks a lot,

Regards,

Rebeca

1 ACCEPTED SOLUTION

former_member585060
Active Contributor
0 Kudos

Hi,

Try this code, if u select second radio button, the send set not displays.

REPORT zpbk_selection_screen.

TABLES : sscrfields.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS : rd_p1 TYPE c RADIOBUTTON GROUP r1 USER-COMMAND abcd,

rd_p2 TYPE c RADIOBUTTON GROUP r1 .

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

PARAMETERS : rd_r1 TYPE c RADIOBUTTON GROUP r2 MODIF ID ccc,

rd_r2 TYPE c RADIOBUTTON GROUP r2 MODIF ID ccc,

rd_r3 TYPE c RADIOBUTTON GROUP r2 MODIF ID ccc.

SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

IF rd_p2 = 'X' .

LOOP AT SCREEN.

CASE screen-group1.

WHEN 'CCC'.

screen-input = 0. "Enable

screen-invisible = 1. "Disable

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

ENDIF.

START-OF-SELECTION.

Regards

Bala Krishna

4 REPLIES 4

former_member188685
Active Contributor
0 Kudos

check this Program demo_sel_screen_function_key

you have to use the event at selection-screen output event and modify the selection-screen accordingly based on the button value. using loop at screen logic.

former_member585060
Active Contributor
0 Kudos

Hi,

Try this code, if u select second radio button, the send set not displays.

REPORT zpbk_selection_screen.

TABLES : sscrfields.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS : rd_p1 TYPE c RADIOBUTTON GROUP r1 USER-COMMAND abcd,

rd_p2 TYPE c RADIOBUTTON GROUP r1 .

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

PARAMETERS : rd_r1 TYPE c RADIOBUTTON GROUP r2 MODIF ID ccc,

rd_r2 TYPE c RADIOBUTTON GROUP r2 MODIF ID ccc,

rd_r3 TYPE c RADIOBUTTON GROUP r2 MODIF ID ccc.

SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

IF rd_p2 = 'X' .

LOOP AT SCREEN.

CASE screen-group1.

WHEN 'CCC'.

screen-input = 0. "Enable

screen-invisible = 1. "Disable

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

ENDIF.

START-OF-SELECTION.

Regards

Bala Krishna

0 Kudos

Hi experts,

Now I see the pushbutton, but I see all the button, not the button of each group.. This is my code:

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON  1(79) DTP USER-COMMAND DTP
VISIBLE LENGTH 20.
SELECTION-SCREEN PUSHBUTTON 25(79) EMP USER-COMMAND EMP
VISIBLE LENGTH 20.
SELECTION-SCREEN PUSHBUTTON 49(79) ABS USER-COMMAND ABS
VISIBLE LENGTH 20.

PARAMETERS: PROC_TYP TYPE I DEFAULT 1 NO-DISPLAY.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN SKIP.


* Informes de datos de tiempo.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN PUSHBUTTON 1(20) TEXT-FED USER-COMMAND FED MODIF ID DTP.

SELECTION-SCREEN PUSHBUTTON 23(20) TEXT-DCH USER-COMMAND DCH MODIF ID DTP.

SELECTION-SCREEN PUSHBUTTON 45(20) TEXT-ACH USER-COMMAND ACH MODIF ID DTP.

SELECTION-SCREEN END OF LINE.


SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN PUSHBUTTON 1(20) TEXT-LDP USER-COMMAND LDP MODIF ID EMP.

SELECTION-SCREEN PUSHBUTTON 23(20) TEXT-PDF USER-COMMAND PDF MODIF ID EMP.

SELECTION-SCREEN PUSHBUTTON 45(20) TEXT-LDT USER-COMMAND LDT MODIF ID EMP.

SELECTION-SCREEN END OF LINE.


SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN.
  CASE SSCRFIELDS-UCOMM.
    WHEN 'DTP'. PROC_TYP = '1'.
    WHEN 'EMP'. PROC_TYP = '2'.
    WHEN 'ABS'. PROC_TYP = '3'.

  ENDCASE.


AT SELECTION-SCREEN OUTPUT.
  CASE PROC_TYP.


* Cuando el botón que ha seleccionado es "Datos de tiempo"

    WHEN 1.

      CALL FUNCTION 'ICON_CREATE'                      "yjs acc
        EXPORTING
          NAME                        = ICON_OKAY
          TEXT                        = TEXT-DTP
          INFO                        = TEXT-AUS
        IMPORTING
          RESULT                      = DTP.

      EMP = TEXT-EMP.
      ABS = TEXT-ABS.




       LOOP AT SCREEN.
        CASE SCREEN-GROUP1.
          WHEN 'DTP'.
            SCREEN-ACTIVE = 1.
            SCREEN-INVISIBLE = 0.
            MODIFY SCREEN.
        ENDCASE.
       ENDLOOP.


    WHEN 2.

      CALL FUNCTION 'ICON_CREATE'                       "yjs acc
        EXPORTING
          NAME                        = ICON_OKAY
          TEXT                        = TEXT-EMP
          INFO                        = TEXT-AUS
        IMPORTING
          RESULT                      = EMP.

      DTP = TEXT-DTP.
      ABS = TEXT-ABS.

How can I do, for case number 1 only to show the button which has the modify ID 'DTP?

Thanks a lot!

Edited by: Rebeca R on Oct 13, 2008 1:57 PM

Edited by: Rebeca R on Oct 13, 2008 1:58 PM

Edited by: Rebeca R on Oct 13, 2008 1:59 PM

Former Member
0 Kudos

hi,

i sugest following concept.

pushbutton4

pushbutton5

pushbutton6

selection-screen begin of screen 900.

pushbutton1

pushbutton2

pushbutton3

selection-screen end of screen 900.

at selection-screen.

if sy-ucomm = pushbutton4.

call selection-screen 900.

endif.