37 Replies Latest reply: Mar 21, 2012 6:29 PM by Luke Marson RSS

Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile

Husna Siddiqui
Currently Being Moderated

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

  • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
    Stephen Burr
    Currently Being Moderated

    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

    • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
      Husna Siddiqui
      Currently Being Moderated

      Hi Stephen,

      Thanks for your reply.

      Can you just explain what you mean at the beginning - I am trying to put contract type and end date into extended employee profile.

      Regards

      Husna

      • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
        Stephen Burr
        Currently Being Moderated

        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

        • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
          Husna Siddiqui
          Currently Being Moderated

          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

          • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
            Stephen Burr
            Currently Being Moderated

            That is what I did in my first reply ... by adding some linked detail configuration it links from one of the details already used to provide sections in the extended employee profile area to your new detail.

             

            Stephen

            • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
              Husna Siddiqui
              Currently Being Moderated

              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" /> 

              <xsl:value-of select="//cds/sections/section[@name='951AC7E2-BAC2-4AF4-F118-D1B2BC5C0F5E'][$tabpos]" disable-output-escaping="yes" />

              <xsl:value-of select="//cds/sections/section[@name='D7E2775C-2E61-9382-0672-3B57DEFC6B8D'][$tabpos]" disable-output-escaping="yes" />

              As advised, in the SAPPositionincumbentdetailsconfigextended.xml - i have linked my detail with this

              - <linkeddetail name="Contractelements">

              <linkto>Contractelements</linkto>

              - <links>

              - <link>

              <passvalue>Pernr</passvalue>

              <passfieldname>PERNR</passfieldname>

              <passvaluesource>Data</passvaluesource>

              </link>

              </links>

              <mode>Data</mode>

              <recordlimit>0</recordlimit>

              </linkeddetail>

              have i missed a step, or is something not right.

              Thanks

              Husna

              • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                Stephen Burr
                Currently Being Moderated

                What is your new detail called?

                (i.e. the one where the new sections are defined in)

                This is the name you should use in the linked detail config (where you currently have "Contractelements")

                As always, check the CDS log too.

                 

                Stephen

              • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                Luke Marson
                Currently Being Moderated

                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

                • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                  Husna Siddiqui
                  Currently Being Moderated

                  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

                  • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                    Luke Marson
                    Currently Being Moderated

                    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

                    • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                      Husna Siddiqui
                      Currently Being Moderated

                      Hi Luke,

                      Sorry it is 'contractelements' without a space. The other fields added were PERNR, CTTYP, CTEND. In the preview section for the created data element, there are results for all three fields.

                      Regards

                      Husna

                      • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                        Stephen Burr
                        Currently Being Moderated

                        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

                        • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                          Husna Siddiqui
                          Currently Being Moderated

                          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

                          2.png

                          1.png

                          3.png

                          data element code:

                          - <dataelement webservice="false">

                          - <extrainfo>

                          - <item>

                          - <name>

                          - <![CDATA[

                          DLL
                          ]]>
                          </name>

                          - <value>

                          - <![CDATA[

                          Nakisa.SAP.Custom.OTFProcessor
                          ]]>
                          </value>

                          </item>

                          - <item>

                          - <name>

                          - <![CDATA[

                          CLASS
                          ]]>
                          </name>

                          - <value>

                          - <![CDATA[

                          Nakisa.SAP.Custom.OTFProcessor.BAPI_SAP_OTFProcessor_Report
                          ]]>
                          </value>

                          </item>

                          - <item>

                          - <name>

                          - <![CDATA[

                          Description
                          ]]>
                          </name>

                          - <value>

                          - <![CDATA[

                          Contractelements
                          ]]>
                          </value>

                          </item>

                          - <item>

                          - <name>

                          - <![CDATA[

                          WIZARDTYPE
                          ]]>
                          </name>

                          - <value>

                          - <![CDATA[

                          OTFSIMPLE
                          ]]>
                          </value>

                          </item>

                          </extrainfo>

                          - <cacherequests>

                          - <![CDATA[

                          true
                          ]]>
                          </cacherequests>

                          - <connection>

                          - <![CDATA[

                          SAPConnection
                          ]]>
                          </connection>

                          - <table>

                          - <![CDATA[

                          _Contractelements
                          ]]>
                          </table>

                          <casesensitive>true</casesensitive>

                          <selectdistinct>false</selectdistinct>

                          <filter />

                          <dynamicfilter />

                          <objectclass />

                          <relativednfield />

                          - <fields>

                          - <field name="PERNR">

                          - <caption key="PERNRe78eedeb">

                          - <![CDATA[

                          Personnel number
                          ]]>
                          </caption>

                          </field>

                          - <field name="CTTYP">

                          - <caption key="CTTYP034e5581">

                          - <![CDATA[

                          Contract Type
                          ]]>
                          </caption>

                          </field>

                          - <field name="CTEDT">

                          - <caption key="CTEDT739169af">

                          - <![CDATA[

                          Contract End Date
                          ]]>
                          </caption>

                          </field>

                          </fields>

                          - <keys>

                          <key name="PERNR" />

                          </keys>

                          <effectivedating />

                          </dataelement>

                          • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                            Stephen Burr
                            Currently Being Moderated

                            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

                            • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                              Husna Siddiqui
                              Currently Being Moderated

                              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

                              • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                                Luke Marson
                                Currently Being Moderated

                                Hi Husna,

                                Can you attach employeedetailsxsl.xsl. The section in there should be A3565B81-0724-6629-5298-0D50E4B0AA5B. So far everything looks okay (except for the double linkeddetail as mentioned by Stephen).

                                Best regards,

                                Luke

                              • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                                Stephen Burr
                                Currently Being Moderated

                                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

                                • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                                  Stephen Burr
                                  Currently Being Moderated

                                  Ooops, I see I overlapped - sorry.

                                   

                                  Anyway in your latest post your "SAPPPositionIncumbentsDetailsConfigExtended.xml" still has 2 linked details:

                                     <linkeddetail name="Contractelements">

                                   

                                  Can you remove?

                                  (then reload Admin, Publish)

                                   

                                  Stephen

                                  • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                                    Husna Siddiqui
                                    Currently Being Moderated

                                    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!

                                    4.png

                                    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

                                    • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                                      Stephen Burr
                                      Currently Being Moderated

                                      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

                                      • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                                        Husna Siddiqui
                                        Currently Being Moderated

                                        Hi Stephen,

                                        Updated the file in the delta folder and republished. Still no luck in getting the fields to appear in the User Console. The odd thing is that there are no further errors relating to this in the log now.

                                        Regards

                                        Husna

                                        • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                                          Stephen Burr
                                          Currently Being Moderated

                                          Well that is some progress I guess!

                                          Can you send the portion of the log that appears when you click on the position details panel?

                                          (i.e. all msgs, not just error).

                                          Are you sure your test employee has PA0016 data?

                                          And I presume the same PERNR can be used in the Data Center to show data?

                                           

                                          Stephen    

                                        • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                                          Luke Marson
                                          Currently Being Moderated

                                          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

                                          • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                                            Husna Siddiqui
                                            Currently Being Moderated

                                            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

                                            • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                                              Husna Siddiqui
                                              Currently Being Moderated

                                              Hi

                                              AFter restarting the application to solve another issue, I can see contract type and contract end date fields appearing in the extended employee information box. However...it seems to be displaying every individuals contract end date and type in every single box

                                              6.png

                                              • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                                                Luke Marson
                                                Currently Being Moderated

                                                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

                                              • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                                                Stephen Burr
                                                Currently Being Moderated

                                                Husna,

                                                 

                                                If changing the link doesn't help, please can you send your OTF.  I'm glad all our help has finally proved helpful!!

                                                 

                                                 

                                                Stephen    

                                                • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                                                  Husna Siddiqui
                                                  Currently Being Moderated

                                                  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

                                                  • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                                                    Luke Marson
                                                    Currently Being Moderated

                                                    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

                                                    • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                                                      Husna Siddiqui
                                                      Currently Being Moderated

                                                      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

                                                      • Re: Orgchart 3.0 sp2 - Add Fields to Extended Employee Profile
                                                        Luke Marson
                                                        Currently Being Moderated

                                                        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

Actions