‎2010 Apr 23 7:39 AM
Hello Friends,
I have a parameter field on selection screen and it is optional.
If user enters any data on parameter, then I have to retrieve only corresponding value to the parameter from table.
If user does not enter any data in parameter, then I have to fetch all the records.
I want to convert this to selection-option.
please let me know....
‎2010 Apr 23 7:45 AM
You can use a range for that......
PARAMETERS: p_test TYPE c.
IF p_test IS NOT INITIAL.
r_test-sign = 'I'.
r_test-option = 'EQ'.
r_test-low = p_test.
APPEND r_test.
ENDIF.
If no value is entered in parameter then don't populate the range and it will get all the possible values.
‎2010 Apr 23 7:45 AM
Hi,
Instead of converting why cant you do like this ,
if P_field is initial.
select * from <table>
into table itab.
else.
select * from <table >
into table itab
where field = p_field.
endif.
You can use select-option as parameter in this way,
Select-options : s_field for wa-field no intervals no-extension.
Regads,
Raghava Channooru
‎2010 Apr 23 7:47 AM
Hi,
Please see the SCN Rules before Posting
With Regards,
Sumodh.P
‎2010 Apr 23 12:45 PM
Welcome to SDN.
This is a very basic question that you can solve yourself. Please try and search for answers before posting questions, as we are trying to cut down on the redundancy in these forums.
Thread locked.
Thomas