Wednesday, 18 July 2018

WebADI - Delete Interface/Integrator from Backend


--Query to Get Integrator code
SELECT application_id
      ,integrator_code
      ,user_name
  FROM bne_integrators_vl
WHERE user_name  = '<Integrator Name>';

--Query to Get Interface Code
SELECT *
  FROM bne_interfaces_b
 WHERE integrator_code = '<Integrator_code>';

-- Query to Get interface columns
SELECT *
  FROM bne_interface_cols_b
 WHERE interface_code = '<interface_code>';

--Query get an Interface/Integrator Details
SELECT biv.application_id
      ,biv.integrator_code
      ,biv.user_name
      ,bib.interface_code
  FROM bne_integrators_vl biv
      ,bne_interfaces_b   bib
 WHERE upper(user_name) like 'XXAP%' --'XXAP Supplier Update WebADI'
   AND bib.integrator_code = biv.integrator_code;

--Script to Delete an Interface
DECLARE
   vn_number   NUMBER;
BEGIN
   vn_number := bne_integrator_utils.delete_interface
                (p_application_id => 200,
                p_interface_code  => 'XXSUP_XINTG_INTF1');
               
   DBMS_OUTPUT.put_line ('WebADI Interface has been Deleted '||vn_number);
   COMMIT;
   --
EXCEPTION 
   WHEN OTHERS THEN
      DBMS_OUTPUT.put_line('Error: '||sqlerrm);
      ROLLBACK;
END;
/


--Script to Delete an Integrator
DECLARE
   vn_number number:=0;
BEGIN
   vn_number:= bne_integrator_utils.delete_integrator
               (p_application_id => 200,
               p_integrator_code => 'XXSUP_XINTG');
              
   dbms_output.put_line('WebADI Integrator has been Deleted : '||vn_number);
   COMMIT;
   --
EXCEPTION 
   WHEN OTHERS THEN
      DBMS_OUTPUT.put_line('Error: '||sqlerrm);
      ROLLBACK;
END;
/

No comments:

Post a Comment