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

at selection screen output not responding

Former Member
0 Likes
2,130

Hi ppl,

I've 4 selection options in my screen. however I just need user to insert only 1 of the 4 for searching. Therefore i included 4 radio buttons. when user select <i>rbf</i>, <i>sfileno</i> will activer and other 3 will be grayed out, when user select <i>rbi</i>, <i>sidnum</i> will active and other will not be active and so forth. You can see the codes below.

However, during the program running, I found out when i select <i>rbf,</i> the other select options fields - <i>sfileno</i>, <i>sidnum</i> n <i>scompsno</i> are not inactive/grayed. It is the same when I seledt the other radio button. I just seem that i receive no response from the program. What have i done wrong here. please help. TQ

SELECTION-SCREEN BEGIN OF BLOCK frm1 WITH FRAME TITLE text-t01 .

SELECT-OPTIONS : sfileno FOR zlic_masterdb-nofailpermohonan modif id f01

,

sidnum FOR zcustomer-idnumber modif id i01,

sconame FOR zcustomer-contactname modif id n01,

scompsno FOR zcom_compdhdr-compsno modif id c01.

PARAMETERS: rbf RADIOBUTTON GROUP g1 ,

rbi RADIOBUTTON GROUP g1,

rbn RADIOBUTTON GROUP g1,

rbc RADIOBUTTON GROUP g1.

SELECTION-SCREEN END OF BLOCK frm1.

INITIALIZATION.

sfileno = '00001'.

**********************************************************************

  • AT SELECTION-SCREEN OUTPUT

**********************************************************************

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

CHECK SCREEN-GROUP1 = 'f01' OR

SCREEN-GROUP1 = 'i01' OR

SCREEN-GROUP1 = 'n01' OR

SCREEN-GROUP1 = 'c01'.

IF rbf = 'X'.

IF SCREEN-GROUP1 EQ 'f01'.

SCREEN-ACTIVE = 1.

ELSEIF SCREEN-GROUP1 EQ 'i01'.

SCREEN-ACTIVE = 0.

ELSEIF SCREEN-GROUP1 EQ 'n01'.

SCREEN-ACTIVE = 0.

ELSEIF SCREEN-GROUP1 EQ 'c01'.

SCREEN-ACTIVE = 0.

ENDIF.

ELSEIF rbi = 'X'.

IF SCREEN-GROUP1 EQ 'i01'.

SCREEN-ACTIVE = 1.

ELSEIF SCREEN-GROUP1 EQ 'f01'.

SCREEN-ACTIVE = 0.

ELSEIF SCREEN-GROUP1 EQ 'n01'.

SCREEN-ACTIVE = 0.

ELSEIF SCREEN-GROUP1 EQ 'c01'.

SCREEN-ACTIVE = 0.

ENDIF.

ELSEIF rbn = 'X'.

IF SCREEN-GROUP1 EQ 'n01'.

SCREEN-ACTIVE = 1.

ELSEIF SCREEN-GROUP1 EQ 'f01'.

SCREEN-ACTIVE = 0.

ELSEIF SCREEN-GROUP1 EQ 'i01'.

SCREEN-ACTIVE = 0.

ELSEIF SCREEN-GROUP1 EQ 'c01'.

SCREEN-ACTIVE = 0.

ENDIF.

ELSEIF rbc = 'X'.

IF SCREEN-GROUP1 EQ 'c01'.

SCREEN-ACTIVE = 1.

ELSEIF SCREEN-GROUP1 EQ 'f01'.

SCREEN-ACTIVE = 0.

ELSEIF SCREEN-GROUP1 EQ 'n01'.

SCREEN-ACTIVE = 0.

ELSEIF SCREEN-GROUP1 EQ 'i01'.

SCREEN-ACTIVE = 0.

ENDIF.

ENDIF.

MODIFY SCREEN.

continue.

ENDLOOP.

1 ACCEPTED SOLUTION
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
2,103

Hi,

Try this code.I checked and it is working fine.

PARAMETERS: rbf RADIOBUTTON GROUP g1 <b>default 'X'</b> user-command r1,

rbi RADIOBUTTON GROUP g1 ,

rbn RADIOBUTTON GROUP g1 ,

rbc RADIOBUTTON GROUP g1 .

SELECTION-SCREEN END OF BLOCK frm1.

AT SELECTION-SCREEN OUTPUT.

<b>LOOP AT SCREEN.

if rbf = 'X'.

if screen-group1 = 'F01' or screen-name CS 'RB' .

screen-input = 1.

else.

screen-input = 0.

endif.

modify screen.

endif.

if rbi = 'X'.

if screen-group1 = 'I01' or screen-name CS 'RB' .

