<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr/m-p/2358401#M521384</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 below program&lt;/P&gt;&lt;P&gt;Look at the marco used in the report&lt;/P&gt;&lt;P&gt;rp_provide_from_last p0001 space pn-begda pn-endda.&lt;/P&gt;&lt;P&gt;*******************&lt;/P&gt;&lt;P&gt;REPORT Z_HR_DEMO_2 LINE-SIZE 200&lt;/P&gt;&lt;P&gt;                   LINE-COUNT 65&lt;/P&gt;&lt;P&gt;                   MESSAGE-ID SY.&lt;/P&gt;&lt;P&gt;*-- Declaration&lt;/P&gt;&lt;P&gt;TABLES: pernr,&lt;/P&gt;&lt;P&gt;        T001P.                         "plant section&lt;/P&gt;&lt;P&gt;INFOTYPES: 0001,                       "Organ. Assignment&lt;/P&gt;&lt;P&gt;           0006.                       "Recurr. Earn. &amp;amp; Deduc.&lt;/P&gt;&lt;P&gt;DATA: FILLED_LINES LIKE SY-INDEX,&lt;/P&gt;&lt;P&gt;      WA_RC LIKE SY-SUBRC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Processing&lt;/P&gt;&lt;P&gt;GET pernr.&lt;/P&gt;&lt;P&gt;  DESCRIBE TABLE P0006 LINES FILLED_LINES.&lt;/P&gt;&lt;P&gt;  IF filled_lines GT 0.&lt;/P&gt;&lt;P&gt;    rp_provide_from_last p0001 space pn-begda pn-endda.&lt;/P&gt;&lt;P&gt;    rp-read-t001p p0001-werks p0001-btrtl space.&lt;/P&gt;&lt;P&gt;    SKIP 2.&lt;/P&gt;&lt;P&gt;    WRITE: / pernr-pernr,&lt;/P&gt;&lt;P&gt;             (20) p0001-ename,&lt;/P&gt;&lt;P&gt;             p0001-werks,&lt;/P&gt;&lt;P&gt;             t001p-btext.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_READ_INFOTYPE'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;          PERNR           = PERNR-PERNR&lt;/P&gt;&lt;P&gt;          INFTY           = '0006'&lt;/P&gt;&lt;P&gt;         BEGDA           =  PN-BEGDA&lt;/P&gt;&lt;P&gt;         ENDDA           =  PN-ENDDA&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;         SUBRC           = WA_RC&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;          INFTY_TAB       = P0006&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;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;    WRITE :  P0006-STRAS,&lt;/P&gt;&lt;P&gt;             P0006-ORT01,&lt;/P&gt;&lt;P&gt;             P0006-LAND1,&lt;/P&gt;&lt;P&gt;             P0006-PSTLZ,&lt;/P&gt;&lt;P&gt;             P0006-TELNR,&lt;/P&gt;&lt;P&gt;             P0006-STATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&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;IFF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Reward Suitable points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jun 2007 06:20:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-13T06:20:36Z</dc:date>
    <item>
      <title>HR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr/m-p/2358394#M521377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; how do we fetch the last record in the infotype IT0014 using a FM. i want the last record so that i can delimit the end date from 12/31/9999 to a new date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points wud be awarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 05:16:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hr/m-p/2358394#M521377</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T05:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: HR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr/m-p/2358395#M521378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mouli,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can always get the last record after fetching the data. You just need to SORT the same. No need to look for a special FM for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 05:20:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hr/m-p/2358395#M521378</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T05:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: HR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr/m-p/2358396#M521379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi mouli,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to select all records from the infotype to itab,&lt;/P&gt;&lt;P&gt;then use describe key word to know total records of that internal table,&lt;/P&gt;&lt;P&gt;then read statement on that itab to know the last record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;seshu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 05:21:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hr/m-p/2358396#M521379</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T05:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: HR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr/m-p/2358397#M521380</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;1. if ur using PNP LDB, then u can use -&amp;gt; rp_provide_from_last.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;INFOTYPES: 0014,   
                     0000.   "Organizational Assignment


START-OF-SELECTION.

