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

select

Former Member
0 Likes
415

Hi ,

Can any one split the code which is written using join conditions in to normal select ,for vbak,vbrk,likp

select VBAKAUART VBAKKUNNR VBAKVBELN VBAKVTWEG VBFAPOSNN VBFAVBELN VBFAVBELV VBFAVBTYP_N VBRKERDAT VBRKNETWR VBRK~VBELN

VBRKVBTYP VBRKWAERK ZVBFAPOSNN ZVBFAVBELN ZVBFAVBELV ZVBFAVBTYP_N LIKPVBELN LIKPWADAT_IST

into (VBAK-AUART , VBAK-KUNNR , VBAK-VBELN , VBAK-VTWEG , VBFA-POSNN , VBFA-VBELN , VBFA-VBELV , VBFA-VBTYP_N , VBRK-ERDAT

, VBRK-NETWR , VBRK-VBELN , VBRK-VBTYP , VBRK-WAERK , ZVBFA-POSNN , ZVBFA-VBELN , ZVBFA-VBELV , ZVBFA-VBTYP_N , LIKP-VBELN

, LIKP-WADAT_IST )

from ( VBAK

inner join VBFA

on VBFAVBELV = VBAKVBELN

inner join VBRK

on VBRKVBELN = VBFAVBELN

and VBRKVBTYP = VBFAVBTYP_N

inner join VBFA as ZVBFA

on ZVBFAVBELN = VBRKVBELN

and ZVBFAVBTYP_N = VBRKVBTYP

left outer join LIKP

on LIKPVBELN = ZVBFAVBELV )

2 REPLIES 2
Read only

Former Member
0 Likes
382

Hi,

Fetch the data in different internal tables.Make use of FOR ALL ENTRIES...........Then consolidate the data into final internal table.

Read only

Former Member
0 Likes
382

Can you help in writing in one select statement for vbak,

the where condition is

where VBAK~AUART in SP$00004

and VBAK~KUNNR in SP$00006

and VBAK~VBELN in SP$00001

and VBAK~VTWEG in SP$00005

and VBFA~POSNN in SP$00008

and VBRK~ERDAT in SP$00007

and VBRK~VBELN in SP$00002

and ZVBFA~POSNN in SP$00009.

%dbacc = %dbacc - 1.

if %dbacc = 0.

stop.

endif.

add 1 to %count-VBAK.

%linr-VBAK = '01'.

extract %fg01.

endselect.

Thanks in advance ......will be rewarded greatfully