2007 Sep 24 12:57 PM
what is the sequence of events in an ldb program and what is their description.
2007 Sep 24 12:58 PM
Hi
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.
LDB offers an easy-to-use selection screens. You can modify the pre-generated selection screen to your needs. It offers check functions to check whether user input is complete, correct, and plausible. It offers reasonable data selections. It contains central authorization checks for data base accesses. Enhancements such as improved performance immediately apply to all report programs that use the logical database.
Less coding s required to retrieve data compared to normal internel tables.
Tables used LDB are in hierarchial structure.
Mainly we used LDBs in HR Abap Programming.
Where all tables are highly inter related so LDBs can optimize the performance there.
Check this Document. All abt LDB's
GO THROUGH LINKS -
http://www.sap-basis-abap.com/saptab.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html
www.sap-img.com/abap/abap-interview-question.htm
www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm
Gothru the blog which provides info on LDB's:
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
Sample code
TABLES: SPFLI,
SFLIGHT,
SBOOK,
SCARR.
START-OF-SELECTION.
GET SPFLI.
WRITE:/ SPFLI: , SPFLI-CARRID, SPFLI-CONNID,
SPFLI-AIRPFROM, SPFLI-AIRPTO.
GET SFLIGHT.
WRITE:/ SFLIGHT: , SFLIGHT-CARRID, SFLIGHT-CONNID, SFLIGHT-FLDATE.
GET SBOOK.
WRITE:/ SBOOK: , SBOOK-CARRID, SBOOK-CONNID,
SBOOK-FLDATE, SBOOK-BOOKID.
GET SFLIGHT LATE.
WRITE:/ GET SFLIGHT LATE: , SFLIGHT-FLDATE.
Regards
Anji
2007 Sep 24 12:58 PM
Hi
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.
LDB offers an easy-to-use selection screens. You can modify the pre-generated selection screen to your needs. It offers check functions to check whether user input is complete, correct, and plausible. It offers reasonable data selections. It contains central authorization checks for data base accesses. Enhancements such as improved performance immediately apply to all report programs that use the logical database.
Less coding s required to retrieve data compared to normal internel tables.
Tables used LDB are in hierarchial structure.
Mainly we used LDBs in HR Abap Programming.
Where all tables are highly inter related so LDBs can optimize the performance there.
Check this Document. All abt LDB's
GO THROUGH LINKS -
http://www.sap-basis-abap.com/saptab.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html
www.sap-img.com/abap/abap-interview-question.htm
www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm
Gothru the blog which provides info on LDB's:
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
Sample code
TABLES: SPFLI,
SFLIGHT,
SBOOK,
SCARR.
START-OF-SELECTION.
GET SPFLI.
WRITE:/ SPFLI: , SPFLI-CARRID, SPFLI-CONNID,
SPFLI-AIRPFROM, SPFLI-AIRPTO.
GET SFLIGHT.
WRITE:/ SFLIGHT: , SFLIGHT-CARRID, SFLIGHT-CONNID, SFLIGHT-FLDATE.
GET SBOOK.
WRITE:/ SBOOK: , SBOOK-CARRID, SBOOK-CONNID,
SBOOK-FLDATE, SBOOK-BOOKID.
GET SFLIGHT LATE.
WRITE:/ GET SFLIGHT LATE: , SFLIGHT-FLDATE.
Regards
Anji
2007 Sep 24 12:58 PM
hi
LOGICAL DATABASES ARE SPECIAL ABAP PROGRAMS THAT RETRIEVE DATA AND MAKE IT AVAILABLE TO APPLICATION PROGRAMS. THE MOST COMMON USE OF LDBS IS STILL TO READ DATA FROM DATABASE TABLES BY LINKING THEM TO EXECUTABLE PROGRAMS.
WE CAN ALSO CALL LDBS USING THE FUNCTION MODULE LDB_PROCESS.
LOGICAL DATABASE CONTAIN OPEN SQL STATEMENTS THAT READ DATA FROM THE DATABASE. THEREFORE WE DO NOT NEED TO USE OPEN SQL STATEMENTS IN OUR ABAP PROGRAMS.
MANY TABLES IN THE R/3 SYSTEM ARE LINKED TO EACH OTHER USING FOREIGN KEY RELATIONSHIPS. SOME OF THESE DEPENDENCIES FORM TREE-LIKE HIERARCHICAL STRUCTURES. LDBS READ DATA FROM DATABASE TABLES THAT ARE PART OF THESE STRUCTURES.
 IT READS THE SAME DATA FOR SEVERAL PROGRAMS.
 IT DEFINES THE SAME USER INTERFACE FOR SEVERAL PROGRAMS.
 IT PROVIDES CENTRAL AUTHORIZATION CHECKS.
 IT IMPROVES THE PERFORMANCE.
THE LOGICAL DATABASE MADE UP OF THREE COMPONENTS.
 STRUCTURE IT DEFINES THE DATA VIEW OF THE LDB.
 SELECTIONS IT DEFINES A SELECTION SCREEN, WHICH FORMS THE USER INTERFACE OF THE EXECUTABLE PROGRAMS THAT USE THE LOGICAL DATABASE.
 DATABASE PROGRAM IT CONTAINS THE ABAP STATEMENTS USED TO READ THE DATA AND PASS IT TO THE USER OF THE LDB. THE STRUCTURE OF THE DATABASE PROGRAM IS A COLLECTION OF SPECIAL ROUTINES.
THE DATABASE PROGRAM IS WITH THE NAMING CONVENTION OF SAPDB<LDB>. IT CONSISTS OF SUBROUTINES. EG, FORM PBO, PAI, LDB_PROCESS_INIT, AND INIT.
SELECTION VIEWS
THESE ARE THE COLLECTION OF FIELDS FROM DIFFERENT DATABASE TABLES.
TRANSACTION FOR CREATING LDB SE36 OR SLDB
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo
2007 Sep 24 12:59 PM
<a href="http://help.sap.com/saphelp_erp2005/helpdata/en/9f/db9be035c111d1829f0000e829fbfe/content.htm">Example</a>
Arya
2007 Sep 24 1:00 PM
hi,
EXPORT PROGRAM
REPORT zexp.
DATA: seltab LIKE rsparams OCCURS 2.
PARAMETERS: pernr TYPE persno DEFAULT '00000011'.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = 'ZEXP'
TABLES
selection_table = seltab.
EXPORT seltab to MEMORY ID 'tab'.
SUBMIT zimp AND RETURN WITH SELECTION-TABLE seltab.
IMPORT PROGRAM
REPORT zimp.
TABLES: pernr.
NODES: peras.
DATA: seltab LIKE rsparams OCCURS 2.
INITIALIZATION.
BREAK-POINT.
IMPORT seltab FROM MEMORY ID 'tab'.
BREAK-POINT.
START-OF-SELECTION.
GET peras.
END-OF-SELECTION.
Import program uses LDB PNPCE.
thanks,
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo
2007 Sep 24 1:01 PM
Hi Sandeep:
Following are the events in LDB:
get -- starts executing from root node onwards.
get late -- starts executing subroot nodes first & later root node.
get late reject -- starts executing subroot nodes only.
get late reject table -- starts executing that particular Database tale only.
put --- it will write the data
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo