Symptom
You are querying a business object in the Cloud Application Studio and observe the values for Start-/End Date/-Time is different than what you see in the document in the UI.
Environment
SAP Cloud Application Studio
Reproducing the Issue
For this example, you notice a different date shown for a Contract Item Start Date. This field is located on the Items tab inside a Contract.
-
Log into the SDK.
- Open a solution.
- Click the View button on the Toolbar and display the Repository Explorer.
- Search for the Business Object XYZ (XYZ represents BO name). Example: CustomerContract.
- Right-Click on the QueryByElements query and click execute.
- Enter the Document ID 123 (123 represents a sample document ID).
- Highlight the row and click the option to navigate.
- Navigate to the node where the date value is stored. Example: Item - ItemPeriodTerms node for Contract.
- Check the Date fields.
- Open the UI and navigate to the work centre and view where the issue is observed.
- Navigate to the document 123 (123 represents the document ID).
- Go to the tab where the issue is observed. Example: Items tab.
- The Contract Item Start Date is different than what was returned in the SDK query.
Cause
This is standard behaviour. Documents that have been created in a different time zone will show date/time in the UI of that time zone. However, querying a BO will return the data that is stored in the backend database. This is stored in UTC.
Resolution
This is expected system behaviour.
In the UI, the date/ time will be shown in the time zone of the logged in user.
In the SDK, the date/ time will be shown in the time zone of the user the object was created in.
Keywords
BO, Query, Time, Zone, SDK, Cloud , KBA , query , bo , node , amount , repository explorer , AP-RC-BDS-QRY , ByDesign Studio BO Queries , How To