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

Generate a report based on input fields

Former Member
0 Likes
1,258

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

4 REPLIES 4
Read only

Former Member
0 Likes
802

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...

Read only

Former Member
0 Likes
802

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

Read only

hymavathi_oruganti
Active Contributor
0 Likes
802

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.

Read only

Former Member
0 Likes
802

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**