<?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: HR ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr-abap/m-p/2885152#M677722</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;GET is the command used in Logical database concept for fetching the data&lt;/P&gt;&lt;P&gt;GET PERNR will fetch all the Pernr's one by one in a Loop like thing&lt;/P&gt;&lt;P&gt;and for each pernr the data records in other infotypes have been processed&lt;/P&gt;&lt;P&gt;and it goes on till all the pernr's are completed.&lt;/P&gt;&lt;P&gt;see the sample code&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get PERNR from LDB&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;get pernr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get data from Respective Infotypes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;rp_provide_from_last p0001 space pnpbegda pnpendda.&lt;/P&gt;&lt;P&gt;if p0001-kostl in pnpkostl.&lt;/P&gt;&lt;P&gt;rep_tab-kostl = p0001-kostl.&lt;/P&gt;&lt;P&gt;rep_tab-pernr = p0001-pernr.&lt;/P&gt;&lt;P&gt;rep_tab-ename = p0001-ename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Position Text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear t528t-plstx.&lt;/P&gt;&lt;P&gt;select single plstx into t528t-plstx from t528t&lt;/P&gt;&lt;P&gt;where plans = p0001-plans and&lt;/P&gt;&lt;P&gt;otype = c_type and&lt;/P&gt;&lt;P&gt;sprsl = sy-langu.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;rep_tab-ptext = t528t-plstx.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Cost Center Text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear cskt-ltext.&lt;/P&gt;&lt;P&gt;select single ltext into cskt-ltext from cskt&lt;/P&gt;&lt;P&gt;where spras = sy-langu and&lt;/P&gt;&lt;P&gt;kokrs = c_kokrs and&lt;/P&gt;&lt;P&gt;kostl = p0001-kostl.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;rep_tab-ctext = cskt-ltext.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;append rep_tab.&lt;/P&gt;&lt;P&gt;clear rep_tab.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;********************&lt;/P&gt;&lt;P&gt;In attributes of program u need to include logical database as PNP etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives idea about logical database....&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;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Less coding s required to retrieve data compared to normal internel tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables used LDB are in hierarchial structure.&lt;/P&gt;&lt;P&gt;Mainly we used LDBs in HR Abap Programming.&lt;/P&gt;&lt;P&gt;Where all tables are highly inter related so LDBs can optimize the performance there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this Document. All abt LDB's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2flibrary%2fabap%2fabap-code-samples%2fldb+browser.doc" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2flibrary%2fabap%2fabap-code-samples%2fldb+browser.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GO THROUGH LINKS - &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-basis-abap.com/saptab.htm" target="test_blank"&gt;http://www.sap-basis-abap.com/saptab.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3110478"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html" target="test_blank"&gt;www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sap-img.com/abap/abap-interview-question.htm" target="test_blank"&gt;www.sap-img.com/abap/abap-interview-question.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm" target="test_blank"&gt;www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm&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://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Gothru the blog which provides info on LDB's:&lt;/P&gt;&lt;P&gt;/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there r total six events in LDB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get, -- starts executing from root node onwards.&lt;/P&gt;&lt;P&gt;get late -- starts executing subroot nodes first &amp;amp; later root node.&lt;/P&gt;&lt;P&gt;get late reject -- starts executing subroot nodes only.&lt;/P&gt;&lt;P&gt;get late reject table -- starts executing that particular Database tale only.&lt;/P&gt;&lt;P&gt;put --- it will write the data. &lt;/P&gt;&lt;P&gt;***************************&lt;/P&gt;&lt;P&gt;tables : pernr.&lt;/P&gt;&lt;P&gt;infotypes : 0001,0002.&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;&lt;/P&gt;&lt;P&gt;loop at p0002.&lt;/P&gt;&lt;P&gt;provide vorna nachn from p0002 between pn-begda and pn-endda.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; p0002-vorna, p0002-nachn.&lt;/P&gt;&lt;P&gt;endprovide.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ensure u give PNP in attributes of program : in Logical Database&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**********************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The infotype records are imported to internal tables Pnnnn (for example, P0006 for infotype 0006).These tables are then processed in a PROVIDE-ENDPROVIDE loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax for retrieving data from multiple infotypes using PROVIDE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET PERNR.&lt;/P&gt;&lt;P&gt;PROVIDE * FROM P0002&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FROM P0006&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;BETWEEN PN-BEGDA AND PN-ENDDA&lt;/P&gt;&lt;P&gt;WHERE P0006-SUBTY = '1'.&lt;/P&gt;&lt;P&gt;IF P0006_VALID = 'X'.&lt;/P&gt;&lt;P&gt;WRITE...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDPROVIDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROVIDE STELL&lt;/P&gt;&lt;P&gt;ENAME FROM P0001&lt;/P&gt;&lt;P&gt;GBDAT FROM P0002&lt;/P&gt;&lt;P&gt;BETWEEN PN-BEGDA AND PN-ENDDA.&lt;/P&gt;&lt;P&gt;WRITE: P0001-ENAME,&lt;/P&gt;&lt;P&gt;P0002-GBDAT.&lt;/P&gt;&lt;P&gt;ENDPROVIDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;******************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="500112"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3858043"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************************&lt;/P&gt;&lt;P&gt;Provide and endprovide is used when u have defined logical database in your program attribute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;se38-&amp;gt;attribute&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally it is used in HR module.&lt;/P&gt;&lt;P&gt;In HR there are many infotypes (for time bing consider infotype as a transparent table )&lt;/P&gt;&lt;P&gt;In program we define infotype by INFOTYPES statement&lt;/P&gt;&lt;P&gt;this creates internal table automatically &lt;/P&gt;&lt;P&gt;to get data from these infotype into internal table we use GET event .&lt;/P&gt;&lt;P&gt;at the execution of this event all data are fetched into int.table via logical database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now here is your answer !&lt;/P&gt;&lt;P&gt;if you want to process data inside infotype u can use Provide - End provide and also Loop Endloop.&lt;/P&gt;&lt;P&gt;But In provide -Endprovide differs from normal loop statement in these way.&lt;/P&gt;&lt;P&gt;1 : you can give start date and END date in Provide statement itself so no need of seperation of data within required dates.&lt;/P&gt;&lt;P&gt;2: you can join several Infotypes (internal table here) in one loop &lt;/P&gt;&lt;P&gt;E.G .provide * from p0001 p0001 ...&lt;/P&gt;&lt;P&gt;Endprovide.&lt;/P&gt;&lt;P&gt;3: you can Project one/several field in loop via Provide statement.&lt;/P&gt;&lt;P&gt;E.G your table contains 50 records &lt;/P&gt;&lt;P&gt;there is one field in table say ABC&lt;/P&gt;&lt;P&gt;out of 50 records value of ABC is changed only two times so &lt;/P&gt;&lt;P&gt;logically loop will execute only 2 times if u have projected the field in Provide statement.&lt;/P&gt;&lt;P&gt;E.G &lt;/P&gt;&lt;P&gt;Provide ABC from p0000 ...&lt;/P&gt;&lt;P&gt;ENdprovide.&lt;/P&gt;&lt;P&gt;4: there are many other advantages too - but i have counted the major one.&lt;/P&gt;&lt;P&gt;**************************************&lt;/P&gt;&lt;P&gt;both loop..endloop AND provide..endprovide can be used in a Report tied to the PNP/PNPCE LDB. With Provide, you have the option of using JOIN similar to the SELECT statements. ie retrieve records from multiple infotypes in one statement.&lt;/P&gt;&lt;P&gt;****************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Oct 2007 10:28:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-05T10:28:09Z</dc:date>
    <item>
      <title>HR ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr-abap/m-p/2885151#M677721</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;&lt;/P&gt;&lt;P&gt; I am new to HR ABAP.&lt;/P&gt;&lt;P&gt;I am writing a piece of code below. Can anyone explain what each statement is doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: pernr.&lt;/P&gt;&lt;P&gt;INFOTYPES: 0001,0002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET pernr.&lt;/P&gt;&lt;P&gt;PROVIDE * FROM p0002 BETWEEN pn-begda AND pn-endda.&lt;/P&gt;&lt;P&gt;  WRITE: p0002-pernr, p0002-nachn, p0002-vorna.&lt;/P&gt;&lt;P&gt;ENDPROVIDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Soumya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 10:25:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hr-abap/m-p/2885151#M677721</guid>
      <dc:creator>soumya_jose3</dc:creator>
      <dc:date>2007-10-05T10:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: HR ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr-abap/m-p/2885152#M677722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;GET is the command used in Logical database concept for fetching the data&lt;/P&gt;&lt;P&gt;GET PERNR will fetch all the Pernr's one by one in a Loop like thing&lt;/P&gt;&lt;P&gt;and for each pernr the data records in other infotypes have been processed&lt;/P&gt;&lt;P&gt;and it goes on till all the pernr's are completed.&lt;/P&gt;&lt;P&gt;see the sample code&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get PERNR from LDB&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;get pernr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get data from Respective Infotypes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;rp_provide_from_last p0001 space pnpbegda pnpendda.&lt;/P&gt;&lt;P&gt;if p0001-kostl in pnpkostl.&lt;/P&gt;&lt;P&gt;rep_tab-kostl = p0001-kostl.&lt;/P&gt;&lt;P&gt;rep_tab-pernr = p0001-pernr.&lt;/P&gt;&lt;P&gt;rep_tab-ename = p0001-ename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Position Text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear t528t-plstx.&lt;/P&gt;&lt;P&gt;select single plstx into t528t-plstx from t528t&lt;/P&gt;&lt;P&gt;where plans = p0001-plans and&lt;/P&gt;&lt;P&gt;otype = c_type and&lt;/P&gt;&lt;P&gt;sprsl = sy-langu.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;rep_tab-ptext = t528t-plstx.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Cost Center Text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear cskt-ltext.&lt;/P&gt;&lt;P&gt;select single ltext into cskt-ltext from cskt&lt;/P&gt;&lt;P&gt;where spras = sy-langu and&lt;/P&gt;&lt;P&gt;kokrs = c_kokrs and&lt;/P&gt;&lt;P&gt;kostl = p0001-kostl.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;rep_tab-ctext = cskt-ltext.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;append rep_tab.&lt;/P&gt;&lt;P&gt;clear rep_tab.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;********************&lt;/P&gt;&lt;P&gt;In attributes of program u need to include logical database as PNP etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives idea about logical database....&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;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Less coding s required to retrieve data compared to normal internel tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables used LDB are in hierarchial structure.&lt;/P&gt;&lt;P&gt;Mainly we used LDBs in HR Abap Programming.&lt;/P&gt;&lt;P&gt;Where all tables are highly inter related so LDBs can optimize the performance there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this Document. All abt LDB's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2flibrary%2fabap%2fabap-code-samples%2fldb+browser.doc" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2flibrary%2fabap%2fabap-code-samples%2fldb+browser.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GO THROUGH LINKS - &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-basis-abap.com/saptab.htm" target="test_blank"&gt;http://www.sap-basis-abap.com/saptab.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3110478"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html" target="test_blank"&gt;www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sap-img.com/abap/abap-interview-question.htm" target="test_blank"&gt;www.sap-img.com/abap/abap-interview-question.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm" target="test_blank"&gt;www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm&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://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Gothru the blog which provides info on LDB's:&lt;/P&gt;&lt;P&gt;/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there r total six events in LDB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get, -- starts executing from root node onwards.&lt;/P&gt;&lt;P&gt;get late -- starts executing subroot nodes first &amp;amp; later root node.&lt;/P&gt;&lt;P&gt;get late reject -- starts executing subroot nodes only.&lt;/P&gt;&lt;P&gt;get late reject table -- starts executing that particular Database tale only.&lt;/P&gt;&lt;P&gt;put --- it will write the data. &lt;/P&gt;&lt;P&gt;***************************&lt;/P&gt;&lt;P&gt;tables : pernr.&lt;/P&gt;&lt;P&gt;infotypes : 0001,0002.&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;&lt;/P&gt;&lt;P&gt;loop at p0002.&lt;/P&gt;&lt;P&gt;provide vorna nachn from p0002 between pn-begda and pn-endda.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; p0002-vorna, p0002-nachn.&lt;/P&gt;&lt;P&gt;endprovide.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ensure u give PNP in attributes of program : in Logical Database&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**********************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The infotype records are imported to internal tables Pnnnn (for example, P0006 for infotype 0006).These tables are then processed in a PROVIDE-ENDPROVIDE loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax for retrieving data from multiple infotypes using PROVIDE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET PERNR.&lt;/P&gt;&lt;P&gt;PROVIDE * FROM P0002&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FROM P0006&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;BETWEEN PN-BEGDA AND PN-ENDDA&lt;/P&gt;&lt;P&gt;WHERE P0006-SUBTY = '1'.&lt;/P&gt;&lt;P&gt;IF P0006_VALID = 'X'.&lt;/P&gt;&lt;P&gt;WRITE...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDPROVIDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROVIDE STELL&lt;/P&gt;&lt;P&gt;ENAME FROM P0001&lt;/P&gt;&lt;P&gt;GBDAT FROM P0002&lt;/P&gt;&lt;P&gt;BETWEEN PN-BEGDA AND PN-ENDDA.&lt;/P&gt;&lt;P&gt;WRITE: P0001-ENAME,&lt;/P&gt;&lt;P&gt;P0002-GBDAT.&lt;/P&gt;&lt;P&gt;ENDPROVIDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;******************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="500112"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3858043"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************************&lt;/P&gt;&lt;P&gt;Provide and endprovide is used when u have defined logical database in your program attribute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;se38-&amp;gt;attribute&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally it is used in HR module.&lt;/P&gt;&lt;P&gt;In HR there are many infotypes (for time bing consider infotype as a transparent table )&lt;/P&gt;&lt;P&gt;In program we define infotype by INFOTYPES statement&lt;/P&gt;&lt;P&gt;this creates internal table automatically &lt;/P&gt;&lt;P&gt;to get data from these infotype into internal table we use GET event .&lt;/P&gt;&lt;P&gt;at the execution of this event all data are fetched into int.table via logical database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now here is your answer !&lt;/P&gt;&lt;P&gt;if you want to process data inside infotype u can use Provide - End provide and also Loop Endloop.&lt;/P&gt;&lt;P&gt;But In provide -Endprovide differs from normal loop statement in these way.&lt;/P&gt;&lt;P&gt;1 : you can give start date and END date in Provide statement itself so no need of seperation of data within required dates.&lt;/P&gt;&lt;P&gt;2: you can join several Infotypes (internal table here) in one loop &lt;/P&gt;&lt;P&gt;E.G .provide * from p0001 p0001 ...&lt;/P&gt;&lt;P&gt;Endprovide.&lt;/P&gt;&lt;P&gt;3: you can Project one/several field in loop via Provide statement.&lt;/P&gt;&lt;P&gt;E.G your table contains 50 records &lt;/P&gt;&lt;P&gt;there is one field in table say ABC&lt;/P&gt;&lt;P&gt;out of 50 records value of ABC is changed only two times so &lt;/P&gt;&lt;P&gt;logically loop will execute only 2 times if u have projected the field in Provide statement.&lt;/P&gt;&lt;P&gt;E.G &lt;/P&gt;&lt;P&gt;Provide ABC from p0000 ...&lt;/P&gt;&lt;P&gt;ENdprovide.&lt;/P&gt;&lt;P&gt;4: there are many other advantages too - but i have counted the major one.&lt;/P&gt;&lt;P&gt;**************************************&lt;/P&gt;&lt;P&gt;both loop..endloop AND provide..endprovide can be used in a Report tied to the PNP/PNPCE LDB. With Provide, you have the option of using JOIN similar to the SELECT statements. ie retrieve records from multiple infotypes in one statement.&lt;/P&gt;&lt;P&gt;****************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 10:28:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hr-abap/m-p/2885152#M677722</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T10:28:09Z</dc:date>
    </item>
  </channel>
</rss>

