‎2008 Mar 01 2:36 AM
hi,
what is LDB....its benefit
and how to to it for multiple tables ......
.... i want to use LDB instead of table joins...... there are abt 20 tables..... using joins , the performance is slow ...
..... please advise..
thanks
‎2008 Mar 01 2:50 AM
Logical databases tend to be slower than SELECTs, so I would stay a way from them. If you use indexes, you should have no problem with performance.
Having said that, it will probably be pretty difficult to write a JOIN on 20 tables. I would try to split them into logical groups. This will help with debugging.
Rob
‎2008 Mar 01 4:05 AM
i m already done with the program usin joins ... but performance is an issue ...so tell how to improve the performance ...
‎2008 Mar 01 4:08 AM
‎2008 Mar 01 4:49 PM
‎2008 Mar 01 3:25 AM
LOGICAL DATABASES:
-
Logical Databases are used to generate report.
It is a repository object, not a data dictionary object.
Under one logical database, a node is created first for the corresponding table in the database.
A logical database can have any number of related nodes in the hierarchical manner.
First node of the logical database is called as ROOT NODE.
SLDB or SE36 to create logical databases.
Navigations to Create Logical Database:
-
SLDB -> Specify LDB name starting with Z or Y -> Click on Create -> Opens an interface -> Enter short description
-> Create -> Save under a package and assign request number -> Opens an interface
-> Specify Root Node name (MARA) -> Enter short description for the Root node
-> Specify Database Table name (MARA) -> Create -> Opens an interface
-> Select the Root Node (KNA1) -> Click on SELECTIONS pushbutton from Appn.
Toolbar -> Click on Yes to generate Selection Screens from the Structure
-> Click on No to Search Help -> Opens an Interface
-> Select the checkboxes to create Field Selections and Free Selections
-> TRansfer -> Opens an Include Program -> Decomment Select-Options statement and specify range variable as follows:
SELECT-OPTIONS : MATNUM FOR MARA-MATNR.
-> Save -> Activate -> Come back.
Select the Node -> Click on SOURCE CODE pushbutton
-> Click on Yes to generate source code from Structure and Selections -> Opens a report with two Include Files :
include DBZLOGICAL_DATABASE1TOP . " header
include DBZLOGICAL_DATABASE1NXXX . " all system routines
-> Double click on Header File to declare global variables -> Specify Following code:
TABLES : MARA * Autogenerated
DATA IT_MARA LIKE MARA OCCURS 0 WITH HEADER LINE.
-> Save -> Activate -> Come back -> Double click on System Routine file, where the fetching operations are done
-> Opens an Include File with three subfiles as follows:
include DBZLOGICAL_DATABASE1N001 . " Node MARA
include DBZLOGICAL_DATABASE1FXXX . " init, PBO, PAI
include DBZLOGICAL_DATABASE1SXXX . " search help
-> Double click on the first file -> Specify SELECT operation statement as follows:
select * from mara into table it_mara where matnr in MATNUM.
PUT MARA. * AUTOGENERATED CODE
loop at it_mara.
write 😕 it_mara-matnr, it_mara-mtart, it_mara-mbrsh, it_mara-meins.
endloop.
-> Save -> Activate.
To Access LDB node, create SE38 PROGRAM, Specify LDB name in ATTRIBUTES section -> Specify following code in SE38:
NODES MARA.
GET MARA.
-> Save -> Activate -> Execute.