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: 

Menu items

Former Member
0 Kudos

Hi,

I have one requirement like on selection screen i have two radibuttons.if user select one radio button some of the menu items shoud be disable and user select second radio button thay items should be enable .please give me the example it is on selection screen.

Thanks,

Hari.

7 REPLIES 7

Former Member
0 Kudos

Hi Harinath,

Check this sample code.

Sample :

  • Selection screen

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

PARAMETERS : rb3 RADIOBUTTON GROUP rg_b USER-COMMAND rg_b,

ps_file TYPE ibipparms-path MODIF ID ps,

rb4 RADIOBUTTON GROUP rg_b,

as_file TYPE ibipparms-path MODIF ID as.

SELECTION-SCREEN END OF BLOCK b1.

  • For toggling

LOOP AT SCREEN.

IF screen-group1 = c_ps.

IF rb3 = c_x.

screen-active = c_01.

ELSE.

screen-active = 0.

ENDIF.

ENDIF.

IF screen-group1 = c_as.

IF rb4 = c_x.

screen-active = c_01.

ELSE.

screen-active = 0.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Hope this will resolve your Query.

Reward all the helpful answers.

Regards

Nagaraj T

Former Member
0 Kudos

Hi Harinath,

pls check this.

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.

kindly reward if helpful.

cheers,

Hema.

Former Member
0 Kudos

Hi,

Is it Module pool OR Report?

0 Kudos

Dear,

it is report (i want to modify menu(Applications tool bar items not screen fields)

0 Kudos

Hi,

In report also you can set pf-status. Try like,

data: itab type table of char5.

if r_button1 = 'X'.

append 'CODE1' to itab1.

set pf-status status excluding itab.

elseif r_button = 'X'.

append 'CODE2' to itab1.

set pf-status status excluding itab.

....

endif.

where CODE represents the fuction code of the menu item.

Hope this helps.

Regards,

Renjith Michael.

Edited by: Renjith Michael on Jan 10, 2008 5:39 PM

0 Kudos

hi harinath,

even this example will be helping you

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETERS: P_WERKS LIKE MARC-WERKS OBLIGATORY VALUE CHECK MODIF ID S1.

SELECT-OPTIONS: S_EBELP FOR EKPO-EBELP OBLIGATORY NO INTERVALS NO-EXTENSION MODIF ID S2.

SELECTION-SCREEN END OF BLOCK B1.

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

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: R_PLANT RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND UC1.

SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R_PLANT.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS:R_PO RADIOBUTTON GROUP G1.

SELECTION-SCREEN COMMENT 5(20) TEXT-004 FOR FIELD R_PO.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK B2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF R_PLANT = 'X' AND SCREEN-GROUP1 = 'S2'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

IF R_PO = 'X' AND SCREEN-GROUP1 = 'S1'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Reward points if useful

thanks

swaroop

Former Member
0 Kudos

Hi peeleti,

Have a look on this logic.It will help you out.

If you want to do it using 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.

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

Hope it will solve your problem.

Reward points if useful

thanks

swaroop