<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ABAP Tutorials &#187; ABAP HR</title>
	<atom:link href="http://www.abap-tutorials.com/tag/abap-hr/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.abap-tutorials.com</link>
	<description>ABAP Tutorials, Guides, Training, Manuals</description>
	<lastBuildDate>Thu, 17 Nov 2011 07:43:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Custom HR Infotypes Creation</title>
		<link>http://www.abap-tutorials.com/2010/03/21/hr-infotypes-creation/</link>
		<comments>http://www.abap-tutorials.com/2010/03/21/hr-infotypes-creation/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 14:32:16 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[ABAP HR]]></category>
		<category><![CDATA[Module Pool]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[HR infotypes]]></category>

		<guid isPermaLink="false">http://www.abap-tutorials.com/?p=1406</guid>
		<description><![CDATA[There are requirements for an ABAP-HR programmer for creating custom HR infotypes. The following PDF shows a walk-through of the steps required to set up custom Infotype from scratch. The steps include creating new Infotype from PM01, to defining structure for it, to defining attributes, till dialog module assignment.     Download link: ABAP HR Infotype [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">There are requirements for an ABAP-HR programmer for creating custom HR infotypes.</p>
<p style="text-align: justify;"><a href="http://www.abap-tutorials.com/wp-content/uploads/2010/03/wizard.jpg"><img class="aligncenter size-full wp-image-1407" title="Create Infotype" src="http://www.abap-tutorials.com/wp-content/uploads/2010/03/wizard.jpg" alt="" width="157" height="206" /></a>The following PDF shows a walk-through of the steps required to set up custom Infotype from scratch.</p>
<p style="text-align: justify;">The steps include creating new Infotype from PM01, to defining structure for it, to defining attributes, till dialog module assignment.</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">Download link: <a href="http://www.abap-tutorials.com/wp-content/uploads/pdfs/Infotype_creation.pdf" target="_blank">ABAP HR Infotype Creation</a></p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2009/11/18/abap-hr-program-to-list-maintained-infotypes-in-sap/' rel='bookmark' title='ABAP HR Program to list maintained Infotypes in SAP'>ABAP HR Program to list maintained Infotypes in SAP</a></li>
<li><a href='http://www.abap-tutorials.com/2009/07/20/abap-editor-create-custom-pattern/' rel='bookmark' title='ABAP Editor: Create custom Pattern'>ABAP Editor: Create custom Pattern</a></li>
<li><a href='http://www.abap-tutorials.com/2010/01/14/programmers-guide-to-abap-hr/' rel='bookmark' title='Programmer&#8217;s Guide to ABAP HR'>Programmer&#8217;s Guide to ABAP HR</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2010/03/21/hr-infotypes-creation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programmer&#8217;s Guide to ABAP HR</title>
		<link>http://www.abap-tutorials.com/2010/01/14/programmers-guide-to-abap-hr/</link>
		<comments>http://www.abap-tutorials.com/2010/01/14/programmers-guide-to-abap-hr/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 15:21:14 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP HR]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Clusters]]></category>
		<category><![CDATA[HR infotypes]]></category>
		<category><![CDATA[macros]]></category>
		<category><![CDATA[PDF]]></category>

		<guid isPermaLink="false">http://www.abap-tutorials.com/?p=1279</guid>
		<description><![CDATA[The following PDF file is a Programmer&#8217;s Guide to ABAP HR.      It covers following points in ABAP HR :   Brief description of modules in SAP-HR  Concept of Infotypes  Infotype Structures  Creation of infotype  Enhancement of infotype  HR Macros  Use of Provide statement  Cluster reading for [...]]]></description>
			<content:encoded><![CDATA[<p>The following PDF file is a Programmer&#8217;s Guide to ABAP HR. </p>
<p style="text-align: center;">
<div style="text-align: center;"><a href="http://www.abap-tutorials.com/wp-content/uploads/2010/01/sap-abap-jobs-3-300x200.jpg"></a></div>
<p><a href="http://www.abap-tutorials.com/wp-content/uploads/2010/01/sap-abap-jobs-3-300x200.jpg"></a> </p>
<div><a href="http://www.abap-tutorials.com/wp-content/uploads/2010/01/sap-abap-jobs-3-300x200.jpg"></a></div>
<p><a href="http://www.abap-tutorials.com/wp-content/uploads/2010/01/sap-abap-jobs-3-300x200.jpg"></p>
<div style="width: 100%; float: left;"><img class="aligncenter size-full wp-image-1283" title="SAP ABAP HR" src="http://www.abap-tutorials.com/wp-content/uploads/2010/01/sap-abap-jobs-3-300x200.jpg" alt="" width="300" height="200" /></div>
<p> </p>
<p></a>It covers following points in ABAP HR : </p>
<div id="_mcePaste">
<ul>
<li> Brief description of modules in SAP-HR</li>
<li> Concept of Infotypes</li>
<li> Infotype Structures</li>
<li> Creation of infotype</li>
<li> Enhancement of infotype</li>
<li> HR Macros</li>
<li> Use of Provide statement</li>
<li> Cluster reading for Payroll results</li>
<li> Example of PA letters infotype (Customer defined)</li>
</ul>
</div>
<p><span id="more-1279"></span> </p>
<p>Link : <a href="http://www.abap-tutorials.com/wp-content/uploads/pdfs/ABAP_HR_PROGRAMING.pdf" target="_blank">Programmer&#8217;s Guide to ABAP HR</a></p>
<pre><span style="color: #888888;">
<address style="text-align: justify;"><span style="color: #888888;">*Source: http://abaphr.com</span></address>

</span></pre>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2009/11/18/abap-vs-abap-hr/' rel='bookmark' title='ABAP Vs. ABAP HR'>ABAP Vs. ABAP HR</a></li>
<li><a href='http://www.abap-tutorials.com/2009/11/20/macros-in-abap-hr-programming-i/' rel='bookmark' title='Macros in ABAP-HR Programming &#8211; I'>Macros in ABAP-HR Programming &#8211; I</a></li>
<li><a href='http://www.abap-tutorials.com/2010/08/16/upgrade-guide-from-sap-r3-4-6-to-ecc-6-0-for-abap-developers/' rel='bookmark' title='Upgrade Guide from SAP R/3 4.6 to ECC 6.0 for ABAP Developers'>Upgrade Guide from SAP R/3 4.6 to ECC 6.0 for ABAP Developers</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2010/01/14/programmers-guide-to-abap-hr/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>ABAP HR &#8211; Linking Personnel no to SAP User-id</title>
		<link>http://www.abap-tutorials.com/2009/12/22/abap-hr-linking-personnel-no-to-sap-user-id/</link>
		<comments>http://www.abap-tutorials.com/2009/12/22/abap-hr-linking-personnel-no-to-sap-user-id/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 08:39:08 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP HR]]></category>
		<category><![CDATA[Enhancement/Modification]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Personnel No]]></category>
		<category><![CDATA[SAP User-id]]></category>

		<guid isPermaLink="false">http://www.abap-tutorials.com/?p=1230</guid>
		<description><![CDATA[  The linking between Personnel No and the SAP Userid is available in the infotype 0105. This information can be maintained as shown below:  Go to transaction PA30.    Enter the infotype 0105 in the “Direct selection” and 0001 in the subtype.     Click on Create.  Following screen appears:     Enter the start date and [...]]]></description>
			<content:encoded><![CDATA[<p> </p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">The linking between Personnel No and the SAP Userid is available in the infotype 0105. This information can be maintained as shown below: </div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">Go to transaction PA30.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">  </div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">Enter the infotype 0105 in the “Direct selection” and 0001 in the subtype. </div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">  </div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">Click on Create. </div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">Following screen appears: </div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">  </div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">Enter the start date and the end date as required. Also enter the SAP User-id to which this personnel number has to be mapped. </div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">Click on Save to update your records </div>
<p style="text-align: justify;"><span style="border-collapse: collapse; font-family: Arial; line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;">The linking between Personnel No and the SAP Userid is pretty useful when we are required to map both of these ( as in case of SAP Employee Self Service). The mapping is available in the infotype 0105. This information can be maintained as shown below: </span></p>
<p style="text-align: justify;"><span style="border-collapse: collapse; font-family: Arial; line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;">1. Go to transaction PA30. Enter the infotype 0105 in the “Direct selection” and 0001 in the subtype. Click on Create.</span></p>
<p style="text-align: center;"><span style="border-collapse: collapse; font-family: Arial; line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"> </span></p>
<div style="width: 100%; float: left;"><img class="aligncenter size-full wp-image-1235" title="link01" src="http://www.abap-tutorials.com/wp-content/uploads/2009/12/link011.jpg" alt="link01" width="614" height="445" /></div>
<p> </p>
<p style="text-align: center;"> </p>
<p style="text-align: left;"><span id="more-1230"></span></p>
<p style="text-align: justify;">2. Following screen appears: </p>
<p style="text-align: center; "> </p>
<div style="width: 100%; float: left;"><img class="aligncenter size-full wp-image-1236" title="link02" src="http://www.abap-tutorials.com/wp-content/uploads/2009/12/link021.jpg" alt="link02" width="614" height="445" /></div>
<p> </p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">Enter the start date and the end date as required. Also enter the SAP User-id to which this personnel number has to be mapped. </p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">Click on Save to update your records.</p>
<p style="text-align: justify;"><span style="border-collapse: collapse; font-family: Arial; line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><br />
</span></p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2009/11/20/macros-in-abap-hr-programming-i/' rel='bookmark' title='Macros in ABAP-HR Programming &#8211; I'>Macros in ABAP-HR Programming &#8211; I</a></li>
<li><a href='http://www.abap-tutorials.com/2009/12/21/hiding-fields-in-an-infotype-abap-hr/' rel='bookmark' title='Hiding fields in an Infotype &#8211; ABAP HR'>Hiding fields in an Infotype &#8211; ABAP HR</a></li>
<li><a href='http://www.abap-tutorials.com/2009/11/19/logical-database-in-sap-a-must-for-abap-hr-programmer/' rel='bookmark' title='Logical Database in SAP &#8211; a must for ABAP HR programmer'>Logical Database in SAP &#8211; a must for ABAP HR programmer</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2009/12/22/abap-hr-linking-personnel-no-to-sap-user-id/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Hiding fields in an Infotype &#8211; ABAP HR</title>
		<link>http://www.abap-tutorials.com/2009/12/21/hiding-fields-in-an-infotype-abap-hr/</link>
		<comments>http://www.abap-tutorials.com/2009/12/21/hiding-fields-in-an-infotype-abap-hr/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 06:57:05 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP HR]]></category>
		<category><![CDATA[Enhancement/Modification]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Infotype]]></category>

		<guid isPermaLink="false">http://www.abap-tutorials.com/?p=1208</guid>
		<description><![CDATA[  It is sometimes required to customize the screen fields in the HR Infotypes. This can be done using the view V_T588M.     1. If we see in PA30, the standard screen for 0023 (Other/Previous Employers) is:       2. Let us hide the field “Work Contract” &#38; “Job” from the standard Infotype [...]]]></description>
			<content:encoded><![CDATA[<p> <br />
It is sometimes required to customize the screen fields in the HR Infotypes. This can be done using the view V_T588M.</p>
<div style="width: 100%; float: left;"> <img class="aligncenter size-full wp-image-1209" title="hide_fields0" src="http://www.abap-tutorials.com/wp-content/uploads/2009/12/hide_fields0.jpg" alt="hide_fields0" width="615" height="480" /></div>
<p> <br />
<span id="more-1208"></span></p>
<p>1. If we see in PA30, the standard screen for 0023 (Other/Previous Employers) is:</p>
<p style="text-align: center;"> </p>
<div style="width: 100%; float: left;"><img class="aligncenter size-full wp-image-1211" title="hide_fields1" src="http://www.abap-tutorials.com/wp-content/uploads/2009/12/hide_fields1.jpg" alt="hide_fields1" width="614" height="445" /></div>
<p> </p>
<p> </p>
<p>2. Let us hide the field “Work Contract” &amp; “Job” from the standard Infotype screen.</p>
<p style="text-align: center;"> </p>
<div style="width: 100%; float: left;"><img class="aligncenter size-full wp-image-1212" title="hide_fields2" src="http://www.abap-tutorials.com/wp-content/uploads/2009/12/hide_fields2.jpg" alt="hide_fields2" width="614" height="445" /></div>
<p> </p>
<p> </p>
<p>Go to SM30 &amp; enter view name as “V_T588M”. Click on “Maintain”.</p>
<p style="text-align: center;"> </p>
<div style="width: 100%; float: left;"><img class="aligncenter size-full wp-image-1213" title="hide_fields3" src="http://www.abap-tutorials.com/wp-content/uploads/2009/12/hide_fields3.jpg" alt="hide_fields3" width="614" height="445" /></div>
<p> </p>
<p> </p>
<p>3. Enter the module pool program &amp; click Ok. In our case it is MP002300.</p>
<p style="text-align: center;"> </p>
<div style="width: 100%; float: left;"><img class="aligncenter size-full wp-image-1214" title="hide_fields4" src="http://www.abap-tutorials.com/wp-content/uploads/2009/12/hide_fields4.jpg" alt="hide_fields4" width="523" height="132" /></div>
<p> </p>
<p> </p>
<p>4. Now click on &#8216;New Entries&#8217; button.</p>
<p style="text-align: center;"> </p>
<div style="width: 100%; float: left;"><img class="aligncenter size-full wp-image-1215" title="hide_fields5" src="http://www.abap-tutorials.com/wp-content/uploads/2009/12/hide_fields5.jpg" alt="hide_fields5" width="614" height="445" /></div>
<p> </p>
<p> </p>
<p>5. Now enter the “Module Pool” (mandatory) “Standard screen” (mandatory).Press “Enter”.</p>
<p style="text-align: center;"> </p>
<div style="width: 100%; float: left;"><img class="aligncenter size-full wp-image-1216" title="hide_fields6" src="http://www.abap-tutorials.com/wp-content/uploads/2009/12/hide_fields6.jpg" alt="hide_fields6" width="614" height="445" /></div>
<p> </p>
<p>6. After we press “Enter”, all the screen fields of the Infotype are shown along with their attributes.</p>
<p> </p>
<p>7. Now, we can change the attributes according to our requirements by selecting the desired radio button. After that press Save.</p>
<p style="text-align: center;"> </p>
<div style="width: 100%; float: left;"><img class="aligncenter size-full wp-image-1217" title="hide_fields7" src="http://www.abap-tutorials.com/wp-content/uploads/2009/12/hide_fields7.jpg" alt="hide_fields7" width="614" height="445" /></div>
<p> </p>
<p> </p>
<p>8. Then Go to PA30  and check the changes done to the standard Infotype (here Infotype 0023). The fields we chose to hide gets hidden.</p>
<p style="text-align: center;"> </p>
<div style="width: 100%; float: left;"><img class="aligncenter size-full wp-image-1218" title="hide_fields8" src="http://www.abap-tutorials.com/wp-content/uploads/2009/12/hide_fields8.jpg" alt="hide_fields8" width="614" height="445" /></div>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2009/12/22/abap-hr-linking-personnel-no-to-sap-user-id/' rel='bookmark' title='ABAP HR &#8211; Linking Personnel no to SAP User-id'>ABAP HR &#8211; Linking Personnel no to SAP User-id</a></li>
<li><a href='http://www.abap-tutorials.com/2009/11/18/abap-vs-abap-hr/' rel='bookmark' title='ABAP Vs. ABAP HR'>ABAP Vs. ABAP HR</a></li>
<li><a href='http://www.abap-tutorials.com/2009/07/29/display-oaer-pictures-on-screen/' rel='bookmark' title='ABAP Program to Display OAER pictures on Screen'>ABAP Program to Display OAER pictures on Screen</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2009/12/21/hiding-fields-in-an-infotype-abap-hr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ABAP HR program to download Employee data</title>
		<link>http://www.abap-tutorials.com/2009/12/11/abap-hr-program-to-download-employee-data/</link>
		<comments>http://www.abap-tutorials.com/2009/12/11/abap-hr-program-to-download-employee-data/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 07:12:31 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP HR]]></category>
		<category><![CDATA[Function Modules]]></category>
		<category><![CDATA[Report]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[Upload Download]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[employee data]]></category>
		<category><![CDATA[logical database]]></category>
		<category><![CDATA[PNP]]></category>

		<guid isPermaLink="false">http://www.abap-tutorials.com/?p=1153</guid>
		<description><![CDATA[Following program downloads Employee Data into Excel file(.xls). The selection criteria can be specified at the run time. It also uses Logical Database &#8216;PNP&#8217; ( to be specified in the program attributes) to retrieve various personnel data.       Program Code:   REPORT zdownempdata . INFOTYPES: 0000, 0001, 0007, 0008, 0121, 0615. NODES: pernr. TABLES: t001p. [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Following program downloads Employee Data into Excel file(.xls). The selection criteria can be specified at the run time. It also uses Logical Database &#8216;PNP&#8217; ( to be specified in the program attributes) to retrieve various personnel data.</p>
<div style="width: 100%; float: left;"><img class="aligncenter size-full wp-image-1154" title="download_empl_data" src="http://www.abap-tutorials.com/wp-content/uploads/2009/12/download_empl_data.jpg" alt="download_empl_data" width="614" height="445" /></div>
<p> </p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"><span id="more-1153"></span></p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"><strong><span style="color: #3366ff;">Program Code: </span></strong></p>
<p> </p>
<pre lang="ABAP">REPORT  zdownempdata  .

INFOTYPES: 0000, 0001, 0007, 0008, 0121, 0615.
NODES: pernr.
TABLES: t001p.

TYPES: BEGIN OF t_employee,
*        INCLUDE STRUCTURE hrms_biw_io_occupancy.
  begda	TYPE begda,
  endda	TYPE endda,
  pernr	TYPE pernr_d,
  rfpnr	TYPE rfpnr,
  bukrs	TYPE bukrs,
  werks	TYPE persa,
  btrtl	TYPE btrtl,
  persg	TYPE persg,
  persk	TYPE persk,
  orgeh	TYPE orgeh,
  stell	TYPE stell,
  plans	TYPE plans,
  kokrs	TYPE mast_coar,
  kostl	TYPE mast_cctr,
  abkrs	TYPE abkrs,
  molga	TYPE molga,
  trfar	TYPE trfar,
  trfgb	TYPE trfgb,
  trfkz	TYPE trfkz,
  trfgr	TYPE trfgr,
  trfst	TYPE trfst,
  bsgrd	TYPE bsgrd,
  ansal	TYPE ansal_15,
  ancur	TYPE ancur,
  empct	TYPE empct,
  stat2	TYPE stat2,
  ncsdate     TYPE hiredate,
  sltyp	TYPE p_sltyp,
  slreg	TYPE p_slreg,
  slgrp	TYPE p_slgrp,
  sllev	TYPE p_sllvl,
  ansvh	TYPE ansvh,
  vdsk1	TYPE vdsk1,
  sname	TYPE smnam,
 END OF t_employee.
DATA: it_employee TYPE STANDARD TABLE OF t_employee INITIAL SIZE 0,
      wa_employee TYPE t_employee.

TYPES: BEGIN OF t_emptexts,
*        INCLUDE STRUCTURE hrms_bw_txt_employee.
  DATEFROM  TYPE RSDATEFROM,
  DATETO  TYPE RSDATETO,
  PERNR	TYPE PERSNO,
  TXTMD	TYPE EMNAM,
 END OF t_emptexts.
DATA: it_emptexts TYPE STANDARD TABLE OF t_emptexts INITIAL SIZE 0,
      wa_emptexts TYPE t_emptexts.

TYPES: BEGIN OF t_contract,
*        INCLUDE STRUCTURE pa0615.
  pernr TYPE p0615-pernr,
  begda TYPE p0615-begda,
  endda TYPE p0615-endda,
  aedtm TYPE p0615-aedtm,
  ctype TYPE p0615-ctype,
  cbeg  TYPE p0615-cbeg,
  cend  TYPE p0615-cend,
 END OF t_contract.
DATA: it_contract TYPE STANDARD TABLE OF t_contract INITIAL SIZE 0,
      wa_contract TYPE t_contract.

DATA: it_tabemp TYPE filetable,
      gd_subrcemp TYPE i,
      it_tabempt TYPE filetable,
      gd_subrcempt TYPE i,
      it_tabcont TYPE filetable,
      gd_subrccont TYPE i.

DATA: gd_downfile TYPE string.

SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
PARAMETERS: p_emp   LIKE rlgrap-filename,
            p_empt  LIKE rlgrap-filename,
            p_cont LIKE rlgrap-filename.
SELECTION-SCREEN END OF BLOCK block1.

***********************************************************************
*at selection-screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_emp.

  REFRESH: it_tabemp.
  CALL METHOD cl_gui_frontend_services=&gt;file_open_dialog
    EXPORTING
      window_title      = 'Select File'
      default_filename  = '*.xls'
      initial_directory = 'C:\'
      multiselection    = ' '  "No multiple selection
    CHANGING
      file_table        = it_tabemp
      rc                = gd_subrcemp.

  LOOP AT it_tabemp INTO p_emp.
  ENDLOOP.

***********************************************************************
*at selection-screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_empt.

  REFRESH: it_tabemp.
  CALL METHOD cl_gui_frontend_services=&gt;file_open_dialog
    EXPORTING
      window_title      = 'Select File'
      default_filename  = '*.xls'
      initial_directory = 'C:\'
      multiselection    = ' '  "No multiple selection
    CHANGING
      file_table        = it_tabempt
      rc                = gd_subrcempt.

  LOOP AT it_tabempt INTO p_empt.
  ENDLOOP.

***********************************************************************
*at selection-screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_cont.

  REFRESH: it_tabcont.
  CALL METHOD cl_gui_frontend_services=&gt;file_open_dialog
    EXPORTING
      window_title      = 'Select File'
      default_filename  = '*.xls'
      initial_directory = 'C:\'
      multiselection    = ' '  "No multiple selection
    CHANGING
      file_table        = it_tabcont
      rc                = gd_subrccont.

  LOOP AT it_tabcont INTO p_cont.
  ENDLOOP.

************************************************************************
*START-OF-SELECTION.
START-OF-SELECTION.

GET pernr.
* Selecting the latest infotype record
  rp_provide_from_last p0000 space pn-begda pn-endda.
  rp_provide_from_last p0001 space pn-begda pn-endda.
  rp_provide_from_last p0007 space pn-begda pn-endda.
  rp_provide_from_last p0008 space pn-begda pn-endda.
  rp_provide_from_last p0121 space pn-begda pn-endda.
  rp_provide_from_last p0615 space pn-begda pn-endda.

  MOVE-CORRESPONDING p0001 TO wa_employee.
  wa_employee-rfpnr = p0121-rfp01. "?????

  MOVE-CORRESPONDING p0007 TO wa_employee.
  MOVE-CORRESPONDING p0008 TO wa_employee.
  MOVE-CORRESPONDING p0000 TO wa_employee.

  SELECT SINGLE molga
    FROM t001p
    INTO wa_employee-molga
   WHERE werks EQ p0001-werks AND
         btrtl EQ p0001-btrtl.

  SELECT SINGLE trfkz
    FROM t503
    INTO wa_employee-trfkz
   WHERE persg EQ p0001-persg AND
         persk EQ p0001-persk.

  CALL FUNCTION 'HR_ENTRY_DATE'
    EXPORTING
      persnr                     = pernr-pernr
*   RCLAS                      =
*   BEGDA                      = '18000101'
*   ENDDA                      = '99991231'
*   VARKY                      =
   IMPORTING
      entrydate                  = wa_employee-ncsdate
* TABLES
*   ENTRY_DATES                =
 EXCEPTIONS
   ENTRY_DATE_NOT_FOUND       = 1
   PERNR_NOT_ASSIGNED         = 2
   OTHERS                     = 3
            .
  IF sy-subrc &lt;&gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

* append employee data
  APPEND wa_employee TO it_employee.
  CLEAR: wa_employee.

  wa_emptexts-datefrom = p0001-begda.
  wa_emptexts-dateto   = p0001-endda.
  wa_emptexts-pernr    = p0001-pernr.
  wa_emptexts-txtmd    = p0001-ename.

* append employee texts data
  APPEND wa_emptexts TO it_emptexts.
  CLEAR: wa_emptexts.

  MOVE-CORRESPONDING p0615 TO wa_contract.
* append employee contract data
  APPEND wa_contract TO it_contract.
  CLEAR: wa_contract.

************************************************************************
*END-OF-SELECTION.
END-OF-SELECTION.

* download employee data
  IF NOT p_emp IS INITIAL.
    gd_downfile = p_emp.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename              = gd_downfile
        filetype              = 'ASC'
        write_field_separator = 'X'
      TABLES
        data_tab              = it_employee.
    IF sy-subrc EQ 0.
      WRITE:/ 'Employee file downloaded to',
              gd_downfile.
    ELSE.
      WRITE:/ 'There was an error downloading Employee file to',
              gd_downfile.
    ENDIF.
  ENDIF.

* download employee texts data
  IF NOT p_empt IS INITIAL.
    gd_downfile = p_empt.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename              = gd_downfile
        filetype              = 'ASC'
        write_field_separator = 'X'
      TABLES
        data_tab              = it_emptexts.
    IF sy-subrc EQ 0.
      WRITE:/ 'Employee text file downloaded to',
              gd_downfile.
    ELSE.
      WRITE:/ 'There was an error downloading Employee text file to',
              gd_downfile.
    ENDIF.
  ENDIF.

* download contract data
  IF NOT p_cont IS INITIAL.
    gd_downfile = p_cont.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename              = gd_downfile
        filetype              = 'ASC'
        write_field_separator = 'X'
      TABLES
        data_tab              = it_contract.
    IF sy-subrc EQ 0.
      WRITE:/ 'Employee contract file downloaded to',
              gd_downfile.
    ELSE.
WRITE:/ 'There was an error downloading Employee contract file to',
              gd_downfile.
    ENDIF.
  ENDIF.</pre>
<p> </p>
<p>Before execution the program, browse for the file path and provide file name for files Employee Data, Employee Data Texts, and Employee Contract Data.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1158" title="download_empl_data2" src="http://www.abap-tutorials.com/wp-content/uploads/2009/12/download_empl_data2.jpg" alt="download_empl_data2" width="450" height="335" /></p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2009/11/20/macros-in-abap-hr-programming-i/' rel='bookmark' title='Macros in ABAP-HR Programming &#8211; I'>Macros in ABAP-HR Programming &#8211; I</a></li>
<li><a href='http://www.abap-tutorials.com/2009/12/07/maintain-hr-report-category/' rel='bookmark' title='Create HR Report Category in SAP'>Create HR Report Category in SAP</a></li>
<li><a href='http://www.abap-tutorials.com/2010/05/25/bdc-to-insert-wage-type-in-infotype-0008/' rel='bookmark' title='BDC to insert Wage Type in Infotype 0008 (Basic Pay)'>BDC to insert Wage Type in Infotype 0008 (Basic Pay)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2009/12/11/abap-hr-program-to-download-employee-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

