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

Regarding Selection Screen

Former Member
0 Likes
1,507

Hi All,

Here I have problem in selection scree.

I have created one check box , after selecting check box I am getting 10 select-options in selection screen,when I am deselecting again , all 10 are disappearing as per my requirement. It is working fine.

but ,problem is when I am selecting check box , I am getting 10 select options , but after deselecting , they are disappearing , But space is still there...in the selection screen. Could you tell me how to remove the space also,when I am dissecting the check box.

Regards,

Siddivinesh Jogu

10 REPLIES 10
Read only

Former Member
0 Likes
1,476
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: p1 type c as CHECKBOX USER-COMMAND U1.

SELECT-OPTIONS: s1 for sy-uname MODIF ID m1,
                s2 for sy-uname MODIF ID m1,
                s3 for sy-uname MODIF ID m1,
                s4 for sy-uname MODIF ID m1.
SELECTION-SCREEN end OF BLOCK b1.
SELECTION-SCREEN BEGIN OF block b2 WITH FRAME.
  SELECT-OPTIONS : p2 for sy-abcde.
SELECTION-SCREEN end OF block b2.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    if p1 = 'X' and screen-group1 = 'M1'.
      screen-active = 1.
    elseif p1 = '' and screen-group1 = 'M1'.
      screen-active = 0.
    endif.
    MODIFY SCREEN.
 ENDLOOP.

try this

Edited by: Soumyaprakash Mishra on Sep 18, 2009 1:25 PM

Read only

Former Member
0 Likes
1,476

Hi,

Maintain select-options in another block and enable or disabled the block at once

Read only

Former Member
0 Likes
1,476

Hi,

Maintain those group of select-options in a separate block & enable/disable that block accoding to status of the check box.

else, just declare the seelction screen without blocks, so that, if they disappear, there wont be any space appeared.

Hope this helps.

Rgds,

Sripal

Read only

Former Member
0 Likes
1,476

Hi,

Here is code acc to the requirement for 3 sel options.. likewise u cn tke 10 sel options vt same modif id..


parameters:
p_chk AS checkbox USER-COMMAND FCODE.
data:
w_p type i.

select-options:

s_fld1 for w_p modif id MD1,
s_fld2 for w_p modif id MD1,
s_fld3 for w_p modif id MD1.

at selection-screen output.
  if p_chk ne 'X'.
    loop at screen.
    if screen-group1 = 'MD1'.
      screen-active  = 0.
      modify screen.
    ENDIF.
  endloop.
  ENDIF.

Regards,

Deeba

Read only

Former Member
0 Likes
1,476

Hi,

Have check box with out block and select options in one block.

PARAMETER : po_c_bx TYPE c AS CHECKBOX USER-COMMAND check.

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

select-options : so_matnr TYPE mara-matnr MODIF ID g1,

so_matkl TYPE mara-matkl MODIF ID g1.

SELECTION-SCREEN END OF BLOCK b1.

thanks and regards,

Gopalakrishnan Ulagajothi

Read only

0 Likes
1,476

Hi All,

I have creted check box in one block and other fields in one block still after disecting the space is there..

I have tried with all the ways mentioned..

But still space is there after..

could you please provide me any test program..which won't have the space..after diselectiong .

My scenario: I have multiple check boxes, upon selcting which I am getting the selection fields, But upon deselecting the space is remains there..so the selection screen is very lenghy...evnen though I am deselecting..

Read only

0 Likes
1,476

Declare both the check boxes and the select-option fields in the same selection screen block and check. You wont get the additional space when you make the select options invisible.

Read only

0 Likes
1,476

Hi, Try this way.


 REPORT ztest_notepad.
 TABLES:pa0001.
                                                            "Block 1
 SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
 PARAMETERS: p_check TYPE c AS CHECKBOX USER-COMMAND u1.
 SELECTION-SCREEN END OF BLOCK blk1.
                                                            "Block 2
 SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME.
 SELECT-OPTIONS: s_date_1 FOR pa0001-begda MODIF ID mo1,
                 s_date_2 FOR pa0001-endda MODIF ID mo1.
 SELECTION-SCREEN END OF BLOCK blk2.
 "AT SELECTION-SCREEN OUTPUT.
 AT SELECTION-SCREEN OUTPUT.
   LOOP AT SCREEN.
     IF p_check       = 'X' AND
        screen-group1 = 'MO1'.
       screen-active = 1.
       MODIFY SCREEN.
     ELSEIF p_check       = space AND
            screen-group1 = 'MO1'.
       screen-active = 0.
       MODIFY SCREEN.
     ENDIF.
   ENDLOOP.
Thanks Venkat.O

Read only

0 Likes
1,476

Sorry .In the previous post i could not give right answer. Try this one.


 REPORT ztest_notepad.
 TABLES:pa0001.
                                                            "Block 1
 SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
 PARAMETERS: p_check1 TYPE c AS CHECKBOX USER-COMMAND u1.
 PARAMETERS:p_check2 TYPE c AS CHECKBOX USER-COMMAND u2.
 SELECTION-SCREEN END OF BLOCK blk1.
                                                            "Block 2
 SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME.
 SELECT-OPTIONS: s_date1 FOR pa0001-begda MODIF ID mo1,
                 s_date2 FOR pa0001-endda MODIF ID mo1.
 SELECTION-SCREEN END OF BLOCK blk2.

 SELECTION-SCREEN BEGIN OF BLOCK blk3 WITH FRAME.
 SELECT-OPTIONS: s_date11 FOR pa0001-begda MODIF ID mo2,
                 s_date22 FOR pa0001-endda MODIF ID mo2.
 SELECTION-SCREEN END OF BLOCK blk3.

 "AT SELECTION-SCREEN OUTPUT.

 AT SELECTION-SCREEN OUTPUT.
   LOOP AT SCREEN.
     IF p_check1      = 'X' AND
        screen-group1 = 'MO1'.
       screen-active = 1.
       MODIFY SCREEN.
     ELSEIF p_check1       = space AND
            screen-group1 = 'MO1'.
       screen-active = 0.
       MODIFY SCREEN.
     ENDIF.
     IF p_check2      = 'X' AND
        screen-group1 = 'MO2'.
       screen-active = 1.
       MODIFY SCREEN.
     ELSEIF p_check2       = space AND
            screen-group1 = 'MO2'.
       screen-active = 0.
       MODIFY SCREEN.
     ENDIF.
   ENDLOOP.
Thanks Venkat.O

Read only

Former Member
0 Likes
1,476

Hi,

Put all the Select-optuons in Group. Make it visible or invisible as per your requirement.

Regards,

Silas