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

select

Former Member
0 Likes
1,179

hi to all,

help me in this issue,

i need values from two tables to pass into the rfc

can i do like this in first

select * from zsd1 into table it_zsd

where ---

2nd select statemnet

select * from zsd2 appending into table it_zsd

where-----

thanks in advance

kiran kumar.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,115

Hi,

U can append only if the structure of ZSD1 & ZSD2 same.

Cheers.

8 REPLIES 8
Read only

Former Member
0 Likes
1,115

i think in rfc you will be having nly one internal table to be passed, so please use join , so that values fron two tables can be obtained into one internal table.

Read only

Former Member
0 Likes
1,115

You can. I presume the two tables have the sames fields in them.

Read only

Former Member
0 Likes
1,116

Hi,

U can append only if the structure of ZSD1 & ZSD2 same.

Cheers.

Read only

0 Likes
1,115

hi,

both the structures r having differnt fields

thanks in advance

kiran kuamr

Read only

0 Likes
1,115

Then in that case you can not use the select statement as u mentioned.

Use Join or use for all entries or move data from 2 int tables into a single int table

Regards

- Gopi

Read only

former_member404244
Active Contributor
0 Likes
1,115

Hi Kiran,

u cannot do like what u have mentioned...

use to different intenal tables for ZSD1 and ZSD2 database tables.get the data to two internal tables and then pass the two internal tables data to the final internal table .

Regards,

nagaraj

Read only

Former Member
0 Likes
1,115

You cannot do it in that way. Instead fetch the data in two different internal tabels and then append the data from one internal table to othet internal tabel. Pass that internal tabel to RFC.

select * from zsd1 into table it_zsd1.

select * from zsd2 into table it_zsd2.

Loop at it_zsd2 into wa_zsd.

append wa_zsd into it_zsd1.

endloop.

But for this you need to have structures of both tables it_zsd1 and it_zsd2 same, then only you can do in this way.

or the best option is to use join on tables zsd1 and zsd2 if they have some fields in common.

I hope it helps.

Best Regards,

Vibha

*Please mark all the helpful answers

Read only

Former Member
0 Likes
1,115

use for all entries when ever ur selecting the fields from the second table .