Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

what is the use of LDB How Can i use it effectively

Former Member
0 Kudos

what is the use of LDB How can it be used effectively

1 ACCEPTED SOLUTION

Former Member
0 Kudos

LDB ( Logical Data Base ) Is a Option Which was first introduced in ABAP in Fourth Generation Languages.

U Can create a LDB in the transaction code SE36

LDB's Can be used only in Executable Program.

U can get a LDB By Using The command GET.

LDB will simplify Joins in your program

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

5 REPLIES 5

Former Member
0 Kudos

Hi Nikitha,

Check this info.

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.

GET will fetch the table data immediately

GET LATE

In the LDB when you define the table structure in hierarchy, first it will fetch the higher node data and then all the below node tables data and comes to a second record in the top node table. for this GET Late is used.

You can create any number of primary keys in a table

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

Hope this resolves your query.

Reward all the helpful answers.

Regards

Former Member
0 Kudos

LDB is used to fetch data it usally consist of a group of table arranged in an hierarchical order so so when we fetch some value from some particualr table it wil read that table in that aprticular hierarchy we use the keyword GET <LDB name > to read the table defined inside that LDB using this single GET comand we can read the value from the LDB no need to select queries this is what i know abt LDB

reward if this helps u

ravi

Former Member
0 Kudos

Hi,

Logical database

A logical database is a special ABAP/4 program which combines the contents of certain database tables. Using logical databases facilitates the process of reading database tables.

Ex.

HR Logical Database is PNP

Main Functions of the logical database PNP:

Standard Selection screen

Data Retrieval

Authorization check

To use logical database PNP in your program, specify in your program attributes.

Standard Selection Screen

Date selection

Date selection delimits the time period for which data is evaluated. GET PERNR retrieves all records of the relevant infotypes from the database. When you enter a date selection period, the PROVIDE loop retrieves the infotype records whose validity period overlaps with at least one day of this period.

Person selection

Person selection is the 'true' selection of choosing a group of employees for whom the report is to run.

Sorting Data

· The standard sort sequence lists personnel numbers in ascending order.

· SORT function allows you to sort the report data otherwise. All the sorting fields are from infotype 0001.

Report Class

· You can suppress input fields which are not used on the selection screen by assigning a report class to your program.

· If SAP standard delivered report classes do not satisfy your requirements, you can create your own report class through the IMG.

Data Retrieval from LDB

1. Create data structures for infotypes.

INFOTYPES: 0001, "ORG ASSIGNMENT

0002, "PERSONAL DATA

0008. "BASIC PAY

2. Fill data structures with the infotype records.

Start-of-selection.

GET PERNR.

End-0f-selection.

Read Master Data

Infotype structures (after GET PERNR) are internal tables loaded with data.

The infotype records (selected within the period) are processed sequentially by the PROVIDE - ENDPROVIDE loop.

GET PERNR.

PROVIDE * FROM Pnnnn BETWEEN PN/BEGDA AND PN/ENDDA

If Pnnnn-XXXX = ' '. write:/ Pnnnn-XXXX. endif.

ENDPROVIDE.

Period-Related Data

All infotype records are time stamped.

IT0006 (Address infotype)

01/01/1990 12/31/9999 present

Which record to be read depends on the date selection period specified on the

selection screen. PN/BEGDA PN/ENDDA.

Current Data

IT0006 Address - 01/01/1990 12/31/9999 present

RP-PROVIDE-FROM-LAST retrieves the record which is valid in the data selection period.

For example, pn/begda = '19990931' pn/endda = '99991231'

IT0006 subtype 1 is resident address

RP-PROVIDE-FROM-LAST P0006 1 PN/BEGDA PN/ENDDA.

Regards

Gaurav

Former Member
0 Kudos

Check the blog below:

/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases

Former Member
0 Kudos

LDB ( Logical Data Base ) Is a Option Which was first introduced in ABAP in Fourth Generation Languages.

U Can create a LDB in the transaction code SE36

LDB's Can be used only in Executable Program.

U can get a LDB By Using The command GET.

LDB will simplify Joins in your program

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