screen-input = 1.

else.

screen-input = 0.

endif.

modify screen.

endif.

if rbn = 'X'.

if screen-group1 = 'N01' or screen-name CS 'RB' .

screen-input = 1.

else.

screen-input = 0.

endif.

modify screen.

endif.

if rbc = 'X'.

if screen-group1 = 'C01' or screen-name CS 'RB'.

screen-input = 1.

else.

screen-input = 0.

endif.

modify screen.

endif.

endloop.</b>

11 REPLIES 11
Read only

Former Member
0 Likes
2,103

HI,

FIRST CHK THAT ALL CONDITONS U HV GIVEN ARE IN SMALL CASE. E.G. 'f01'. IT MUST BE 'f01'.

AND AFTER EACH SCREEN CHANGE USE MODIFY SCREEN AS:

SCREE-ACTIVE = '1'.

MODIFY SCREEN.

REWARD IF HELPS.

JOGDAND M B

Message was edited by:

Jogdand M B

Read only

Former Member
0 Likes
2,103

hi Enzo

Check my sample code



TABLES: eban,
        SSCRFIELDS.

SELECTION-SCREEN BEGIN OF SCREEN 100 TITLE title.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETER:rad1 RADIOBUTTON GROUP rad USER-COMMAND frad1 DEFAULT 'X',
          rad2 RADIOBUTTON GROUP rad .
SELECTION-SCREEN END OF BLOCK b1.

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

PARAMETER: mtr AS CHECKBOX MODIF ID g3 USER-COMMAND chk1,
           p_matnr TYPE eban-matnr MODIF ID g1,
           sloc AS CHECKBOX MODIF ID g3 USER-COMMAND chk2,
           str_loc TYPE eban-lgort MODIF ID g4.

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
SELECT-OPTIONS: matnr1 FOR eban-matnr MODIF ID g2.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN PUSHBUTTON /20(10) name USER-COMMAND UCOM.


SELECTION-SCREEN END OF SCREEN 100.



name = 'FETCH'.
title = 'Test Report'.
CALL SELECTION-SCREEN '100'.


TYPE-POOLS slis.

* declaration of internal tables and work areas to be used


DATA: BEGIN OF it_pr OCCURS 0,
      banfn TYPE eban-banfn,
      bnfpo TYPE eban-bnfpo,
      loekz TYPE eban-loekz,
      statu TYPE eban-statu,
      ekgrp TYPE eban-ekgrp,
      matnr TYPE eban-matnr,
      werks TYPE eban-werks,
      lgort TYPE eban-lgort,
      preis TYPE eban-preis,
      peinh TYPE eban-peinh,
      END OF it_pr.

DATA: BEGIN OF it_mat OCCURS 0,
      matnr TYPE eban-matnr,
      END OF it_mat.

*DATA:BEGIN OF ITAB1 OCCURS 0,

  DATA: l_answer.



DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
      wa_fieldcat LIKE LINE OF it_fieldcat,
      it_event TYPE slis_t_event,
      wa_event TYPE slis_alv_event.

* declaration of variables to be used

DATA: r_ucomm TYPE sy-ucomm,
      mat_no TYPE eban-matnr,
      len TYPE i VALUE 1,
      count TYPE i VALUE IS INITIAL,
      iflag TYPE i VALUE IS INITIAL,
      iflag1 TYPE i VALUE 0.


DATA :pr_id TYPE sy-repid,
rt_extab TYPE slis_t_extab.

 INITIALIZATION.

  pr_id = sy-repid.

probably it would sol;ve ur problem

regards

ravish

<b>plz dont forget to reward points if helpful</b>

Read only

0 Likes
2,103

Hi Mr Ravish,

Where is ur at selection-screen output?

not even selection-screen output., my INITIALIZATION also does not work. what's the problem?

Read only

Former Member
0 Likes
2,103

hi,

I think u have to use MODIFY SCREEN after every making the screen active everytime.

Read only

Former Member
0 Likes
2,103

Hi,

Atfer evey change for the Field write MODIFY SCREEN to modify the field status

Regards

Sudheer

Read only

Former Member
0 Likes
2,103

Hi all,

thanks for all suggestions, i've tried as suggested like check the condition case and put modify screen everytime i change the field status or making the screen active but unfortunately still not successful.

any other suggestion please. i've read many guide about this and i did code like suggested but why i still can't solve the problem?

Read only

Former Member
0 Likes
2,103

HI,

Change your code in the at selection-screen output as below:

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

CHECK SCREEN-GROUP1 = 'f01' OR

SCREEN-GROUP1 = 'i01' OR

SCREEN-GROUP1 = 'n01' OR

