DECLARE p_system_rec CSI_DATASTRUCTURES_PUB.SYSTEM_REC; p_txn_rec CSI_DATASTRUCTURES_PUB.TRANSACTION_REC; x_system_id NUMBER; 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; BEGIN p_system_rec.system_id := NULL; p_system_rec.customer_id :=1000; p_system_rec.system_type_code := 'TEST'; p_system_rec.system_number := ''; p_system_rec.parent_system_id := NULL; p_system_rec.ship_to_contact_id := NULL; p_system_rec.bill_to_contact_id := NULL; p_system_rec.technical_contact_id := NULL; p_system_rec.service_admin_contact_id := NULL; p_system_rec.ship_to_site_use_id := 321921; p_system_rec.bill_to_site_use_id := 221327; p_system_rec.install_site_use_id := 319286; p_system_rec.coterminate_day_month := ''; p_system_rec.autocreated_from_system_id := NULL; p_system_rec.config_system_type := ''; p_system_rec.start_date_active := TO_DATE(''); p_system_rec.end_date_active := TO_DATE(''); p_system_rec.context := ''; p_system_rec.attribute1 := ''; p_system_rec.attribute2 := ''; p_system_rec.attribute3 := ''; p_system_rec.attribute4 := ''; p_system_rec.attribute5 := ''; p_system_rec.attribute6 := ''; p_system_rec.attribute7 := ''; p_system_rec.attribute8 := ''; p_system_rec.attribute9 := ''; p_system_rec.attribute10 := ''; p_system_rec.attribute11 := ''; p_system_rec.attribute12 := ''; p_system_rec.attribute13 := ''; p_system_rec.attribute14 := ''; p_system_rec.attribute15 := ''; p_system_rec.object_version_number := NULL; p_system_rec.name := 'TEST_123'; p_system_rec.description := ''; p_system_rec.tech_cont_change_flag := ''; p_system_rec.bill_to_cont_change_flag := ''; p_system_rec.ship_to_cont_change_flag := ''; p_system_rec.serv_admin_cont_change_flag := ''; p_system_rec.bill_to_site_change_flag := ''; p_system_rec.ship_to_site_change_flag := ''; p_system_rec.install_to_site_change_flag := ''; p_system_rec.cascade_cust_to_ins_flag := ''; p_txn_rec.transaction_id := NULL; p_txn_rec.transaction_date := sysdate; p_txn_rec.source_transaction_date := sysdate; p_txn_rec.transaction_type_id := 1; p_txn_rec.txn_sub_type_id := NULL; p_txn_rec.source_group_ref_id := NULL; p_txn_rec.source_group_ref := ''; p_txn_rec.source_header_ref_id := NULL; p_txn_rec.source_header_ref := ''; p_txn_rec.source_line_ref_id := NULL; p_txn_rec.source_line_ref := ''; p_txn_rec.source_dist_ref_id1 := NULL; p_txn_rec.source_dist_ref_id2 := NULL; p_txn_rec.inv_material_transaction_id := NULL; p_txn_rec.transaction_quantity := NULL; p_txn_rec.transaction_uom_code := ''; p_txn_rec.transacted_by := NULL; p_txn_rec.transaction_status_code := ''; p_txn_rec.transaction_action_code := ''; p_txn_rec.message_id := NULL; p_txn_rec.context := ''; p_txn_rec.attribute1 := ''; p_txn_rec.attribute2 := ''; p_txn_rec.attribute3 := ''; p_txn_rec.attribute4 := ''; p_txn_rec.attribute5 := ''; p_txn_rec.attribute6 := ''; p_txn_rec.attribute7 := ''; p_txn_rec.attribute8 := ''; p_txn_rec.attribute9 := ''; p_txn_rec.attribute10 := ''; p_txn_rec.attribute11 := ''; p_txn_rec.attribute12 := ''; p_txn_rec.attribute13 := ''; p_txn_rec.attribute14 := ''; p_txn_rec.attribute15 := ''; p_txn_rec.object_version_number := NULL; p_txn_rec.split_reason_code := ''; -- Now call the stored program csi_systems_pub.create_system( p_api_version => 1.0 ,p_commit => fnd_api.g_false ,p_init_msg_list => fnd_api.g_false ,p_validation_level => fnd_api.g_valid_level_full ,p_system_rec => p_system_rec ,p_txn_rec => p_txn_rec ,x_system_id => x_system_id ,x_return_status => x_return_status ,x_msg_count => x_msg_count ,x_msg_data => x_msg_data ); 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); dbms_output.put_line('x_system_id = '||x_system_id); -- COMMIT; END;