<?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; PNPCE</title>
	<atom:link href="http://www.abap-tutorials.com/tag/pnpce/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>PNP Vs. PNPCE &#8211; Comparing the two Logical Databases</title>
		<link>http://www.abap-tutorials.com/2009/11/23/difference-between-pnp-and-pnpce/</link>
		<comments>http://www.abap-tutorials.com/2009/11/23/difference-between-pnp-and-pnpce/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 13:50:06 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP HR]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Concurrent Employment]]></category>
		<category><![CDATA[logical database]]></category>
		<category><![CDATA[PNP]]></category>
		<category><![CDATA[PNPCE]]></category>

		<guid isPermaLink="false">http://www.abap-tutorials.com/?p=1085</guid>
		<description><![CDATA[PNPCE database in many ways can be said as the extension of  PNP logical database. PNP doesn&#8217;t contain all the data elements that are now in the expanded Concurrent Employment Database. SAP made an internal decision to not modify PNP, rather supercede it with a newer logical database, PNPCE. The PNPCE logical database supports the evaluation [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">PNPCE database in many ways can be said as the extension of  PNP logical database. PNP doesn&#8217;t contain all the data elements that are now in the expanded <strong>Concurrent Employment</strong> Database. SAP made an internal decision to not modify PNP, rather supercede it with a newer logical database, PNPCE.</p>
<p style="text-align: justify;">The PNPCE logical database supports the evaluation of HR master data. It includes the functions of the PNP logical database and offers additional evaluation options. Therefore, PNPCE logical database <strong>should be preffered</strong> over PNP database for all new developments.</p>
<p style="text-align: justify;"><span id="more-1085"></span></p>
<p style="text-align: justify;">The enhanced functionality of PNPCE in comparison to PNP essentially concerns the evaluation of Concurrent Employment, that is the possibility to group evaluate several assignments/personnel numbers of a person. The new events &#8216;<strong>GET PERSON</strong>&#8216; and &#8216;<strong>GET GROUP</strong>&#8216; as well as an enhanced syntax for the INFOTYPES statement (addition <strong>AS PERSON TABLE</strong>) for the procurement of infotype data enable you to use the new functionality. The use of these new functions is optional. You can run a PNPCE report that does not use the new events and the addition for the INFOTYPES statement in a PNP-compatible session. Since the PNPCE also has an improved selection screen, each report benefits from this even if the report does not use the functions for evaluating Concurrent Employment.</p>
<p style="text-align: justify;"><strong>Essentials</strong><br />
A report that wants to use the PNPCE must enter this in its report attributes under Logical database.<br />
In addition, the PERNR structure must be declared in the report using the &#8216;TABLES PERNR&#8217; statement. You can only use the PERNR structure again in certain circumstances. The use of the &#8216;GET PERNR&#8217; event is therefore forbidden. Instead, use the &#8216;GET PERAS&#8217; event. Except for the PERNR-PERNR component, all other components of the PERNR structure are no longer filled and have initial values. This kind of programming (with the exception of PERNR-PERNR) therefore not permitted.<br />
In addition to the &#8216;GET PERAS&#8217; event, you can also use the GET PERSON&#8217; and &#8216;GET GROUP&#8217; events. To be able to use these events, you must declare them using the NODES statement (NODES PERSON&#8217;, &#8216;NODES GROUP&#8217;, or. NODES PERAS&#8217;).</p>
<p style="text-align: justify;"><strong>Explanation of Terms</strong><br />
If the &#8216;GET PERSON&#8217; and &#8216;GET GROUP events and the &#8216;AS PERSON TABLE&#8217; addition for the INFOTYPES statement are not used, the report indicates that it does not require the functionality for evaluating Concurrent Employment. In this case, the report runs in a PNP-compatible session. This is referred to as PNP mode in the following documentation. On the other hand, if the report uses the functionality for evaluating Concurrent Employment we refer to CE mode.</p>
<p style="text-align: justify;"><strong>Features</strong><br />
Process of an Evaluation<br />
The PNPCE selection screen offers you as standard a range of functions that you can use to restrict the personnel number and person selection. The process is initially as follows regardless of whether the report runs in CE or PNP mode. All available functions and selection conditions leads to the selection of personnel numbers. If you use the sorting function, this set of personnel numbers is then sorted according to the sort criteria you selected. In PNP mode, the GET PERAS event is triggered as a result for each personnel number.<br />
In CE mode, the persons belonging to the personnel numbers are determined first for all personnel numbers selected. The GET PERSON event is then triggered for each person. The person ID is specified in the OBJID component of the PERSON structure. PERNR_NUM contains the total number of personnel assignments (= personnel numbers) that this person has and the ALL_PERNRS table, which contains a list of these personnel numbers regardless of whether they were actually selected or not. The SELECTED flag is set to X for the personnel numbers selected. The flag is initial for all personnel numbers that are not selected. The PROCESS flag specifies whether the personnel number should be processed in the rest of the process. This flag is set to X by default for the personnel numbers selected. However, the report can set or delete this flag at the GET PERSON event for all personnel numbers. In this way, report and logical database communicate with each other which enables the report to control the rest of the process.</p>
<p style="text-align: justify;">In the next step, the logical database groups all personnel numbers of a person that are to be processed (that is, all personnel numbers that have the PROCESS flag set). The report can control the type of grouping using the PNPCE_GROUPING_FROM_PAYROLL flag (normal or payroll grouping) and using the PNPGPRSN (grouping reason) and PNPGPVAL (grouping value) parameters of the selection screen. The GET GROUP event is triggered for each group of personnel numbers determined. The GROUPING_REASON and GROUPING_VALUE components contain the grouping reason and grouping value of this group. The number of personnel numbers that belong to this group and that are processed subsequently is in PERNR_NUM. The included ALL_PERNR table contains a list of these personnel numbers with additional information. The SELECTED flag specifies whether the current personnel number was originally selected (flag is set) or was marked by the report as to be processed. GROUPING_BEGDA and GROUPING_ENDDA contain the validity period that the personnel number has for this grouping. The NO_AUTHORITY flag is set if there is insufficient authorization for a personnel number. This personnel number is not processed further. The SORT component defines a standard sort order for the personnel numbers of a group. The report can change this by overwriting the values. In this way, report and logical database communicate with each other, which controls the further processing sequence of the personnel numbers.</p>
<p style="text-align: justify;">The GET PERAS event is then triggered for all personnel numbers of the group (with the exception of the personnel numbers for which no authorization exists) in the sequence defined by the SORT component (see above). The SELECTED, GROUPING_BEGDA, and GROUPING_ENDDA components have the same meaning here as with the GET GROUP event. The PROCESSED_BEFORE flag specifies whether the personnel number has already been processed once before (it is possible that the personnel number belongs to several groupings and has been therefore been processed several times).</p>
<p style="text-align: justify;">


<p>You might also be interested in these posts:<ol><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>
<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>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2009/11/23/difference-between-pnp-and-pnpce/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Macros in ABAP-HR Programming &#8211; I</title>
		<link>http://www.abap-tutorials.com/2009/11/20/macros-in-abap-hr-programming-i/</link>
		<comments>http://www.abap-tutorials.com/2009/11/20/macros-in-abap-hr-programming-i/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 11:32:42 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP HR]]></category>
		<category><![CDATA[Function Modules]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[macro]]></category>
		<category><![CDATA[macros]]></category>
		<category><![CDATA[PNP]]></category>
		<category><![CDATA[PNPCE]]></category>
		<category><![CDATA[RP-PROVIDE-FROM-FRST]]></category>
		<category><![CDATA[RP-PROVIDE-FROM-LAST]]></category>

		<guid isPermaLink="false">http://www.abap-tutorials.com/?p=1081</guid>
		<description><![CDATA[The macros will be used to get the data from the various clusters based on the cluster ID.For Buffering purpose we use macros. For example, when we want to read the data from the cluster RU, we have to pass the cluster ID &#8220;RU&#8221; and Rx-KEY to the particular macro. By using the Rx-key the [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">The macros will be used to get the data from the various clusters based on the cluster ID.For Buffering purpose we use macros.</p>
<p style="text-align: justify;">For example, when we want to read the data from the cluster RU, we have to pass the cluster ID &#8220;RU&#8221; and Rx-KEY to the particular macro. By using the Rx-key the macro will fetch the data from the cluster RU.</p>
<p style="text-align: justify;">Basically we use the macros to IMPORT/EXPORT the data to or from the clusters.</p>
<p style="text-align: justify;"><span id="more-1081"></span></p>
<p style="text-align: justify;">Here is the general naming convension for the IMPORT and EXPORT macros.</p>
<p style="text-align: justify;"><strong><span style="color: #3366ff;">For Import:</span></strong></p>
<p style="text-align: justify;">RP-IMP-Cn-xx</p>
<p style="text-align: justify;">where,</p>
<p style="text-align: justify;">n &#8212;&#8212;&#8211;&gt; No. of PCL file.(ex:1,2,3,4 0r 5)</p>
<p style="text-align: justify;">xx&#8212;&#8212;&#8211;&gt; cluster ID</p>
<p style="text-align: justify;">IMP&#8212;&#8212;&gt; Import</p>
<p style="text-align: justify;"><strong><span style="color: #3366ff;">For Export:</span></strong></p>
<p style="text-align: justify;">RP-EXP-Cn-xx</p>
<p style="text-align: justify;">where,</p>
<p style="text-align: justify;">n &#8212;&#8212;&#8211;&gt; No. of PCL file.(ex:1,2,3,4 0r 5)</p>
<p style="text-align: justify;">xx&#8212;&#8212;&#8211;&gt; cluster ID</p>
<p style="text-align: justify;">EXP&#8212;&#8212;&gt; Export</p>
<p style="text-align: justify;">Macro contains some part of source code which it will be useful for number of applications, just like function modules.</p>
<p style="text-align: justify;"><strong><span style="color: #3366ff;">Generally we use two macros in HR ABAP</span></strong></p>
<ul>
<li>
<div style="text-align: justify;"><strong>RP-PROVIDE-FROM-LAST</strong></div>
</li>
<li>
<div style="text-align: justify;"><strong>RP-PROVIDE-FROM-FRST</strong></div>
</li>
</ul>
<p style="text-align: justify;">The macro RP-PROVIDE-FROM-LAST retrieves the last(latest) data record which is valid in the data selection period.</p>
<p style="text-align: justify;">The macro RP-PROVIDE-FROM-FRST retrieves the first(start)data record which is valid in the data selection period.</p>
<p style="text-align: justify;">For every macro, whether the operation was successful or not will be checked with PNP-SW-FOUND. If PNP-SW-FOUND = 1, then the operation is successful. ( same as sy-subrc but the value is in reverse case)</p>
<p style="text-align: justify;">The macro RP-READ-INFOTYPE retrieves all the data record(s) which is valid in the data selection period. If SY-SUBRC = 0 or initial, then the process is successful.</p>
<p style="text-align: justify;">All the Macros are stored in table TRMAC.</p>
<p style="text-align: justify;">Whenever you are using the macros like RP-PROVIDE-FROM-LAST or RP-PROVIDE-FROM-FRST, check whether you have included logical database PNP in program attributes.</p>
<p style="text-align: justify;">It is not necessary to include logical database PNP/PNPCE in your program when you are using the macro like RP-READ-INFOTYPE A B C D E , where A corresponds to PERNR which describes for which personnel number you require records. B corresponds to INFOTYPE which describes from which infotype you require records. C corresponds to data structure of the declared infotype (internal table like P0000 for infotype 0000) where all the records of the particular personnel number will be stored. D corresponds to Start date. E corresponds to End date.</p>
<p style="text-align: justify;"><strong>Sample Code :</strong></p>
<p style="text-align: justify;">Tables : PERNR.</p>
<p style="text-align: justify;">INFOTYPES : 0001,0002.</p>
<p style="text-align: justify;"> Start-of-selection.</p>
<p style="text-align: justify;">Get PERNR.</p>
<p style="text-align: justify;">RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.</p>
<p style="text-align: justify;"> Write : / P0001-PERNR.</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"><strong><span style="color: #3366ff;">Note:</span></strong></p>
<p style="text-align: justify;">1. NULL is a macro which contains the value 0 (on most implementations). this is the one used to initialize a pointer to NULL</p>
<p style="text-align: justify;">2. Debugging a MACRO is not really possible, prevent the use of them.</p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2009/07/20/macro-an-under-used-modularization-technique/' rel='bookmark' title='MACRO in ABAP &#8211; an under-used Modularization Technique'>MACRO in ABAP &#8211; an under-used Modularization Technique</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>
<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>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2009/11/20/macros-in-abap-hr-programming-i/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