GET pernr.

  rp_provide_from_frst p0000 space pn-begda pn-endda.

  if pnp-sw-found EQ '1'.
      READ TABLE p0001 WITH KEY pernr = p0000-pernr.
     if sy-subrc = 0.
     write : p0001-plans. " earliest.
    endif.
  endif.

  rp_provide_from_last p0014 space pn-begda pn-endda.

  if pnp-sw-found EQ '1'.
   READ TABLE p0014 WITH KEY pernr = p0000-pernr.
     if sy-subrc = 0.
     write : p0014-LGART. .
    endif.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 05:24:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hr/m-p/2358397#M521380</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2007-06-13T05:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: HR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr/m-p/2358398#M521381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if u r sure tht u want to read a data with end date 31.12.9999 then u can simply write a select query to read tht record with pernr, endda and subtype in where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use FM HR_INFOTYPE_OPERATION to delimit the current record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab like pa0014.&lt;/P&gt;&lt;P&gt;parameters: p_pernr like pa0014-pernr default  '00062703'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single * from pa0014 into itab&lt;/P&gt;&lt;P&gt;          where pernr = p_pernr&lt;/P&gt;&lt;P&gt;          and   subty = '8970'&lt;/P&gt;&lt;P&gt;          and   endda = '99991231'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: itab-pernr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 05:38:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hr/m-p/2358398#M521381</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T05:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: HR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr/m-p/2358399#M521382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for the replies. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i already fetched the last record after reading the internal table of PA0014 corresponding to a wage type with end date as 12/31/9999. this would fetch the last record ofcourse but my lead wants a FM which directly fetches the last record for the infotype IT0014 corresponding to a wage type. does anyone know if HR_ECM_READ_INFOTYPE Function Module works?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am not working in PNP LDB. i actually dont know what PNP is?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 05:41:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hr/m-p/2358399#M521382</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T05:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: HR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr/m-p/2358400#M521383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;refer this code then  -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_pernr like pa0014-pernr default  '00062703'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: p0014_tab TYPE TABLE OF p0014 INITIAL SIZE 1 with header line.&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0.&lt;/P&gt;&lt;P&gt;         include structure p0014.&lt;/P&gt;&lt;P&gt;data  end of itab.&lt;/P&gt;&lt;P&gt;DATA: message_handler type ref to IF_HRPA_MESSAGE_HANDLER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_ECM_READ_INFOTYPE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    pernr                 = p_pernr&lt;/P&gt;&lt;P&gt;    infty                 = '0014'&lt;/P&gt;&lt;P&gt;    SUBTY                 = '8970'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OBJPS                 = '*'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SPRPS                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BEGDA                 = '18000101'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ENDDA                 = '99991231'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_AUTH_CHECK         = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    message_handler       = message_handler&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   INFOTYPE_TAB          = itab[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; loop at itab.&lt;/P&gt;&lt;P&gt;   write: itab-pernr.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 06:01:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hr/m-p/2358400#M521383</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T06:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: HR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr/m-p/2358401#M521384</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 below program&lt;/P&gt;&lt;P&gt;Look at the marco used in the report&lt;/P&gt;&lt;P&gt;rp_provide_from_last p0001 space pn-begda pn-endda.&lt;/P&gt;&lt;P&gt;*******************&lt;/P&gt;&lt;P&gt;REPORT Z_HR_DEMO_2 LINE-SIZE 200&lt;/P&gt;&lt;P&gt;                   LINE-COUNT 65&lt;/P&gt;&lt;P&gt;                   MESSAGE-ID SY.&lt;/P&gt;&lt;P&gt;*-- Declaration&lt;/P&gt;&lt;P&gt;TABLES: pernr,&lt;/P&gt;&lt;P&gt;        T001P.                         "plant section&lt;/P&gt;&lt;P&gt;INFOTYPES: 0001,                       "Organ. Assignment&lt;/P&gt;&lt;P&gt;           0006.                       "Recurr. Earn. &amp;amp; Deduc.&lt;/P&gt;&lt;P&gt;DATA: FILLED_LINES LIKE SY-INDEX,&lt;/P&gt;&lt;P&gt;      WA_RC LIKE SY-SUBRC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Processing&lt;/P&gt;&lt;P&gt;GET pernr.&lt;/P&gt;&lt;P&gt;  DESCRIBE TABLE P0006 LINES FILLED_LINES.&lt;/P&gt;&lt;P&gt;  IF filled_lines GT 0.&lt;/P&gt;&lt;P&gt;    rp_provide_from_last p0001 space pn-begda pn-endda.&lt;/P&gt;&lt;P&gt;    rp-read-t001p p0001-werks p0001-btrtl space.&lt;/P&gt;&lt;P&gt;    SKIP 2.&lt;/P&gt;&lt;P&gt;    WRITE: / pernr-pernr,&lt;/P&gt;&lt;P&gt;             (20) p0001-ename,&lt;/P&gt;&lt;P&gt;             p0001-werks,&lt;/P&gt;&lt;P&gt;             t001p-btext.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_READ_INFOTYPE'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;          PERNR           = PERNR-PERNR&lt;/P&gt;&lt;P&gt;          INFTY           = '0006'&lt;/P&gt;&lt;P&gt;         BEGDA           =  PN-BEGDA&lt;/P&gt;&lt;P&gt;         ENDDA           =  PN-ENDDA&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;         SUBRC           = WA_RC&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;          INFTY_TAB       = P0006&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;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;    WRITE :  P0006-STRAS,&lt;/P&gt;&lt;P&gt;             P0006-ORT01,&lt;/P&gt;&lt;P&gt;             P0006-LAND1,&lt;/P&gt;&lt;P&gt;             P0006-PSTLZ,&lt;/P&gt;&lt;P&gt;             P0006-TELNR,&lt;/P&gt;&lt;P&gt;             P0006-STATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&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;IFF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Reward Suitable points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 06:20:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hr/m-p/2358401#M521384</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T06:20:36Z</dc:date>
    </item>
  </channel>
</rss>

