Search This Blog

Saturday, February 20, 2010

Logical Data Base


LDB is a special Programming in ABAP to increase Performance of the Reports. It is a collection of nodes assigned with GUI and Select Statement. It is a Repository Object.
Before learning about creation of LDB, let us know about GET and PUT statements.

PUT : It is the statement used in source code of LDB in between SELECT-ENDSELECT to add selected data information in the Node.

GET: We can invoke the node using "GET" statement. It gets the data from NODE into the Presentation layer.

NOTE: Do not perform DML operations as it effects performance of Server. Inconsistent code in LDB causes lot of delay for all applications in SAP Data Base and even Application Server.

Navigations to create Logical Data Base:
*GUI Creation.
SLDB -> name the Logical Database( zmyldb_1) -> create -> Short text -> save -> Specify name of Root Node ( KNA1) -> short text -> Data base table ( KNA1) -> continue-> opens Logical Data base Editor -> Select the node -> click on Selections from Application toolbar -> opens a dialog box -> click on yes -> prompts another dialog box to create search helps ( no ) -> select all checkboxs prompted in LPS [ is used to generate GUI for Dynamic Selections from the table and Dynamic Field Selects from the table -> Click on transfer -> opens SE38 code -> code is generate by SAP -> Replace ? with Suitable name , remove comments for GUI statement if required -> save -> activate the source code -> come back.
(Remember that Node name and table name must be same.)
Adding Select Statement for the Node:
select the node from LDB editor -> click on Source Code From application toolbar -> opens ABAP editor with two include files as "Top Include file " AND "nxxx" FILE . Double click on top include file -> declare internal table. Double click on file -> opens another ABAP editor -> Double Click in "Node" code include statement -> activate the select statement as follows .
SELECT * INTO CORRESPONDING FIELDS OF ITAB
FROM MARA WHERE MATNR IN MATNUM.
PUT MARA.
APPEND ITAB.
ENDSELECT.
Don't forget to use PUT Statement between Select - Endselect , as it adds all data information in the Node -> save and Activate the code.
Once If the Logical Data Base is created with Nodes can be invoked from the program using SE38 -> name the program -> create -> short text -> type of program -> Logical Database (zmyldb_1) -> save -> opens ABAP editor -> use the code as follows.
NODES : MARA.
GET MARA.

No comments:

Post a Comment