2009 Mar 09 11:41 PM
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
2009 Mar 10 6:28 AM
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
2009 Mar 10 6:28 AM
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
2009 Mar 10 12:59 PM
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.
2009 Mar 10 1:18 PM
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
2009 Mar 10 3:45 PM
Personally, I don't see anything wrong with using logical databases here. Why re-program something that exists already?
2009 Mar 11 7:56 AM
>
> 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]
2009 Jul 05 5:57 PM
2009 Jul 05 6:00 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |