SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

select from EANL

ricky_shaw
Contributor
0 Kudos
199

Hello Experts,
Can you write the two queries into one. I want to avoid  hitting EANL twice.


I need to pull all the installations from EANL for a given premise. But at this point i dont have premise, but i have installation only.

i have anlage in lv_install.

1)select single vstelle into lv_prem from EANL where anlage = lv_install.

2) select anlage anlart into table it_eanl where vstelle = lv_prem (from 1 above)

pls suggest

1 ACCEPTED SOLUTION

0 Kudos
128

Hello Ricky,

try this code

select b~anlage b~vstelle b~anlart into table it_eanl from ( eanl as a inner join eanl as b on a~vstelle eq b~vstelle )

     where a~anlage =lv_install.

Thanks & Regards

Tatha

View solution in original post

1 REPLY 1

0 Kudos
129

Hello Ricky,

try this code

select b~anlage b~vstelle b~anlart into table it_eanl from ( eanl as a inner join eanl as b on a~vstelle eq b~vstelle )

     where a~anlage =lv_install.

Thanks & Regards

Tatha