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

Nested Radiobutton - At selection screen output

Former Member
0 Likes
2,068

Hello Friends,

I have to display the Selection Screen as --

Radion button - G1(group)

Finished Product (rb_fnsh)

Semifinished Product (rb_sfns)

--> rb_fnsh is selected --> Radio button group G2

With Serial no. (rb_sernr)

Without serial no. (rb_vsern)

--> rb_sfns is selected --> Radio button group G3

With serial no. (rb_sern1)

W/o serial no. (rb_vser1)

(Have to hide either G2 or G3)

And if both rb_fnsh & rb_sernr are selected --> Then display three Select Options - SO_SERNR, SO_KUNNR, SO_LFDAT.

Is it possible to write nested Radio button for selection screen.

I am developing since 2 hrs, my report is ready but unable to give user required Selection screen.

Hw can I present this logic?

1 ACCEPTED SOLUTION
Read only

former_member404244
Active Contributor
0 Likes
1,311

Hi,

You can use "AT selectionn-screen output... You will get lot more threads related to this..Please search in SCN..

sample code...



IF p_pserv IS  INITIAL.

    LOOP AT SCREEN.

      CASE screen-name.

        WHEN 'P_PFILE1'.
          screen-input = 0.
          MODIFY SCREEN.

        WHEN 'P_PFILE2'.
          screen-input = 0.
          MODIFY SCREEN.

        WHEN 'P_ERRFL1'.
          screen-input = 0.
          MODIFY SCREEN.

        WHEN 'P_ERRFL2'.
          screen-input = 0.
          MODIFY SCREEN.

      ENDCASE.

    ENDLOOP.

  ELSE.

    LOOP AT SCREEN.

      CASE screen-name.

        WHEN 'P_AFILE1'.
          screen-input = 0.
          MODIFY SCREEN.

        WHEN 'P_AFILE2'.
          screen-input = 0.
          MODIFY SCREEN.

        WHEN 'P_AERFL1'.
          screen-input = 0.
          MODIFY SCREEN.

        WHEN 'P_AERFL2'.
          screen-input = 0.
          MODIFY SCREEN.


      ENDCASE.

    ENDLOOP.

  ENDIF.

here p_pserv is one radio button ..

Regards,

Nagaraj

5 REPLIES 5
Read only

former_member404244
Active Contributor
0 Likes
1,312

Hi,

You can use "AT selectionn-screen output... You will get lot more threads related to this..Please search in SCN..

sample code...



IF p_pserv IS  INITIAL.

    LOOP AT SCREEN.

      CASE screen-name.

        WHEN 'P_PFILE1'.
          screen-input = 0.
          MODIFY SCREEN.

        WHEN 'P_PFILE2'.
          screen-input = 0.
          MODIFY SCREEN.

        WHEN 'P_ERRFL1'.
          screen-input = 0.
          MODIFY SCREEN.

        WHEN 'P_ERRFL2'.
          screen-input = 0.
          MODIFY SCREEN.

      ENDCASE.

    ENDLOOP.

  ELSE.

    LOOP AT SCREEN.

      CASE screen-name.

        WHEN 'P_AFILE1'.
          screen-input = 0.
          MODIFY SCREEN.

        WHEN 'P_AFILE2'.
          screen-input = 0.
          MODIFY SCREEN.

        WHEN 'P_AERFL1'.
          screen-input = 0.
          MODIFY SCREEN.

        WHEN 'P_AERFL2'.
          screen-input = 0.
          MODIFY SCREEN.


      ENDCASE.

    ENDLOOP.

  ENDIF.

here p_pserv is one radio button ..

Regards,

Nagaraj

Read only

Former Member
0 Likes
1,311

Thanks Nagaraj.

I also tried CASE statement.

But the Problem is - Nested Radio buttons.

( In radio button - one of the selection is always 'X' and that's why it's not possible to Hide the Complete Radio button Group G2 or G3).

Can we do something for this?

Read only

0 Likes
1,311

Hi,

Please make all the three radio button's under one group..

Based on the selection make the fields ready for input and rest all the fields are not for input...

Please try delcring the radio buttons like this.. This is a sample code



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

PARAMETERS : p_lpn TYPE filename-pathintern
             DEFAULT c_lpn OBLIGATORY ,          "Logical Path Name
             p_aserv RADIOBUTTON GROUP grp
             USER-COMMAND app,                   "Application server

             p_afile1 TYPE filename-fileextern , "Application File
                                                 "Name for contracts
             p_afile2 TYPE filename-fileextern , "Application
                                                 "FileName for
                                                 "Long text
             p_aerfl1 TYPE filename-fileextern , "Error File
                                                 "forcontracts

             p_aerfl2 TYPE filename-fileextern , "Error File
                                                 "for Longtext

             p_pserv RADIOBUTTON GROUP grp,     "Presentation Server
             p_pfile1 TYPE rlgrap-filename ,    "Presentation File
                                                "Name forcontracts

             p_pfile2 TYPE rlgrap-filename ,    "Presentation File
                                                "Name for long
                                                "texts
             p_errfl1 TYPE rlgrap-filename ,
                                                "Error File for
                                                "contracts
             p_errfl2 TYPE rlgrap-filename .    "Err File Long text

SELECTION-SCREEN : END OF BLOCK b1.

Use my earlier post Loop at screen...

Regards,

Nagaraj

Read only

Former Member
0 Likes
1,311

Hey, Thanks again.

But it's not possible to club the three. ( I have to select two out of three)

First - I have to select finished or Semifinished.

Second - If finished is selected then - With Serial no or without serial no.

else semifinished is selected then - with serial no. or without serial no.

Prog. logic to display sr. no for finished and semifinished is totally different.

Read only

0 Likes
1,311

Hi,

I got your point...

I think you can do like this as well..

Initial radio buttons....

Radio button (Finished) and group G3.

Radio button(Semi-finished) and group G3.

if i select First radio button then do the following..

Radio button (Finished Product with Serial number ) and group ->G1.

Radio button(Finished Product without Serial number) and group G1.

Now when you select First radio button, user knows that he/she is selectiong Finished product with Serial number, so now open up the field for input under this radio button and close the other field under Finished Product without Serial number radio button.

if i select Second radio button then do the following.

similarly you can also do for Semifinished as well.

Radio button (Semi - Finished Product with Serial number ) and group ->G2.

Radio button( Semi-Finished Product without Serial number) and group-> G2.

Also you can validate based on the user inputs in the program which gives user to select in a correct manner

Regards,

Nagaraj