SCREEN-GROUP1 = 'c01'.

IF rbf = 'X'.

IF SCREEN-GROUP1 EQ 'f01'.

SCREEN-ACTIVE = 1.

ELSEIF SCREEN-GROUP1 EQ 'i01'.

SCREEN-ACTIVE = 0.

ELSEIF SCREEN-GROUP1 EQ 'n01'.

SCREEN-ACTIVE = 0.

ELSEIF SCREEN-GROUP1 EQ 'c01'.

SCREEN-ACTIVE = 0.

ENDIF.

<b>MODIFY SCREEN.</b>

ELSEIF rbi = 'X'.

IF SCREEN-GROUP1 EQ 'i01'.

SCREEN-ACTIVE = 1.

ELSEIF SCREEN-GROUP1 EQ 'f01'.

SCREEN-ACTIVE = 0.

ELSEIF SCREEN-GROUP1 EQ 'n01'.

SCREEN-ACTIVE = 0.

ELSEIF SCREEN-GROUP1 EQ 'c01'.

SCREEN-ACTIVE = 0.

ENDIF.

<b>MODIFY SCREEN.</b>

ELSEIF rbn = 'X'.

IF SCREEN-GROUP1 EQ 'n01'.

SCREEN-ACTIVE = 1.

ELSEIF SCREEN-GROUP1 EQ 'f01'.

SCREEN-ACTIVE = 0.

ELSEIF SCREEN-GROUP1 EQ 'i01'.

SCREEN-ACTIVE = 0.

ELSEIF SCREEN-GROUP1 EQ 'c01'.

SCREEN-ACTIVE = 0.

ENDIF.

<b>MODIFY SCREEN.</b>

ELSEIF rbc = 'X'.

IF SCREEN-GROUP1 EQ 'c01'.

SCREEN-ACTIVE = 1.

ELSEIF SCREEN-GROUP1 EQ 'f01'.

SCREEN-ACTIVE = 0.

ELSEIF SCREEN-GROUP1 EQ 'n01'.

SCREEN-ACTIVE = 0.

ELSEIF SCREEN-GROUP1 EQ 'i01'.

SCREEN-ACTIVE = 0.

ENDIF.

<b>MODIFY SCREEN.</b>

ENDIF.

ENDLOOP.

Regards

Sayee

Read only

0 Likes
2,103

My Sayeed,

Sorry, still cannot solve the problem. Anyway thanks. Any other suggestion please?

Read only

Former Member
0 Likes
2,103

Hi,

you can't modify the screen by checking IF rbf = 'X'.

while declaring radio button group use user command like this:

PARAMETERS: rbf RADIOBUTTON GROUP g1 USER-COMMAND 'CLK' ,

rbi RADIOBUTTON GROUP g1,

rbn RADIOBUTTON GROUP g1,

rbc RADIOBUTTON GROUP g1.

And in your code:

check whetehr the radiobutton is clicked or not...i.e,

IF SSCRFIELDS-UCOMM = 'CLK'

.

.

.... includes the code which u have written to modify the screen

...

ENDIF

And one more thing while checking the name of the groups.. IF SCREEN-GROUP1 = 'XYZ' in single quotes use capitals only.. otherwise ur if condition always fails.

hope this will help you.

Regards

Bhavani

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
2,104

Hi,

Try this code.I checked and it is working fine.

PARAMETERS: rbf RADIOBUTTON GROUP g1 <b>default 'X'</b> user-command r1,

rbi RADIOBUTTON GROUP g1 ,

rbn RADIOBUTTON GROUP g1 ,

rbc RADIOBUTTON GROUP g1 .

SELECTION-SCREEN END OF BLOCK frm1.

AT SELECTION-SCREEN OUTPUT.

<b>LOOP AT SCREEN.

if rbf = 'X'.

if screen-group1 = 'F01' or screen-name CS 'RB' .

screen-input = 1.

else.

screen-input = 0.

endif.

modify screen.

endif.

if rbi = 'X'.

if screen-group1 = 'I01' or screen-name CS 'RB' .

screen-input = 1.

else.

screen-input = 0.

endif.

modify screen.

endif.

if rbn = 'X'.

if screen-group1 = 'N01' or screen-name CS 'RB' .

screen-input = 1.

else.

screen-input = 0.

endif.

modify screen.

endif.

if rbc = 'X'.

if screen-group1 = 'C01' or screen-name CS 'RB'.

screen-input = 1.

else.

screen-input = 0.

endif.

modify screen.

endif.

endloop.</b>

Read only

0 Likes
2,103

Finally, my problem solved.

Thanks Mr Jayaraman for your help. Really appreciate it.

I've awarded full points for u. Thanks again