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: 

Need an approch for data fetching

Former Member
0 Kudos
213

Hi Experts,

I have a requirement to fetch data from three tables on the basis of a date we have passed through selection screen.

I have the three tables EVER , EANLH and ERCH.

I have to check the BELEGDAT in table ERCH and pick the VERTRAG from it .This BELEGDAT should be passed through selection screen.

And then I have to check this VERTRAG in table EVER and pick the ANLAGE.

And then I need to pick TARIFTYP from table EANLH using this ANLAGE. Also I need to check the BIS = 31.12.9999 in table EANLH. Because it has multple records for our selection.

AT least I need the values of ANLAGE and TARIFTYP in one internal table.

I have tried various select approches and also the inner join technique. But not able to fetch the data as per of requirement.

Can you please let me know which approch I need to use as I am new to ABAP.

Thanks and Regards,

Jasvinder Kumar

1 ACCEPTED SOLUTION

Former Member
0 Kudos
151

Hi Jasvinder,

You can use different select queries with "for all entries"- this will reduce database use in case of joins.

get data in different internal tables and combine them in program.

Hope this helps.

Regards,

Nachiket

View solution in original post

2 REPLIES 2

Former Member
0 Kudos
152

Hi Jasvinder,

You can use different select queries with "for all entries"- this will reduce database use in case of joins.

get data in different internal tables and combine them in program.

Hope this helps.

Regards,

Nachiket

william_eastman
Product and Topic Expert
Product and Topic Expert
0 Kudos
151

The problem as i see it is your starting point - it cannot reasonably be ERCH unless the user is providing the billing document number.

The normal approach would be to have user provide a contract value and get the ANLAGE from EVER based on that contract.  Then use ANLAGE to check EANLH with your restrictions.  I don't see what ERCH adds to your process.

regards,

bill.