cancel
Showing results for 
Search instead for 
Did you mean: 

Inner join select

Former Member
0 Kudos
75

I had my data declaration as below.

DATA :BEGIN OF t_plaf OCCURS 0,

normt LIKE mara-normt,

matnr LIKE plaf-matnr,

pwwrk LIKE plaf-pwwrk,

paart LIKE plaf-paart,

verid LIKE plaf-verid,

auffx LIKE plaf-auffx,

psttr LIKE plaf-psttr,

gsmng LIKE plaf-gsmng,

END OF t_plaf.

corresponding inner join statement

SELECT maranormt plafmatnr

plafpwwrk plafpaart plaf~verid

plafauffx plafpsttr plaf~gsmng

INTO TABLE t_plaf

FROM plaf

INNER JOIN mara

ON plafmatnr EQ maramatnr

WHERE plaf~paart = 'LA'.

Now I have changed the declaration as below

DATA : BEGIN OF t_plaf OCCURS 0,

normt LIKE mara-normt.

INCLUDE STRUCTURE plaf.

DATA : END OF t_plaf.

now i have changed the data declaration as mentioned above and need a inner join statement for the data declaration i have specified.

Any suggestions,

MAdhu

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Madhu,

USE INTO CORRESPONDING option instead of INTO TABLE.

SELECT maranormt plafmatnr

plafpwwrk plafpaart plaf~verid

plafauffx plafpsttr plaf~gsmng

<b>INTO CORRESPONDING FIELDS OF TABLE t_plaf</b>

FROM plaf

INNER JOIN mara

ON plafmatnr EQ maramatnr

WHERE plaf~paart = 'LA'.

Thanks,

Vinay

Former Member
0 Kudos

Thanks Vinay,

I need to get data into all the fields if t_plaf table not restrict to some fields.

Madhu.