<?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: ldb in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ldb/m-p/3475219#M835333</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi dear&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOGICAL DATABASES:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logical Databases are used to generate report. &lt;/P&gt;&lt;P&gt;It is a repository object, not a data dictionary object. &lt;/P&gt;&lt;P&gt;Under one logical database, a node is created first for the corresponding table in the database. &lt;/P&gt;&lt;P&gt;A logical database can have any number of related nodes in the hierarchical manner. &lt;/P&gt;&lt;P&gt;First node of the logical database is called as ROOT NODE. &lt;/P&gt;&lt;P&gt;SLDB or SE36 to create logical databases. &lt;/P&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;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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Feb 2008 10:51:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-29T10:51:57Z</dc:date>
    <item>
      <title>ldb</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ldb/m-p/3475216#M835330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how i work in LDB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 10:42:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ldb/m-p/3475216#M835330</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T10:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: ldb</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ldb/m-p/3475217#M835331</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;A href="http://help.sap.com/saphelp_46c/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_46c/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 10:48:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ldb/m-p/3475217#M835331</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T10:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: ldb</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ldb/m-p/3475218#M835332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check this simple program,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logical database&lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HR Logical Database is PNP &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Main Functions of the logical database PNP:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Standard Selection screen &lt;/P&gt;&lt;P&gt;Data Retrieval &lt;/P&gt;&lt;P&gt;Authorization check  &lt;/P&gt;&lt;P&gt;To use logical database PNP in your program, specify in your program attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Standard Selection Screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date selection&lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;Person selection&lt;/P&gt;&lt;P&gt;Person selection is the 'true' selection of choosing a group of employees for whom the report is to run. &lt;/P&gt;&lt;P&gt;Sorting Data&lt;/P&gt;&lt;P&gt;· The standard sort sequence lists personnel numbers in ascending order.&lt;/P&gt;&lt;P&gt;· SORT function allows you to sort the report data otherwise. All the sorting fields are from infotype 0001. &lt;/P&gt;&lt;P&gt;Report Class &lt;/P&gt;&lt;P&gt;· You can suppress input fields which are not used on the selection screen by assigning a report class to your program.&lt;/P&gt;&lt;P&gt;· If SAP standard delivered report classes do not satisfy your requirements, you can create your own report class through the IMG. &lt;/P&gt;&lt;P&gt;Data Retrieval from LDB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create data structures for infotypes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    INFOTYPES: 0001, "ORG ASSIGNMENT&lt;/P&gt;&lt;P&gt;                        0002, "PERSONAL DATA&lt;/P&gt;&lt;P&gt;                        0008. "BASIC PAY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Fill data structures with the infotype records. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Start-of-selection. &lt;/P&gt;&lt;P&gt;         GET PERNR. &lt;/P&gt;&lt;P&gt;    End-0f-selection.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Read Master Data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Infotype structures (after GET PERNR) are internal tables loaded with data. &lt;/P&gt;&lt;P&gt;The infotype records (selected within the period) are processed sequentially by the PROVIDE - ENDPROVIDE loop. &lt;/P&gt;&lt;P&gt;          GET PERNR.&lt;/P&gt;&lt;P&gt;             PROVIDE * FROM Pnnnn BETWEEN PN/BEGDA AND PN/ENDDA&lt;/P&gt;&lt;P&gt;                    If Pnnnn-XXXX = ' '. write:/ Pnnnn-XXXX. endif. &lt;/P&gt;&lt;P&gt;             ENDPROVIDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Period-Related Data&lt;/P&gt;&lt;P&gt;All infotype records are time stamped. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT0006 (Address infotype)&lt;/P&gt;&lt;P&gt;01/01/1990   12/31/9999  present &lt;/P&gt;&lt;P&gt;          Which record to be read depends on the date selection period specified on the&lt;/P&gt;&lt;P&gt;          selection screen. PN/BEGDA PN/ENDDA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current Data &lt;/P&gt;&lt;P&gt;IT0006 Address  -  01/01/1990 12/31/9999   present &lt;/P&gt;&lt;P&gt;RP-PROVIDE-FROM-LAST retrieves the record which is valid in the data selection period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, pn/begda = '19990931'    pn/endda = '99991231'&lt;/P&gt;&lt;P&gt;IT0006 subtype 1 is resident address&lt;/P&gt;&lt;P&gt;RP-PROVIDE-FROM-LAST P0006 1 PN/BEGDA PN/ENDDA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 29, 2008 6:23 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 10:51:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ldb/m-p/3475218#M835332</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T10:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: ldb</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ldb/m-p/3475219#M835333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi dear&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOGICAL DATABASES:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logical Databases are used to generate report. &lt;/P&gt;&lt;P&gt;It is a repository object, not a data dictionary object. &lt;/P&gt;&lt;P&gt;Under one logical database, a node is created first for the corresponding table in the database. &lt;/P&gt;&lt;P&gt;A logical database can have any number of related nodes in the hierarchical manner. &lt;/P&gt;&lt;P&gt;First node of the logical database is called as ROOT NODE. &lt;/P&gt;&lt;P&gt;SLDB or SE36 to create logical databases. &lt;/P&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;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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 10:51:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ldb/m-p/3475219#M835333</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T10:51:57Z</dc:date>
    </item>
  </channel>
</rss>

