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

Clearing Select option value

Former Member
0 Likes
2,255

hi all,

i have given the selectoptions as

so_sales for usr02-bname default sy-uname.

since i have given the default as sy-uname it will take the corresponding login id as userid when ever the user is executing the report. when the user is trying to change some other userid in so_sales i need to get the F4 help for another field called so_zonm . since the value is not getting cleared i couldnt able to view the F4 help for the so_zonm.

kindly pls throw light on this.

thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,222

HI Shantha,

try this

at selection-screen on value request so_sales-low. "use the low here

Refresh so_sales .

perform f4.

with out refresh data will append so always first value is populating (first value is Default value).

Regards,

raja

19 REPLIES 19
Read only

Former Member
0 Likes
2,222

In Which Event you are trying to do this?

Try to check the order of Events and place the code at the appropriate location

Thanks,

Babu Kilari

Read only

0 Likes
2,222

at selection-screen on value request so_sales.

perform f4.

Read only

Former Member
0 Likes
2,222

Hi

Can i know more details about so_zonm?

Please check search help is available or not in field zonm.

Read only

0 Likes
2,222

i have created f4 help for the field so_zonm separately using the FM . the problem is if i am able to clear the values then i am able to get the f4 help. i checked in the debug mode as well

Read only

0 Likes
2,222

In the initialization event you can provide space for low and high of select-option

Read only

Former Member
0 Likes
2,222

HI Shantha,

try below

at selection-screen on value request so_sales-low.  "use the low here
perform f4.

now you will get the F4 help.

thanks!

Read only

0 Likes
2,222

i am sorry i have done like below

so_sales FOR usr02-bname NO INTERVALS DEFAULT sy-uname

i have not attached f4 as i have told before

Read only

0 Likes
2,222

hi shantha,

i think the problem which i understood is when the user changes the value in so_sales, then there will be multiple records get created in so_sales because of which u r not able to populate the values in the other field..

to avoid that,

in at selection-screen output.

clear so_sales[].

so_sales1-low = so_sales-low.

so_sales1-high = so_sales-high.

so_sales1-sign = 'I'.

so_sales1-option = 'BT'.

append so_sales1.

clear so_sales1.

based on above so_sales1 populate the other field in at selection-screen value request using FM since it will have only one record everytime.

hope this will solvve ur problem.

Rgds.,

subash

Read only

Former Member
0 Likes
2,223

HI Shantha,

try this

at selection-screen on value request so_sales-low. "use the low here

Refresh so_sales .

perform f4.

with out refresh data will append so always first value is populating (first value is Default value).

Regards,

raja

Read only

0 Likes
2,222

if the user is entering the value directly without pressing the F4 help then the value is not getting cleared

Read only

0 Likes
2,222

hi,

use AT SELECTION-SCREEN OUTPUT event to clear the previous values...

Rgds.,

subash

Read only

0 Likes
2,222

no totally the value is getting cleared

Read only

0 Likes
2,222

sorry u should place that code in at selection-screen event not output.

ok on clear of so_sales[], u r saying it is totally cleared..

then did u checked what is the value present in so_sales-low and so_sales-high in AT SELECTION-SCREEN event.

Read only

0 Likes
2,222

the defaulted value is coming.

Read only

0 Likes
2,222

can you put ur sample code here....

Read only

0 Likes
2,222

please paste ur code here...

Read only

Former Member
0 Likes
2,222

Try this,

At selection-screen on value request so_sales-low.

Clear so_sales-low.

Perform f4.

Regards,

Joan

Read only

0 Likes
2,222

selection screen:

SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-t01.

SELECT-OPTIONS: so_quost FOR tj30t-txt30 NO INTERVALS OBLIGATORY, "Quote status

so_date FOR vbak-erdat OBLIGATORY, "Quote created date

so_regi FOR t171-bzirk NO INTERVALS, "Region/territory

so_sales FOR usr02-bname NO INTERVALS DEFAULT sy-uname , "Sales person

so_kunnr FOR kna1-kunnr NO INTERVALS, "Sold to Party

so_cust FOR t151-kdgrp NO INTERVALS, "Customer Groups

so_zonm FOR usr02-bname NO INTERVALS. " Zone Manager

SELECTION-SCREEN END OF BLOCK blk1.

here based upon so_sales need to populate f4 help for so_zonm. since here i have given default values as sy-uname after the report is executed when the user tries to change the so_sales from xxs to xxy the value xxs only its taking. its not clearing the falue.

for so_zonm i have created f4 as below.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_zonm-low.

PERFORM get_f4_zonemanager.

Read only

0 Likes
2,222

hi,

1) so for the first time so_sales has value XXS( default value)

based on this value so_zonm values are populated on F4.

since XXS is default as per your logic it will display the F4 values for so_zonm.

2) so now so_sales has been changed to XXY , here so_sales-low holds value XXY.

now u add this code before

select-options: so_sales1 FOR usr02-bname no display.

initialization event.

so_sales1[] = so_sales[].

at selection-screen output.

clear so_sales1[].

so_sales1-low = so_sales-low.

so_sales1-high= so_sales-high.

so_sales1-sign = 'I'.

so_sales1-option= 'BT'.

append so_sales1.

clear so_sales1.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_zonm-low.

PERFORM get_f4_zonemanager.

inside perform , under select statement where condition use so_sales1 instead of so_sales.

Rgds.,

subash