Search on this Website

Showing posts with label Logical DataBase. Show all posts
Showing posts with label Logical DataBase. Show all posts

Wednesday, May 28, 2008

What are logical databases? What are the advantages/ dis-advantages of logical databases?

To read data from a database tables we use logical database. A logical database provides read-only access to a group of related tables to an ABAP/4 program.
Advantages:
i)check functions which check that user input is complete, correct,and plausible.
ii)Meaningful data selection.
iii)central authorization checks for database accesses.
iv)good read access performance while retaining the hierarchical data view determined by the application logic.
Disadvantages:
i)If you donot specify a logical database in the program attributes,the GET events never occur. ii)There is no ENDGET command,so the code block associated with an event ends with the next event statement (such as another GET or an END-OF-SELECTION).



What sort of tables one can use in designing the hierarchy of a LDB ?

Tables which are having Foreign key relations.The structure of Logical Databases relfects the Foreign key dependencies of hierarchical tables in the SAP System.

If you want to improve the response time ( time to access data ) Logical DataBases permits you to achieve this using VIEWS.

Also See :Example : How to create Logical Database

Also See :
What is Logical Database?Logical database in ABAP programming

Also See : How to Generate Query Report ?Example


Click Here to Read More !!!!

Friday, May 16, 2008

Example : How to create Logical Database

Goto the transaction code SE36 ( Logical database Builder) and enter the logical database name and click on the CREATE button.
We need to have structure, selections and source code.



Enter the short text and click on the CREATE button.


In order to create the structure, Enter the short text for the root node and the corresponding table and click on the CREATE button.
Give the second node which should be hierarchically under the root node and enter the short description with the database table name .


Now click on the SELECTIONS buttons and u need to have the selections of logical database be generated from the structure and do not define a new search help.


U get the menu generation options. Select the tables for which the nodes for the free selections are to be generated.

Uncomment the select options for both the tables and SAVE, CHECK & ACTIVATE.


Now click on the SOURCE CODE button and should generate the program of the logical database from structure and selections.
Double click on the TOP INCLUDE structure.
Check whether the tables used in the logical database are present and uncommented and click BACK.
Now double click on the system routines include structure.

In the system routines, double click on the INCLUDE structure of NODE ZKA_EMP. Now uncomment the SQL statement and enter the field and the database table name according to the logical database builder.
Click BACK and In the system routines, double click on the INCLUDE structure of NODE ZKA_COM. Now uncomment the SQL statement and enter the field and the database table name according to the logical database builder

SAVE, CHECK and ACTIVATE the screen.

Click BACK and SAVE, CHECK & ACTIVATE the screen until u reach the main screen and SAVE the logical database.

Thus the logical database is constructed.



Also See : What is Logical Database?Logical database in ABAP programming


Click Here to Read More !!!!

Saturday, May 10, 2008

What is Logical Database?Logical database in ABAP programming

The Logical Database Builder then saves you work by using components that you have already defined to generate proposals for other components. Some of the most important attributes of a logical database are set when you define its structure. When you have defined the structure, the Logical Database Builder automatically generates a proposal for the selection include. The system then generates an input mask for the database program, based on the structure of the logical database and the selections.
These generated proposals allow you to create a working logical database quickly. However, you must program refinements such as authorization checks and performance optimization yourself.
• Database tables. The table must be active in the ABAP Dictionary. Tables always have a flat structure. The name of the node must correspond with the name of the table.
• Data types from the ABAP Dictionary: The node may refer to any data type in the ABAP Dictionary. The node name and the name of the data type do not have to be the same. You can use deep data types as nodes.
• Data types from type groups: The node can also refer to a data type from a type group in the ABAP Dictionary. Enter the name of the type group in the corresponding field. You must choose Other types before specifying this type. Data types in type groups were the forerunners of real data types in the ABAP Dictionary. Wherever possible, you should use ABAP Dictionary data types. They have all of the semantic properties of their underlying data elements. This is useful, for example, when you use a logical database to create ABAP Queries.

You edit logical databases using the Logical Database Builder in the ABAP Workbench. To start the Logical Database Builder, use Transaction SE36 or SLDB, or choose Tools ® ABAP Workbench, followed by Development ® Programming environment ® Logical Database Builder. You can also start it by forward navigation from the Repository Browser or other ABAP Workbench tools.
In the Logical database field, you can enter a name of up to 20 characters. The name may also contain a three to ten-character namespace prefix, enclosed in forward slashes.
On the initial screen, you can create, copy, and delete logical databases. However, you can only delete a logical database if it is not linked to an executable program. Even if a logical database is not linked to any executable programs, it can still be used by a program that calls it using the function module LDB_PROCESS. Before deleting one, you should therefore check that it is not still in use. However, the Where-used list function only shows where a logical database is assigned to an executable program.

Click Here to Read More !!!!