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

Logical Databases with ABAP OO

Former Member
0 Likes
1,336

As we move to ABAP OO paradigm, should we abandon the use of logical databases?

Edited by: Kimberly Carmack on Mar 10, 2009 12:47 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,097

Hi Kim

Logical databases are based on subroutines instead of methods. Also it means implicit triggering of events, implicit calls, and data sharing between programs. All of this is contradictory to the ideas of object based programming.

If you do have to use a logical database, you may create a method and call the FM ldb_process in it.

Pushpraj

As we move to ABAP OO paradigm, should we abandon the use of logical databases?

Edited by: Kimberly Carmack on Mar 10, 2009 12:47 AM

7 REPLIES 7
Read only

Former Member
0 Likes
1,098

Hi Kim

Logical databases are based on subroutines instead of methods. Also it means implicit triggering of events, implicit calls, and data sharing between programs. All of this is contradictory to the ideas of object based programming.

If you do have to use a logical database, you may create a method and call the FM ldb_process in it.

Pushpraj

Read only

0 Likes
1,097

Thank you for your reply.

Will you please explain further what you mean about " .....implicit triggering of events, implicit calls, and data sharing between programs....is contradictory [to OO ideals]...."

I am aware that I can call LDB_PROCESS from a method. But should it be done? Is this something that should be avoided?

Should we now avoid LDBs all together? Or could there be scenarios where LDB is a good fit? And if so, what would those scenarios look like?

I am asking from a pragmatic as well as methodological design perspective.

Read only

0 Likes
1,097

Thank you for your input.

I am aware of the capability to call FM LDB_PROCESS from a method.

But should I? Should I avoid using LDBs altogether? In what scenario should I use an LDB in OOA/OOD?

I am very interested in hearing more about why "implicit triggering of events, implicit calls, and data sharing between programs....is contradictory ..to OO". Will you please elaborate?

Let me give some insight as to the source of this question...

Our company has made an acquistion. We are converting some of their customization into our system.

I am currently re-engineering one of their reports. It uses data from the tables: VBAK, VBAP, VBEP, VBUK, VBUP, VBEP, VBPA and VBFA.

Although the old program does not use logical database, I see the VAV logical database lines up with this data request quite nicely.

And since I know that there are several of their reports and transactions that access the same data, the reusability of the LDB is quite attractive.

However, our company has an initiative to conduct all new development using OO standards.

So, should I used the VAV LDB from a local method? Or would it be better practice to look at creating a global class that has methods that repeat the functionality of the VAV LDB?

And if global classes and new methods is the way to go, what would that global class look like?

This is what I am wondering about.

Any feedback is appreciated.

Edited by: Kimberly Carmack on Mar 10, 2009 2:19 PM

Read only

Tamas_Hoznek
Product and Topic Expert
Product and Topic Expert
0 Likes
1,097

Personally, I don't see anything wrong with using logical databases here. Why re-program something that exists already?

Read only

0 Likes
1,097

>

> I am very interested in hearing more about why "implicit triggering of events, implicit calls, and data sharing between programs....is contradictory ..to OO". Will you please elaborate?

As data sharing, implicit Subroutine calls and implicit triggering of events violate the basic concepts(data encapsulation, use of methods and explicit triggering of events) of OO Programming SAP recommends not to use LDBs

Please check the recommendation by SAP for using LDBs in the link provided below(page 12)

[State-of-the-art ABAP programs - Part 1|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c2992ca9-0e01-0010-adb1-b7629adb623c]

Read only

Former Member
0 Likes
1,097

This thread points out that LDB is considered obsolete technique:

For now, I am abandoning the idea to use LDBs.

Thanks for your input everyone.

Read only

Former Member
0 Likes
1,097

see last reply.