详解EBS接口开发之物料导入API

时间:2022-07-07 04:40:14

create_item

 inv_item_grp.create_item(p_commit        => fnd_api.g_true, --
                                     p_item_rec      => l_item_rec,
                                     x_item_rec      => x_item_rec,
                                     x_return_status => x_return_status,
                                     x_error_tbl     => l_error_tbl,
                                     p_template_id   => l_record.template_id);

update_item

inv_item_grp.update_item(p_commit        => fnd_api.g_true,
                                     p_item_rec      => l_item_rec,
                                     x_item_rec      => x_item_rec,
                                     x_return_status => x_return_status,
                                     x_error_tbl     => l_error_tbl,
                                     p_template_id   => l_record.template_id);

默认接收子库存

 inv_item_sub_default_pkg.insert_upd_item_sub_defaults(x_return_status     => x_return_status,
                                                                     x_msg_count         => x_msg_count,
                                                                     x_msg_data          => x_msg_data,
                                                                     p_organization_id   => x_item_rec.organization_id,
                                                                     p_inventory_item_id => x_item_rec.inventory_item_id,
                                                                     p_subinventory_code => l_record.default_receiving_subinv,
                                                                     p_default_type      => '2',
                                                                     p_creation_date     => SYSDATE,
                                                                     p_created_by        => fnd_global.user_id,
                                                                     p_last_update_date  => SYSDATE,
                                                                     p_last_updated_by   => fnd_global.user_id,
                                                                     p_process_code      => l_process_code,
                                                                     p_commit            => fnd_api.g_true);

CREATE item INV CATEGORY 

 inv_item_category_pub.create_category_assignment(p_api_version       => '1.0',
                                                                p_init_msg_list     => p_init_msg_list,
                                                                p_commit            => p_commit,
                                                                x_return_status     => x_return_status,
                                                                x_errorcode         => l_errorcode,
                                                                x_msg_count         => x_msg_count,
                                                                x_msg_data          => x_msg_data,
                                                                p_category_id       => l_record.inv_category_id,
                                                                p_category_set_id   => 1,
                                                                p_inventory_item_id => x_item_rec.inventory_item_id,
                                                                p_organization_id   => x_item_rec.organization_id);

UPDATE item INV CATEGORY

inv_item_category_pub.update_category_assignment(p_api_version       => '1.0',
                                                                p_init_msg_list     => p_init_msg_list,
                                                                p_commit            => p_commit,
                                                                x_return_status     => x_return_status,
                                                                x_errorcode         => l_errorcode,
                                                                x_msg_count         => x_msg_count,
                                                                x_msg_data          => x_msg_data,
                                                                p_old_category_id   => l_old_category_id,
                                                                p_category_id       => l_record.inv_category_id,
                                                                p_category_set_id   => 1,
                                                                p_inventory_item_id => x_item_rec.inventory_item_id,
                                                                p_organization_id   => x_item_rec.organization_id);

DELETE item INV CATEGORY 

inv_item_category_pub.delete_category_assignment(p_api_version       => '1.0',
                                                                p_init_msg_list     => p_init_msg_list,
                                                                p_commit            => p_commit,
                                                                x_return_status     => x_return_status,
                                                                x_errorcode         => l_errorcode,
                                                                x_msg_count         => x_msg_count,
                                                                x_msg_data          => x_msg_data,
                                                                p_category_id       => l_old_category_id,
                                                                p_category_set_id   => 1,
                                                                p_inventory_item_id => x_item_rec.inventory_item_id,
                                                                p_organization_id   => x_item_rec.organization_id);

CREATE item SALE CATEGORY

 inv_item_category_pub.create_category_assignment(p_api_version       => '1.0',
                                                                p_init_msg_list     => p_init_msg_list,
                                                                p_commit            => p_commit,
                                                                x_return_status     => x_return_status,
                                                                x_errorcode         => l_errorcode,
                                                                x_msg_count         => x_msg_count,
                                                                x_msg_data          => x_msg_data,
                                                                p_category_id       => l_record.sale_category_id,
                                                                p_category_set_id   => l_category_set_id,
                                                                p_inventory_item_id => x_item_rec.inventory_item_id,
                                                                p_organization_id   => x_item_rec.organization_id);

UPDATE item SALE CATEGORY

inv_item_category_pub.update_category_assignment(p_api_version       => '1.0',
                                                                p_init_msg_list     => p_init_msg_list,
                                                                p_commit            => p_commit,
                                                                x_return_status     => x_return_status,
                                                                x_errorcode         => l_errorcode,
                                                                x_msg_count         => x_msg_count,
                                                                x_msg_data          => x_msg_data,
                                                                p_old_category_id   => l_old_category_id,
                                                                p_category_id       => l_record.sale_category_id,
                                                                p_category_set_id   => l_category_set_id,
                                                                p_inventory_item_id => x_item_rec.inventory_item_id,
                                                                p_organization_id   => x_item_rec.organization_id);

