‎2006 Aug 24 1:57 PM
Hi All ,
Is there any join statement like that retrives 'ALL THE DATA' from different table other than using select * statemnts...
thxs,
vin.
‎2006 Aug 24 2:07 PM
Hi V,
To retrieve all the fields from Table(s) you just would have to write SELECT * from a instead of SELECT a~perner.
Join is just used to related two or more tables in question.
Hopefully this is the thing you were looking for.
Regards.
‎2006 Aug 24 1:59 PM
JOIN statement is used only in conjunction with select statements. There is no JOIN statement without select statement.
What is your actual requirement?
here is a smaple usage for join:
<i><b>DATA: DATE LIKE SFLIGHT-FLDATE,
CARRID LIKE SFLIGHT-CARRID,
CONNID LIKE SFLIGHT-CONNID.
SELECT FCARRID FCONNID F~FLDATE
INTO (CARRID, CONNID, DATE)
FROM SFLIGHT AS F INNER JOIN SPFLI AS P
ON FCARRID = PCARRID AND
FCONNID = PCONNID
WHERE P~CITYFROM = 'FRANKFURT'
AND P~CITYTO = 'NEW YORK'
AND F~FLDATE BETWEEN '20010910' AND '20010920'
AND FSEATSOCC < FSEATSMAX.
WRITE: / DATE, CARRID, CONNID.
ENDSELECT.</b></i>
‎2006 Aug 24 2:03 PM
Hi Ravi ,
Usually join statments r like this avbeln bkunnr c~matnr which retrives data for tht particular fields from the table a , b , c but my requirment is to retrive all the feilds present in table a , b , c using join statemetns...
thxs,
vin
‎2006 Aug 24 2:02 PM
Hi Vind,
Can you please elaborate your problem statement. Join is nothing to do with the col/fields, it works on record basis. For fields either you have to mention field names or you fetch all fields of the given table(s) using '*'.
Please make me clear if I'm getting you wrong.
Regards.
Shabbar
‎2006 Aug 24 2:02 PM
Hi,
You can use field-groups to get data from diffrent
tables instead of join
field-group: header,items
insert mara-matnr into header.
insert makt-maktx into item .
extract item.
loop.
write:mara-matnr,mara-maktx.
endloop.
Regards
amole
‎2006 Aug 24 2:02 PM
Join can only be used in conjunction with select statement but the other ways of retriving data from database tables is using LDBs
Regards
Anurag
‎2006 Aug 24 2:07 PM
Hi V,
To retrieve all the fields from Table(s) you just would have to write SELECT * from a instead of SELECT a~perner.
Join is just used to related two or more tables in question.
Hopefully this is the thing you were looking for.
Regards.
‎2006 Aug 24 2:33 PM
hi,
If you want to select all the fields from some table, then use * instead of individual fields. Join is used to relate table based on some fields.
Regards,
Richa
‎2006 Aug 24 2:45 PM
Hi richa,
How to join the two r more differnt tables with all fields to display in an ALV and how to deifne the two r more tables is it ?? to pass the table to ALV..
DATA : BEGIN OF ITAB OCCURS 0.
INCLUDE STRUCTURE MARA.
INCLUDE STRUCTURE VBAK.
DATA : END OF ITAB.
THXS,
vin.
‎2006 Aug 24 2:09 PM
I think u have go for FOR ALL ENTRIES in your select statemant.
Cheers
Badri
‎2006 Aug 24 2:15 PM
Hi,
One option you can use is native sql
Exec sql.
select a.* b.* c.* ....
endexec.
Regards
Amole