‎2009 Feb 23 3:21 PM
Hi folks,
In my report i have five selections screen feilds.for each selection i have different selection criteria.for each selection -criteria i have to write seprate code.if i select first feild i want that selection criteria only.if i select second one i want that particular selection only.how can i achieve this.for this iam trying to write in seprate form for each selection but iam getting the first selection data only for all the selections.
please do needful.
Thx in advance,
Neelima.N
‎2009 Feb 23 3:28 PM
Hi,
write the code as
AT SELECTION SCREEN ON <fieldname>
for 5 fields .
Regards,
jaya
‎2009 Feb 24 5:38 AM
Hi,
can you please provide me sample coding.
Do needful.
Thanks & Regards,
Neelima.N
‎2009 Feb 24 5:46 AM
check the following code
selection-screen begin of block a with frame title text-001.
select-options: mydate for sy-datum no-extension obligatory.
parameters: sel1 radiobutton group a,
sel2 radiobutton group a,
sel3 radiobutton group a,
sel4 radiobutton group a,
selection-screen end of block a.
"<----End of selection screen ----------->
start-of-selection.
if sel1 = 'X'.
" Ur code for selection
elseif sel2 = 'X'.
" Ur code for selection
elseif sel3 = 'X'.
" Ur code for selection
elseif sel4 = 'X'.
" Ur code for selection
endif.
‎2009 Feb 24 5:55 AM
Hi,
My requirement is i hav five selection criteria.for example if i enter material number regarding material number data has to print.if i enter manufacturer number,regarding manufacturer number data has to print.for each selection the data is changing.
how to print the data.bcoz for each selection the data is changing.
i have to select the data from all together 4 tables.so iam using joins.
how can i achieve this.
Thanks in advance,
Neelima.N
Edited by: neelima natta on Feb 24, 2009 6:56 AM
‎2009 Feb 24 5:52 AM
Hi Neelima,
If you have to select the data from same table with different conditions for different selection fields, you can build dynamic query depending upon slection criteria. It should solve your problem.
You populate internal table and pass it in the where clause.
data :begin of querytab occurs 0 with header line,
query(1028) type c,
end of querytab.
***Popultae querytab.
IF not p_1 is initial.
*populate querytab
elseif not p_2 is initial.
*populate querytab
elseif not p_3 is initial.
*populate querytab
elseif not p_4 is initial.
*populate querytab
elseif not p_5 is initial.
*populate querytab
endif.
select *
from dbtab
where ( querytab )
Regards,
Anil.
‎2009 Feb 24 5:55 AM
please put code of the selection screen block, then we will get an idea
‎2009 Feb 25 7:49 AM