cancel
Showing results for 
Search instead for 
Did you mean: 

how to add short field of POSITION on dataelement of OrgModeler

Former Member
0 Kudos

Hi,

I am implementing OrgModeler 3.0 SP1.

I want to use SHORT of HRP1000 as sort field on OrgModeler.

It seems not to be read by OCI.

If you know how to config data elements usw. Please advise.

Best Regards,

Hiroshi Takimoto

Accepted Solutions (0)

Answers (1)

Answers (1)

lukemarson
Active Contributor
0 Kudos

Hi Hiroshi,

You need to do the same thing here as you did for SuccessionPlanning (in your other post). As you are changing the structure you have to make HR-OCI changes. The evaluation path used in OrgModeler is ZNAKO2PP.

Best regards,

Luke

Former Member
0 Kudos

Hi Luke,

Thank you for your prompt help.

Actually, I am suffering from tracing that OCI.

It seems Org Modeler is not using HROCI which is used in Org modeler OrgUnit data element (SAPOrgUnitDataElement) and Succession Planning data element. I can't figure out where HROCI is called.

I suppose that the data element for Org modeler position is SAPPositionDataElement, which calls both SAPPositionDataElementHROCI and SAPPositionVacancyDataElement. The former data element SAPPositionDataElement is calling a class BAPI_SP_Hierarchy_OrgUnit2JointSP. Class file is available, but I can't pull out parameters available in the class (this time, for field short).

I also tried to use evaluation path ZNAKO2PP and created a view for HROCI call by copying data element which I have in Succession Planning. I named OCI as ZZWO2P and added column group for SHORT field. I have replaced SAPPositionDataElementHROCI with an OCI, but linking the new HROCI and vacancy has failed.

Would it be possible to name the HROCI org modeler position is using?

Thank you again for your prompt help.

Best regards,

Hiroshi

lukemarson
Active Contributor
0 Kudos

Hi Hiroshi,

What do you mean by "Would it be possible to name the HROCI org modeler position is using?" - do you mean the view? I think it's "encrypted" within the class used.

A possible solution here is to extend the OTFSchema function SAPPositionVacancy.xml. This retrieves the vacancy information but you could also use it to extract the short name and then all you need to do is add the field to the SAPPositionVacancyDataElement and SAPPositionDataElementHROCI data elements.

Best regards,

Luke

Former Member
0 Kudos

Hi, Luke

thank you for your reply.

I was intended to ask which xml file is used to read Positions with HROCI.

I will maybe try your proposal using xml about vacancy.

Best Regards,

Hiroshi Takimoto

lukemarson
Active Contributor
0 Kudos

Hi Hirsohi,

It is SAPPositionDataElementHROCI.xml in Data Element configuration. This uses HR-OCI. The Position Vacancy data element uses NakisaRFC.

Best regards,

Luke

Former Member
0 Kudos

Hello Luke,

I am working with Hiroshi.

Let me ask you further details.

I have two questions.

1) Is the HROCI called in SAPPositionDataElementHROCI.xml? If HROCI is called, which is the view in OM used?

2) does Nakisa.SAP.SAPSPProcessor.BAPI_SP_Hierarchy_OrgUnit2JointSP follow sort fields set in AdminConsole?

I am looking at SAPPositionDataElementHROCI.xml. This is using CLASS Nakisa.SAP.SAPSPProcessor.BAPI_SP_Hierarchy_OrgUnit2JointSP and using evaluation path to fetch the org data. The BAPI seems to call FM RH_STRUC_GET, but it doesn't go through OCI Function Modules.

We also added a field for SHORT in SAPPositionVacancyDataElement. It is calling FM /NAKISA/RFC_REPORT and sort is done within this data element. But, when it is joined with SAPPositionDataElementHROCI, sort seems to follow RH_STRUC_GET order.

Thank you in advance for your help.

Regards,

Akinori

lukemarson
Active Contributor
0 Kudos

Hi Akinori,

Please see my response below:

1) I don't believe it uses a view, just an evaluation path

2) No, the sort fields are defined in the hierarchy configuration and come from the data element SAPPositionDataElement

If you run function RH_STRUC_GET with the evaluation path ZNAKO2PP does it return the fields you see in the data element? If this doesn't include SHORT then you might be able to extend the function module to include it.

Is your field added to the NakisaRFC function SAPPositionVacancy.xml (in <you build>\.delta\OTFSchema\functionconfiguration)? If so, has the field also been added to SAPPositionDataElement.xml and SAPPositionVacancy.xml data elements? If so then in the AdminConsole you should be able to select your field in the Sort Order section. If not then you have done something incorrect.

Please make sure ALL changes are made to files in the .delta folder of your build configuration otherwise they can be lost.

Best regards,

Luke

Former Member
0 Kudos

Hi Luke,

Thank you very much for explanation.

Things are becoming clearer. So, let me clarify some points.

Apology for the long reply...

Let me continue discussion by quoting your reply.

1) I don't believe it uses a view, just an evaluation path

If you run function RH_STRUC_GET with the evaluation path ZNAKO2PP does it return the fields you see in the data element? If this doesn't include SHORT then you might be able to extend the function module to include it.

