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: 

at selection-screen output.

Former Member
0 Kudos

HI!

As you will see below I have a checkbox p_cust and a second block with some selection criteria. In the selection screen only the p_cust must be displayed but when p_cust = 'X' then the second block must be displayed too.

I suppose that I have to do something with at selection screen output and loop at screen. Any idea?

_____________________________________________

SELECTION-SCREEN: BEGIN OF BLOCK mad WITH FRAME TITLE text-b01.

parameters: p_cust as checkbox.

SELECTION-SCREEN: END OF BLOCK mad.

SELECTION-SCREEN: BEGIN OF BLOCK cus WITH FRAME TITLE text-b01.

select-options : s_kunnr for kna1-kunnr..

parameters: p_kdkg5 like kna1-kdkg5 default 'Y1'.

SELECTION-SCREEN: END OF BLOCK cus.

1 ACCEPTED SOLUTION

JozsefSzikszai
Active Contributor
0 Kudos

hi,

modify the following:

parameters: p_cust as checkbox USER-COMMAND uc01.

select-options : s_kunnr for kna1-kunnr MODIF ID 001.

parameters: p_kdkg5 like kna1-kdkg5 default 'Y1' MODIF ID 001.

add the following:

AT SELECTION-SCREEN OUTPUT.

LOOP AT screen.

IF screen-group1 = '001'.

IF p_cust IS INITIAL.

screen-active = '0'.

ELSE.

screen-active = '1'.

ENDIF.

MODIFY screen.

ENDIF.

ENDLOOP.

hope this helps

ec

5 REPLIES 5

Former Member
0 Kudos

Hi,

Instead of checkbox you should use radio option, then only it will work as per your requirement.

See below code :

TABLES : bsis.

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

PARAMETER : sp_sel radiobutton group rad USER-COMMAND radio DEFAULT 'X',

sp_all RADIOBUTTON GROUP rad.

SELECTION-SCREEN END OF BLOCK b1.

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

SELECT-OPTIONS : so_bukrs FOR bsis-bukrs MODIF ID sp1.

SELECT-OPTIONS : so_hkont FOR bsis-hkont MODIF ID sp2.

SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF sp_sel = 'X'.

IF screen-group1 = 'SP2'.

screen-input = '0'.

screen-invisible = '0'.

screen-required = '0'.

MODIFY SCREEN.

ENDIF.

elseif sp_all = 'X'.

IF screen-group1 = 'SP2'.

screen-input = '0'.

screen-invisible = '0'.

screen-required = '0'.

MODIFY SCREEN.

ENDIF.

endif.

ENDLOOP.

Thanks,

Sri.

Edited by: Sriram Ponna on Jan 18, 2008 3:05 PM

JozsefSzikszai
Active Contributor
0 Kudos

hi,

modify the following:

parameters: p_cust as checkbox USER-COMMAND uc01.

select-options : s_kunnr for kna1-kunnr MODIF ID 001.

parameters: p_kdkg5 like kna1-kdkg5 default 'Y1' MODIF ID 001.

add the following:

AT SELECTION-SCREEN OUTPUT.

LOOP AT screen.

IF screen-group1 = '001'.

IF p_cust IS INITIAL.

screen-active = '0'.

ELSE.

screen-active = '1'.

ENDIF.

MODIFY screen.

ENDIF.

ENDLOOP.

hope this helps

ec

former_member404244
Active Contributor
0 Kudos

hi,

loop at screen.

if p_cust = 'X'.

if screen-name = 'S_KUNNR'.

screen-input = 0.

elseif screen-name = 'p_kdkg5'.

screen-input = 0.

modify screen.

endif.

endif.

endloop.

Regards,

Nagaraj

Former Member
0 Kudos

TABLES kna1.

SELECTION-SCREEN: BEGIN OF BLOCK mad WITH FRAME.

PARAMETERS: p_cust AS CHECKBOX USER-COMMAND rad.

SELECTION-SCREEN: END OF BLOCK mad.

SELECTION-SCREEN: BEGIN OF BLOCK cus WITH FRAME TITLE text_1.

SELECT-OPTIONS : s_kunnr FOR kna1-kunnr MODIF ID run.

PARAMETERS: p_kdkg5 LIKE kna1-kdkg5 DEFAULT 'Y1' MODIF ID run.

SELECTION-SCREEN: END OF BLOCK cus.

&----


*& At Selection Screen output *

&----


AT SELECTION-SCREEN OUTPUT.

IF p_cust EQ 'X'.

LOOP AT SCREEN.

IF screen-group1 EQ 'DIP'.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

IF screen-group1 EQ 'RUN'.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Regards,

Sai Ramesh

Former Member
0 Kudos

Hi antonis,

i worked on same scenario...try this code.

include this code,

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.

at selection-screen output.

if mtr = 'X'.

loop at screen.

if screen-group1 = 'G1'.

screen-input = 1 .

endif.

modify screen.

endloop.

endif.

if sloc = 'X'.

loop at screen.

if screen-group1 = 'G4'.

screen-input = 1 .

endif.

modify screen.

endloop.

endif.

plz reward if helpful.