<?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 Sap Query Additional Fields using  Abap Code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-additional-fields-using-abap-code/m-p/6733340#M1457428</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 relatively new to the world of SAP query (Log Database PNPCE), I have written a number of additional fields to retrieve previous info-type data using the select statement E.G &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;prev_endda = p0008-begda - 1.&lt;/P&gt;&lt;P&gt;SELECT  single bsgrd&lt;/P&gt;&lt;P&gt;      INTO FTE1&lt;/P&gt;&lt;P&gt;      FROM&lt;/P&gt;&lt;P&gt;        pa0008&lt;/P&gt;&lt;P&gt;      WHERE pernr EQ  P0008-pernr&lt;/P&gt;&lt;P&gt;      AND   endda EQ prev_endda&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although I can retrieve the previous info-type data , I was wondering if there was a easy way where I could take this a step further and show the Previous , Previous record. I.E&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pernr     FTE Current    FTE1      FTE2&lt;/P&gt;&lt;P&gt;101              60%          30%       75%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess what I am asking is , is there a way to loop through the HR info-type records, does anybody know if there is a standard function or macro I can use to achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help is much appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Mar 2010 20:23:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-18T20:23:10Z</dc:date>
    <item>
      <title>Sap Query Additional Fields using  Abap Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-additional-fields-using-abap-code/m-p/6733340#M1457428</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 relatively new to the world of SAP query (Log Database PNPCE), I have written a number of additional fields to retrieve previous info-type data using the select statement E.G &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;prev_endda = p0008-begda - 1.&lt;/P&gt;&lt;P&gt;SELECT  single bsgrd&lt;/P&gt;&lt;P&gt;      INTO FTE1&lt;/P&gt;&lt;P&gt;      FROM&lt;/P&gt;&lt;P&gt;        pa0008&lt;/P&gt;&lt;P&gt;      WHERE pernr EQ  P0008-pernr&lt;/P&gt;&lt;P&gt;      AND   endda EQ prev_endda&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although I can retrieve the previous info-type data , I was wondering if there was a easy way where I could take this a step further and show the Previous , Previous record. I.E&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pernr     FTE Current    FTE1      FTE2&lt;/P&gt;&lt;P&gt;101              60%          30%       75%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess what I am asking is , is there a way to loop through the HR info-type records, does anybody know if there is a standard function or macro I can use to achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help is much appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 20:23:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-additional-fields-using-abap-code/m-p/6733340#M1457428</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T20:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sap Query Additional Fields using  Abap Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-additional-fields-using-abap-code/m-p/6733341#M1457429</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;Use FM &lt;STRONG&gt;HR_READ_INFOTYPE&lt;/STRONG&gt; To acces PAxxx. It's better than select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 21:47:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-additional-fields-using-abap-code/m-p/6733341#M1457429</guid>
      <dc:creator>StMou</dc:creator>
      <dc:date>2010-03-18T21:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sap Query Additional Fields using  Abap Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-additional-fields-using-abap-code/m-p/6733342#M1457430</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;Thanks for our reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have pasted some example code into my additional field which I have created in SAP Query But im not sure how the loop bit works and how I can populate the additional fields that I have created , could you please explain this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_READ_INFOTYPE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    pernr                 = '000000019'&lt;/P&gt;&lt;P&gt;    infty                 = '01'&lt;/P&gt;&lt;P&gt;    BEGDA                 = '18000101'&lt;/P&gt;&lt;P&gt;    ENDDA                 = '99991231'&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    infty_tab             = p0008&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    INFTY_NOT_FOUND       = 1&lt;/P&gt;&lt;P&gt;    OTHERS                = 2&lt;/P&gt;&lt;P&gt;    LOOP AT p0008.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;NOT SURE WHAT TO PUT IN THIS SECTION *****&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created 3 additional Fields in the infoset Current FTE ,FTE1 FTE2 , and I want to loop through the records and populate the relevant Additional field with the employees FTE  (I only want to populate  where there is a change) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Begda              Endda             FTE        Salary&lt;/P&gt;&lt;P&gt;1/1/2010         31/12/999       60%         19K          (Current  FTE)&lt;/P&gt;&lt;P&gt;01/08/2009     31/12/2009     100%       27k           (FTE1)&lt;/P&gt;&lt;P&gt;01/07/2008     31/7/2009         50%       17K          (FTE2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thanks in anticipation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 22:23:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-additional-fields-using-abap-code/m-p/6733342#M1457430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T22:23:18Z</dc:date>
    </item>
  </channel>
</rss>

