← Back to list

Oracle OBR — Posttranformation to handle CurrentDate

Let’s say, we have a requirement in Order Management — Sales Orders during Order entry to set Schedule Ship Date = Requested Ship Date, if…

Manikkavel N · 2021-06-07 12:26 · 0 claps · 1.7 min read
#oracle-cloud-om #obr
Open on Medium ↗
Wiki topics: BIZ · Business Strategy

Oracle OBR — Posttranformation to handle CurrentDate

Let’s say, we have a requirement in Order Management — Sales Orders during Order entry to set Schedule Ship Date = Requested Ship Date, if Requested Date > Current Date and Schedule Ship Date = Current Date if Requested Date is in the past.

The article here explains how Schedule Ship Date is set using Post Tranformation Rules: FA: SCM: OM: How To Default Schedule Ship Date from Requested Ship Date Using PostTransformation Defaulting Rules (Doc ID 2190769.1)

We will be basically use the above article and build on the logic to handle Current Date. Below is the snippet of the rule without Current Date logic.

Now let’s add Current Date variable

In the “Then” portion of the rule we need to compare Current Date and Requested Ship Date, for this we need to compare Time units, since both the attributes are different data types. Hence convert them into a common datatype and use comparison operator.

Add below if (advanced) condition in then portion.

if (advanced) (Fline.RequestShipDate.time<CD.date.timeInMillis)

if (advanced) (Fline.RequestShipDate.time>=CD.date.timeInMillis)

Note I have also removed existing Assert New, since these statements should go inside the if blocks.

Add Assert New statements as follows under each if (advanced)

As you notice Current Date is not directly assigned to Schedule Ship Date attribute, it needs to be converted to timeInMillis and then assign.

Publish the rule.


메타데이터
post_id
757ea87e54eb
slug
oracle-obr-posttranformation-to-handle-currentdate-757ea87e54eb
url
https://medium.com/@manikkavel-n/oracle-obr-posttranformation-to-handle-currentdate-757ea87e54eb
canonical_url
https://medium.com/@manikkavel-n/oracle-obr-posttranformation-to-handle-currentdate-757ea87e54eb
author_url
https://medium.com/@manikkavel-n
status
ok
fetched_at
2026-06-12 18:14:10