DECLARE
l_return_status VARCHAR2(1);
l_msg_count NUMBER;
l_msg_data VARCHAR2(1000);
l_contract_id NUMBER;
BEGIN
FND_GLOBAL.APPS_INITIALIZE
( user_id => 1000200
,resp_id => 21708
,resp_appl_id => 515
);
OKC_CONTEXT.SET_OKC_ORG_CONTEXT(204,204);
OKS_IMPORT_HEADER_PUB.CREATE_TEMPLATE_FROM_CONTRACT
(
p_api_version => 1.0,
p_init_msg_list => OKC_API.G_TRUE,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data ,
p_source_contract_id => 202111 ,
p_template_name => 'XXAASC_TEMP' ,
x_Contract_id => l_contract_id
) ;
Dbms_Output.put_line('l_return_status
'||l_return_status);
IF l_return_status='S'
THEN
Dbms_Output.put_line('
Template created from contract ' );
COMMIT;
END IF;
IF l_return_status<>'S'
THEN
FOR i IN 1..l_msg_count
LOOP
l_msg_data := FND_MSG_PUB.Get(i, p_encoded => FND_API.G_FALSE);
Dbms_Output.put_line(l_msg_data);
END LOOP;
END IF;
END;
No comments:
Post a Comment