Application Development and Automation 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: 
Read only

Logical databases

Former Member
0 Likes
748

What is exactly logical databases used for?

i know what logical database is.. (i have read SAP help documents on that).. but whats really use?

as far as my understanding goes, logical databases can be accessed by the syntax "GET", if the same function can be done with the "SELECT" query, whats the advantage using logical database gives?

if they are same as databases... are they obsolete?

how does "GET" and LDB work together? does GET syntax fetches each and every individual record from the table? does it not hamper performance?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
723

Logical database are no separate databases.

These are runtime objects that gives the user a feeling that all the data that he needs is in a single entity.

The LDB relieves the programmer from building the complex select queries based on the selection screen.

Behind the scenes, the GET statement would probably use a select query only.

Regards,

ravi kanth

5 REPLIES 5
Read only

Former Member
0 Likes
724

Logical database are no separate databases.

These are runtime objects that gives the user a feeling that all the data that he needs is in a single entity.

The LDB relieves the programmer from building the complex select queries based on the selection screen.

Behind the scenes, the GET statement would probably use a select query only.

Regards,

ravi kanth

Read only

Former Member
0 Likes
723

hi logiacl databases are mostly used in the hrabap.

Logical databases are programs that read data from database tables and pass it to other programs for processing. The order of reading the database tables is determined by a hierarchy.

Many tables in the R/3 System are linked using foreign key relationships. Parts of these relationships form tree-like hierarchical structures. Logical databases allow you to read data easily from database tables that form parts of these structures

Retrieving Data Using a Logical Database:

GET EVENT

This is the most important event for executable programs that use a logical database. It occurs when the logical database has read a line from the node <table> and made it available to the program in the work area declared using the statement NODES <table>.

When you define the corresponding event block in the program, you can specify a field list if the logical database supports field selection for this node:

GET <table> http://FIELDS <f1> <f 2>....

Transation is se36

check this simple example..

REPORT Z_LDB_DEMO.

NODES: SPFLI, SFLIGHT, SBOOK.

START-OF-SELECTION.

WRITE 'Test Program for GET'.

GET SPFLI.

SKIP.

WRITE: / 'From:', SPFLI-CITYFROM,

'TO :', SPFLI-CITYTO.

GET SFLIGHT.

SKIP.

WRITE: / 'Carrid:', SFLIGHT-CARRID,

'Connid:', SFLIGHT-CONNID.

ULINE.

GET SBOOK.

WRITE: / 'Fldate:', SFLIGHT-FLDATE,

'Bookid:', SBOOK-BOOKID,

'Luggweight', SBOOK-LUGGWEIGHT.

ULINE.

END-OF-SELECTION.

Read only

0 Likes
723

so, basically

start of selection.

get "node"

some programming related to node.

end of selection.

This code works as

start of selection.

*select * from node.* (where condition applies with check select options)

some programming related to node.

endselect.

end of selection

is it right?

if it is, then would it not hamper performance very badly in case of large database tables?

so, my question is, what all things i have to take care of if i want to replace GET by SELECT...??

i know i have to remove LDB from attributes, and then use suitable select query.. what else?

Read only

0 Likes
723

hi check one thing the logical databases are used when the processing of a single pernrs ..because the get pernr is a loop in the ldb ..when the data is vary high or when the employees in the selection screen is high it is not used..due to performance reasons..

we didnt use the select statemenst but we use the function modules like RH_READ_INFTY and HR_READ_INFOTYPE becase they will get the data with best authorisation checks than the selects .... or you can use the selects also..

when ever the macros is used then it will be replaced with the select statements..

Read only

Former Member
0 Likes
723

Check out the below related threads