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

using offset in join statement

Former Member
0 Likes
2,183

hi,

i wanted to use offset in join statement. but it is giving error.

select a~kunnr

a~vkorg

from knvv as inner join zcust

on knvv-kunnr+5(5) = zcust-refid.

3 REPLIES 3
Read only

Former Member
0 Likes
1,118

U CAN'T USE OFFSET at left side but u can use at right side of '=' sign

S@meer

Read only

0 Likes
1,118

hi sameer,

i used it this way but still it gives error.

select a~kunnr

a~vkorg

from knvv as inner join zcust

zcust-refid = knvv-kunnr+5(5) .

Read only

Former Member
0 Likes
1,118

hi neha,

try this code i tested it.

types: begin of ty_knvv,

INCLUDE type knvv,

kunid type i, " For u type is zcust-refid

end of ty_knvv.

data: it_knvv type STANDARD TABLE OF ty_knvv INITIAL SIZE 0,

wa_knvv type ty_knvv.

select *

from knvv

into table it_knvv.

loop at it_knvv into wa_knvv.

kunid = wa_knvv-kunnr+5(5).

wa_knvv-kunid = kunid.

MOdify it_knvv TRANSPORTING kunid.

read table zcust into wa_zcust with key resid = wa_knvv-kunid.

endloop.