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: 

If chk box is chkd, It has to display set of Select Options on Selct screen

Former Member
0 Kudos
166

Hi,

SELECTION-SCREEN BEGIN OF BLOCK B1. 
SELECT-OPTIONS: s_vkorg1 FOR ce1rh03-vkorg,    "Sales org
                s_vtweg1 FOR ce1rh03-vtweg,    "Dist Channel
                s_spart1 FOR ce1rh03-spart,    "Division
                s_kndnr2 FOR ce1rh03-kndnr,
                s_vrgar1 FOR ce1rh03-vrgar,
                s_mtart1 FOR ce1rh03-mtart,
                s_fkart1 FOR ce1rh03-fkart.

SELECTION-SCREEN END OF BLOCK B1.



This is a Block(b1) of select options that I have on my screen. 

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-110.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS P_ICMP AS CHECKBOX USER-COMMAND FLAG.
SELECTION-SCREEN COMMENT 3(70) text-108.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.

In Block b2 there will be a check box, if user selects this check box then it has to display the Block B3(It has a set of select-optioins)

Any suggestions will be apprecaited!

Regards,

Kittu

Edited by: Kittu on Apr 9, 2009 2:06 PM

1 ACCEPTED SOLUTION

Former Member
0 Kudos
135

Hi,

SELECTION-SCREEN BEGIN OF BLOCK B1.

SELECT-OPTIONS: s_vkorg1 FOR ce1rh03-vkorg, "Sales org

s_vtweg1 FOR ce1rh03-vtweg, "Dist Channel

s_spart1 FOR ce1rh03-spart, "Division

s_kndnr2 FOR ce1rh03-kndnr,

s_vrgar1 FOR ce1rh03-vrgar,

s_mtart1 FOR ce1rh03-mtart,

s_fkart1 FOR ce1rh03-fkart.

SELECTION-SCREEN END OF BLOCK B1.

This is a Block(b1) of select options that I have on my screen.

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-110.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS P_ICMP AS CHECKBOX USER-COMMAND FLAG.

SELECTION-SCREEN COMMENT 3(70) text-108.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK B2.

SELECTION-SCREEN BEGIN OF BLOCK b3.

SELECT-OPTIONS: s_matnr FOR mara-matnr MODIF ID mi,

s_ernam FOR mara-ernam MODIF ID mi.

SELECTION-SCREEN END OF BLOCK b3.

AT SELECTION-SCREEN OUTPUT.

IF p_icmp IS NOT INITIAL.

LOOP AT SCREEN.

IF screen-group1 = 'MI'.

screen-active = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

IF screen-group1 = 'MI'.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Hope this helps you.

With Regards,

Khan

10 REPLIES 10

Former Member
0 Kudos
135

Hi

TABLES: bkpf.

PARAMETERS: p_chk AS CHECKBOX USER-COMMAND chk.

SELECT-OPTIONS: s_bukrs FOR bkpf-bukrs MODIF ID aaa,
                s_belnr FOR bkpf-belnr MODIF ID aaa.

AT SELECTION-SCREEN OUTPUT.

  CHECK p_chk IS INITIAL.

  LOOP AT SCREEN.
    IF screen-group1 = 'AAA'.
      screen-active = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Max

Former Member
0 Kudos
135

Hi,

U code it like below:

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF CH_TOT = 'X'.

IF SCREEN-GROUP1 = 'RBG'.

SCREEN-INPUT = 1.

ENDIF.

ELSE.

IF SCREEN-GROUP1 = 'RBG'.

SCREEN-INPUT = 0.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Hope it works!!

Regards,

Pavan

Edited by: vishnu Pavan on Apr 9, 2009 2:14 PM

Former Member
0 Kudos
135

Hi Kittu...

The selection screen that you want to display in the Block 3, put it in as a Screen Group, looop at screen and check if the Check Box(P_ICMP) is not Initial and screen-group = ' G1'(Block 3 screen group) den activate the Screen Group of Block 3.

i.e. screen-active = '1'.

screen-input = '1'.

Info might be helpful.

Regards

Karan Arya

Former Member
0 Kudos
135

Hi Kittu,


 
PARAMETERS: p_chk AS CHECKBOX USER-COMMAND chk Default.
 
SELECT-OPTIONS: s_bukrs FOR bkpf-bukrs MODIF ID aaa,
                s_belnr FOR bkpf-belnr MODIF ID aaa.
 
AT SELECTION-SCREEN ON p_chk.         "<<<Use this on field it will work
 
  CHECK p_chk IS INITIAL.
 
  LOOP AT SCREEN.
    IF screen-group1 = 'AAA'.
      screen-active = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Regards,

Prabhduas

Former Member
0 Kudos
135

Hi Kittu,

check below code

PARAMETERS: test1(10) TYPE c MODIF ID sc1,

