0
Answered

Change Request - SAP Street address update to AD

Joe Varkey 8 years ago in UNIFYBroker/SAP ERP Human Capital Management • updated by anonymous 3 years ago 11

CR-FSExt-01: Import additional fields from SAP, concatenate fields if value exists and flow resulting values into AD streetAddress attribute

Affected Versions:
Fixed by Version:

Error received when attempting to read a table in SAP, IdB does not read dynamically generated columns:

Unify.Communicators.SapHRCommunicator.SapHrRfcException: An error occurred whilst attempting to call the GetEmployees RFC: SAP.Connector.RfcSystemException: A dynamically specified column name is unknown.
at SAP.Connector.SAPConnection.ThrowRfcException(RFC_ERROR_INFO_EX rfcerrInfo, Encoding encoding, String languangeCode)
at SAP.Connector.Rfc.RfcClient.RfcInvoke(SAPClient proxy, String method, Object[] methodParamsIn)
at SAP.Connector.SAPClient.SAPInvoke(String method, Object[] methodParamsIn)
at Unify.SAP.Proxy.ZHR_UNIFYProxy.Zhr_Unify_Read_Table(String Ip_Delimit, String Ip_Table, String& Op_Count, String& Op_Ltext_Field, String& Op_Ltext_Table, String& Op_Table_Name, ZUNIFY_SELECTIONTable& It_Selection, BAPIRET2Table& Ot_Return, ZUNIFY_INFODATATable& Ot_Table_Data, ZUNIFY_STRUCTURETable& Ot_Table_Structure)
at Unify.Communicators.SapHRCommunicator.SapHrCommunicator.ReadSapTableData(String table, IEnumerable`1 selectionRecords) in S:\hg\Connectors\SAP.HCM\v3.0.0\Source\Unify.Communicators.SapHRCommunicator\SapHrCommunicator.cs:line 380
at Unify.Communicators.SapHRCommunicator.SapHrCommunicator.ReadSapTableData(String table, IEnumerable`1 selectionRecords) in S:\hg\Connectors\SAP.HCM\v3.0.0\Source\Unify.Communicators.SapHRCommunicator\SapHrCommunicator.cs:line 394
at Unify.Communicators.SapHRCommunicator.TestHarness.readTableDatabtn_Click(Object sender, EventArgs e)

Hi Shane,

when attempting to read a SAP table IdB complains of being unable to read dynamically generated columns. Will need some assistance to troubleshoot this problem.

Joe,

Can you supply sufficient information in order to start diagnosis?

Investigation of the ADRC table, extract below:
"Central Address Management

As of 4.0, SAP has moved away from using the SADR table to maintain addresses centrally.

The addresses are now stored in the ADR* tables. ADRC is the main table, and there are many supporting tables.

SAP supplies the function module ADDR_GET to get the address. The function does not retrieve ALL of the address information maintained in SAP. It does pass back a structure letting you know each type of address that has been stored. This can be used to read the other tables (ADR4 to ADR16) directly, and add them to the provided SADR structure. ADR2 (Phone) and ADR3 (Fax) numbers are supplied by the function module."

Looks like the table returned from ADRC is dynamically generated from a combination of address data stored in tables ADR*. This could mean that the schema is generated dynamically based on the columns available in these tables. Would require a SAP consultant to confirm this.

Full Error:

