SAP Knowledge Base Article - Public

2294037 - Enlarge maxlength for timezone attribute in User Object "Query metadata "

Symptom

 

An Error message is display while querying an Metadata.

 

Environment

Employee Central Data Model

Employee Central Integration  API, Metadata

Succession

Reproducing the Issue

Example:

  1. Using apache olingo library
  2. When calling : https://api12preview.sapsf.eu/odata/v2/$metadata

 

It gives following Error Message:

 

org.apache.olingo.odata2.api.edm.EdmSimpleTypeException: The metadata constraints '[Nullable=true, MaxLength=16]' do not match the literal 'America/Montevideo'.

 

Result

  • describeSFObjectsResponse_user.xml
  • The response contains a maxlength of 16 chars. 

<Property Name="timeZone" Type="Edm.String" Nullable="true" sf:Required="true" sap:required="true" sf:Insertable="true" sap:creatable="true" sf:Updatable="true" sap:updatable="true" sf:Upsertable="true" sap:upsertable="true" sf:Selectable="true" sap:visible="true" sf:Sortable="false" sap:sortable="false" sf:Filterable="false" sap:filterable="false" MaxLength="16" sap:field-control="userPermissionsNav/timeZone" sap:label="Time Zone" />

Resolution

Please Contact Cloud Product Support Team for configuration change

 

Step 1:  Succession Data Model or SDM  Configuration Change

  1. Download Succession Data Model 
  2. Change max-length to 64
  3. Import SDM

 Before:

  </standard-element>

  <standard-element id="timeZone" max-length="16" required="true" matrix-filter="false">

    <label>Time Zone </label>

  </standard-element>

 

Modify:

  </standard-element>

  <standard-element id="timeZone" max-length="64" required="true" matrix-filter="false">

 

    <label>Time Zone </label>

  </standard-element>

 Important:

  1. Enlarge maxlength for timezone attribute in User Object
  2. By Default maxlength is 16  but could be enlarged to 64 "Can Not exceed 64" 

 

Step 2: Refresh: Odata API Metadata Refresh 

Next Step: Customer action

  1. Go to your Instance then Admin Center
  2. Tool and Type: Odata API Metadata Refresh An Export
  3. Click on: Refresh 

Step 3:Test

  Query Metadata

Example: When calling : https://api12preview.sapsf.eu/odata/v2/$metadata

 

Metadata.png

 

Keywords

  1. Odata API Metadata Refresh 
  2. timeZone
  3. API
  4. Metadata
  5. maxlength
, KBA , LOD-SF-EC , Employee Central , LOD-SF-SCM-DAT , Data Model , LOD-SF-INT-API , SF API & Adhoc API Framework , Problem

Product

SAP SuccessFactors HCM Core 1511