Hi everyone,

I recently implemented the SAPHR Driver in my current environment. I am
running into a problem where the P0041 infotype values are read
properly, but don't get pulled in through the Driver Shim in the
resulting XML Document received. I have the P0041 infotypes in the
filter enabled. I read through Geoffrey Carman's CMP articles (which I
found particularly entertaining and useful, Thanks Geoff!). I am
supposed to process a DAR value of Z1 with an expected Term date and
make decisions to terminate the person record. Here is an excerpt from
my trace:

11/21/13 15:16:52.553]:SAP-HR-CMP PT:ParseIDoc: Parsing infotype: 0041,
[11/21/13 15:16:52.553]:SAP-HR-CMP PT:ParseIDoc: GSA segment
[11/21/13 15:16:52.553]:SAP-HR-CMP PT:ParseIDoc: GSA segment
[11/21/13 15:16:52.553]:SAP-HR-CMP PT:ParseIDoc: GSA segment

I am not able to get any more information from the shim. Any pointers
please? Any help is much appreciated. I can provide more information if


Lothar Haeger;39969 Wrote:
> veenasugu wrote:
> > 1. How do I get the employee starting date (when he starts working
> > first) and the last working date (on termination)?? Please advise.

> funny you ask that today, as I wrote an article yesterday that takes how
> to obtain the SAP exit date in a few xpath statemats as an example for
> the use of xpath axes. Unfortunately it's not published yet, so you'll
> have to wait for http://tinyurl.com/ofdpowv to become accessible in the
> next days for the full text. In short:
> Basically in my SAP system (other may use different fields to store that
> info) the exit date is the day before the begin of the validity period
> (BEGDA) of the action record (Infotype 0000) of type "10" (MASSN) with
> the highest validity end date (ENDDA). Simple and straightforward as
> usual in SAP systems ;-) So map P0000:MASSN:none:74:2 to a custom
> attribute, e.g. auxEmployeeExitDate and put the following in an input
> transform:
> <rule>
> <description>Reformat auxEmployeeExitDate
> (P0000:MASSN:none:74:2)</description>
> <comment xml:space="preserve">Determine the day before the begin of the
> validity period of the action record of type "10" with the highest
> validity end date</comment>
> <conditions/>
> <actions>
> <do-strip-xpath
> expression='self::*//value[ancestor::*/@attr-name="P0000:MASSN:none:74:2"][not(text()="10")]'/>
> <do-strip-xpath
> expression='self::*//value[ancestor::*/@attr-name="P0000:MASSN:none:74:2"][substring(@timestamp,10,8)
> < substring(following-sibling::value/@timestamp,10,8) or
> substring(@timestamp,10,8) <
> substring(preceding-sibling::value/@timestamp,10,8)]'/>
> <do-strip-xpath
> expression='self::*//value[ancestor::*/@attr-name="P0000:MASSN:none:74:2"][not(1)]'/>
> <do-reformat-op-attr name="P0000:MASSN:none:74:2">
> <arg-value>
> <token-convert-time dest-format="yyyyMMdd" offset="-1" offset-unit="day"
> src-format="yyyyMMdd">
> <token-xpath expression="substring($current-value/@timestamp,1,8)"/>
> </token-convert-time>
> </arg-value>
> </do-reformat-op-attr>
> </actions>
> </rule>
> The hire date is stored in InfoType 0041, where it's the date of type
> "01" (again, in my system, don't know about others). This is a bit
> tricky to access, as Infotype 0041 has twelve pars of DAR01/DAT01 (..02,
> ..03 etc.) fields and you've got to read the date out of DAT0x where the
> corresponding DAR0x is "01". The trick is not to use the standard
> attribute definitions from the HRMD_A IDoc, but read the whole set of
> DAR/DAT pairs as on long string and reformat that to strip off all other
> dates than the one you want. So map loginActivationTime or whatever
> attribute you see fit to P0041ATES:none:74:120 and reformat:
> <do-reformat-op-attr name="P0041ATES:none:74:120">
> <arg-value>
> <token-replace-first regex=".*01([0-9]{8}),.*" replace-with="$1">
> <token-replace-all regex="([0-9 ]{10})" replace-with="$1,">
> <token-local-variable name="current-value"/>
> </token-replace-all>
> </token-replace-first>
> </arg-value>
> </do-reformat-op-attr>
> Cheers, Lothar

ssankar_1's Profile: https://forums.netiq.com/member.php?userid=5338
View this thread: https://forums.netiq.com/showthread.php?t=8539