‎2006 Nov 07 9:26 AM
Hi,
Can any body give me links for tutorials on Logical databases. how it works and how to work with it.
Thanks & Regards
Narendiran Rathinavelu
‎2006 Nov 07 9:26 AM
http://www.planetsap.com/HR_ABAP_LDB.htm
award points if useful
‎2006 Nov 07 9:27 AM
Hi,
check the following link.
http://help.sap.com/saphelp_46c/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
Regards,
Kinshuk
‎2006 Nov 07 9:28 AM
Hi,
LOGIGAL SYSTEM means usually the SLD entry "logical system" resp the name which is given by customizing in transaction SALE. It is only used for IDoc traffic. I dont know where you found that in the proxy.
Proxy deoes not require any logical name of the system. This is the entry made in transaction SALE.
Refer to following weblog for proxy.
/people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies - Activate Proxy
/people/siva.maranani/blog/2005/04/03/abap-server-proxies - ABAP Server Proxy
/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy - ABAP Client Proxy
Check this demo of ABAP Proxy.
https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798#xi [original link is broken]
Logical databases are special ABAP programs that retrieve data and make it available to application programs. The most common use of logical databases is 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.
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.
Tasks of Logical Databases
1.Reading the same data for several programs.
2.Defining the same user interface for several programs.
3.Central authorization checks
4.Improving performance
First part of your question
So,if i am not wrong, LDB cannot be completely considered as object oriented programmming.
I have highlighted some important points above
For understanding this in detail you can go through the sap help .(if you donot know go through the below path
sap library
+ Basis Components
-Abap Programing and runtime enviornment
-BC-ABAP Programming(noe serach for ldb
Here I am mentioning a link which shows a complete implementation of an LDB.
http://homepages.wmich.edu/~r2raviko/HandsOnQuest/HO9.doc
I suppose after going through the reply(or sap help) and the link mentioned above all your doubts regarding LDB will be cleared.
For Logical database
http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
very useful
http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
Regards,
Ram
Reward points if helpful....
‎2006 Nov 07 9:28 AM
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.
Check this for LDB
http://help.sap.com/saphelp_46c/helpdata/EN/c6/8a15381b80436ce10000009b38f8cf/content.htm
http://www.cs.ucc.ie/~abf/CS507-8/l37c.pdf.
Good tutorial to start with.
http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_FunctionalAreas_LogicalDB.asp
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
Also check this thread,
‎2006 Nov 07 9:29 AM
Hi narendiran,
1. A logical database is in fact
a program only.
2. This LDB provides two main things :
a) a pre-defined selection screen
which handles all user inputs and validations
b) pre defined set of data
based upon the user selection.
3. So we dont have to worry about from
which tables to fetch data.
4. Moreover, this LDB Program,
handles all user-authorisations
and is efficient in all respects.
5. tcode is SLDB.
*----
1. To get a taste of it.
2. create a new z program.
3. while creating type PNP
in logical database field.
4. paste this code and execute.
REPORT ABC.
*----
infotypes : 0001.
TABLES : PERNR.
*----
GET PERNR.
WRITE 😕 PERNR-PERNR.
5. The selection screen which u see
is coming from logical database PNP program.
6. Execute
7. U will get a list of pernr.
-
SAPDBPNP
this is the main program of LDB PNP
which does the main work.
SAPDB + ldb name.
regards,
amit m.
‎2006 Nov 07 9:30 AM
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.
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 PAY2. 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
Anver
if hlped pls mark points