How To Import Item Catalog Descriptive Element Values [ID 360850.1]

85579711發表於2014-03-20

How to Import Item Catalog Descriptive Element Values?

Solution

This document is created to know how to use the following public APIs which help in importing Item Catalog Descriptive Element Values?
1. inv_item_catalog_elem_pub.process_item_catalog_grp_recs,
2. inv_item_catalog_elem_pub.process_item_descr_elements

Please follow the following Steps

Step 1::

a) Create an item through form. or Item Open Interface. 
b) Assign a catalog group to the item. This should populate the mtl_descr_element_values table for this item. The elements will be defined but will not have any values.

Step 2::

To populate the values in mtl_descr_element_values you can use either of these two APIs:
inv_item_catalog_elem_pub.process_item_catalog_grp_recs, or
inv_item_catalog_elem_pub.process_item_descr_elements

The first API, process_item_catalog_grp_recs, is used in batch mode to import element values for a SET of items.
The second API, process_item_descr_elements, is used to import element values for a SINGLE item.

Using process_item_catalog_grp_recs
===========================
Populate the interface table mtl_desc_elem_val_interface with the following values:

item_number or inventory_item_id, --item for which desc element values need to be imported;
element_name,                               --name of the element to be imported;
element_value,                               --value of the element to be imported;
element_sequence,                         --sequence number of the element name=> determines the 
                                                        sequence in which the elements are displayed
process_flag=1,
set_process_id                              --any numeric value, used to group records to be imported

Now run the API inv_item_catalog_elem_pub.process_item_catalog_grp_recs.
The declaration of this API is:
inv_item_catalog_elem_pub.process_item_catalog_grp_recs
(
  errbuf out nocopy varchar2
, retcode out nocopy number
, p_rec_set_id in number
, p_upload_rec_flag in number default 1
, p_delete_rec_flag in number default 1
, p_commit_flag in number default 1
, p_prog_appid in number default null
, p_prog_id in number default null
, p_request_id in number default null
, p_user_id in number default null
);

Specify values as follows:

p_rec_set_id = set_process_id from interface table

The other parameters are described below:

errbuf                    - holds the error message, if any, that results from trying to import the values for the descriptive elements 
                                the catalog group.
retcode                  - should be zero if there were no errors
p_rec_set_id          - used to group the rows, should be set to value of "set_process_id" in mtl_desc_elem_val_interface table
p_upload_rec_flag - whether the rows in interface table are to be uploaded to database
p_delete_rec_flag  - whether to delete the rows in interface table are to be deleted after they have been uploaded to database
p_commit_flag       - whether the uploaded rows need to be commited to the database


Using process_item_descr_elements
==================================
Define necessary values programmatically in PL/SQL variables and tables and call this API.
Do not populate interface table.

The decalaration of this API:

PROCEDURE Process_item_descr_elements
(
  p_api_version IN NUMBER
, p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_FALSE
, p_commit_flag IN VARCHAR2 DEFAULT fnd_api.g_FALSE
, p_validation_level IN NUMBER DEFAULT INV_ITEM_CATALOG_ELEM_PUB.g_VALIDATE_ALL
, p_inventory_item_id IN NUMBER DEFAULT -999
, p_item_number IN VARCHAR2 DEFAULT NULL
, p_item_desc_element_table IN ITEM_DESC_ELEMENT_TABLE
, x_generated_descr OUT NOCOPY VARCHAR2
, x_return_status OUT NOCOPY VARCHAR2
, x_msg_count OUT NOCOPY NUMBER
, x_msg_data OUT NOCOPY VARCHAR2
);

The parameters are described below:

p_api_version                     – the version of this API. 
                                             Value=1.0
p_init_msg_list                    – if set to true initially, messages generated internally by the API will be captured. 
                                             Value = fnd_api.g_TRUE, if messages need to be captured, else accept default.
p_commit_flag                    – whether the uploaded rows need to be commited to the database
                                            Value = fnd_api.g_TRUE, to commit else accept default.
p_validation_level               – determines if item_number is to be converted to item_id
                                             If item_id is specified, set Value = g_VALIDATE_NONE, Else take default.
p_inventory_item_id            – item id of the item for which the element values need to be uploaded
p_item_number                   – Item number of the item
p_item_desc_element_table – PL/SQL table of records; each record will hold element name, value and description.
x_generated_descr              – element values are concatenated to generate item description
x_return_status                    – the return status of the API
x_msg_count                       – count of messages generated
x_msg_data                         – holds the messages generated 

ReferBug 4216729

 

 

INSERT INTO mtl_desc_elem_val_interface
  (inventory_item_id,
  
   element_name, --name of the element to be imported;
   element_value, --value of the element to be imported;
   element_sequence, --sequence number of the element name=> determines the
   --     sequence in which the elements are displayed
   process_flag,
   set_process_id)
VALUES
  (......)


Item Catalog Group Element Open Interface

INV_ITEM_CAT_GRP_ELE_OI

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29063131/viewspace-1126136/,如需轉載,請註明出處,否則將追究法律責任。

相關文章