‎2011 Nov 17 10:54 AM
Hi all.
I have to optimize a report, and it is using BRM logical database to get data from BKPF and BSEG. Could you say to me if it is the faster way or if it would be better to use a SELECT?
Thanks a lot.
Marta.
‎2011 Nov 17 12:39 PM
Hello Marta,
my experience with logical databases is mostly negative.
Old standard coding nobody wants to touch. All selects are normally single and nested. So if you need many entries they will be read most probably one by one with quite some overhead.
Regards,
Yuri
‎2011 Nov 18 2:57 AM
‎2011 Nov 18 9:29 AM
It's a balances report. It show average balance by bussines code and account.
‎2011 Nov 18 9:26 AM
Couple reasons why to use LDBs:
- they provide standard and uniform way of data selection (you don't need to know the relationship b/w tables)
- they provide standard selection screen
- they provide authorization check
- you can control them with nested GET statements (i.e. you decide at what time which data are extracted)
- you can restrict data selection based on field [GET ... fields|http://help.sap.com/abapdocu_70/en/ABAPGET_SHORTREF.htm]
Once I met with statement that good ABAPers don't use direct SELECT statement, at least they shouldn't have to. There are so many standard FMs which cover most of SAP db queries.
Regards
Marcin
‎2011 Nov 18 9:45 AM
Hello Marcin,
Once I met with statement that good ABAPers don't use direct SELECT statement, at least they shouldn't have to.
What?? This might be true for HR ABAP, where LDBs are used in abundance
There are so many standard FMs which cover most of SAP db queries.
Most of these std. FMs are generally "not released" & are not performance friendly either.The "released" BAPIs (BAPIGET) don't cater to all your requirements.
I seldom use FMs to fetch the data. I find it easy to implement relevant authority objects & build an optimised SQL construct as per my requirement
Let me know your comments.
BR,
Suhas
‎2011 Nov 18 9:47 AM
Yes I didn't mention it was in HR-ABAP context
Regards
Marcin