how can i fetch the records of 3 tables with a single select
query,without using join.
Answers were Sorted based on User's Feedback
Answer / pratima
You can create a View table and use only one select
statement.
Is This Answer Correct ? | 16 Yes | 1 No |
Answer / uma
SORRY I CAN'T SAY BECAUSE I KNOW ONLY
VIEWS (OR)
INTERNAL TABLE (OR)
STRUCTURE
FETCH THE RECORDS OF 3 TABLES WITH A SINGLE SELECT .
Is This Answer Correct ? | 9 Yes | 0 No |
Answer / m.kmart
If the creteria is to use "Single" select query, then
create a view on the 3 tables in the question and inturn
write a single select satement.
Is This Answer Correct ? | 6 Yes | 2 No |
Answer / naveen
we can use alternative to joins are
1.for all entries
2.views.
Is This Answer Correct ? | 2 Yes | 2 No |
Answer / anurag joshi
records can be fetched from 3 tables using a single select
statement using the CHAIN OPERATOR in select statement....
select : vbeln posnr matnr from VBAK into table i_abc1
where vbeln = s_vbeln,
vbeln1 posnr1 matnr1 from VBAk1 into table i_abc2
where posnr2 = s_posnr,
vbeln2 posnr2 matnr2 from VBAK2 into table i_abc3
where matnr2 = s_matnr2.
..the only difference which makes is the chain operator.
Is This Answer Correct ? | 4 Yes | 6 No |
Answer / sukanta brahma
REPORT ZFFFFFFF.
TABLES: mara, makt, vbak.
TYPES: BEGIN OF xitab.
INCLUDE STRUCTURE vbak.
TYPES:END OF xitab.
TYPES: BEGIN OF yitab.
INCLUDE STRUCTURE mara.
TYPES:END OF yitab.
TYPES: BEGIN OF zitab.
INCLUDE STRUCTURE makt.
TYPES:END OF zitab.
data:i_abc1 type STANDARD TABLE OF xitab WITH HEADER
LINE,
i_abc2 TYPE STANDARD TABLE OF yitab WITH HEADER
LINE,
i_abc3 TYPE STANDARD TABLE OF zitab WITH HEADER
LINE.
select : vbeln from VBAK into CORRESPONDING FIELDS OF
TABLE i_abc1
where vbeln
= '0000004969',
matnr from mara into CORRESPONDING FIELDS OF TABLE
i_abc2
where matnr = '102-310',
maktx from makt into CORRESPONDING FIELDS OF TABLE
i_abc3
where maktx = 'Test
material'.
WRITE:/ 'Experiment successful'.
Is This Answer Correct ? | 1 Yes | 6 No |
using nested select statement we can fectch the data from 3
table.
like
select f1 f2 f3 from table1 into table wa_t1
slect l1 l2 l3 from table2 into table wa_t2
select e1 e2 e3 from table3 into table wa_t2
endselect.
endselect.
endselect.
If I was wrong pls let me inform
Is This Answer Correct ? | 4 Yes | 11 No |
Answer / kiran kumar.b
select max(sal) as sal from
(select max(sal) as sal1 from emp1
union
select max(sal) as sal2 from emp2
union
select max(sal) as sal3 from emp3)
salary order by sal desc
u can get the max sal from three tables lets try to do this
Is This Answer Correct ? | 1 Yes | 9 No |
what is difference betwen type and like statement?
What is lock mechanism? How do we create lock objects in abap?
can any body explain the life cycles of SD & MM
Events in Reports?
What are the domains and data element?
What two statements would be used to exchange data between programs using abap memory?
A company asked me to reply the below question Please send the one page note on your understanding of your module--- topics and duration)???
how many types of idoc'c?
what u can do in technical spec(i mean from functional spec what r u writing in tech spec)?
What are the differences between macro and subroutine?
What is user exists?
2 Answers FutureSoft, Unilogic Software,
Differentiate between static and dynamic step loops?