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

JOIN??

Former Member
0 Likes
371

Hi all,

IN this join i am getting document types 'O'.

Now i need to get both types O and J from VBFA table.

what are the required changes...if i place the order type 'J' including type 'O'...i am getting wrong number of records....

SELECT kvbeln kfkdat pposnr pmatnr parktx lcharg pfkimg pvrkme

FROM vbrk AS k INNER JOIN vbrp AS p

ON kvbeln = pvbeln

INNER JOIN vbfa AS v

ON vvbeln = pvbeln

AND vposnn = pposnr

AND v~vbtyp_v = 'J'

INNER JOIN lips AS l

ON lvbeln = vvbelv

AND luecha = vposnv

INTO CORRESPONDING FIELDS OF TABLE gt_doc_details

WHERE p~matnr IN matnr

AND k~fkdat IN fkdat

AND kdgrp IN kdgrp.

The following also not working...

*(vvbtyp_v = 'J' or vvbtyp_v = 'O')*

*AND ( vvbtyp_v = 'J' or vvbtyp_v = 'O' )*

*AND v~vbtyp_v in ('O', 'J')*

SAchin.

2 REPLIES 2
Read only

Former Member
0 Likes
348

Hi,

Try this

AND v~vbtyp_v in ('O','J')

Regards,

Satish

Read only

Former Member
0 Likes
348

Hi,

Don't use ON on v~vbtyp_v

put v~vbtyp_v in where condition

vvbtyp_v = 'O' or vvbtyp_v = 'J'.

Suman