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: 

help me out pls....................

Former Member
0 Kudos

Hi,

Can any body let me know how to use for all entries for three tables (payr,bsik,rfpdo)...

plsssssssssssssssssss reply soon.....

rgds

mallika

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Check and example :

Here it_funcmod is a internal table, MARC & DRAD are database tables.

Select af3 af4 bf5 b6

into corresponding fields of l_r_tab

from MARC AS a

INNER JOIN DRAD AS b

ON amatnr = bobjky

FOR ALL ENTRIES IN it_funcmod

Where a~f1 = it_funcmod-f1.

l_r_tab-f1 = it_funcmod-f1.

l_r_tab-f2 = it_funcmod-f2.

append l_r_tab to l_t_tab.

Endselect.

4 REPLIES 4

Former Member
0 Kudos

use inner join to join these three tables

and

then for all entries in itab where condition

Former Member
0 Kudos

Hi,

Check and example :

Here it_funcmod is a internal table, MARC & DRAD are database tables.

Select af3 af4 bf5 b6

into corresponding fields of l_r_tab

from MARC AS a

INNER JOIN DRAD AS b

ON amatnr = bobjky

FOR ALL ENTRIES IN it_funcmod

Where a~f1 = it_funcmod-f1.

l_r_tab-f1 = it_funcmod-f1.

l_r_tab-f2 = it_funcmod-f2.

append l_r_tab to l_t_tab.

Endselect.

VB09104
Active Participant
0 Kudos

Hi,

Check with the following code

SELECT a~matnr

a~berid

a~dismm

a~ausss

a~sobsl

b~berty

INTO TABLE it_mdma_mdlv_mdll

FROM mdma AS a

INNER JOIN mdlv AS b

ON aberid EQ bberid

INNER JOIN mdll AS c

ON bberid EQ cberid

FOR ALL ENTRIES IN it_bomitems

WHERE a~matnr EQ it_bomitems-idnrk

AND a~dispo IN s_cdispo

AND b~berty EQ '3'

AND a~sobsl IN s_csobsl

AND c~lbear IN s_lifnr.

Regards,

Vikas.

plz reward if helpful..

Former Member
0 Kudos

Hi Mallika,

Check it.

SELECT anla~bukrs

anla~anln1

anla~anln2

anla~aktiv

anla~deakt

anla~anlue

anlz~kostl

anlz~bdatu

anlz~adatu

INTO CORRESPONDING FIELDS OF TABLE it_anla

FROM anla INNER JOIN anlz

ON anlabukrs EQ anlzbukrs

AND anlaanln1 EQ anlzanln1

AND anlaanln2 EQ anlzanln2

WHERE anla~bukrs IN so_bukrs

AND anla~anln1 IN so_anln1

AND anla~anln2 IN so_anln2

AND anla~deakt IN so_deakt

AND anla~anlue IN so_anlue

AND anla~aktiv IN so_aktiv

AND anlz~kostl IN so_kostl.

SELECT *

FROM anlc

INTO TABLE it_anlc

FOR ALL ENTRIES IN it_anla

WHERE bukrs EQ it_anla-bukrs

AND anln1 EQ it_anla-anln1

AND anln2 EQ it_anla-anln2

AND gjahr EQ pa_gjahr

AND afabe EQ pa_afabe.

Regards,

Mukesh Kumar