Autp Create deliveries – API

Hi, this post I will show the API to create deliveries.

DECLARE
l_operation VARCHAR2 (30) := 'Autocreate Delivery ';
x_return_status VARCHAR2 (1);
x_msg_data VARCHAR2 (2000);
x_msg_count VARCHAR2 (2000);

p_api_version_number NUMBER;
init_msg_list VARCHAR2 (30);
x_msg_details VARCHAR2 (3000);
x_msg_summary VARCHAR2 (3000);

l_line_rows WSH_UTIL_CORE.ID_TAB_TYPE;
l_del_rows WSH_UTIL_CORE.ID_TAB_TYPE;

BEGIN
x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;

FND_GLOBAL.APPS_INITIALIZE (user_id => 26801,
resp_id => 21623,
resp_appl_id => 660);


l_line_rows (1) := &delivery_detail_id;
WSH_DELIVERY_DETAILS_PUB.AUTOCREATE_DELIVERIES ( p_api_version_number => 1.0,
p_init_msg_list => init_msg_list,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_line_rows => l_line_rows,
x_del_rows => l_del_rows);


IF x_return_status = WSH_UTIL_CORE.G_RET_STS_SUCCESS
THEN
DBMS_OUTPUT.put_line (l_operation || ' done successfully.');
COMMIT;
ELSE
DBMS_OUTPUT.put_line ('Failure.');
DBMS_OUTPUT.put_line ('Return Status = ' || x_return_status);
wsh_util_core.get_messages ('Y', x_msg_data, x_msg_details, x_msg_count);
DBMS_OUTPUT.put_line (l_operation || ': ');
DBMS_OUTPUT.put_line ('Summary: ' || SUBSTRB (x_msg_data, 1, 200));
DBMS_OUTPUT.put_line ('Detail: ' || SUBSTRB (x_msg_details, 1, 200));
ROLLBACK;
END IF;
END;

Deixe uma resposta

Powered by WordPress.com. Tema: Baskerville 2 por Anders Noren

Acima ↑

%d blogueiros gostam disto: