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

query in KONV table

Former Member
0 Likes
793

Hello,

We need execute the following query:

select KAWRT, KBERT

from KONV

where

KNUMV=VBAK.KNUMV,

KPOSN=VBAK.POSNR,

KSCHL='ZPDE'

but we have a problem because table KONV is a cluster table.

Does anybody know how can we do this?

Thanks in advance and best Regards,

Néstor.

Hello,

We need execute the following query:

select KAWRT, KBERT

from KONV

where

KNUMV=VBAK.KNUMV,

KPOSN=VBAK.POSNR,

KSCHL='ZPDE'

but we have a problem because table KONV is a cluster table.

Does anybody know how can we do this?

Thanks in advance and best Regards,

Néstor.

2 REPLIES 2
Read only

ThomasZloch
Active Contributor
0 Likes
558

You mean you can't use a JOIN because KONV is a cluster table? Use a two step select, first VBAK then KONV with FOR ALL ENTRIES.

Thomas

Read only

Former Member
0 Likes
558

you can use for all entries here. I'll show you with an example

select knumv posnr

from vbak as vbak inner join vbap as vbap on vbakvbeln = vbapvbeln

into corresponding fields of lt_data

where " write what ever condition you like

if lt_data[] is not initial. " this chk is needed as if the lt_vbak is blank it will fetch all the records from konv table

select KAWRT, KBERT

from KONV

for all entries in lt_data

where

KNUMV=lt_data-KNUMV,

KPOSN=lt_data-POSNR,

KSCHL='ZPDE'.

endif.

note that there is no posnr in vbak table. so you need to take it from vbap