Go to primary content
Oracle® Retail Bulk Data Integration Cloud Service Implementation Guide
Release 19.1.000
F31810-01
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

E Sample Extractor - PL/SQL application code that calls procedures in PL/SQL package

BEGIN 
-- First call beginDataSet of the corresponding interface module datactl pkg before loading data to interface tables.
-- Here interfacemodule is Diff_Fnd and dataload is full set. If partial dataset, then call beginPartialSet_Diff_Fnd
         IF Diff_Fnd_Out_DataCtl.beginFullSet_Diff_Fnd(O_datacontrol_id,O_error_message) = 0 THEN
              DBMS_OUTPUT.PUT_LINE('interfaceModuleDataControlId: ' || O_datacontrol_id);
         ELSE
              DBMS_OUTPUT.PUT_LINE('beginFullSet_Diff_Fnd error: ' || O_error_message);
Return;
         END IF;
-- Call application PL/SQL package to populate outbound interface table
-- Then call endDataSet of the corresponding interface module datactl pkg
         IF Diff_Fnd_Out_DataCtl.onSuccEndSet_Diff_Fnd(O_datacontrol_id,O_error_message) = 0 THEN
              DBMS_OUTPUT.PUT_LINE('Successfully called onSuccEndSet');
              COMMIT;
         ELSE
              DBMS_OUTPUT.PUT_LINE('onSuccEndSet error: ' || O_error_message);
              ROLLBACK;
         END IF;
EXCEPTION
WHEN OTHERS
THEN
         Call onErrDiscardSet in case of an error
         IF Diff_Fnd_Out_DataCtl.onErrDiscardSet_Diff_Fnd(O_datacontrol_id,O_error_message) = 0 THEN
              DBMS_OUTPUT.PUT_LINE('Successfully called onErrEndSet');
         ELSE
              DBMS_OUTPUT.PUT_LINE('onErrEndSet error: ' || O_error_message);
         END IF;
END;