<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Logical Database in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445210#M827423</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajiv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It has its own selection screen. When we use a LDB in a report program, that selection screen automatically appears for this report program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reading a SAP standard logical database (DB M - MRP Documents) in your ABAP/4 program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get is equal to select * from.... &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;get mdkp. &lt;/P&gt;&lt;P&gt;   check field-name. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get mdtb. &lt;/P&gt;&lt;P&gt;   check field-name &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logical database structures&lt;/P&gt;&lt;P&gt;There are three defining entities in an SAP logical database. You must be clear on all three in order to create and use one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table structure: Your logical database includes data from specified tables in SAP. There is a hierarchy among these tables defined by their foreign keys (all known to SAP), and you are going to define a customized relationship between select tables. This structure is unique and must be defined and saved.&lt;/P&gt;&lt;P&gt;Data selection: You may not want or need every item in the referenced tables that contributes to your customized database. There is a selection screen that permits you to pick and choose.&lt;/P&gt;&lt;P&gt;Database access programming: Once you&amp;#146;ve defined your logical database, SAP will generate the access subroutines needed to pull the data in the way you want it pulled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out this:&lt;/P&gt;&lt;P&gt;&lt;A href="http://articles.techrepublic.com.com/5100-10878_11-5034421.html" target="test_blank"&gt;http://articles.techrepublic.com.com/5100-10878_11-5034421.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.erpgenie.com/abaptips/content/view/339/62/" target="test_blank"&gt;http://www.erpgenie.com/abaptips/content/view/339/62/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.ittoolbox.com/index.php" target="test_blank"&gt;http://wiki.ittoolbox.com/index.php&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if usefull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Swati&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Feb 2008 06:49:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-25T06:49:23Z</dc:date>
    <item>
      <title>Logical Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445209#M827422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, experts,&lt;/P&gt;&lt;P&gt;Can any one give me a small example of logical database which I can use in my abap code.&lt;/P&gt;&lt;P&gt;Is it usefull?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help will be appreciable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajiv singh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 06:43:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445209#M827422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T06:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Logical Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445210#M827423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajiv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It has its own selection screen. When we use a LDB in a report program, that selection screen automatically appears for this report program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reading a SAP standard logical database (DB M - MRP Documents) in your ABAP/4 program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get is equal to select * from.... &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;get mdkp. &lt;/P&gt;&lt;P&gt;   check field-name. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get mdtb. &lt;/P&gt;&lt;P&gt;   check field-name &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logical database structures&lt;/P&gt;&lt;P&gt;There are three defining entities in an SAP logical database. You must be clear on all three in order to create and use one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table structure: Your logical database includes data from specified tables in SAP. There is a hierarchy among these tables defined by their foreign keys (all known to SAP), and you are going to define a customized relationship between select tables. This structure is unique and must be defined and saved.&lt;/P&gt;&lt;P&gt;Data selection: You may not want or need every item in the referenced tables that contributes to your customized database. There is a selection screen that permits you to pick and choose.&lt;/P&gt;&lt;P&gt;Database access programming: Once you&amp;#146;ve defined your logical database, SAP will generate the access subroutines needed to pull the data in the way you want it pulled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out this:&lt;/P&gt;&lt;P&gt;&lt;A href="http://articles.techrepublic.com.com/5100-10878_11-5034421.html" target="test_blank"&gt;http://articles.techrepublic.com.com/5100-10878_11-5034421.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.erpgenie.com/abaptips/content/view/339/62/" target="test_blank"&gt;http://www.erpgenie.com/abaptips/content/view/339/62/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.ittoolbox.com/index.php" target="test_blank"&gt;http://wiki.ittoolbox.com/index.php&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if usefull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Swati&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 06:49:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445210#M827423</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T06:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Logical Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445211#M827424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just try out this simple program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example...&lt;/P&gt;&lt;P&gt;tables: pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;infotypes: 0000,2001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: / p0000-pernr,p0000-begda,p0000-endda,&lt;/P&gt;&lt;P&gt;p2001-abwtg,p2001-trfgr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arunsri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 07:15:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445211#M827424</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T07:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Logical Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445212#M827425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Swati&lt;/P&gt;&lt;P&gt;Thanks for prompt action.&lt;/P&gt;&lt;P&gt;I have rewarded for this consideration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please give me a example of a logical database which uses tables MKPF and MSEG?&lt;/P&gt;&lt;P&gt;I have created one in which used to get data into internal table, but in my abap code I can't use that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you have code for this please provide me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I have your mail ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My mail id is : sy.rajiv.s@alokind.com&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 07:19:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445212#M827425</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T07:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Logical Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445213#M827426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer to the link below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/9f/db9be035c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/9f/db9be035c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 07:20:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445213#M827426</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T07:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Logical Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445214#M827427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajiv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to use it in a report program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 1. We have to mention the LDB name in the attributes of report program&amp;#133; say for eg: we mention PNP (is one of the LDB).&lt;/P&gt;&lt;P&gt;2. We have to mention a node in the report program. Node is nothing but a work area.&lt;/P&gt;&lt;P&gt;         This is done by declaring the TABLES statement in the report program.&lt;/P&gt;&lt;P&gt;          For eg:      TABLES : PERNR&lt;/P&gt;&lt;P&gt;          PERNR is a structure which contains the basic details of an employee (related to HR module)&lt;/P&gt;&lt;P&gt; 3. We have to mention the internal tables within which the relevant data is fetched.&lt;/P&gt;&lt;P&gt;          This is done by declaring the INFOTYPES statement in the report program.&lt;/P&gt;&lt;P&gt;          For eg:   INFOTYPES: 0000, 0001,0002, 0006, 0007.&lt;/P&gt;&lt;P&gt;          Infotypes are nothing but a table structure. Here we are declaring the internal tables PA0000, PA0001, PA0002.....which will have the same structure of corresponding database tables PA0000, PA0001, PA0002.. in the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, how the data is actually fetched in to the program:&lt;/P&gt;&lt;P&gt;1.     The fetching of the data is trigerrred by a &amp;#145;GET node&amp;#146; event.&lt;/P&gt;&lt;P&gt;Say, if we mention - GET PERNR. statement in the program. The data rows satisfying the parameters selected in selection screen are fetched from database, but filled into the PERNR work area row by row.&lt;/P&gt;&lt;P&gt;2.     For each row fetched into the PERNR - relevant data is fetched into the internal tables PA0000, PA0001, PA0002 from database tables. For eg: PA0002 is a database table which holds the personal details of an employee and there may be many rows of data for  the same employee. So based on the personnel number (employee number) fetched into PERNR all data records of that employee are fetched in to our internal table pa0002 from the database table PA0002.&lt;/P&gt;&lt;P&gt;             Like wise , the other internal tables - pa0003, pa0006 are filled with the corresponding data      &lt;/P&gt;&lt;P&gt;          Like data in PERNR work area acts like a primary key to fetch the data from data base to the internal tables.            &lt;/P&gt;&lt;P&gt; 3.     For these data fetched into internal tables - we can write our data processing statements or just display on the list report.&lt;/P&gt;&lt;P&gt;             So what ever statements we write between GET PERNR. and END SELECTION. are executed repeatedly like within a loop until all data records satisfying the parameters entered in selection screen are fetched into the node(work area) PERNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             GET PERNR.   * like LOOP.&lt;/P&gt;&lt;P&gt;                       write pa0002-name.   * This statement is executed for each data record fetched into the work area PERNR.&lt;/P&gt;&lt;P&gt;                       &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;other data processing statements.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             END-SELECTION        * like END LOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if found usefull,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Swati&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 07:20:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445214#M827427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T07:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: Logical Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445215#M827428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;logical database&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Are special data collection programs data delivered by SAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Provide your program with data in a hierarchically logical&lt;/P&gt;&lt;P&gt;sequence&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Contain data base accesses that have been optimized for&lt;/P&gt;&lt;P&gt;performance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Supply a dynamic selection screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Contain all necessary authorization checks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can attach a logical database to each type 1 program&lt;/P&gt;&lt;P&gt;using the program attributes.&lt;/P&gt;&lt;P&gt;Special event blocks are also available for processing&lt;/P&gt;&lt;P&gt;individual records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every logical database is an encapsulated data collection program for frequent database access.&lt;/P&gt;&lt;P&gt;The database access has been optimized using Open SQL.&lt;/P&gt;&lt;P&gt;If you are working with a logical database, you do not need to program a selection screen for user entry,&lt;/P&gt;&lt;P&gt;since this is created automatically.&lt;/P&gt;&lt;P&gt;The system performs authorization checks according to the SAP authorization concept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;example&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NODES&lt;/P&gt;&lt;P&gt;:spfli, sflight.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;WRITE: / 'START-OF-SELECTION'&lt;/P&gt;&lt;P&gt;color 3.&lt;/P&gt;&lt;P&gt;GET spfli&lt;/P&gt;&lt;P&gt;FIELDS carrid connid.&lt;/P&gt;&lt;P&gt;WRITE: / 'GET SPFLI' color 1,&lt;/P&gt;&lt;P&gt;spfli-carrid,&lt;/P&gt;&lt;P&gt;spfli-connid.&lt;/P&gt;&lt;P&gt;GET sflight&lt;/P&gt;&lt;P&gt;FIELDS fldate.&lt;/P&gt;&lt;P&gt;WRITE: / 'GET SFLIGHT' color 2,&lt;/P&gt;&lt;P&gt;sflight-fldate.&lt;/P&gt;&lt;P&gt;GET spfli LATE.&lt;/P&gt;&lt;P&gt;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'GET SPFLI LATE'.&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;WRITE: 'END-OF-SELECTION'&lt;/P&gt;&lt;P&gt;color 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;event sequencing&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can include a logical database in every type 1 program using the program attributes.&lt;/P&gt;&lt;P&gt;Each node in the logical database's hierarchy also provides you with a GET event block (in addition to&lt;/P&gt;&lt;P&gt;the other event blocks). (GET SPFLI, GET SFLIGHT, GET SBOOK in the example above).&lt;/P&gt;&lt;P&gt;You can program individual record processing within these GET event blocks.&lt;/P&gt;&lt;P&gt;At runtime the event blocks that create lists are processed, in the following order:&lt;/P&gt;&lt;P&gt;START-OF SELECTION.&lt;/P&gt;&lt;P&gt;GET SPFLI and GET SFLIGHT are called several times in nested SELECT logic according to the&lt;/P&gt;&lt;P&gt;structure of the logical database.&lt;/P&gt;&lt;P&gt;END-OF-SELECTION is called after all GET events, and immediately before the list is sent to the&lt;/P&gt;&lt;P&gt;presentation server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;example&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;REPORT bc400d_logical_database.&lt;/P&gt;&lt;P&gt;NODES: spfli, sflight.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;WRITE: / 'START-OF-SELECTION'&lt;/P&gt;&lt;P&gt;color 3.&lt;/P&gt;&lt;P&gt;FIELDS carrid connid.&lt;/P&gt;&lt;P&gt;WRITE: / 'GET SPFLI' color 1,&lt;/P&gt;&lt;P&gt;spfli-carrid,&lt;/P&gt;&lt;P&gt;spfli-connid.&lt;/P&gt;&lt;P&gt;FIELDS fldate.&lt;/P&gt;&lt;P&gt;WRITE: / 'GET SFLIGHT' color 2,&lt;/P&gt;&lt;P&gt;sflight-fldate.&lt;/P&gt;&lt;P&gt;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'GET SPFLI LATE'.&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;WRITE: 'END-OF-SELECTION'&lt;/P&gt;&lt;P&gt;color 3.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 07:22:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445215#M827428</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T07:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Logical Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445216#M827429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOGICAL DATABASES:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Logical Databases are used to generate report.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;It is a repository object, not a data dictionary object.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Under one logical database, a node is created first for the corresponding table in the database.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;A logical database can have any number of related nodes in the hierarchical manner.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;First node of the logical database is called as ROOT NODE.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SLDB or SE36 to create logical databases.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Navigations to Create Logical Database:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------" /&gt;&lt;P&gt;SLDB -&amp;gt; Specify LDB name starting with Z or Y -&amp;gt; Click on Create -&amp;gt; Opens an interface -&amp;gt; Enter short description &lt;/P&gt;&lt;P&gt;-&amp;gt; Create -&amp;gt; Save under a package and assign request number -&amp;gt; Opens an interface &lt;/P&gt;&lt;P&gt;-&amp;gt; Specify Root Node name (MARA) -&amp;gt; Enter short description for the Root node &lt;/P&gt;&lt;P&gt;-&amp;gt; Specify Database Table name (MARA) -&amp;gt; Create -&amp;gt; Opens an interface &lt;/P&gt;&lt;P&gt;-&amp;gt; Select the Root Node (KNA1) -&amp;gt; Click on SELECTIONS pushbutton from Appn. &lt;/P&gt;&lt;P&gt;Toolbar -&amp;gt; Click on Yes to generate Selection Screens from the Structure &lt;/P&gt;&lt;P&gt;-&amp;gt; Click on No to Search Help -&amp;gt; Opens an Interface &lt;/P&gt;&lt;P&gt;-&amp;gt; Select the checkboxes to create Field Selections and Free Selections &lt;/P&gt;&lt;P&gt;-&amp;gt; TRansfer -&amp;gt; Opens an Include Program -&amp;gt; Decomment Select-Options statement and specify range variable as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT-OPTIONS :  MATNUM  FOR MARA-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; Save -&amp;gt; Activate -&amp;gt; Come back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Select the Node -&amp;gt; Click on SOURCE CODE pushbutton &lt;/P&gt;&lt;P&gt;-&amp;gt; Click on Yes to generate source code from Structure and Selections -&amp;gt; Opens a report with two Include Files :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;include DBZLOGICAL_DATABASE1TOP . " header&lt;/P&gt;&lt;P&gt;include DBZLOGICAL_DATABASE1NXXX . " all system routines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; -&amp;gt; Double click on Header File to declare global variables -&amp;gt; Specify Following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TABLES : MARA * Autogenerated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DATA IT_MARA LIKE MARA OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; Save -&amp;gt; Activate -&amp;gt; Come back -&amp;gt; Double click on System Routine file, where the fetching operations are done &lt;/P&gt;&lt;P&gt;-&amp;gt; Opens an Include File with three subfiles as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;include DBZLOGICAL_DATABASE1N001 . " Node MARA&lt;/P&gt;&lt;P&gt;include DBZLOGICAL_DATABASE1FXXX . " init, PBO, PAI&lt;/P&gt;&lt;P&gt;include DBZLOGICAL_DATABASE1SXXX . " search help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; Double click on the first file -&amp;gt; Specify SELECT operation statement as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from mara into table it_mara where matnr in MATNUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PUT MARA.  			* AUTOGENERATED CODE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_mara.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; it_mara-matnr, it_mara-mtart, it_mara-mbrsh, it_mara-meins.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; Save -&amp;gt; Activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To Access LDB node, create SE38 PROGRAM, Specify LDB name in ATTRIBUTES section -&amp;gt; Specify following code in SE38:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NODES MARA.&lt;/P&gt;&lt;P&gt;GET MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; Save -&amp;gt; Activate -&amp;gt; Execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 07:53:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445216#M827429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T07:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Logical Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445217#M827430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Why the data is not filling into PERNR structure after End-of-selection event, it is showing as ########&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;PNM Raju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 11:30:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445217#M827430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-15T11:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Logical Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445218#M827431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Why the data is not filling into PERNR structure after End-of-selection event, it is showing as ########&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;PNM Raju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 08:14:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logical-database/m-p/3445218#M827431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-17T08:14:06Z</dc:date>
    </item>
  </channel>
</rss>

