You are on page 1of 3

Logical database in SAP The LDB is special type of ABAP program that combines the contents of certain related

database 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 tree str!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&D PA-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 database in the following order Before displaying the selection screen, certain initiali1ations (e.g. calc!lating defa!lt val!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!t also that the !ser has the appropriate a!thori1ations. If an error occ!rs, some fields are made ready for inp!t again, so that the !ser can make the necessary correction(s/.

In the event "TA-T+,2+")L)*TI,&, the ABAP program performs any preliminary work (for e#, importing files/. The logical database reads the selected data and the program processes it within the 3)T events according to the se !ence specified by the str!ct!re. In the event )&D+,2+")L)*TI,&, the ABAP program performs any concl!ding operations (for e#ample, calc!lating totals, e#porting files/. $ . Designing the selection screens The 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, each on a new line. The system a!tomatically generates s!ch a screen for each program that does 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 database selections. The flow logic for s!ch screens is also generated a!tomatically and therefore cannot 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 it can be accessed for processing. Screening : )mployees can be selected according to the organi1ational criteria entered on the selection 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 infotype records whose validity period overlaps with at least one day of this period.

Authori!ation chec": This ens!res that the person starting the eval!ation Is a!thori1ed to access the report data. Lagical Data bases in H# ABAP: P&P P&P*) PAP P*6

You might also like