The view mechanism allows to add fields with HROCI framework, but SAPPositionDataElementHROCI.xml with evaluation path doesn't allow adjustment of returning fields. Is this true?

Then, if we look at the FM, the SHORT field is returned from the FM, but I suppose that returned fields from FM are converted/mapped in Nakisa.SAP.SAPSPProcessor.BAPI_SP_Hierarchy_OrgUnit2JointSP. I guess this mapping is performed because FM returns OBJID/STEXT/SHORT as a field name, but table BAPI_1_DataSets_O2S has "Object_ID","Name" as a field name (which I don't see any alias unlike others). There must be something that maps FM field and table fields. Would you know mappings?

2) No, the sort fields are defined in the hierarchy configuration and come from the data element SAPPositionDataElement

Is your field added to the NakisaRFC function SAPPositionVacancy.xml (in <you build>\.delta\OTFSchema\functionconfiguration)? If so, has the field also been added to SAPPositionDataElement.xml and SAPPositionVacancy.xml data elements? If so then in the AdminConsole you should be able to select your field in the Sort Order section. If not then you have done something incorrect.

Do you mean "hierarchy configuration" is configuration of the node "Position" under "Organization Structure" in "Source OrgChart" pane "Hierarchies"?

I have defined the added field in Sort Order section, but sorting doesn't take place. I have added the field to all the XMLs and confirmed field definition by showing the added field in a view (view shows values correctly).

My assumptions here is:

A) "SAPPositionDataElement.xml" is not sorting order by any field from "AdditionalFieldsDataElement".

B) Class "Nakisa.SAP.Custom.OTFProcessor.BAPI_SAP_OTFProcessor_LinkedDataElement" returns sorted table entries from ERP system and will not use the "Sort Order in hierarchy".

C) the sort order from "CurrentFieldsDataElement" is predominantly used for "BAPI_SAP_OTFProcessor_LinkedDataElement"

D) DataElement using "Nakisa.SAP.Custom.OTFProcessor.BAPI_SAP_OTFProcessor_Report" sorts based on the "Sort Order in hierarchy". Return of Report itself is confrimed sorted.

E) single method of data fetch (either report, chart, or HROCI) will assure "the sort order in hierarchy".

The current understanding of Nakisa leaves me with few options. These are:

Option 1) understand mapping from FM to BAPI_1_DataSets_O2S. This may tell me SHORT is available in the SAPPositionDataElementHROCI.

Option 2) use sort order (PRIOX) from object relationship (from FM: HR_STRUC_GET). HRP1001 has to be updated by another program.

I still would like to pursue the SHORT sort by using Nakisa.

Would you be able to share your expert knowledge about the assumptions above A,B,C,D,E and possibly about Op1?

Thank you again.

Akinori

lukemarson
Active Contributor
0 Kudos

Hi Akinori,

Your assumptions are incorrect, except for E (E will also work).

If you know the field is bringing back data but the sort isn't working then the sort isn't configured correctly. By hierarchy configuration I mean the "Positions" under the "Organization Structure". I am talking about the Source OrgChart, not Organization Structure scenario. For the Organization Structure you need to make sure you copy the fields from the source and then set the sort order there.

You can see the details of your sort order in the hierarchy configuration SAPPositionHierarchy.xml.

Best regards,

Luke

Former Member
0 Kudos

Hi Luke,

Thank you for the reply.

So, the "SAPPositionDataElement.xml" does support sorts for the fields from "AdditionalFieldsDataElement".

Below is "SAPPositionHierarchy.xml" sort part.

<fields>

<hierarchyidfield>Object_ID</hierarchyidfield>

<hierarchyparentfield />

<hierarchyparentgroupfield />

<elementidfield>Object_ID</elementidfield>

- <sort>

<field allowsortasc="true" allowsortdesc="true" defaultsort="asc" name="SHORT" />

</sort>

</fields>

Configurations look okay, and I can't find missing piece...

Would you happen to know the mapping for "SAPPositionDataElementHROCI.xml"?

Regards,

Akinori

lukemarson
Active Contributor
0 Kudos

Hi Akinori,

In the section below, have you tried changing the sort to desc ?

<sort>
<field allowsortasc="true" allowsortdesc="true" defaultsort="asc" name="SHORT" />
</sort>

Linked Data Elements can be tricky and I've found a few a few bugs in 3.0 caused by the change to Java.

Only Nakisa know the mapping used in the class BAPI_SP_Hierarchy_OrgUnit2JointSP.

Another alternative is to create a NakisaRFC function for all the fields in SAPPositionDataElement. This should not be so hard and is very likely to work easily.

Best regards,

Luke

Former Member
0 Kudos

Hi Luke,

Thank you very much.

I haven't tried "desc" later. (I am not onsite today...)

Using a custom built DataElement is surely an alternative. Thank you for the advice.

I hope to minimize the degree of customization and this option is a little bit over the operation capacity. (I understand this may be easier than sticking to sort order for added field).

Let us try out some options.

Regards,

Akinori

lukemarson
Active Contributor
0 Kudos

Hi Akinori,

Did you get chance to test this?

Best regards,

Luke