Copy Requisition Lines

You add lines to a new requisition by copying the lines of another requisition. You can also duplicate a line of the same requisition. You can subsequently modify only some of the contents, as necessary, without having to create a new requisition from scratch. You can only copy lines of requisitions that have you as the preparer. The target requisition must be incomplete, rejected, returned, or withdrawn for you to be able to add lines to it. Requisition lines that were split, replaced, or reinstated can't be copied from the source requisition.

You should be the preparer of the requisition to be able to copy requisition lines.

Let's discuss these scenarios briefly.
  • Copy lines from a requisition.

    Copy a requisition line.

Copy Lines from a Requisition

Let's consider that Jim Kenworthy, who is a preparer in an organization, creates requisitions to order office supplies for a team of project leads regularly. To optimize his time, Jim wants to copy the lines of his previously approved requisition to a new requisition and simply adjust the quantity for certain items. Jim should be able to use the copy user-defined action. After the requisition lines are copied, Jim can patch the lines to update the quantity, add new lines, and then submit the requisition for approval. This example shows how Jim can copy lines of one requisition to another.

Note:

The same user-defined action can be used to duplicate lines of a requisition. The source and the target requisition ID can be the same. Then all lines eligible for copy will be duplicated.

Example URL

Use this resource URL format:

POST

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.action+json" -d 'request payload' 
"https://servername/fscmRestApi/resources/version/purchaseRequisitions/RequisitionHeaderId"

Example Request

Here's an example of the request body in JSON format:
{
    "name":"copyLinesFromRequisition",
    "parameters":[{"sourceRequisitionHeaderId": 300100575842619}]
}

Example Response

Here's an example of the response body in JSON format:pre
{
    "result": {
        "STATUS": [
            {
                "CODE": "SUCCESS"
            }
        ]
    }
}

Copy a Requisition Line

After copying the requisition lines in the previous example, Jim Kenworthy wants to duplicate one of the lines as it is to be delivered to another location for a different requester. He can copy the line of his requisition and subsequently patch the requester and the deliver-to location of the new line. This example shows how he can duplicate a line of the requisition.

Example URL

Use this resource URL format:

POST

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.action+json" -d 'request payload' 
"https://servername/fscmRestApi/resources/version/purchaseRequisitions/RequisitionHeaderId"

Example Request

Here's an example of the request body in JSON format:
{
    "name":"copyLine",
    "parameters":[{"sourceRequisitionLineId": 100101633556293}]
}

Example Response

Here's an example of the response body in JSON format:
{
    "result": {
        "STATUS": "SUCCESS",
        "RequisitioningLineId": "100101708116936"
    }
}