- OracleApps Epicenter - http://www.oracleappshub.com -

API’s availability in Oracle Service Contracts(OKS)

Contract Header Creation : For creating contract header API is:OKS_CONTRACTS_PUB.CREATE_CONTRACT_HEADER

Line Creation : You creating lines you can this api OKS_CONTRACTS_PUB.CREATE_SERVICE_LINE

Sub Line Creation : This is important when underline item is IB track able then we can create covered product sub line with IB link established. API you can use is: OKS_CONTRACTS_PUB.CREATE_COVERED_LINE

UPDATING CONTRACT HEADER - You can use okc_contract_pub.update_contract_header API to Update contract Header

okc_contract_pub.update_contract_header
( 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_restricted_update => okc_api.g_false,
p_chrv_tbl => l_chrv_tbl_in,
x_chrv_tbl => l_chrv_tbl_out);

UPDATING CONTRACT LINE - You can use okc_contract_pub.update_contract_line API to Update contract Lines

okc_contract_pub.update_contract_line (
p_api_version => 1,
p_init_msg_list => OKC_API.G_TRUE,
p_restricted_update => OKC_API.G_FALSE,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_clev_tbl => l_clev_tbl,
x_clev_tbl => l_x_clev_tbl
);

CASCADE DATE -You can use oks_bill_sch.cascade_dates_sll to cascase date in billing agreement(schedule). You just need to pass only the contract line ID

oks_bill_sch.cascade_dates_sll
(
p_top_line_id => <OKS Contract Line ID>,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);

DEFAULTING ATTRIBUTES FROM LINES TO SUBLINES : You can use below API for daulting attributes

oks_attr_defaults_pvt.default_lines_to_sublines
(
lines_sublines_tbl => l_line_table,
x_return_status => l_return_status,
x_msg_tbl => l_msg_tbl
);

CREATING CONTACT AT CONTRACT HEADER LEVEL :You can use okc_contract_party_pub.create_contact to create contact at header.

okc_contract_party_pub.create_contact (
p_api_version => 1,
p_init_msg_list => fnd_api.g_true,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_ctcv_rec => l_ctcv_rec,
x_ctcv_rec => l_x_ctcv_rec
);

UPDATING CONTACT AT CONTRACT HEADER LEVEL :You can use okc_contract_party_pub.update_contact to create contact at header.

okc_contract_party_pub.update_contact (
p_api_version => 1,
p_init_msg_list => OKC_API.G_FALSE,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_ctcv_rec => l_ctcv_rec,
x_ctcv_rec => l_x_ctcv_rec
);

CREATING CONTACT E-MAIL ADDRESS AT CONTRACT HEADER LEVEL :You can use OKS_EXTWAR_UTIL_PUB.Contact_Point to create contact at header.

OKS_EXTWAR_UTIL_PUB.Contact_Point (
p_api_version => 1,
p_init_msg_list => 'T',
P_commit => 'F',
P_contact_point_rec => l_cpoint_rec,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
x_contact_point_id => l_x_contact_point_id
);

Sales Credit : For creating sales credit separately, we will have to use API:OKS_SALES_CREDIT_PUB.INSERT_SALES_CREDIT.