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

Can we use use ' join ' with in a function module !!!

Former Member
0 Likes
435

In my case its giving an error

SELECT vbak~vbeln

vbak~erdat

vbak~vkorg

ABRVW

augru

kunnr

posnr

matnr

vbap~vkaus

vbap~spart

vbap~netwr

vbap~waerk

kwmeng

kondm

mvgr1

mvgr2

mvgr3

mvgr4

mvgr5

FROM vbak AS vbak INNER JOIN vbap AS vbap

ON vbakvbeln EQ vbapvbeln

INTO corresponding fields of TABLE tvbak

WHERE vbak~vbeln = vbeln1.

for the above code which is a part of function module.its

giving run time exception.....as its saying it cant read data from table VBAK.....NEED HLP

2 REPLIES 2
Read only

Former Member
0 Likes
409

Yes - you can use a JOIN in an FM. Maybe you get the error because there is no data that meets your selection conditions.

You may have to run vbeln1 through FM CONVERSION_EXIT_ALPHA_OUTPUT before doing the SELECT.

Rob

Read only

Former Member
0 Likes
409

Hi Jyotirmoy,

Yes, you can read data in FM using inner join as mentioned in the post from Rob.

What is the runtime exception you are getting?

Send the details of the runtime exception text.

Thanks

Sanjeev