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

Clear selection screen

Former Member
0 Likes
1,237

Hi

I have a req of clearing the sel screen contents after the "START OF SELECTION" event.

The req is like this: if no data is selected for the entered values, all the values should be cleared.

Any pointers will helpful.

Regards

Ravish

1 ACCEPTED SOLUTION
Read only

former_member784222
Active Participant
0 Likes
925

Hi,

You can set a flag inside start-of-selection if your select has no value. With this flag you can clear your Selection screen parameters in 'at selection-screen output' event:

example:

parameters: p_some type c.

select-options: s_dat type sy-datum.

data: v_flg type c.

at selection-screen output.

if v_flg = 'X'.

clear: p_some, s_dat,v_flg.

refresh: s_dat.

endif.

start-of-selection.

assuming your select yields nothing.

if sy-subrc ne 0.

v_flg = 'X'.

endif.

Regards,

S. Chandra Mouli.

6 REPLIES 6
Read only

Former Member
0 Likes
925

Hi,

Start-of-selection.

write select statement.

check for sy-subrc, if it is equal to 4. Do as below :

refresh all selection parameters.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
925

Hi Ravish,

Use event AT SELECTION SCREEN OUTPUT.

In this event clear all the screen parameters or select options.

Regards

Sourabh Verma

Read only

Former Member
0 Likes
925

hi Ravish,

after start of selection write the program as

if sy-subrc=4,

refresh select options.

and also instead of at selection screen

write at selection screen output

Reward points if useful

thanks

swaroop

Edited by: Jyothi Swaroop Kaza on Jan 9, 2008 12:34 PM

Read only

Former Member
0 Likes
925

Hi,

You can use CLEAR or REFRESH statements for that.

ex. CLEAR so_field1.

Regards,

Renjith Michael.

Read only

former_member386202
Active Contributor
0 Likes
925

Hi,

Clear all the selection parameteres

Regards,

Prashant

Read only

former_member784222
Active Participant
0 Likes
926

Hi,

You can set a flag inside start-of-selection if your select has no value. With this flag you can clear your Selection screen parameters in 'at selection-screen output' event:

example:

parameters: p_some type c.

select-options: s_dat type sy-datum.

data: v_flg type c.

at selection-screen output.

if v_flg = 'X'.

clear: p_some, s_dat,v_flg.

refresh: s_dat.

endif.

start-of-selection.

assuming your select yields nothing.

if sy-subrc ne 0.

v_flg = 'X'.

endif.

Regards,

S. Chandra Mouli.