This appendix presents information on the Oracle Depot Repair public API.
This appendix covers the following topics:
Oracle Depot Repair provides the following public API.
CSD_REPAIRS_PUB
This API includes the following two procedures:
Procedure Name | Description |
---|---|
Create_Repair_Order | This procedure is called to create a Repair Order. |
Update_Repair_Order | This procedure is called to update a Repair Order. |
This API will create a Repair Order. User can pass REPAIR_LINE_ID and REPAIR_NUMBER. If passed, the ID or NUMBER will be validated for uniqueness. If valid, the same ID or NUMBER will be returned.
Create_Repair_Order
None
IN p_api_version_number IN NUMBER Required p_init_msg_list IN VARCHAR2 Optional Default = FND_API.G_FALSE p_commit IN VARCHAR2 Optional Default = FND_API.G_FALSE p_validation_level IN NUMBER Optional Default = FND_API.G_VALID_LEVEL_FULL p_repair_line_id IN NUMBER Optional Default = FND_API.G_MISS_NUM P_REPLN_Rec IN CSD_REPAIRS_PUB.REPLN_Rec_Type Required
OUT x_return_status OUT VARCHAR2 x_msg_count OUT NUMBER x_msg_data OUT VARCHAR2 x_repair_line_id OUT NUMBER x_repair_number OUT NUMBER
1.0
Create_Repair_Order ( P_Api_Version_Number IN NUMBER, P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE, P_Commit IN VARCHAR2 := FND_API.G_FALSE, p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL, p_repair_line_id IN NUMBER := FND_API.G_MISS_NUM, P_REPLN_Rec IN CSD_REPAIRS_PUB.REPLN_Rec_Type, X_REPAIR_LINE_ID OUT NOCOPY NUMBER, X_REPAIR_NUMBER OUT NOCOPY VARCHAR2, X_Return_Status OUT NOCOPY VARCHAR2, X_Msg_Count OUT NOCOPY NUMBER, X_Msg_Data OUT NOCOPY VARCHAR2 );
This procedure will update a Repair Order.
Update_Repair_Order
None
IN p_api_version_number IN NUMBER Required p_init_msg_list IN VARCHAR2 Optional Default = FND_API.G_FALSE p_commit IN VARCHAR2 Optional Default = FND_API.G_FALSE p_validation_level IN NUMBER Optional Default = FND_API.G_VALID_LEVEL_FULL p_repair_line_id IN NUMBER Required P_REPLN_Rec IN CSD_REPAIRS_PUB.REPLN_Rec_Type Required
OUT x_return_status OUT VARCHAR2 x_msg_count OUT NUMBER x_msg_data OUT VARCHAR2
1.0
Update_Repair_Order ( P_Api_Version_Number IN NUMBER, P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE, P_Commit IN VARCHAR2 := FND_API.G_FALSE, p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL, p_repair_line_id IN NUMBER, P_REPLN_Rec IN OUT NOCOPY CSD_REPAIRS_PUB.REPLN_Rec_Type, X_Return_Status OUT NOCOPY VARCHAR2, X_Msg_Count OUT NOCOPY NUMBER, X_Msg_Data OUT NOCOPY VARCHAR2 );
The following table describes the IN parameters associated with this API.
Parameter | Data Type | Description |
---|---|---|
p_api_version | NUMBER | This must match the version number of the API. An unexpected error is returned if the calling program version number is incompatible with the current API version number (provided in the documentation). |
p_init_msg_list | VARCHAR2 | Default = FND_API.G_FALSE. If set to true, then the API makes a call to fnd_msg_pub.initialize to initialize the message stack. If set to false then the calling program must initialize the message stack. This action is required to be performed only once, even in cases where more than one API is called. |
p_commit | VARCHAR2 | Default = FND_API.G_FALSE If set to true, then the API commits before returning to the calling program. If set to false, then it is the calling program's responsibility to commit the transaction. |
p_validation_level | NUMBER | Default = FND_API.G_VALID_LEVEL_FULL If set to full, then the API validates all the IN parameter values. If set to none, then the API validates parameters that are a minimum requirement to create a Repair Order. |
p_repair_line_id | NUMBER | If the repair line id is not passed, then the API uses sequence to generate the repair line id. If the repair line id is passed, then it validates to ensure that the repair line id does not exist in CSD_REPAIRS table. |
P_REPLN_Rec | PL/SQL Record | It accepts the Repair Order record. |
The following table describes the OUT parameters associated with this API.
Parameter | Data Type | Description |
---|---|---|
x_return_status | VARCHAR2(1) | If the API successfully creates a Repair Order, then it returns the status 'S', Else it returns the status as 'E' or 'U'. |
x_msg_count | NUMBER | Returns the number of messages logged in the message stack. |
x_msg_data | VARCHAR2 | It retrieves the message from the message stack and returns the message to the calling APIs. |
x_repair_line_id | NUMBER | It returns the repair line id after the Repair Order is created successfully. |
x_repair_number | NUMBER | It returns the repair number after the Repair Order is created successfully. The repair number can be different from the repair line id as different sequences are used. |
Depot Repair API uses the following data structure.
The following table presents descriptions of data structures.
Name | Description |
---|---|
Repair_Number | If this value is passed during Repair Order creation, it will be validated for uniqueness and used for creation of Repair Order. |
Incident_id | This is the Service Request id. |
Inventory_item_id | Item information. |
Customer_product_id | Instance ID of IB reference number. |
Unit_of_measure | Unit of Measure Code. |
Repair_type_id | Repair type information. |
Resource_id | Resource to which the Repair Order is to be linked. |
Project_id | Not used currently. |
Task_id | Not used currently. |
Contract_line_id | Used to store the contract information. |
Auto_process_rma | Used to determine if the RMA has to be created automatically for the Repair Order. |
Repair_mode | Used to determine if the Repair Order has to be created in WIP/Task/None mode. |
Object_version_number | For Repair Order creation, the version number should be 1. For Repair Order update, the version number must be the same as that of the Repair Order in the database. |
Item_revision | If the item is revision controlled, then pass the revision. |
Instance_id | Same as customer product id. |
Status | Repair Order transaction status. |
Status_reason_code | Estimate approval reason code. It is required only if there is an estimate. |
Date_closed | Repair order close date. |
Approval_required_flag | This flag is used to check if the approval is required. |
Approval_status | Estimate approval status. |
Serial_number | Serial number if the serialized item is selected. |
Promise_date | The promise date of repair completion. |
Attribute_category | Context of the descriptive flexfield. |
Attribute1 | Attribute1 |
Attribute2 | Attribute2 |
Attribute3 | Attribute3 |
Attribute4 | Attribute4 |
Attribute5 | Attribute5 |
Attribute6 | Attribute6 |
Attribute7 | Attribute7 |
Attribute8 | Attribute8 |
Attribute9 | Attribute9 |
Attribute10 | Attribute10 |
Attribute11 | Attribute11 |
Attribute12 | Attribute12 |
Attribute13 | Attribute13 |
Attribute14 | Attribute14 |
Attribute15 | Attribute15 |
Quantity | Total Quantity for which the Repair Order has to be created. |
Quantity_in_wip | To store quantity submitted for Work in Process (WIP) process. |
Quantity_rcvd | To store the received quantity. |
Quantity_shipped | To store the shipped quantity. |
Currency_code | To store the currency code |
RO_txn_status | Used internally to store the Repair Order Status. |
Order_line_id | Not used currently. |
Original_source_reference | Not used currently. |
Original_source_header_id | Order header id of the source reference |
Original_source_line_id | Order line id of the source reference |
Price_list_header_id | Default Repair Order price list |