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 modify selection-screen

Former Member
0 Likes
898

sorry but this funda has never been clear to me

can you please help me out

on my selection screen i have 3 fields

1 employee

2. start date

3. end date

and two radio buttons

1. employee wise report

2.detailed report

now when i select the employee wise report then it should display the employee field on the selection screen

and if i select the detailed report radio button then the selection screen should have only two fields that is start and end date

tere should be no employee field on the selection screen then

i have given a screen modif id sc1 to to the employee

and tried one or two ways but no use

can anyone please help me out.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
643

Hi

SELECT-OPTIONS: s_pernr FOR pa0001-pernr,

s_begdt FOR pa0001-begda,

s_enddt FOR pa0001-endda.

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

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: pa_emp RADIOBUTTON GROUP g1 USER-COMMAND uc01 DEFAULT 'X'.

SELECTION-SCREEN COMMENT 3(60) text-004 FOR FIELD pa_emp.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: pa_det RADIOBUTTON GROUP g1 .

SELECTION-SCREEN COMMENT 3(60) text-005 FOR FIELD pa_det.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK b3.

In At selection-Screen event write th code:

IF pa_det EQ 'X'.

LOOP AT SCREEN.

IF screen-name = 'S_BEGDT' or screen-name = 'S_ENDDT' .

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ELSEIF pa_rep EQ gc_x.

LOOP AT SCREEN.

IF screen-name = 'S_PERNR'.

screen-input = 0.

ENDIF.

Modify screen.

ENDLOOP.

Reward points if useful

Regards

Anji

6 REPLIES 6
Read only

Former Member
0 Likes
643

Hi Ashish,

The following thread will help you about how to modify the screen dynamically.

http://www.sapdevelopment.co.uk/reporting/selscr/selscr_loopscreen.htm

Warm Regards,

Vijay

Read only

Former Member
0 Likes
643

Hi,

U define seperate Selection screen Fields for employee field & for Start & end date Field.

Regards,

Padmam.

Read only

Former Member
0 Likes
643

hi check this code

this code actually removes the block data when check box is checked and shows the block on deselecting it.U can change the chk box condition according to ur requirement.

SELECTION-SCREEN BEGIN OF BLOCK FPATH .

SELECTION-SCREEN : BEGIN OF LINE .

PARAMETERS : p_EU AS CHECKBOX USER-COMMAND CHK MODIF ID BL1.

SELECTION-SCREEN : COMMENT 4(15) TEXT-106 FOR FIELD P_EU.

SELECTION-SCREEN : END OF LINE .

SELECTION-SCREEN : BEGIN OF LINE.

PARAMETERS : P_LOCL AS CHECKBOX MODIF ID BL1.

SELECTION-SCREEN : COMMENT 4(15) TEXT-002 FOR FIELD P_LOCL.

SELECTION-SCREEN POSITION 33.

PARAMETER: P_FILE1 LIKE RLGRAP-FILENAME MODIF ID BL1.

SELECTION-SCREEN : END OF LINE .

SELECTION-SCREEN : BEGIN OF LINE .

PARAMETERS: P_APPL AS CHECKBOX DEFAULT 'X' MODIF ID BL1.

SELECTION-SCREEN : COMMENT 4(13) TEXT-003 FOR FIELD P_APPL.

SELECTION-SCREEN POSITION 33.

PARAMETER: FNAM2 LIKE RLGRAP-FILENAME MODIF ID BL1.

SELECTION-SCREEN : END OF LINE .

SELECTION-SCREEN END OF BLOCK FPATH.

SELECTION-SCREEN BEGIN OF BLOCK FPATH1 .

SELECTION-SCREEN : BEGIN OF LINE .

PARAMETERS : p_APAC AS CHECKBOX MODIF ID BL2 USER-COMMAND CH.

SELECTION-SCREEN : COMMENT 4(15) TEXT-105 FOR FIELD P_APAC.

SELECTION-SCREEN : END OF LINE .

SELECTION-SCREEN : BEGIN OF LINE.

PARAMETERS : P_LOCL1 AS CHECKBOX MODIF ID BL2.

SELECTION-SCREEN : COMMENT 4(15) TEXT-102 FOR FIELD P_LOCL1.

SELECTION-SCREEN POSITION 33.

PARAMETER: P_FILE11 LIKE RLGRAP-FILENAME MODIF ID BL2.

SELECTION-SCREEN : END OF LINE .

SELECTION-SCREEN : BEGIN OF LINE .

PARAMETERS: P_APPL1 AS CHECKBOX DEFAULT 'X' MODIF ID BL2.

SELECTION-SCREEN : COMMENT 4(13) TEXT-103 FOR FIELD P_APPL1.

SELECTION-SCREEN POSITION 33.

PARAMETER: FNAM21 LIKE RLGRAP-FILENAME MODIF ID BL2.

SELECTION-SCREEN : END OF LINE .

SELECTION-SCREEN END OF BLOCK FPATH1.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF P_EU = 'X' AND SCREEN-GROUP1 = 'BL2'.

SCREEN-ACTIVE = 0.

ENDIF.

IF P_APAC = 'X' AND SCREEN-GROUP1 = 'BL1'.

SCREEN-ACTIVE = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Read only

Former Member
0 Likes
643

Hi Ashish,

Use <b>Loop at screen</b> n inside tht set the selection-screen parameters as visible and invisible according to ur radiobutton value.

Loop at screen.

if radio1 = 'X'.

if screen-fieldname = 'Employee'.

screen-visible = 0.

endif.

endif.

endloop.

<b>plz reward points if helpful or if it solves ur query.</b>

Thanks

Chinmay

Read only

former_member196299
Active Contributor
0 Likes
643

hi Ashish ,

Why d't you try like this, create 2 screens lets say 100 n 200 . 100 has got only one field employee and 200 has got 2 fields start date and end date .

in your selection screen keep only the radio buttons , and then check the condition , when 'employee wise report' the call screen 100 and when 'detailed report' call screen 200 .. and write the logic of the screens accordingly ..

as if you use a parameter statement for the 3 fields then you can not avoid them from the display in the selection screen ..

I hope that logic will work !

Regards,

Ranjita.

Read only

Former Member
0 Likes
644

Hi

SELECT-OPTIONS: s_pernr FOR pa0001-pernr,

s_begdt FOR pa0001-begda,

s_enddt FOR pa0001-endda.

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

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: pa_emp RADIOBUTTON GROUP g1 USER-COMMAND uc01 DEFAULT 'X'.

SELECTION-SCREEN COMMENT 3(60) text-004 FOR FIELD pa_emp.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: pa_det RADIOBUTTON GROUP g1 .

SELECTION-SCREEN COMMENT 3(60) text-005 FOR FIELD pa_det.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK b3.

In At selection-Screen event write th code:

IF pa_det EQ 'X'.

LOOP AT SCREEN.

IF screen-name = 'S_BEGDT' or screen-name = 'S_ENDDT' .

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ELSEIF pa_rep EQ gc_x.

LOOP AT SCREEN.

IF screen-name = 'S_PERNR'.

screen-input = 0.

ENDIF.

Modify screen.

ENDLOOP.

Reward points if useful

Regards

Anji