‎2007 Dec 12 7:45 AM
HOW TO USE LDB F1S IN A REPORT AND DISPLAY RECORDS?WHAT IS THE PURPOSE OF GET STATEMENT?
‎2007 Dec 12 7:47 AM
Hi,
Reffer these links
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
‎2007 Dec 12 11:55 AM
hi,
Use of LDB is used to read data from database tables by linking them to executable ABAP programs.
please check following links:
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9a2135c111d1829f0000e829fbfe/content.htm
‎2007 Dec 13 12:34 PM
‎2007 Dec 13 12:33 PM
hi,
For figures use link: http://www.datamanagementgroup.com/Resources/Articles/Article_UsingR3sLogicalDatabases.asp
>So, why use LDBs for R/3 reporting?
Whenever relationships between tables require evaluation, (i.e., when a query is executed) this table-tree structure is accessed. Each time an InfoSet (using an LDB) is generated or an InfoSet is maintained, the structure of the LDB is re-read and its structure and table relationships (via the key fields) are compared with the structure already stored within the InfoSet. The purpose is to allow underlying table modifications or allow tables to be added or deleted within the LDB - therefore, the InfoSet is always up-to-date and quality control is secured. If tables and/or fields are removed and the InfoSet and its associated queries are not updated, error messages will be generated.
As we mentioned in the previous article, SAP R/3 InfoSets - an Overview, using InfoSets (and basing them upon LDBs) with your Crystal Reports will not only save your reporting team development time, but will also ensure data integrity. A Best Practice to be sure!
What can be misleading with the name "Logical Database" is that it is not a database at all. Technically speaking, a Logical Database is a collection of associated ABAP programs designed to categorize and retrieve specified data for application programs - one example of an application program are ABAP queries and another is Crystal Reports. Note: R/3 version 4.5a onward permits using a Function Call to directly execute the use of Logical Databases called LDB_PROCESS.
One key point to remember: ABAP reports are restricted to the LDB within the application they are reporting from; therefore, an ABAP report within the module SD is inherently limited to reporting from the SD LDB.
An advantage of employing Crystal Reports is its non-reliance on LDBs - thereby allowing easy cross-module reporting. But as we will see, using a LDB has its advantages when used with Crystal or other R/3 reporting tools.
Here is a quick listing of some salient facts regarding Logical Databases (LDBs):
LDBs are always auto-configured for optimal performance and contain further functions such as authorization checks and search helps
Reports using LDBs have a 1:1 relationship, meaning, a report may use only one LDB
An LDB has a 1:n relationship with reports, meaning, an LDB may have multiple reports using its functionality
LDBs use Open SQL statements for direct data-reads and retrieval from the underlying vendor database application (Oracle, Informix, Sybase, etc.)
LDBs simplify and encapsulate data retrieval
Technical details for an LDB (i.e., WHERE clauses within SELECT statements) do not require specification by Developers
Updates, changes, etc., to a LDB is immediately promoted to all reports using that LDB
The data structure of an LDB is always hierarchical. Many tables within the R/3 System are linked to each other using foreign keys. Some of these dependencies form tree-like hierarchical structures. Parent-Child relationships between tables are the norm
LDBs read data from database tables that are part of these structures
Reports executed via LDBs are not processed sequentially. Processing flow is controlled and determined via the inherent tree structure
Regarding the tree structure relationships used by LDBs:
Parent-Child relationships are typically defined via the key fields
The structures always represent a logical view of the related database tables
LDBs may be designed using the ABAP Workbenchs Object Browser - defining the structure, relevant selection criteria and database access routines
The creation of LDBs can be thought of as akin to the development of Functions - specific data retrieval processes that return a defined data set
Beginning with version 4.0b, LDBs may have more than three-character names
Once your team or organization has undertaken the task of developing their own LDB, the data retrieval ABAP/Open SQL program is auto-generated from the structure along with the selection includes you also defined. The ABAP/Open SQL program has a modular structure, consisting of several include programs and all of the necessary subroutines to facilitate the data return.
The last important task when creating an LDB is ensuring it executes efficiently. Below is an overview of ways you can improve the overall performance (Note: Some of these techniques require extensive ABAP skills and are not for the casual LDB developer):
Static selection criteria and parameters on the selection screen, possibly with default values and value lists defined in the logical database
Dynamic selections
Search helps
ABAP Dictionary views, or other methods that minimize the number of database reads
Early authorization checks - during selection screen processing if possible, and not during the data selection process itself
Multiple selection screen versions
When a new InfoSet is created over an LDB, the structure of the LDB (the arrangement of its tables within the tree structure) is read from the relevant R/3 System tables once and then stored within the InfoSet.
When associating your InfoSets with a particular LDB, you will accomplish this via the following screen during query development:
Enter the name of the logical database of your choice. The matchcode drop-down list will display all available LDBs. From this list, you can request detailed information regarding an individual LDB. The logical database structure (its hierarchical relationship of the logical database tables) should be of particular importance to you when creating InfoSets
As you associate your InfoSet to an LDB, you can review the structure of the InfoSet
‎2007 Dec 14 8:23 AM
Dear Gopi,
A logical database is a special ABAP/4 program which combines the contents of certain database tables. You can link a logical database to an ABAP/4 report program as an attribute. The logical database then supplies the report program with a set of hierarchically structured table lines which can be taken from different database tables.
LDB offers an easy-to-use selection screens. You can modify the pre-generated selection screen to your needs. It offers check functions to check whether user input is complete, correct, and plausible. It offers reasonable data selections. It contains central authorization checks for data base accesses. Enhancements such as improved performance immediately apply to all report programs that use the logical database.
Less coding s required to retrieve data compared to normal internel tables.
Tables used LDB are in hierarchial structure.
Mainly we used LDBs in HR Abap Programming.
Where all tables are highly inter related so LDBs can optimize the performance there.
Check this Document. All abt LDB's
GO THROUGH LINKS -
http://www.sap-basis-abap.com/saptab.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html
www.sap-img.com/abap/abap-interview-question.htm
www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm
Gothru the blog which provides info on LDB's:
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
Sample code
TABLES: SPFLI,
SFLIGHT,
SBOOK,
SCARR.
START-OF-SELECTION.
GET SPFLI.
WRITE:/ SPFLI: , SPFLI-CARRID, SPFLI-CONNID,
SPFLI-AIRPFROM, SPFLI-AIRPTO.
GET SFLIGHT.
WRITE:/ SFLIGHT: , SFLIGHT-CARRID, SFLIGHT-CONNID, SFLIGHT-FLDATE.
GET SBOOK.
WRITE:/ SBOOK: , SBOOK-CARRID, SBOOK-CONNID,
SBOOK-FLDATE, SBOOK-BOOKID.
GET SFLIGHT LATE.
WRITE:/ GET SFLIGHT LATE: , SFLIGHT-FLDATE.
Regards,
Rajesh
<b>Please reward points if helpful.</b>