Total Pageviews

February 29, 2016

2/29/2016 11:35:00 AM


To import items and use item templates.
 To see all template names run the following sql.
SELECT   template_id, template_name, description FROM mtl_item_templates; 
To see all the attributes related to template run the following sql.
SELECT   template_id,
         attribute_name,
         enabled_flag,
         report_user_value
  FROM   mtl_item_templ_attributes
 WHERE   template_id = &template_id;
Please substitute the template id from the 1st query in the second query 
To see the attribute values.
In our example i am going to use purchasing template.
SELECT   template_id, template_name, description
  FROM   mtl_item_templates
 WHERE   template_id = 259;
 
Template_id template_name description
----------- -------------  ----------------
        259-purchased item purchased item
 
We are going to insert a new item in the master organization and use the purchasing template.
 
INSERT INTO mtl_system_items_interface (process_flag,
                                        set_process_id,
                                        transaction_type,
                                        organization_id,
                                        segment1,
                                        description,
                                        template_id)
  VALUES   (1,
            1,
            'create',
            204,
            'testtemplate',
            'testing item import with template',
            259);

COMMIT;
Now run the item import program ie. Item > import > import items.
In process set enter 1 as we had used 1 in the set_process_id column. Now enter 1 in create or update items field and hit ok button.
You can check view requests to check whether your request has completed  Successfully.
Now go to master items screen and query on 'testtemplate' the item that we had populated and you should be able to see the item. Now you will see that the purchasing attributes are set because we used the purchasing template.
 Note: instead of using template_id we can use template_name and you should 
See the same effect.
INSERT INTO mtl_system_items_interface (process_flag,
                                        set_process_id,
                                        transaction_type,
                                        organization_id,
                                        segment1,
                                        description,
                                        template_name)
  VALUES   (1,
            1,
            'create',
            204,
            'testtemplate',
            'testing item import with template',
            'Purchased item');

COMMIT; 
 
Part 1
Inventory Item Import Technical Snippets Part-1
 
Related Posts Plugin for WordPress, Blogger...