Sunday, October 22, 2017

API To delete Lookup Values in Oracle Applications

DECLARE
   CURSOR lookup_values
   IS
      SELECT lookup_type, lookup_code, security_group_id,
             view_application_id
        FROM fnd_lookup_values_vl
       WHERE lookup_type = 'XX_LOOKUP_NAME' AND lookup_code LIKE 'TEST%';
BEGIN
   FOR i IN lookup_values
   LOOP
      BEGIN
         fnd_lookup_values_pkg.delete_row
                             (x_lookup_type              => i.lookup_type,
                              x_security_group_id        => i.security_group_id,
                              x_view_application_id      => i.view_application_id,
                              x_lookup_code              => i.lookup_code
                             );
         COMMIT;
         DBMS_OUTPUT.put_line (   'Looup Code '
                               || i.lookup_code
                               || ' has been delted..!'
                              );
      EXCEPTION
         WHEN OTHERS
         THEN
            DBMS_OUTPUT.put_line ('Inside Inner Exception: ' || SQLERRM);
      END;
   END LOOP;
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line ('Inside Main Exception ' || SQLERRM);
END;

No comments:

Post a Comment

SupplierAddressImportTemplate.xlsm South Africa Suburb Field mapping in POZ_SUPPLIER_ADDRESSES_INT

Suburb mpping in Supplier Address Import Template will be mapped to Address Element Attribute2 (HZ_LOCATIONS. ADDR_ELEMENT_ATTRIBUTE2)