20110606,09:20:21,Change detection engine import all items started.,Change detection engine,Information,Change detection engine import all items for connector Address Information started.,Normal
20110606,09:20:21,Identity Broker,Identity Broker for SAP HCM,Information,"Calling ReadSapTableData(table: ADRC, selectionRecords: FieldName: DATE_TO FieldValue: 99991231 Operand: EQ)",Diagnostic
20110606,09:20:25,Change detection engine import all items failed.,Change detection engine,Warning,"Change detection engine import all items for connector Address Information failed with reason An error occurred whilst attempting to call the GetEmployees RFC: SAP.Connector.RfcSystemException: A dynamically specified column name is unknown.
at SAP.Connector.SAPConnection.ThrowRfcException(RFC_ERROR_INFO_EX rfcerrInfo, Encoding encoding, String languangeCode)
at SAP.Connector.Rfc.RfcClient.RfcInvoke(SAPClient proxy, String method, Object[] methodParamsIn)
at SAP.Connector.SAPClient.SAPInvoke(String method, Object[] methodParamsIn)
at Unify.SAP.Proxy.ZHR_UNIFYProxy.Zhr_Unify_Read_Table(String Ip_Delimit, String Ip_Table, String& Op_Count, String& Op_Ltext_Field, String& Op_Ltext_Table, String& Op_Table_Name, ZUNIFY_SELECTIONTable& It_Selection, BAPIRET2Table& Ot_Return, ZUNIFY_INFODATATable& Ot_Table_Data, ZUNIFY_STRUCTURETable& Ot_Table_Structure)
at Unify.Communicators.SapHRCommunicator.SapHrCommunicator.ReadSapTableData(String table, IEnumerable`1 selectionRecords). Duration: 00:00:04.2812774
Error details:
Unify.Communicators.SapHRCommunicator.SapHrRfcException: An error occurred whilst attempting to call the GetEmployees RFC: SAP.Connector.RfcSystemException: A dynamically specified column name is unknown.
at SAP.Connector.SAPConnection.ThrowRfcException(RFC_ERROR_INFO_EX rfcerrInfo, Encoding encoding, String languangeCode)
at SAP.Connector.Rfc.RfcClient.RfcInvoke(SAPClient proxy, String method, Object[] methodParamsIn)
at SAP.Connector.SAPClient.SAPInvoke(String method, Object[] methodParamsIn)
at Unify.SAP.Proxy.ZHR_UNIFYProxy.Zhr_Unify_Read_Table(String Ip_Delimit, String Ip_Table, String& Op_Count, String& Op_Ltext_Field, String& Op_Ltext_Table, String& Op_Table_Name, ZUNIFY_SELECTIONTable& It_Selection, BAPIRET2Table& Ot_Return, ZUNIFY_INFODATATable& Ot_Table_Data, ZUNIFY_STRUCTURETable& Ot_Table_Structure)
at Unify.Communicators.SapHRCommunicator.SapHrCommunicator.ReadSapTableData(String table, IEnumerable`1 selectionRecords)
at Unify.Communicators.SapHRCommunicator.SapHrCommunicator.ReadSapTableData(String table, IEnumerable`1 selectionRecords)
at Unify.Communicators.SapHRCommunicator.SapLoggingCommunicatorDecorator.ReadSapTableData(String table, IEnumerable`1 selectionRecords)
at Unify.Connectors.SapHrReadTableConnector.GetAllEntities(IStoredValueCollection storedValueState)
at Unify.Framework.ConnectorToReadingConnectorBridge.GetAllEntities(IStoredValueCollection storedValueState)
at Unify.Framework.EventNotifierReadingConnectorDecoratorBase`1.GetAllEntities(IStoredValueCollection storedValues)
at Unify.Framework.ChangeDetectionImportAllJob.ImportAllChangeProcess()
at Unify.Framework.ChangeDetectionImportAllJob.RunBase()
at Unify.Framework.JobBase.Run()
at Unify.Framework.MutexJobDecorator.Run()
at Unify.Framework.DefinedScopeJobAuditTrailJobDecorator.Run()
at Unify.Framework.AsynchronousJobExecutor.PerformJobCallback(Object state)",Normal

Joe
If you remove the constraints on the table are you able to query it? Send me an email for remote access details and I'll see if I can figure stuff out.

Remote access not working atm, will provide details once available...

RA working now, have requested for remote access for you and shane lim, awaiting confirmation.

Result of tes by removing the constraints -

Timestamp Severity Source Module Message
8/06/2011 3:19:05 PM Warning Change detection engine import all items failed. Change detection engine "Change detection engine import all items for connector Address Information failed with reason An error occurred whilst attempting to call the GetEmployees RFC: SAP.Connector.RfcSystemException: A dynamically specified column name is unknown.
at SAP.Connector.SAPConnection.ThrowRfcException(RFC_ERROR_INFO_EX rfcerrInfo, Encoding encoding, String languangeCode)
at SAP.Connector.Rfc.RfcClient.RfcInvoke(SAPClient proxy, String method, Object[] methodParamsIn)
at SAP.Connector.SAPClient.SAPInvoke(String method, Object[] methodParamsIn)
at Unify.SAP.Proxy.ZHR_UNIFYProxy.Zhr_Unify_Read_Table(String Ip_Delimit, String Ip_Table, String& Op_Count, String& Op_Ltext_Field, String& Op_Ltext_Table, String& Op_Table_Name, ZUNIFY_SELECTIONTable& It_Selection, BAPIRET2Table& Ot_Return, ZUNIFY_INFODATATable& Ot_Table_Data, ZUNIFY_STRUCTURETable& Ot_Table_Structure)
at Unify.Communicators.SapHRCommunicator.SapHrCommunicator.ReadSapTableData(String table, IEnumerable`1 selectionRecords). Duration: 00:00:02.0625132
Error details:
Unify.Communicators.SapHRCommunicator.SapHrRfcException: An error occurred whilst attempting to call the GetEmployees RFC: SAP.Connector.RfcSystemException: A dynamically specified column name is unknown.
at SAP.Connector.SAPConnection.ThrowRfcException(RFC_ERROR_INFO_EX rfcerrInfo, Encoding encoding, String languangeCode)
at SAP.Connector.Rfc.RfcClient.RfcInvoke(SAPClient proxy, String method, Object[] methodParamsIn)
at SAP.Connector.SAPClient.SAPInvoke(String method, Object[] methodParamsIn)
at Unify.SAP.Proxy.ZHR_UNIFYProxy.Zhr_Unify_Read_Table(String Ip_Delimit, String Ip_Table, String& Op_Count, String& Op_Ltext_Field, String& Op_Ltext_Table, String& Op_Table_Name, ZUNIFY_SELECTIONTable& It_Selection, BAPIRET2Table& Ot_Return, ZUNIFY_INFODATATable& Ot_Table_Data, ZUNIFY_STRUCTURETable& Ot_Table_Structure)
at Unify.Communicators.SapHRCommunicator.SapHrCommunicator.ReadSapTableData(String table, IEnumerable`1 selectionRecords)
at Unify.Communicators.SapHRCommunicator.SapHrCommunicator.ReadSapTableData(String table, IEnumerable`1 selectionRecords)
at Unify.Communicators.SapHRCommunicator.SapLoggingCommunicatorDecorator.ReadSapTableData(String table, IEnumerable`1 selectionRecords)
at Unify.Connectors.SapHrReadTableConnector.GetAllEntities(IStoredValueCollection storedValueState)
at Unify.Framework.ConnectorToReadingConnectorBridge.GetAllEntities(IStoredValueCollection storedValueState)
at Unify.Framework.EventNotifierReadingConnectorDecoratorBase`1.GetAllEntities(IStoredValueCollection storedValues)
at Unify.Framework.ChangeDetectionImportAllJob.ImportAllChangeProcess()
at Unify.Framework.ChangeDetectionImportAllJob.RunBase()
at Unify.Framework.JobBase.Run()
at Unify.Framework.MutexJobDecorator.Run()
at Unify.Framework.DefinedScopeJobAuditTrailJobDecorator.Run()
at Unify.Framework.AsynchronousJobExecutor.PerformJobCallback(Object state)"

Source Code is checked in to https://bitbucket.org/unifysolutions/solutions.alliedmills under Unify.Product.SAPExtFoundation.MVExtension_migrateUAT

Usage:

1 - Configure the SAPADAttributeFlow.xml file to specify the appropriate attribute names for construction the final attribute value requirement

  <!-- The attribute for constructing street attribute into AD. -->
  <StreetPrefix></StreetPrefix>
  <StreetFirstPartAttributeName>unify-SiteStreetAdress?</StreetFirstPartAttributeName>
  <StreetFirstPartAttributeLength>0</StreetFirstPartAttributeLength>
  <StreetSeparator>, </StreetSeparator>
  <StreetSecondPartAttributeName>unify-StreetAddress?</StreetSecondPartAttributeName>
  <StreetSecondPartAttributeLength>0</StreetSecondPartAttributeLength>

Where
<StreetFirstPartAttributeName> is attributename in the Metaverse representing the STRAS attribute from SAP MA, and
<StreetSecondPartAttributeName> is the attributename in the Metaverse representing the STR_SUPPL3 attribute from SAP MA
2 - Configure AD MA Advanced Export Attribute Flow using the "StreetEAFRule" flow rule name to flow to "street" attributename in AD, for example

MV Attributenames Flow Direction Export Flow Rule Name AD MA Attributename
unify-SiteStreetAdress,unify-StreetAddress Advanced --> StreetEAFRule street

Joe - back to you.

As stated - I'm not sure how to do a relational adapter with a composite relational key and separated inputkeys. If the product team can't help then its probably easier to import them as objects into FIM and lookup the value on inputflow.

Completed unit testing and closing