DELETE item SALE CATEGORY 

inv_item_category_pub.delete_category_assignment(p_api_version       => '1.0',
                                                                p_init_msg_list     => p_init_msg_list,
                                                                p_commit            => p_commit,
                                                                x_return_status     => x_return_status,
                                                                x_errorcode         => l_errorcode,
                                                                x_msg_count         => x_msg_count,
                                                                x_msg_data          => x_msg_data,
                                                                p_category_id       => l_old_category_id,
                                                                p_category_set_id   => l_category_set_id,
                                                                p_inventory_item_id => x_item_rec.inventory_item_id,
                                                                p_organization_id   => x_item_rec.organization_id);

CREATE item COST CATEGORY

 inv_item_category_pub.create_category_assignment(p_api_version       => '1.0',
                                                                p_init_msg_list     => p_init_msg_list,
                                                                p_commit            => p_commit,
                                                                x_return_status     => x_return_status,
                                                                x_errorcode         => l_errorcode,
                                                                x_msg_count         => x_msg_count,
                                                                x_msg_data          => x_msg_data,
                                                                p_category_id       => l_record.cost_category_id,
                                                                p_category_set_id   => l_category_set_id,
                                                                p_inventory_item_id => x_item_rec.inventory_item_id,
                                                                p_organization_id   => x_item_rec.organization_id);

UPDATE item COST CATEGORY 

inv_item_category_pub.update_category_assignment(p_api_version       => '1.0',
                                                                p_init_msg_list     => p_init_msg_list,
                                                                p_commit            => p_commit,
                                                                x_return_status     => x_return_status,
                                                                x_errorcode         => l_errorcode,
                                                                x_msg_count         => x_msg_count,
                                                                x_msg_data          => x_msg_data,
                                                                p_old_category_id   => l_old_category_id,
                                                                p_category_id       => l_record.cost_category_id,
                                                                p_category_set_id   => l_category_set_id,
                                                                p_inventory_item_id => x_item_rec.inventory_item_id,
                                                                p_organization_id   => x_item_rec.organization_id);

DELETE item INV CATEGORY 

inv_item_category_pub.delete_category_assignment(p_api_version       => '1.0',
                                                                p_init_msg_list     => p_init_msg_list,
                                                                p_commit            => p_commit,
                                                                x_return_status     => x_return_status,
                                                                x_errorcode         => l_errorcode,
                                                                x_msg_count         => x_msg_count,
                                                                x_msg_data          => x_msg_data,
                                                                p_category_id       => l_old_category_id,
                                                                p_category_set_id   => l_category_set_id,
                                                                p_inventory_item_id => x_item_rec.inventory_item_id,
                                                                p_organization_id   => x_item_rec.organization_id);

 CREATE item PO CATEGORY 

 inv_item_category_pub.create_category_assignment(p_api_version       => '1.0',
                                                                   p_init_msg_list     => p_init_msg_list,
                                                                   p_commit            => p_commit,
                                                                   x_return_status     => x_return_status,
                                                                   x_errorcode         => l_errorcode,
                                                                   x_msg_count         => x_msg_count,
                                                                   x_msg_data          => x_msg_data,
                                                                   p_category_id       => l_record.po_category_id,
                                                                   p_category_set_id   => l_category_set_id,
                                                                   p_inventory_item_id => x_item_rec.inventory_item_id,
                                                                   p_organization_id   => x_item_rec.organization_id);

UPDATE item PO CATEGORY  

inv_item_category_pub.update_category_assignment(p_api_version       => '1.0',
                                                                   p_init_msg_list     => p_init_msg_list,
                                                                   p_commit            => p_commit,
                                                                   x_return_status     => x_return_status,
                                                                   x_errorcode         => l_errorcode,
                                                                   x_msg_count         => x_msg_count,
                                                                   x_msg_data          => x_msg_data,
                                                                   p_old_category_id   => l_old_category_id,
                                                                   p_category_id       => l_record.po_category_id,
                                                                   p_category_set_id   => l_category_set_id,
                                                                   p_inventory_item_id => x_item_rec.inventory_item_id,
                                                                   p_organization_id   => x_item_rec.organization_id);

DELETE item INV CATEGORY 

inv_item_category_pub.delete_category_assignment(p_api_version       => '1.0',
                                                                   p_init_msg_list     => p_init_msg_list,
                                                                   p_commit            => p_commit,
                                                                   x_return_status     => x_return_status,
                                                                   x_errorcode         => l_errorcode,
                                                                   x_msg_count         => x_msg_count,
                                                                   x_msg_data          => x_msg_data,
                                                                   p_category_id       => l_old_category_id,
                                                                   p_category_set_id   => l_category_set_id,
                                                                   p_inventory_item_id => x_item_rec.inventory_item_id,
                                                                   p_organization_id   => x_item_rec.organization_id);