Skip to Content
author's profile photo Former Member
Former Member


hi frds

what is ldb? what is the disadvantage of LDB

can u give any example

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jan 28, 2008 at 04:23 PM

    Hi Sudhakar

    To read data from a database tables we use logical database. A logical database provides read-only access to a group of related tables to an ABAP/4 program.

    Advantages: i)check functions which check that user input is complete, correct,and plausible. ii)Meaningful data selection. iii)central authorization checks for database accesses. iv)good read access performance while retaining the hierarchical data view determined by the application logic.

    dis advantages: i)If you donot specify a logical database in the program attributes,the GET events never occur. ii)There is no ENDGET command,so the code block associated with an event ends with the next event statement (such as another GET or an END-OF-SELECTION).

    If you need to find the logical database for a table name, you can used SE36 - Logical Database Bulider.

    Steps :-

    Go to transaction SE36

    Click Extras -> Table usage

    Supply the Table name and hit enter.

    A Display Logical Database will be shown on a pop-up windows.

    Award points if helpful

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 04:37 PM



    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.


    0002, "PERSONAL DATA

    0008. "BASIC PAY

    2. Fill data structures with the infotype records.




    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.



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


    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




    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.