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 STATEMENT

Former Member
0 Likes
380

HI,

I HAVE TO RETRIVE THE DATA FROM VBPA WHERE ( VBELN = ITAB-VBELN AND PARVW = 'AG' ) + ( VBELN = ITAB-VBELN AND PARVW ='WE'.

SELECT VBELN

PARVW

KUNNR

FROM VBPA

INTO TABLE IT_VBPA

WHERE VBELN = ITAB-VBELN

PARVW = 'AG' .

PARVW = 'WE'.

THANKS

sURESH

1 ACCEPTED SOLUTION
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
362

Hi,

SELECT VBELN

PARVW

KUNNR

FROM VBPA

INTO <b>CORRESPONDING FIELDS OF</b> TABLE IT_VBPA

WHERE <b>VBELN = ITAB-VBELN AND ( PARVW = 'AG' OR PARVW = 'WE'</b> ).

Regards,

Sesh

2 REPLIES 2
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
363

Hi,

SELECT VBELN

PARVW

KUNNR

FROM VBPA

INTO <b>CORRESPONDING FIELDS OF</b> TABLE IT_VBPA

WHERE <b>VBELN = ITAB-VBELN AND ( PARVW = 'AG' OR PARVW = 'WE'</b> ).

Regards,

Sesh

Read only

Former Member
0 Likes
362

it looks like you want all the data from VBPA coprresponding to VBELN in ITAB...

please use the query

SELECT VBELN .. from VBPA into table IT_VBPA

FOR ALL ENTRIES in ITAB

where VBELN = ITAB-VBELN and

( PARVW = 'AG' or PARVW = 'WE')