‎2007 Sep 21 9:06 AM
Hi,
I would need to create a report depending on the data entered in the 10 fields provided on 1st screen (Its not mandatory to fill in all fields). All the fields are from different database tables. The report must fetch data depending on the criteria and generate a report.
Can someone help me with the code for such a report.
Thanks in advance.
Best Regards,
Preethi
‎2007 Sep 21 9:11 AM
hi,
fetch all the datas from differernt tables using inner join select query and update it in the one internal table.... and then generate the report....
thanks ,
reward points if helpful...
‎2007 Sep 21 9:11 AM
Hi Preethi,
Take the values from te input fields and select the data from DB tables by passing input fields as selection criteria and try to link the input fields to get make inner joins for the tables while selecting the data.
Regards,
Ravi G
‎2007 Sep 21 9:16 AM
hi preeti,
i think u r pretty new to abap. . abap 21 days book will also help u.
the following link refres to abap 21 days.
http://cma.zdnet.com/book/abap/index.htm
i am giving an exmaple for two fields.
parametrs: v_matnr like mara-matnr,
v_mtart like mara-mtart.
*define internal table
select <data> from <dabtab> into <itab>
where matnr = v_matnr and
mtart = v_mtart.
‎2007 Sep 21 9:30 AM
Hi,
You can declare the fileds as select options with no-intervals no extention.
This will act as a range and you can use them in where clause.
like : where Matnr IN s_matnr " s_matnr is ur select option
even if user do not enter anything it will fetch all data from database since passing an empty range in where clause will fetch all data from database
rewar if this is your question**