You can apply hold on existing order by populating the order import interface with the following :
OE_HEADERS_IFACE_ALL
ORDER_SOURCE_ID
ORIG_SYS_DOCUMENT_REF
OPERATION_CODE => 'UPDATE'
ORG_ID
ORDER_TYPE_ID
CREATED_BY
CREATION_DATE
LAST_UPDATED_BY
LAST_UPDATE_DATE
OE_ACTIONS_IFACE_ALL
ORDER_SOURCE_ID,
ORIG_SYS_DOCUMENT_REF,
ORG_ID,
HOLD_ID,
HOLD_TYPE_CODE,
HOLD_TYPE_ID,
OPERATION_CODE => 'APPLY_HOLD'
HOLD_ID is the type of hold that should be applied.
HOLD_ID from OE_HOLD_DEFINITIONS
HOLD_TYPE_CODE is the entity code for the hold source to be created.
C: Customer hold source
S: Bill To or Ship To hold source
I: Item hold source
O: Order hold source
W: Warehouse Hold Source
HOLD_TYPE_ID value depends on value you populate in HOLD_TYPE_CODE,
for example, when you populate HOLD_TYPE_CODE = 'C', HOLD_TYPE_ID would be the customer_number.
A sample call to the process_order API to apply hold is given below.
DECLARE
l_header_rec oe_order_pub.header_rec_type;
l_line_tbl oe_order_pub.line_tbl_type;
l_action_request_tbl oe_order_pub.request_tbl_type;
l_header_adj_tbl oe_order_pub.header_adj_tbl_type;
l_line_adj_tbl oe_order_pub.line_adj_tbl_type;
l_header_scr_tbl oe_order_pub.header_scredit_tbl_type;
l_line_scredit_tbl oe_order_pub.line_scredit_tbl_type;
l_request_rec oe_order_pub.request_rec_type;
l_return_status VARCHAR2(1000);
l_msg_count NUMBER;
l_msg_data VARCHAR2(1000);
p_api_version_number NUMBER := 1.0;
p_init_msg_list VARCHAR2(10) := fnd_api.g_false;
p_return_values VARCHAR2(10) := fnd_api.g_false;
p_action_commit VARCHAR2(10) := fnd_api.g_false;
x_return_status VARCHAR2(1);
x_msg_count NUMBER;
x_msg_data VARCHAR2(100);
v_header_rec oe_order_pub.header_rec_type;
v_line_tbl oe_order_pub.line_tbl_type;
v_action_request_tbl oe_order_pub.request_tbl_type;
p_header_rec oe_order_pub.hea