How To Create Instances With Expiry Date In Past Using API
Last updated on MARCH 08, 2017
Applies to:Oracle Installed Base - Version 12.1.3 and later
Information in this document applies to any platform.
Is it possible to create expired instances in Install Base with expiry dates in the past using the standard APIs?
It is not possible to create an item instance with an expiry date in the past, but you can create an active instance and then update it using the APIs. The create API will not allow you to create expired instances and it is expected behaviour that the transaction date (Install Base transaction date) will always be set to the system date (ie the date when the transaction is executed). The source_transaction_date (ie the date of the 'transaction' in the source system - ie 'custom' code calling the APIs) will be set to whatever date you pass as a parameter to the API.
To be able to create expired instances with the expiry date in the past you have to do this is 2 steps. The first step is to use the csi_item_instance_pub.create_item_instance API to create the instance with an active start date in the past and a source_transaction_date of whatever you need. The second step is to call the csi_item_instance_pub.update_item_instance API passing in the instance_id created in the first step to set the expiry date to some date in the past (but after the start date!). This will expire the instance.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms