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

Re: Selection screen

Former Member
0 Likes
792

Hi experts,

I have to design a selection-screen in such a manner that if i click one radi button r1 , it has to dispaly the selection-screen regarding session method details in the same screen.

Similarly if i click on radio button r2, it has to display the sel screen regarding call transaction method details in the same screen.

I do not want use the include BDCRECX1..

i have used call selection screen statement, but it is working only when if i click on F8.

Can any one suggest the way;

Thanks

Regards

Umakanth

6 REPLIES 6
Read only

Former Member
0 Likes
766

Hi Umakanth, this may be of some help.

Selection screen then it is possible.

for that you have to use AT SELECTION-SCREEN output. event..

See the below code and use it according to your requirement.

======================================

tables: pa0000, pa0001.

parameters: p_rad1 radiobutton group rad1 default 'X' user-command rusr,

p_rad2 radiobutton group rad1.

selection-screen: begin of block blk1 with frame.

select-options: s_pernr for pa0000-pernr modif id ABC.

selection-screen: end of block blk1.

selection-screen: begin of block blk2 with frame.

select-options: s_stat2 for pa0000-stat2 modif id DEF.

select-options: s_werks for pa0001-werks modif id DEF.

selection-screen: end of block blk2.

AT SELECTION-SCREEN output.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'ABC'.

IF p_rad1 = 'X'.

SCREEN-ACTIVE = 1.

ELSE.

SCREEN-ACTIVE = 0.

ENDIF.

MODIFY SCREEN.

ENDIF.

IF SCREEN-GROUP1 = 'DEF'.

IF p_rad2 = 'X'.

SCREEN-ACTIVE = 1.

ELSE.

SCREEN-ACTIVE = 0.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

=====================================

cheers,

Hema.

Read only

Former Member
0 Likes
766

Check the following code for the same purpose:

*----


  • SELECTION SCREEN

*----


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

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

SELECT-OPTIONS s_plant FOR marc-werks NO INTERVALS.

SELECT-OPTIONS s_mat FOR mara-mtart NO INTERVALS.

SELECTION-SCREEN END OF BLOCK b0.

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

PARAMETERS: p_locl RADIOBUTTON GROUP g1

DEFAULT 'X' USER-COMMAND fil,

p_phys RADIOBUTTON GROUP g1,

p_ofile TYPE dxfile-filename LOWER CASE.

SELECTION-SCREEN END OF BLOCK b1.

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

PARAMETERS: p_test RADIOBUTTON GROUP g2

DEFAULT 'X' USER-COMMAND fil,

p_load RADIOBUTTON GROUP g2.

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-005.

PARAMETERS: p_sess RADIOBUTTON GROUP g3 "create session

DEFAULT 'X' USER-COMMAND bdc,

p_ctu RADIOBUTTON GROUP g3. "call transaction

SELECTION-SCREEN END OF BLOCK b3.

SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-006.

PARAMETERS: p_group TYPE apqi-groupid MODIF ID ses.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT (20) text-007 FOR FIELD p_keep.

SELECTION-SCREEN POSITION 32.

PARAMETERS: p_keep AS CHECKBOX .

SELECTION-SCREEN END OF LINE.

PARAMETERS: p_size(4) TYPE n DEFAULT '2000' MODIF ID ses,

p_mode TYPE ctu_params-dismode DEFAULT 'N' MODIF ID ctu,

"A: show all dynpros

"E: show dynpro on error only

"N: do not display dynpro

p_update TYPE ctu_params-updmode DEFAULT 'S' MODIF ID ctu,

"S: synchronously

"A: asynchronously

"L: local

p_error TYPE apqi-groupid MODIF ID ctu .

SELECTION-SCREEN END OF BLOCK b4.

SELECTION-SCREEN END OF BLOCK b5.

REPORT zlppc902

LINE-SIZE 132

LINE-COUNT 65

NO STANDARD PAGE HEADING

MESSAGE-ID zlpp.

*----


  • TABLES / INCLUDES

*----


TABLES: mara,

marc.

INCLUDE: zlppc902_top,

zlppc902_selection_screen,

zlppc902_subroutine.

*----


  • AT SELECTION SCREEN ON VALUE REQUEST

*----


  • Value request for the filename.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ofile.

PERFORM help_audit_file USING p_phys

p_locl

CHANGING p_ofile.

*----


  • AT SELECTION-SCREEN OUTPUT

*----


AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF p_sess = 'X'.

IF screen-group1 = 'CTU'.

screen-active = 0.

ENDIF.

ELSEIF p_ctu = 'X'.

IF screen-group1 = 'SES'.

screen-active = 0.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

*----


  • AT SELECTION-SCREEN

*----


Read only

Former Member
0 Likes
766

Hai.

Check the example.

REPORT zextest595 .

*--- Radiobuttons

PARAMETERS: p_up RADIOBUTTON GROUP a DEFAULT 'X' USER-COMMAND rb,

p_list RADIOBUTTON GROUP a.

PARAMETERS: p_pcfile LIKE rlgrap-filename OBLIGATORY DEFAULT 'C:\'

MODIF ID ccc,

p_pctype LIKE rlgrap-filetype OBLIGATORY DEFAULT 'ASC'

MODIF ID ccc,

p_unix LIKE rlgrap-filename OBLIGATORY DEFAULT '.\'

MODIF ID ccc.

PARAMETERS: p_dir LIKE rlgrap-filename OBLIGATORY DEFAULT '.'

MODIF ID ddd,

p_fp LIKE rlgrap-filename

MODIF ID ddd.

*----


  • AT SELECTION-SCREEN

*----


AT SELECTION-SCREEN OUTPUT.

IF p_up = 'X' .

LOOP AT SCREEN.

