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

Reagrding Selection Screen

Former Member
0 Likes
875

Hi All,

I have 3 fileds on my Selection Screen.

2 are Select Options for date &

1 is Parameter which takes input as differece

bewteen 2 dates.

I want to disable the Parameter option if there is data in

both the Select Option fields(Both date are present)

before the execution of program...

All thye 3 fields are in same selection block.

Pts would be rewarded.

Thanks & Reagrds

Jitendra

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
856

Hello Jithendra,

The particualr functionality cannot be implemented in SAP.

Because disabling of the input field is possible only if an event is triggered.

So for disabling the parameter input,you have to press atleast ENTER.

If you ar OK with pressing the enter then u can code as shown below.

Let s1_date and s2_date be two se;ect options and p_diff the parameter

AT SELECTION-SCREEN.

if s1_date is not initial and s2_date is not initial .

loop at screen.

if screen-name = 'P_DIFF'.

screen-input = 0.

modify screen

endif.

endloop.

endif.

Reward if useful

Thanks Arjun

Hi All,

I have 3 fileds on my Selection Screen.

2 are Select Options for date &

1 is Parameter which takes input as differece

bewteen 2 dates.

I want to disable the Parameter option if there is data in

both the Select Option fields(Both date are present)

before the execution of program...

All thye 3 fields are in same selection block.

Pts would be rewarded.

Thanks & Reagrds

Jitendra

7 REPLIES 7
Read only

Former Member
0 Likes
856

AT SELECTION-SCREEN.

IF first SELCT option IS NOT INITIAL

AND second select option IS NOT INITIAL

AND screen-name = ‘third pram’.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

Read only

Former Member
0 Likes
856

Hi,

See with out adding radio button you can not achieve this functionality here.

Because without firing any event you can not validate whether both dates has data or not.

If you add radio button functionnality by clicking on radio button it will trigger the event and validation will perform....

Read only

Former Member
0 Likes
856

Hi

You can disable them in also u have to go for user command

Parameter : p_test type c user-command usr1 .

At selection screen output event

There Loop at screen

Check if data is there in both the select options..

make screen input zero

endloop

Regards

Hitesh

Reward if helpful

Read only

Former Member
0 Likes
856

After input you need some action , or else it is not possible.

That is possible only with the check box or radiobutton or some button.

Read only

Former Member
0 Likes
856

selection-screen:begin of block bl1.

select-options: s_date1 for sy-datum,

s_date2 for sy-datum.

parameters: p_field type c modif id MD1.

selection-screen: end of block bl1.

at selection-creen output.

loop at screen.

if screen-group1 = 'MD1'.

if not s_date1[] is initial and

not s_date2[] is initial.

screen-input = 0.

screen-active = 0.

modify screen.

endif.

endif.

endloop.

Read only

Former Member
0 Likes
856

Hi,

In PAI, set flag = 'X' , if both the select options are filled.

then in PBO, check the flag. if it is marked then do loop at screen and at parameters name make the screen.output eq 0.

hope it will solve ur problem.

Thanks,

Parul.

Read only

Former Member
0 Likes
857

Hello Jithendra,

The particualr functionality cannot be implemented in SAP.

Because disabling of the input field is possible only if an event is triggered.

So for disabling the parameter input,you have to press atleast ENTER.

If you ar OK with pressing the enter then u can code as shown below.

Let s1_date and s2_date be two se;ect options and p_diff the parameter

AT SELECTION-SCREEN.

if s1_date is not initial and s2_date is not initial .

loop at screen.

if screen-name = 'P_DIFF'.

screen-input = 0.

modify screen

endif.

endloop.

endif.

Reward if useful

Thanks Arjun