Application Development and Automation 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: 
Read only

inner join

Former Member
0 Likes
296

hi,

i have problem to execute the join using select options programm

my code is right but it give a problem of projection

TYPES: BEGIN OF it_output,

bukrs TYPE bseg-bukrs,

belnr TYPE bseg-belnr,

gjahr TYPE bseg-gjahr,

fisper TYPE bseg-gjahr,

buzei TYPE bseg-buzei,

augdt TYPE bseg-augdt,

shkzg TYPE bseg-shkzg,

dmbtr TYPE bseg-dmbtr,

kostl TYPE bseg-kostl,

hkont TYPE bseg-hkont,

matnr TYPE bseg-matnr,

werks TYPE bseg-werks,

blart TYPE bkpf-blart,

bldat TYPE bkpf-bldat,

budat TYPE bkpf-budat,

cpudt TYPE bkpf-cpudt,

usnam TYPE bkpf-usnam,

tcode TYPE bkpf-tcode,

bktxt TYPE bkpf-bktxt,

waers TYPE bkpf-waers,

awtyp TYPE bkpf-awtyp,

awkey TYPE bkpf-awkey,

END OF it_output.

DATA: lt_output TYPE it_output OCCURS 0 WITH HEADER LINE.

SELECTION-SCREEN BEGIN OF BLOCK bl WITH FRAME TITLE text-011.

SELECT-OPTIONS: s_bukrs FOR bseg-bukrs,

s_blart FOR bkpf-blart,

s_budat FOR bkpf-budat.

SELECTION-SCREEN END OF BLOCK bl.

FORM get_data .

SELECT bsegbukrs bsegbelnr bseggjahr bsegfisper bsegbuzei bsegaugdt bsegshkzg bsegdmbtr bsegkostl bseghkont bsegmatnr bsegwerks

bkpfblart bkpfbldat bkpfbudat bkpfcpudt bkpfusnam bkpftcode bkpfbktxt bkpfwaers bkpfawtyp bkpfawkey

INTO CORRESPONDING FIELDS OF TABLE lt_output

FROM ( bseg INNER JOIN bkpf ON

bsegbukrs = bkpfbukrs AND

bsegbelnr = bkpfbelnr AND

bseggjahr = bkpfgjahr )

WHERE bseg~bukrs IN s_bukrs AND

bkpf~blart IN s_blart AND

bkpf~budat IN s_budat.

ENDFORM. "get_data

plz give me a proper solution for this.

thanks.

it give error as

for pooled tables, clusters tables and projection views joins is not allowed "BSEG".

plz help me

1 REPLY 1
Read only

Former Member
0 Likes
276

Hi,

First read data from BKPF into table it_bkpf, then check the internal table is empty or not. Sort the internal table and use SELECT FOR ALL ENTRIES statement to read data from BSEG. Dont use Joins on Pooled and Clustered tables.

Rgds,

Bujji