DECLARE
x_instance_rec csi_datastructures_pub.instance_rec;
p_ext_attrib_values csi_datastructures_pub.extend_attrib_values_tbl;
p_party_tbl csi_datastructures_pub.party_tbl;
p_account_tbl csi_datastructures_pub.party_account_tbl;
p_pricing_attrib_tbl csi_datastructures_pub.pricing_attribs_tbl;
p_org_assignments_tbl csi_datastructures_pub.organization_units_tbl;
p_asset_assignment_tbl csi_datastructures_pub.instance_asset_tbl;
p_txn_rec csi_datastructures_pub.transaction_rec;
x_instance_id_lst csi_datastructures_pub.id_tbl;
x_return_status VARCHAR2(2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
x_msg_index_out NUMBER;
t_output VARCHAR2(2000);
t_msg_dummy NUMBER;
p_validation_level NUMBER;
p_commit VARCHAR2(5);
p_init_msg_lst VARCHAR2(500);
BEGIN
x_instance_rec.instance_id := 4004190;
x_instance_rec.object_version_number := 7;
p_txn_rec.transaction_id := fnd_api.g_miss_num;
p_txn_rec.transaction_date := SYSDATE;
p_txn_rec.source_transaction_date := SYSDATE;
p_txn_rec.transaction_type_id := 1;
p_ext_attrib_values(1).instance_id := 4004190;
p_ext_attrib_values(1).attribute_id := 31000;
p_ext_attrib_values(1).attribute_value := 'TEST_5';
csi_item_instance_pub.update_item_instance(p_api_version => 1.0
, p_commit => p_commit
, p_init_msg_list => p_init_msg_lst
, p_validation_level => 1
, p_instance_rec => x_instance_rec
, p_ext_attrib_values_tbl => p_ext_attrib_values
, p_party_tbl => p_party_tbl
, p_account_tbl => p_account_tbl
, p_pricing_attrib_tbl => p_pricing_attrib_tbl
, p_org_assignments_tbl => p_org_assignments_tbl
, p_asset_assignment_tbl => p_asset_assignment_tbl
, p_txn_rec => p_txn_rec
, x_instance_id_lst => x_instance_id_lst
, x_return_status => x_return_status
, x_msg_count => x_msg_count
, x_msg_data => x_msg_data
);
COMMIT;
-- Output the results
IF x_msg_count > 0
THEN
FOR j IN 1 .. x_msg_count
LOOP
fnd_msg_pub.get(j
, fnd_api.g_false
, x_msg_data
, t_msg_dummy
);
t_output :=('Msg' || TO_CHAR(j) || ': ' || x_msg_data);
DBMS_OUTPUT.put_line(SUBSTR(t_output
, 1
, 255
));
END LOOP;
END IF;
DBMS_OUTPUT.put_line('x_return_status = ' || x_return_status);
DBMS_OUTPUT.put_line('x_msg_count = ' || TO_CHAR(x_msg_count));
DBMS_OUTPUT.put_line('x_msg_data = ' || x_msg_data);
COMMIT;
END;
x_instance_rec csi_datastructures_pub.instance_rec;
p_ext_attrib_values csi_datastructures_pub.extend_attrib_values_tbl;
p_party_tbl csi_datastructures_pub.party_tbl;
p_account_tbl csi_datastructures_pub.party_account_tbl;
p_pricing_attrib_tbl csi_datastructures_pub.pricing_attribs_tbl;
p_org_assignments_tbl csi_datastructures_pub.organization_units_tbl;
p_asset_assignment_tbl csi_datastructures_pub.instance_asset_tbl;
p_txn_rec csi_datastructures_pub.transaction_rec;
x_instance_id_lst csi_datastructures_pub.id_tbl;
x_return_status VARCHAR2(2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
x_msg_index_out NUMBER;
t_output VARCHAR2(2000);
t_msg_dummy NUMBER;
p_validation_level NUMBER;
p_commit VARCHAR2(5);
p_init_msg_lst VARCHAR2(500);
BEGIN
x_instance_rec.instance_id := 4004190;
x_instance_rec.object_version_number := 7;
p_txn_rec.transaction_id := fnd_api.g_miss_num;
p_txn_rec.transaction_date := SYSDATE;
p_txn_rec.source_transaction_date := SYSDATE;
p_txn_rec.transaction_type_id := 1;
p_ext_attrib_values(1).instance_id := 4004190;
p_ext_attrib_values(1).attribute_id := 31000;
p_ext_attrib_values(1).attribute_value := 'TEST_5';
csi_item_instance_pub.update_item_instance(p_api_version => 1.0
, p_commit => p_commit
, p_init_msg_list => p_init_msg_lst
, p_validation_level => 1
, p_instance_rec => x_instance_rec
, p_ext_attrib_values_tbl => p_ext_attrib_values
, p_party_tbl => p_party_tbl
, p_account_tbl => p_account_tbl
, p_pricing_attrib_tbl => p_pricing_attrib_tbl
, p_org_assignments_tbl => p_org_assignments_tbl
, p_asset_assignment_tbl => p_asset_assignment_tbl
, p_txn_rec => p_txn_rec
, x_instance_id_lst => x_instance_id_lst
, x_return_status => x_return_status
, x_msg_count => x_msg_count
, x_msg_data => x_msg_data
);
COMMIT;
-- Output the results
IF x_msg_count > 0
THEN
FOR j IN 1 .. x_msg_count
LOOP
fnd_msg_pub.get(j
, fnd_api.g_false
, x_msg_data
, t_msg_dummy
);
t_output :=('Msg' || TO_CHAR(j) || ': ' || x_msg_data);
DBMS_OUTPUT.put_line(SUBSTR(t_output
, 1
, 255
));
END LOOP;
END IF;
DBMS_OUTPUT.put_line('x_return_status = ' || x_return_status);
DBMS_OUTPUT.put_line('x_msg_count = ' || TO_CHAR(x_msg_count));
DBMS_OUTPUT.put_line('x_msg_data = ' || x_msg_data);
COMMIT;
END;
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.