Interface and API in Oracle
Interface and API in Oracle
--==============================================
Interface:-
--=======================================
--==============================================
Interface:-
--=======================================
User Interface, we have to write codes for validation and
insertion of data’s in Interface tables and then in Oracle
base tables
· The good is that if
there is failure of record, they remain
in the table until either fixed or purged.
Supplier
Base Tables:-
AP_SUPPLIERS
|
AP_SUPPLIER_SITES_ALL
|
AP_SUPPLIER_CONTACTS
|
Supplier
Interface Tables:
AP_SUPPLIERS_INT
|
AP_SUPPLIER_SITES_INT
|
AP_SUP_SITE_CONTACT_INT
|
Supplier Error Interface Table:- AP_SUPPLIER_INT_REJECTIONS |
Supplier
Interface import Programs:-
1. Supplier Open Interface Import |
2. Supplier
Sites Open Interface Import
|
3. Supplier
Site Contacts Open Interface Import
|
API:- Application Programming Interface
--=======================================
An API (Application Programming Interface) is inbuilt
program through which data can be transferred to Oracle
base tables directly without writing the program for
validating or inserting in Interface tables.
-- Call the API
ap_vendor_pub_pkg.create_vendor(p_api_version => p_api_version,
p_init_msg_list =>
p_init_msg_list,
p_commit =>
p_commit,
p_validation_level =>
p_validation_level,
x_return_status => x_return_status,
x_msg_count =>
x_msg_count,
x_msg_data =>
x_msg_data,
p_vendor_rec =>
lr_vend,
x_vendor_id =>
x_vendor_id,
x_party_id =>
x_party_id);
dbms_output.put_line('X_RETURN_STATUS
= ' || x_return_status);
dbms_output.put_line('X_MSG_COUNT
= ' ||
x_msg_count);
dbms_output.put_line('X_MSG_DATA
= ' ||
x_msg_data);
dbms_output.put_line('X_VENDOR_ID
= ' ||
x_vendor_id);
dbms_output.put_line('X_PARTY_ID
= ' ||
x_party_id);
IF (x_return_status
<> FND_API.G_RET_STS_SUCCESS)
THEN
FOR i IN 1..FND_MSG_PUB.COUNT_MSG
LOOP
l_msg := FND_MSG_PUB.get(
p_msg_index => i,
p_encoded => FND_API.G_FALSE
);
dbms_output.put_line('The
API call failed with error '||l_msg);
END LOOP;
ELSE
dbms_output.put_line('The
API call ended with SUCESSS status');
END IF;
Comments
Post a Comment