Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle Apps 11i - MTL_SYSTEM_ITEMS - Unable to Update

733880Jun 23 2012 — edited Jun 28 2012
Hello Experts,

In Oracle Apps11i , when i am trying to run this PL/SQL block it is not updating the table column.
BEGIN

    FOR cur
    IN (SELECT     DISTINCT msi.inventory_item_id, clpt.item_no
                                ,clpt.list_value
         FROM      temp clpt
                  ,mtl_system_items msi
         WHERE     clpt.item_no = msi.segment1 
               AND organization_id IN (222,223))
    LOOP
    
        
        UPDATE    mtl_system_items_b
        SET        list_price_per_unit     = cur.list_value
        WHERE          segment1 = cur.item_no
                    AND inventory_item_id = cur.inventory_item_id
                    AND organization_id IN (222,223);


    END LOOP;


    COMMIT;
exception 
when others then
dbms_output.put_line(sqlerrm);
END;
whereas when i am running direct update query, it is getting updated successfully.
        UPDATE    mtl_system_items_b
        SET        list_price_per_unit     = 25
        WHERE          segment1 = 'DFS30300'
                    AND inventory_item_id = 3
                    AND organization_id IN (222,223);
This table is directly created in APPS schema. So no issue with table creation.

Please help....

Thanks...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 26 2012
Added on Jun 23 2012
10 comments
928 views