cancel
Showing results for 
Search instead for 
Did you mean: 

Format field OpSchedldStartTime of Odata API_PRODUCTION_ORDER_2_SRV/ScheduleProductionOrderOperation

mark_fryu
Participant
0 Kudos

hi, can anyone give me a concrete example of the value to pass for the OpSchedldStartTime field?

On the documentation it says: PT21H12M31S but I can't understand what the value should be.

if I pass 2023-09-29T00:00:00.000 I get the following error Wrong literal format for literal: '[datetime'']'.

Documentation : https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/a6f0333202384ba2b48a841a4a6deb1b/fcab73a7730e4f88b40...

Bais
Participant
0 Kudos

PT21H12M31S is a duration time representation: P<empty> = everyday T21 duration of 21hour 12min 31seconds

Wiki ISO 8601 : https://en.wikipedia.org/wiki/ISO_8601

Durations

PnYnMnDTnHnMnSPnWP<date>T<time>

Durations define the amount of intervening time in a time interval and are represented by the format P[n]Y[n]M[n]DT[n]H[n]M[n]S or P[n]W as shown on the aside. In these representations, the [n] is replaced by the value for each of the date and time elements that follow the [n]. Leading zeros are not required, but the maximum number of digits for each element should be agreed to by the communicating parties. The capital letters P, Y, M, W, D, T, H, M, and S are designators for each of the date and time elements and are not replaced.

  • P is the duration designator (for period) placed at the start of the duration representation.
    • Y is the year designator that follows the value for the number of calendar years.
    • M is the month designator that follows the value for the number of calendar months.
    • W is the week designator that follows the value for the number of weeks.
    • D is the day designator that follows the value for the number of calendar days.
  • T is the time designator that precedes the time components of the representation.
    • H is the hour designator that follows the value for the number of hours.
    • M is the minute designator that follows the value for the number of minutes.
    • S is the second designator that follows the value for the number of seconds.

For example, "P3Y6M4DT12H30M5S" represents a duration of "three years, six months, four days, twelve hours, thirty minutes, and five seconds".

mark_fryu
Participant
0 Kudos

hi,

Thank you for your answer. I tried but I always get the same error

View Entire Topic
dharamverma
Explorer
0 Kudos

Please use format 2024-01-11T00:00:00

Sample Payload

<?xml version="1.0" encoding="UTF-8"?> <A_ProductionOrder_2><A_ProductionOrder_2Type><MfgOrderPlannedEndDate>2024-01-11T00:00:00</MfgOrderPlannedEndDate></A_ProductionOrder_2Type></A_ProductionOrder_2>

mark_fryu
Participant
0 Kudos

Hi, thanks, I tried but nothing. The problem is on the field OpSchedldStartTime: