on 03-15-2012 1:25 PM
Hi,
I had started a post on this previously, but since the new sdn was launched, I cannot find this post anywhere, so am reposting the issue.
I have added my new detail to the employeedetailsxsl.xsl file (contract elements) alongside employeedetailinfo, emploeeextendeddetailinfo etc.
From a previous post, I was told - the detail that contains this section must be linked to the detail configuration for the details panel (sappositiondetailsconfiguration.xml). I am not sure how to add this second step
I am trying to make contract type from infotype 16 contract elements appear in the extended employee profile box.
Thanks
Husna
If you have created a new detail which defines a new section which uses a new detailsdata -> data element -> OTF to do this then ...
I would recommend adding this as a linked detail in "SAPPositionIncumbentsDetailsConfigExtended.xml" something like this (amend SAPEmployeeExtendedDetails to be your own detail name)
<linkeddetails>
<linkeddetail name="SAPEmployeeExtendedDetails">
<linkto>SAPEmployeeExtendedDetails</linkto>
<links>
<link>
<passvalue>Pernr</passvalue>
<passfieldname>PERNR</passfieldname>
<passvaluesource>Data</passvaluesource>
</link>
</links>
<mode>Data</mode>
<recordlimit>0</recordlimit>
</linkeddetail>
</linkeddetails>
You mentioned that you'd changed "employeedetailsxsl.xsl" but be sure to amend "employeemoredetailsxsl.xsl" so the Actions -> Profile feature is consistent with the details panel itself.
FYI - security is applied to the whole Extended EE Profile so no further action required there.
Stephen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I was doing this, I'd be tempted to create a new detail for my own new section. Have you done this?
If you have, it will link through to an OTF (aka NakisaRFC) data element that gets the data.
Does you data element work in Preview (via Data Center)? You can enter a test PERNR to see if it correctly returns data.
Stephen
Hi Stephen,
Yes I have done all the above - created the detail, linked it to the data element, and it previewed fine as well..
I have added the name of the sections from my created detail into employeedetailsxsl.xsl. Could you please explain how i would link my detail to positiondetailsconfiguration.xml as contract elements uses pernr as a primary key whereas sappositiondetailsconfiguration is using position id, so there is a mapping problem between these.
Thanks a lot
Husna
Hi Stephen,
I have done everything youhave advised...putting the code in here now, as it is still not working and I am not sure what is going wrong.
In employeedetailsxsl.xsl - we added the last two, which is from our detail section names.
<xsl:value-of select="//cds/sections/section[@name='EmployeeExtendedExtraInfoSection'][$tabpos]" disable-output-escaping="yes" />
As advised, in the SAPPositionincumbentdetailsconfigextended.xml - i have linked my detail with this
</link>
</links>
</linkeddetail>
have i missed a step, or is something not right.
Thanks
Husna
Hi Husna,
It seems like you've done everything right. I would do 2 things: check the things Stephen has mentioned and check that the field in your new NakisaRFC function is called PERNR. Sometimes the NakisaRFC creation wizard appends the SAP infotype table name to the front of the fields (e.g. PA0016PERNR).
Best regards,
Luke
Hi Luke
I called the new detail contract elements and added the fields pernr, contract type and contract end date. links to pa0016.
I have checked that the field in the data element is called PERNR and there hasn't been any changes to it by the wizard.
I have checked the log and the only error it is throwing is:
169620. 19 Mar 2012 10:59:19 ERROR com.nakisa.Logger - contractelements : java.lang.NullPointerException: while trying to invoke the method com.nakisa.framework.webelement.DetailConfig.getDetailConfiguration() of an object loaded from local variable 'detailConfigObj'
169621. 19 Mar 2012 10:59:19 ERROR com.nakisa.Logger - java.lang.NullPointerException: while trying to invoke the method com.nakisa.framework.webelement.DetailConfig.getDetailConfiguration() of an object loaded from local variable 'detailConfigObj'
Also, I have checked the security settings and in the roles section where you can add/remove secure items, in the hierarchy the fields are visible for the detail I created. However, as mentioned it is not appearing in the user console...
Regards
Husna
Hi Husna,
Do you mean it's called "contract elements" with a space? If so you should remove the space (or replace it with an underscore or other character) from the name of the detail and the references, since this can cause these errors (they are object reference type errors).
Please also check the field names as specified in my previous post.
Best regards,
Luke
Ok, so we know your dataelement works - good.
So it must either be in your link, the detail or the detaildata.
Can you paste each one (ideally with some formatting - or screenshot and embed images) so I can see?
For good measure, pls include the dataelement config too.
I suspect it isn't passing the key in correctly, so do check the fieldname as Luke suggested (i.e. what is the name of the pernr field in your new data element - in your current configuration it needs to be "PERNR" ... so anything different would explain your error).
Stephen
Hi Stephen,
Please find attached screenshots for the data element, plus files attached are for the detail configuration and detail data.. Please let me know if I am missing anything out or if you need any additional information. Thanks
data element code:
- <![CDATA[
]]>DLL
- <![CDATA[
]]>Nakisa.SAP.Custom.OTFProcessor
</item>
- <![CDATA[
]]>CLASS
- <![CDATA[
]]>Nakisa.SAP.Custom.OTFProcessor.BAPI_SAP_OTFProcessor_Report
</item>
- <![CDATA[
]]>Description
- <![CDATA[
]]>Contractelements
</item>
- <![CDATA[
]]>WIZARDTYPE
- <![CDATA[
]]>OTFSIMPLE
</item>
</extrainfo>
- <![CDATA[
]]>true
- <![CDATA[
]]>SAPConnection
- <![CDATA[
]]>_Contractelements
- <![CDATA[
]]>Personnel number
</field>
- <![CDATA[
]]>Contract Type
</field>
- <![CDATA[
]]>Contract End Date
</field>
</fields>
</keys>
</dataelement>
Thanks. Only thing I notice is that in "SAPPositionIncumbentsDetailsConfigExtended.xml" you have included the linked detail section twice. Do you want to remove one and re-publish and try?
Also earlier you said you'd added 2 section names ... not sure why because I think you only need to add 1 "A3565B81-0724-6629-5298-0D50E4B0AA5B" which is defined in "Contractelements.xml". Do you want to update "employeedetailsxsl.xsl" as well.
Then let me know how it goes (if not well, then check the CDS log again).
Stephen
Hi Stephen,
I removed the duplication and also updated employeedetailsxsl.xsl, republished...came back to the user console, its still not there...The errors in the log appearing since the publish are:
519910. 19 Mar 2012 16:46:38 ERROR com.nakisa.Logger - contractelements : java.lang.NullPointerException: while trying to invoke the method com.nakisa.framework.webelement.DetailConfig.getDetailConfiguration() of an object loaded from local variable 'detailConfigObj'
519911. 19 Mar 2012 16:46:38 ERROR com.nakisa.Logger - java.lang.NullPointerException: while trying to invoke the method com.nakisa.framework.webelement.DetailConfig.getDetailConfiguration() of an object loaded from local variable 'detailConfigObj'
519977. 19 Mar 2012 16:46:39 ERROR com.nakisa.Logger - Detail - SAPEmployeeManagerLinkedDetailsConfiguration : FetchData : Fetch data operation failed. Index: 0, Size: 0
519979. 19 Mar 2012 16:46:39 ERROR com.nakisa.Logger - Detail - SAPEmployeePeersLinkedDetailsConfiguration : FetchData : Fetch data operation failed. Index: 0, Size: 0
519987. 19 Mar 2012 16:46:40 ERROR com.nakisa.Logger - com.nakisa.framework.data.commandProcessor.impl.SqlServerCommandProcessor : getDataTables : Could not create a database connection. Data Element Name: ExpertSeek_Detail1_DataElement
519988. 19 Mar 2012 16:46:40 ERROR com.nakisa.Logger - Detail - ExpertSeek_OrgUnit_GROUPSMEMBERSMASTER_Detail : FetchData : Fetch data operation failed. Index: 0, Size: 0
Regards
Husna
Hi Luke,
Please find both files attached, checked the section and it is what it should be, also removed the duplication...
Any idea on why the fields are not appearing? I'm starting to lose the will to live with this! I do not understand, they are even showing in the hierarchy but not anywhere in the user console!
Don't worry about the errors "SAPEmployeeManagerLinkedDetailsConfiguration" and "SAPEmployeePeersLinkedDetailsConfiguration " as this is related to fact you don't have S-S relationships defined. Nothing to worry about - common practice in UK.
Error message shows it is clearly trying to link to "contractelements" detail (in first red line of your msg).
Seems to be a problem reading the detail section ... and you said you've updated "employeedetailsxsl.xsl" as per my previous post suggestion then I'm confused ... perhaps easiest to confirm that is correct by attaching.
Stephen
Hi Stephen,
Not sure why it did that again, but anyway, I removed the duplicated linked detail, saved, then went to Admin Console, published, then to User Console - still not there!
Just one question, if the fields are to appear in employee extended info - which is sappositionincumbentsdetailsconfigextended, should they not appear there in the hierarchy rather than as fields in details contractelements...
Regards
Husna
OK, I think I see it now ... for some reason your new section has also been included as a section in "SAPPositionIncumbentsDetailsConfigExtended.xml" ... can you remove?
i.e. remove all this - I've updated your previous attachment and re-attached.
<section enable="true" name="A3565B81-0724-6629-5298-0D50E4B0AA5B
">
<fieldsetname>3c56026ea8fd4e559094551a1bcc2217
</fieldsetname>
<presentation>DetailSection1MultipleXSL
</presentation>
</section>
Stephen
Hi Husna,
Can you check PresentationResources.xml in your .delta folder and look for EmployeeDetailsXSL. Does the case of the filename reflect the actual name of the file (e.g. employeedetailsxsl.xsl). If not, please change it to match and re-publish. If PresentationResources.xml doesn't exist then copy it from outside the .delta folder.
Best regards,
Luke
Hi Stephen, Luke
Ok the error that has appeared again is:
86930. 20 Mar 2012 12:30:36 INFO com.nakisa.Logger - BAPI_SAP_OTFProcessor_Report : WhereClause : (PERNR='00003084'); Table : (_Contractelements); Dataelement : (Contractelements)
86931. 20 Mar 2012 12:30:36 ERROR com.nakisa.Logger - contractelements : java.lang.NullPointerException: while trying to invoke the method com.nakisa.framework.webelement.DetailConfig.getDetailConfiguration() of an object loaded from local variable 'detailConfigObj'
86932. 20 Mar 2012 12:30:36 ERROR com.nakisa.Logger - java.lang.NullPointerException: while trying to invoke the method com.nakisa.framework.webelement.DetailConfig.getDetailConfiguration() of an object loaded from local variable 'detailConfigObj'
Before this, there was processing of another dataelement which was fine.
I have gone in and checked that specific employee number and can confirm it does have contract elements data in it.
Majority of my test data has PA0016 data in the sap system, I have gone and checked employees individually in Nakisa incase the fields appeared somewhere!
Luke, I copied the presentationresources.xml file to .delta and renamed employeedetailsxsl to be all lower case, saved and republished..still nothing showing in the user console
Regards
Husna
Hi Husna,
Great news! After fixing the detail configuration it was probably technically correct - it looks like it was the PresentationResources.xml stopping it from showing. It frustrates me that this has to be done for every standard XSL file that you change.
The issue you are now facing looks almost certainly like it is the link. Usually if it cannot link or it is set incorrectly then it does this. Can you attach your NakisaRFC function and your data element? Hopefully we can nail this.
One thing might be to change your linkeddetail so that the mode is Record rather than Data.
Best regards,
Luke
Hi Luke, Stephen,
Thank you sooo much for your help on this! Really appreciate it...some good news..I decided to create a new linkeddetail and mapped it to my data element. Did all the steps and went and published in the Admin Console..went to User Console, and now the fields are there as they should be for each test employee!
Luke I do not understand what you mean by having the mode as Record rather than Data. I see where it is appearing in the xml file but not sure what it relates to..
Just one issue that I have noticed is if there are multiple employees for a position, it pulls the fields in for the first employee, but for the second employee the fields are not there...Any idea on why this is happening?
Also, the contract end date is currently showing as year-month-day, I wasnt too sure how would i swap this round to show day/month/year?
Thanks
Husna
Hi Husna,
I wouldn't worry about the Record/Data mode - it was just a suggestion if you didn't get it working.
For the contract end date, you need to define it as a date field in the NakisaRFC function. You have to create a processed date for this and set it to type="date". The application then reads it as a date and displays it in the format that it displays all other fields.
For the multiple employee, it depends how the details are linked. This problem was prevalent in SP1 and shoiuld have been fixed in SP2. Do all of your other fields in the Extended Employee Profile display correctly (e.g. is it just the fields you've added)?
Best regards,
Luke
Hi Luke,
Ah yes I have updated type to date and it is displaying correctly now
Mayeb something more complicated...for Contract Type it displays the number associated to permanent/ temporary - 01, 02 etc. If I wanted to display the actual word 'temporary' or 'permanent next to contract type rather than the number...is it something quite simple or quite difficult?
Yes all the other fields in the Extended Employee profile are displayed for the 2nd person, just my added fields are not there.
Thanks
Husna
Hi Husna,
For the Contract Type number/text - this is correct because SAP stores values as codes. There is then a text table that stores the text value associated with the code. You need to add this table (T547S) to your function and then link it to the PA0016 table by CTTYP field. The fields in this table are CTTYP and CTTXT. The only extract condition you need is the language (SPRSL = 'EN'). In your output table simply change the contract type field with the one from T547S.
Once this is working we can look at your other issues. One thing at a time
Best regards,
Luke
Hi Luke,
I presume I had to do the following: create a new rfc data element linking 2 tables together, then create the linked detail for this data element, then add the section to employee detailsxsl.xsl? I did the steps and published...the fields do appear in the userconsole but again duplicated for every employee like the screenshot above with the problem I was having initially..
to test out I went ahead to add my other field required - , I created a data element for pa0041 for employee leaving date, created the linked detail, then took the section name and added to employeedetailsxsl.xsl and then published in admin console. In the user console, not only is this field appearing as it should be for each employee, but it is also appearing for the 2nd employee assigned to a position.
Not to sure what else I can do to sort out the mentioned problem?
Regards
Husna
Hi Husna,
This is all very odd, but I do think it's probably down to the customizing. I would edit the original NakisaRFC function (_Contractelements.xml), add the table for T547S there and link them together (as per my previous post), change the field in the output table (keep the same alias but change the source field). This is all you have to do to get the correct value to show. Then I would check the linked details. Can you confirm that for the shared position, both employees have a contract type assigned in PA0016?
Best regards,
Luke
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.