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

Data base statement

Former Member
0 Likes
1,275

Dear,

My requirement is, I need to fetch data from 4 different table, means there is no relation between each table. Then how I ll fetch the data from the table ?

I want to fetch some  fields from each table and finally i want to show all field with their values in output  list .

Please suggest me. ?

Kind Regards,

Ajit sarangi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,239

Dear as I said,

The report already showing 22 field s from  3 tables and these 3 tables has the relations but now they want to show more 14 fields from completely different 4 tables. lets one eg...

now current output is from A B  C Table..A B C has relations..

Req---

o/p is -- A B C D E F G table but different is D E F G has no relation with each other and also no relation withh A B C table. So how I ll fetch data from there?

Regards,

Ajit

11 REPLIES 11
Read only

former_member188827
Active Contributor
0 Likes
1,239

How will you combine the data in output when there is no relationship between the tables? Can you be more specific on what are the names of table from which you need to fetch data and what exactly will your report show?

Regards

Read only

former_member187748
Active Contributor
0 Likes
1,239

Hi Ajit,

as far as i consern, you will have to call your table based on the selection screen fields.

If yes, then you can call your each table separately, based on selection screen fields,

otherwise tell me is this feasible to call a table, having no relation with each other.

Read only

Former Member
0 Likes
1,239

what are all the tables and what are all the fields?

without any relation, it is not possible! dig yourself or try to find the mapping...

Read only

Former Member
0 Likes
1,239

Dear,

Actually I have  4 custom tables where company has maintained some field and values.They have one report where they are showing 22 fields but now they want more 14 fields from 4 tabls but there is no relation between each table.

So how I ll start my code  ?

Regards,

Ajit

Read only

0 Likes
1,239

HI Ajit,

if  already 22 fields are showing then , what is the problem in showing other new 14 fields,

is these 14 fields are from any fifth table ?

Please see those 4 tables from they are showing data for 22 fields, and take these new data

same from 4 tables (i hope that fields will exists in 4 tables).

So whats the problem ?

Are you saying that you have to show new 14 fields from new 4 custom tables ?

Please specify your questions, its not clear.

Read only

0 Likes
1,239

Hello Ajit,

There has to be some relation available.

For ex : You need to fetch and display 4 fields from 3 Tables say MARA, VBAK, VBAP.

So you fetch required record from VBAK since it is header table. Then based on material for the fetched vbeln you would fetch material details fields from MARA and item level details from VBAP for the fetch VBELN values of VBAK.

If there is not relation between 4 custom tables then it means there is no key field on which you have to arrange your output. This woudnt make any sense!

Please post your requirement more accurately.

Read only

Former Member
0 Likes
1,241

Dear as I said,

The report already showing 22 field s from  3 tables and these 3 tables has the relations but now they want to show more 14 fields from completely different 4 tables. lets one eg...

now current output is from A B  C Table..A B C has relations..

Req---

o/p is -- A B C D E F G table but different is D E F G has no relation with each other and also no relation withh A B C table. So how I ll fetch data from there?

Regards,

Ajit

Read only

0 Likes
1,239

then ask the client how do they wish to combine data. Extract some of the data from those 4 tables and ask the client how would these 14 fields be displayed against which row of report.

Regards

Read only

0 Likes
1,239

Hi Ajit,

talk to your concern person and tell him that, if there will be no dependencies in between the old table fields, with new table fields, you are not able to link between them.

I hope they will understands and solve your problems.

Its not possible without having linking in between fields of old and new tables.

Read only

0 Likes
1,239

A B C has relations..This are fetched based on some relations right...remaining D E F G tables are also fetched on some cndtns right , i think the logic to fetch from D E F G is given right , if so u can fetch data from D E F G and put it under one table and then append the two final tables into one table...

regards

A.S

Read only

Former Member
0 Likes
1,239

Thank you all for your valuable answer and time.

Thanks,

Ajit