CASE screen-group1.

WHEN 'CCC'.

screen-input = 1. "Enable

screen-invisible = 0. "Disable

MODIFY SCREEN.

WHEN 'DDD'.

screen-input = 0.

screen-invisible = 1.

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

ENDIF.

IF p_list = 'X'.

LOOP AT SCREEN.

CASE screen-group1.

WHEN 'CCC'.

screen-input = 0.

screen-invisible = 1.

MODIFY SCREEN.

WHEN 'DDD'.

screen-input = 1.

screen-invisible = 0.

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

ENDIF.

regards.

sowjanya.b

Read only

Former Member
0 Likes
766

Hi,

Try the below code and make the changes

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

PARAMETERS : r_tpp RADIOBUTTON GROUP r1 DEFAULT 'X' USER-COMMAND dummy,

r_loc RADIOBUTTON GROUP r1,

r_lgn RADIOBUTTON GROUP r1.

PARAMETERS : p_tplold TYPE ttds-tplst MODIF ID fil,

p_tplst TYPE ttds-tplst OBLIGATORY DEFAULT '0001' MODIF ID fil,

p_locold TYPE zlmz-locat MODIF ID val,

p_locat TYPE zlmz-locat OBLIGATORY DEFAULT '0888' MODIF ID val,

p_lgnold TYPE lqua-lgnum MODIF ID lgn,

p_lgnum TYPE lqua-lgnum OBLIGATORY MEMORY ID lgn MODIF ID lgn.

SELECTION-SCREEN : END OF BLOCK b1.

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

  • AT SELECTION SCREEN OUTPUT

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

AT SELECTION-SCREEN OUTPUT .

  • Scree

n validation

PERFORM screen_validation_radio.

AT SELECTION-SCREEN.

CHECK sy-ucomm <> gc_dummy.

IF r_tpp = gc_x.

PERFORM validate_tpp USING p_tplold.

PERFORM validate_tpp USING p_tplst.

ELSEIF r_loc = gc_x. "IF r_tpp = c_x

PERFORM validate_loc USING p_locold.

PERFORM validate_loc USING p_locat.

ELSEIF r_lgn = gc_x. "IF r_tpp = c_x

PERFORM validate_lgn USING p_lgnold.

PERFORM validate_lgn USING p_lgnum.

ENDIF."IF r_tpp = c_x

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

  • START OF SELECTION

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

START-OF-SELECTION.

IF r_tpp = gc_x.

PERFORM update_tpp.

ELSEIF r_loc = gc_x."IF r_tpp = c_x

PERFORM update_loc.

ELSEIF r_lgn = gc_x."IF r_tpp = c_x

PERFORM update_lgn.

ENDIF."IF r_tpp = c_x

*eject

*&----


**& Form screen_validation

*&----


    • screen validation for radio buttons

*----


**

**

*----


FORM screen_validation_radio.

CONSTANTS : lc_fil TYPE char3 VALUE 'FIL',

lc_val TYPE char3 VALUE 'VAL',

lc_lgn TYPE char3 VALUE 'LGN',

lc_zero TYPE i VALUE '0',

lc_one TYPE i VALUE '1'.

IF r_tpp = gc_x.

LOOP AT SCREEN.

IF screen-group1 = lc_fil.

screen-active = lc_one.

screen-input = lc_one.

ENDIF."IF screen-group1 = fil

MODIFY SCREEN.

IF screen-group1 = lc_val.

screen-active = lc_zero.

screen-input = lc_zero.

MODIFY SCREEN.

ENDIF."IF screen-group1 = lc_dat

IF screen-group1 = lc_lgn.

screen-active = lc_zero.

screen-input = lc_zero.

MODIFY SCREEN.

ENDIF."IF screen-group1 = lc_lgn

ENDLOOP."LOOP AT SCREEN.

ENDIF."IF r_file = c_x

IF r_loc = gc_x.

LOOP AT SCREEN.

IF screen-group1 = lc_fil.

screen-active = lc_zero.

screen-input = lc_zero.

MODIFY SCREEN.

ENDIF."IF screen-group1 = lc_fil.

IF screen-group1 = lc_lgn.

screen-active = lc_zero.

screen-input = lc_zero.

MODIFY SCREEN.

ENDIF."IF screen-group1 = lc_lgn

IF screen-group1 = lc_val.

screen-active = lc_one.

screen-input = lc_one.

MODIFY SCREEN.

ENDIF."IF screen-group1 = lc_val

ENDLOOP."LOOP AT SCREEN.

ENDIF."IF r_date = c_x

IF r_lgn = gc_x.

LOOP AT SCREEN.

IF screen-group1 = lc_fil.

screen-active = lc_zero.

screen-input = lc_zero.

MODIFY SCREEN.

ENDIF."IF screen-group1 = lc_fil.

IF screen-group1 = lc_val.

screen-active = lc_zero.

screen-input = lc_zero.

MODIFY SCREEN.

ENDIF."IF screen-group1 = lc_dat

IF screen-group1 = lc_lgn.

screen-active = lc_one.

screen-input = lc_one.

MODIFY SCREEN.

ENDIF."IF screen-group1 = lc_val

ENDLOOP."LOOP AT SCREEN.

ENDIF."IF r_lgn = c_x

ENDFORM. " screen_validation

Regards

Shiva

Read only

Former Member
0 Likes
766

Hi,

in ur selection screen add user-command rad to both the radio buttons.........

Cheers,

Will.

Read only

Former Member
0 Likes
766

Thank you all, actually my requirement is bit changed, first it can show all selection-screens and later depending on the radio button selection, i have to choose the selection-screen blocks...

i did it.

First i thought like that it has not to show any selection screen blocks except the 2 radi buttons.

i rewarded the points