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: 

Logical Data Base

Former Member
0 Kudos

What is logical data base (LDB) With an example please ? ( with demo program)

4 REPLIES 4

Former Member
0 Kudos

Hi Dipankar,

Please go through the following link for the description of a Logical Database.

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm

For a sample program,I would advice you to go to the T-code SE36 and view any of the existing LDBs like PSJ.

Look carefully at the Structure,Selection screen and the Database program for the same and do not forget to read its documentation.

LDBs are attached to the Reports in the Attributes section.

For any specific query regarding the LDB,do let me know.

In case you have any further clarifications,do let me know.

Regards,

Puneet Jhari.

Former Member
0 Kudos

Hi,

Advantages of using LDBs

1) we need not design the selection-screens.

2) we need not write select statements.

3) we need not do authority checks.

You have to give PNP logical base in your program attributes.

Check the below code.

tables: pernr.

infotypes: 0000, 0001, 0002.

*If we use the above statement, it will automatically *declares corresponding internal tables

*example: infotype 0000 internal table is p0000.

start-of-selection.

get pernr. "This event will fill data for a Employee

loop at p0000.

  • Do what ever you want

endloop.

loop at p0002.

  • Do what ever you want

endloop.

loop at p0002.

  • Do what ever you want

endloop.

end-of-selection.

hymavathi_oruganti
Active Contributor
0 Kudos

by using ldbs u can reduce select statement, selection s-creen coding and all as LDBs will have the coding by default and what we need to do is go there and enter the required parameters and get it in the report.

Former Member
0 Kudos

hi

good

Logical databases are special ABAP programs that retrieve data and make it available to application programs. The most common use of logical databases is still to read data from database tables by linking them to executable ABAP programs.

However, from Release 4.5A, it has also been possible to call logical databases using the function module LDB_PROCESS. This allows you to call several logical databases from any ABAP program, nested in any way. It is also possible to call a logical database more than once in a program, if it has been programmed to allow this. This is particularly useful for programs with type 1.

Logical databases contain Open SQL statements that read data from the database. You do not therefore need to use SQL in your own programs. The logical database reads the program, stores them in the program if necessary, and then passes them line by line to the application program or the function module LDB_PROCESS using an interface work area.

http://help.sap.com/saphelp_46c/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm

reward point if helpful.

thanks

mrutyun^