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: 

looping screen

Former Member
0 Kudos

Dear Experts,



SELECTION-SCREEN begin of block k with frame TITLE text-001.
  PARAMETERS : r1 RADIOBUTTON GROUP g MODIF ID g1,
               r2 RADIOBUTTON GROUP g MODIF ID g2.
  SELECTION-SCREEN end of block k.




  SELECTION-SCREEN begin of block k1 with frame TITLE text-002.
  PARAMETERS : pernr type pa0001-pernr.
  SELECTION-SCREEN end of block k1.



  START-OF-SELECTION.
  loop at screen.
  if screen-group1 = 'G1'.
    screen-invisible = 0.
    endif.
    MODIFY SCREEN.
    endloop.

when i click on first radio button the second selection screen should disapper so what to do for this can any one help me.

Thanks and Regards,

Thirukumaran. R

1 ACCEPTED SOLUTION

Former Member
0 Kudos

first thing: you need to enables you radio buttons to responds to the clicks that is: user command.

next:

give modif id to the field which you want to hide. i.e for the parameter.

next: check the radio button value, and disable the field checking the group.

SELECTION-SCREEN begin of block k with frame TITLE text-001.
  PARAMETERS : r1 RADIOBUTTON GROUP g DEFAULT 'X' USER-COMMAND ucomm, " here you need user command
               r2 RADIOBUTTON GROUP g.
  SELECTION-SCREEN end of block k.

  SELECTION-SCREEN begin of block k1 with frame TITLE text-002.
  PARAMETERS : pernr type pa0001-pernr MODIF ID M1. " here you need modif id
  SELECTION-SCREEN end of block k1.


AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    if r2 = 'X'.
      if screen-group1 = 'M1'.
        screen-active = 0.
      endif.
    endif.
    MODIFY SCREEN.
  ENDLOOP.

6 REPLIES 6

former_member194669
Active Contributor
0 Kudos

Deleted

Former Member
0 Kudos

Hi,

Make the following changes in your code and check


SELECTION-SCREEN begin of block k with frame TITLE text-001.
  PARAMETERS : r1 RADIOBUTTON GROUP g MODIF ID g1,
                            r2 RADIOBUTTON GROUP g MODIF ID g2.
  SELECTION-SCREEN end of block k.
 
 
 
 
  SELECTION-SCREEN begin of block k1 with frame TITLE text-002.
  PARAMETERS : pernr type pa0001-pernr.
  SELECTION-SCREEN end of block k1.
 
 
 
AT SELECTION-SCREEN OUTPUT.

if r1 = 'X'.

  loop at screen.
  if screen-name = 'pernr'.
    screen-invisible = 0.
    endif.
    MODIFY SCREEN.
    endloop.
endif.

Regards,

Vikranth

former_member585865
Contributor
0 Kudos

Hi Thiru,

just check the sample code below and correct your code,


ELECTION-SCREEN BEGIN OF LINE.
PARAMETERS       : p_r1 RADIOBUTTON GROUP rad
                        USER-COMMAND clk DEFAULT 'X'.            " upload Radio Button
SELECTION-SCREEN COMMENT 5(35) text-003.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN : BEGIN OF BLOCK 001 WITH FRAME TITLE text-001.
PARAMETERS: p_upl       LIKE rlgrap-filename MODIF ID a           "Upload File
                         DEFAULT 'c:\temp\parbmat.xls',
            p_werks     like t001w-werks MODIF ID a,              "Plant
PARAMETERS: p_rest      LIKE rlgrap-filename MODIF ID a           "Dwonload File Path
                         DEFAULT 'c:\temp\Success.xls'.
SELECTION-SCREEN : END OF BLOCK 001.

SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : p_r2 RADIOBUTTON GROUP rad.
SELECTION-SCREEN COMMENT 5(35) text-004.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN : BEGIN OF BLOCK 002 WITH FRAME TITLE text-002.
PARAMETERS     : p_plant  LIKE marc-werks MODIF ID b.                "Plant
PARAMETERS     : p_lgort  LIKE mard-lgort MODIF ID b.                "Storage Location
PARAMETERS     : p_vkorg  LIKE mvke-vkorg MODIF ID b.                "Sales Organization
PARAMETERS     : p_vtweg  LIKE mvke-vtweg MODIF ID b.                "Distribution Channel
SELECT-OPTIONS : s_mat FOR  mara-matnr MODIF ID b.                  "Material No No
SELECT-OPTIONS : s_dat FOR  mara-ersda MODIF ID b.                  "Date on Record Created

PARAMETERS     : p_down LIKE rlgrap-filename MODIF ID b
                  DEFAULT 'c:\temp\Material Master.xls'.           "Download File Path
SELECTION-SCREEN : END OF BLOCK 002.


AT SELECTION-SCREEN OUTPUT.
*Inactive Fields depending on the radio button
  LOOP AT SCREEN.
    IF p_r1 = 'X'.
      IF screen-group1 = 'B'.
        screen-active = 0.
      ENDIF.
    ELSEIF p_r2 = 'X'.
      IF screen-group1 = 'A'.
        screen-active = 0.
      ENDIF.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.

Edited by: suresh suresh on Sep 11, 2009 6:27 AM

Former Member
0 Kudos

first thing: you need to enables you radio buttons to responds to the clicks that is: user command.

next:

give modif id to the field which you want to hide. i.e for the parameter.

next: check the radio button value, and disable the field checking the group.

SELECTION-SCREEN begin of block k with frame TITLE text-001.
  PARAMETERS : r1 RADIOBUTTON GROUP g DEFAULT 'X' USER-COMMAND ucomm, " here you need user command
               r2 RADIOBUTTON GROUP g.
  SELECTION-SCREEN end of block k.

  SELECTION-SCREEN begin of block k1 with frame TITLE text-002.
  PARAMETERS : pernr type pa0001-pernr MODIF ID M1. " here you need modif id
  SELECTION-SCREEN end of block k1.


AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    if r2 = 'X'.
      if screen-group1 = 'M1'.
        screen-active = 0.
      endif.
    endif.
    MODIFY SCREEN.
  ENDLOOP.

Former Member
0 Kudos

Hi ,

Try this code.

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

PARAMETERS : R1 RADIOBUTTON GROUP G USER-COMMAND VJY ,

R2 RADIOBUTTON GROUP G .

SELECTION-SCREEN END OF BLOCK K.

SELECTION-SCREEN BEGIN OF BLOCK K1 WITH FRAME TITLE TEXT-002.

PARAMETERS : PERNR TYPE PA0001-PERNR MODIF ID AKP.

SELECTION-SCREEN END OF BLOCK K1.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF R1 = 'X'.

IF SCREEN-GROUP1 = 'AKP'.

  • SCREEN-INVISIBLE = 0.

SCREEN-INPUT = 0.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

Regards,

Vijay

Former Member
0 Kudos

Hi,

you follow your code in that way.

SELECTION-SCREEN begin of block k with frame TITLE text-001.

PARAMETERS :r2 RADIOBUTTON GROUP g user-command abc

DEFAULT 'X',

r1 RADIOBUTTON GROUP g .

SELECTION-SCREEN end of block k.

SELECTION-SCREEN begin of block k1 with frame TITLE text-002.

PARAMETERS : pernr type pa0001-pernr MODIF ID g3.

SELECTION-SCREEN end of block k1.

at selection-screen output.

IF R1 = 'X'.

loop at screen.

if screen-group1 = 'G3'.

screen-input = 0.

screen-invisible = 1.

MODIFY SCREEN.

endif.

endloop.

else.

loop at screen.

if screen-group1 = 'G3'.

screen-input = 1.

screen-invisible = 0.

MODIFY SCREEN.

endif.

endloop.

endif.

Hope this can solve your problems.

Regards,

Tutun