‎2008 May 22 9:16 AM
We have a parameter and select option in Selection Screen, by using the parameter and select option in the select query, with out passing the any values to the Parameter and SO, how we will get the records?
‎2008 May 22 9:19 AM
Hi,
1.By defaultlt assigning the values to the selection-options and Parameters.
2.By creating the variant and executing with variant.
Regards,
Shiva kumar
‎2008 May 22 9:19 AM
If UR are writing a select ..
select * from <table>
where parameter <> p_param
and sel_optuions in SO.
You'll get data ...
‎2008 May 22 9:20 AM
hi ..
but i am not passing values in select options or parameter
‎2008 May 22 9:23 AM
if the SO and parameters are blank all the data realted to that data element will be in
‎2008 May 22 9:22 AM
Hi,
Without passing Parameter and SO, we can get data, mean Select query will fetch all records from particular table.
Ex.
REPORT Z_VER_RPG6.
data : begin of itab occurs 1,
kunnr type kunnr,
name1 type name1,
ladn1 type land1,
end of itab.
start-of-selection.
select kunnr name1 land1 into table itab from kna1.
loop at itab.
write:/ itab-kunnr, itab-name1, itab-ladn1.
endloop.
Regards,
Vishvesh
‎2008 May 22 9:22 AM
hi check this..
if the parameter is empty if will not work in the select statement..you can get the values for the select options with empty structures..
check this..
tables:mara .
data: begin of itab occurs 0,
matnr like mara-matnr,
end of itab .
parameters:p_matnr like mara-matnr.
select matnr from mara into table itab
where matnr = p_matnr.
loop at itab.
write:/ itab-matnr.
endloop.
it will not fetch data..
for select-options
tables:mara .
data: begin of itab occurs 0,
matnr like mara-matnr,
end of itab .
select-options:s_matnr for mara-matnr.
select matnr from mara into table itab
where matnr in s_matnr.
loop at itab.
write:/ itab-matnr.
endloop.
it will fetch data..
regards,
venkat
‎2008 May 22 9:33 AM
Hi ,
Use this statement,
Select * from <table name>
into table <internal table>
where <fieldname> in <select-option name> and
<fieldname> = <parameter name> .
Reward points if useful.
Thanks,
Khan.