Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10671

Re: Problem with join

$
0
0

You can have many appraoches, one of them would be as below:

 

create seperate internal table for VBRK, VBRP, TVKBT and KNA1.

 

Select <ur fields> from VBRK into <VBRK int table> where fkdat in so_fkdat.

(try keeping vbeln as your where condition as it is primary key field)

 

Select <ur fields> from VBRP into <VBRP int table> for all entries in <VBRK int table> where VBELN eq <VBRK int table-vbeln>

(here u may get multiple entries in your <vbrk int table> for a billing doc)

 

Select <ur fields> from TVKBT into <TVKBT int table> for all entries in <VBRP int table> where vkbur eq <vbrp int table-vkbur>

 

select <ur fields> from kna1 into <kna1 int table> for all entries in <vbrk int table> where kunnr eq <vbrk int table-kunrg>

 

Now you have all the required fields in four internal tables:

loop and combine into one final internal table using read statements based on your requirements:


Viewing all articles
Browse latest Browse all 10671

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>