Application Development 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: 

Inner Join

Former Member
0 Kudos

HI Group,

I need to Pick up field VSTELl and HAUS from table EVBS.

For each HAUS I need to pick up PLTXT from IFLOTX table

Can any body suggest me how to do this using Inner Join.

3 REPLIES 3

gopi_narendra
Active Contributor
0 Kudos

select VSTELI HAUS from EVBS

into table IT_EVBS

where <COND>.

if sy-subrc = 0.

select PLTXT from IFLOTX

into IT_IFLOTX

for all entries in IT_EVBS

where HAUS = IT_EVBS-HAUS.

endif.

I do not have SAP now, so havent gone thru the tables, plz check the tables and follow the key validations also.

Regards

- Gopi

former_member758419
Active Participant
0 Kudos

Hi,

Try this code,

DATA: BEGIN OF wa,

HAUS TYPE EVBS-HAUS,

STELl TYPE EVBS-VSTELl,

PLTXT TYPE IFLOTX-PLTXT,

END OF wa.

DATA: itab LIKE SORTED TABLE OF wa WITH UNIQUE KEY HAUS.

SELECT aHAUS aVSTELI b~PLTXT

INTO CORRESPONDING FIELDS OF TABLE itab

FROM ( EVBS AS a INNER JOIN IFLOTX AS b ON aHAUS = bHAUS ).

Hope this helps,

Regards,

Sachidanand.B

Pls award points for helpful answers

Message was edited by:

Sachidanand B

Former Member
0 Kudos

Hi,

Use the following code,

DATA: BEGIN OF str,

HAUS TYPE EVBS-HAUS,

VSTELl TYPE EVBS-VSTELl,

PLTXT TYPE IFLOTX-PLTXT,

END OF str.

DATA : itab LIKE TABLE OF str with header line.

SELECT aHAUS aVSTELI b~PLTXT

INTO CORRESPONDING FIELDS OF TABLE itab

FROM ( EVBS AS a

INNER JOIN IFLOTX AS b ON aHAUS = bHAUS ).

Reward Points if it works.

Regards,

Rajesh Kumar