test2(10) TYPE c MODIF ID sc2,

test3(10) TYPE c MODIF ID sc1,

test4(10) TYPE c MODIF ID sc2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 'SC1'.

screen-intensified = '1'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

IF screen-group1 = 'SC2'.

screen-intensified = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP

tc

saji

RoySayak
Active Participant
0 Kudos
135

Hi Kittu,

Select Options of Block 3.

SELECT-OPTIONS: <Select Option> FOR <field name1> MODIF ID A1,
                <Select Option> FOR <field name2> MODIF ID A1.

AT SELECTION-SCREEN OUTPUT.
 
  CHECK P_ICMP IS INITIAL.
 
  LOOP AT SCREEN.
    IF screen-group1 = 'A1'.
      screen-active = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Regards,

Sayak

Former Member
0 Kudos
136

Hi,

SELECTION-SCREEN BEGIN OF BLOCK B1.

SELECT-OPTIONS: s_vkorg1 FOR ce1rh03-vkorg, "Sales org

s_vtweg1 FOR ce1rh03-vtweg, "Dist Channel

s_spart1 FOR ce1rh03-spart, "Division

s_kndnr2 FOR ce1rh03-kndnr,

s_vrgar1 FOR ce1rh03-vrgar,

s_mtart1 FOR ce1rh03-mtart,

s_fkart1 FOR ce1rh03-fkart.

SELECTION-SCREEN END OF BLOCK B1.

This is a Block(b1) of select options that I have on my screen.

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-110.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS P_ICMP AS CHECKBOX USER-COMMAND FLAG.

SELECTION-SCREEN COMMENT 3(70) text-108.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK B2.

SELECTION-SCREEN BEGIN OF BLOCK b3.

SELECT-OPTIONS: s_matnr FOR mara-matnr MODIF ID mi,

s_ernam FOR mara-ernam MODIF ID mi.

SELECTION-SCREEN END OF BLOCK b3.

AT SELECTION-SCREEN OUTPUT.

IF p_icmp IS NOT INITIAL.

LOOP AT SCREEN.

IF screen-group1 = 'MI'.

screen-active = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

IF screen-group1 = 'MI'.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Hope this helps you.

With Regards,

Khan

Former Member
0 Kudos
135

Hi Kittu,

tables: vbak.

SELECTION-SCREEN BEGIN OF BLOCK B1.

SELECT-OPTIONS: s_vkorg1 FOR vbak-vkorg, "Sales org

s_vtweg1 FOR vbak-vtweg, "Dist Channel

s_spart1 FOR vbak-spart. "Division

SELECTION-SCREEN END OF BLOCK B1.

*This is a Block(b1) of select options that I have on my screen.

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT1.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS P_ICMP AS CHECKBOX USER-COMMAND FLAG.

SELECTION-SCREEN COMMENT 3(70) text.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK B2.

SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT2.

SELECT-OPTIONS: s_vkorg FOR vbak-vkorg MODIF ID MOD, "Sales org

s_vtweg FOR vbak-vtweg MODIF ID MOD. "Dist

SELECTION-SCREEN END OF BLOCK B3 .

initialization.

TEXT1 = 'Block2'.

TEXT2 = 'Block3'.

text = 'ChkBox'.

at selection-screen output.

loop at screen.

if P_ICMP = 'X' and screen-group1 = 'MOD'.

screen-active = '0'.

modify screen.

else.

screen-active = '1'.

endif.

endloop.

0 Kudos
135

Hi Kittu,

I think you will be able to use this piece of code as it is. You will just have to change the select option variables according to your requirement.

SELECTION-SCREEN BEGIN OF BLOCK b1.

SELECT-OPTIONS: s_vkorg1 FOR ce1rh03-vkorg, "Sales org

s_vtweg1 FOR ce1rh03-vtweg, "Dist Channel

s_spart1 FOR ce1rh03-spart, "Division

s_kndnr2 FOR ce1rh03-kndnr,

s_vrgar1 FOR ce1rh03-vrgar,

s_mtart1 FOR ce1rh03-mtart,

s_fkart1 FOR ce1rh03-fkart.

SELECTION-SCREEN END OF BLOCK b1.

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

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS p_icmp AS CHECKBOX USER-COMMAND flag.

SELECTION-SCREEN COMMENT 3(70) text-108.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN BEGIN OF BLOCK b3.

SELECT-OPTIONS: s_vkorg1 FOR ce1rh03-vkorg MODIF ID aaa,

s_vtweg1 FOR ce1rh03-vtweg MODIF ID aaa.

SELECTION-SCREEN END OF BLOCK b3.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF p_icmp = 'X' AND screen-group1 = 'AAA'.

screen-active = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Former Member
0 Kudos
135

Hello All,

Thank you very much for your suggestions!

They were really helpful and it fixed my issue!

Have a good day!

Regards,

Krishna