Logical database in SAP.doc

Embed Size (px)

Citation preview

  • 8/14/2019 Logical database in SAP.doc

    1/3

    Logical database in SAPThe LDB is special type of ABAP program that combines the contents of certain relateddatabase tables and retrieve some related data and make it available to application

    programs.

    In other words, a LDB is a method by which ABAP programs read and process the data.The se !ence in which the data is s!pplied to the program is determined by a treestr!ct!re.

    The LDB usually consists of the following components:

    "tr!ct!re "elections Database programs

    Logical databases have a tree structure .A logical database can contain a ma#im!m of $%%

    tables

    "APDBP&P is the name of the database program for the logical database P&P.

    How are logical database used

    '.Logical databases when generating an ABAP program

    The selection screen generated contains the selections (")L)*T+ PTI &" A&DPA-A )T)-"/ of both the logical database and the

    program.

    The only database+specific selections displayed on the selection screen are those needed by the program for data retrieval p!rposes

    0. Logical databases at r!n+time of an ABAP program

    At r!n+time, the system processes the events in the program and in the logical databasein the following order

    Before displaying the selection screen, certain initiali1ations (e.g. calc!lating defa!ltval!es s!ch as key date, etc./ are performed for the selection screen by the logical

    database and the program.The selection screen is displayed and the !ser enters data in the inp!t fields.

    The logical database and the program check that the inp!t is correct and complete , b!talso that the !ser has the appropriate a!thori1ations. If an error occ!rs, some fields aremade ready for inp!t again, so that the !ser can make the necessarycorrection(s/.

  • 8/14/2019 Logical database in SAP.doc

    2/3

    In the event "TA-T+ 2+")L)*TI &, the ABAP program performs any preliminarywork (for e#, importing files/.

    The logical database reads the selected data and the program processes it within the 3)Tevents according to the se !ence specified by the str!ct!re.

    In the event )&D+ 2+")L)*TI &, the ABAP program performs any concl!dingoperations (for e#ample, calc!lating totals, e#porting files/.

    $ . Designing the selection screensThe standard selection screen of a logical database has a standard layo!t where")L)*T+ PTI &" and PA-A )T)-" appear in the sequence they are declared, eachon a new line. The system a!tomatically generates s!ch a screen for each program thatdoes not have its own selection screen entered in the attrib!tes.4o! can define yo!r own selection screens for any logical database . If the attrib!tes of a

    program incl!de the n!mber of its own selection screen, the system !ses this screen as a

    model when generating. Any program+specific selections appear after the databaseselections. The flow logic for s!ch screens is also generated a!tomatically and thereforecannot be modified. 4o! cannot delete database selections

    Functions of LDB:

    Data retrie al :

    The personnel data of each employee is loaded into the main memory where itcan be accessed for processing.

    Screening :

    )mployees can be selected according to the organi1ational criteria entered on theselection screen.

    ).g56o!rly wage earners in a partic!lar personnel s!b area. There are two types of screening..Person selection and data selection period.

    Person selection defines those employees for whom a report is to be r!n.

    ).g.. onthly wage earners in a specific personnel s!b+area.

    ).g..Personnel n!mber range ).g..2eat!res of org.Assignment5)mployees who assigned to certain cost center. ).g..)mployee stat!s..Active or inactive.

    The data selection period delimits the time period for which data is eval!ated. 7hen yo! enter the data selection period,the provide loop retrieves the infotyperecords whose validity period overlaps with at least one day of this period.

  • 8/14/2019 Logical database in SAP.doc

    3/3

    Authori!ation chec":

    This ens!res that the person starting the eval!ation Is a!thori1ed to access thereport data.

    Lagical Data bases in H# ABAP:

    P&P P&P*) PAP P*6