API para Criar Previsões

Neste post irei demonstrar a API para criar previsões que podem ser usadas no MRP e no ASCP Posteriormente.

DECLARE
   t_forecast_interface_tab    MRP_FORECAST_INTERFACE_PK.t_forecast_interface;
   t_forecast_designator_tab   MRP_FORECAST_INTERFACE_PK.t_forecast_designator;
   var_bool                    BOOLEAN;
BEGIN
   t_forecast_interface_tab (1).inventory_item_id := 3921;
   t_forecast_interface_tab (1).forecast_designator := 'SK-FORECST';
   t_forecast_interface_tab (1).organization_id := 207;
   t_forecast_interface_tab (2).forecast_date := TO_DATE ('19-FEB-2019');
   t_forecast_interface_tab (1).bucket_type := 2;
   t_forecast_interface_tab (1).quantity := 100;
   t_forecast_interface_tab (1).process_status := 2;
   t_forecast_interface_tab (1).confidence_percentage := 100;
   t_forecast_designator_tab (1).organization_id := 207;
   t_forecast_designator_tab (1).forecast_designator := 'SK-FORECST';
   t_forecast_interface_tab (2).inventory_item_id := 3921;
   t_forecast_interface_tab (2).forecast_designator := 'SK-FORECST';
   t_forecast_interface_tab (2).organization_id := 196;
   t_forecast_interface_tab (2).forecast_date := TO_DATE ('19-FEB-2019');
   t_forecast_interface_tab (2).bucket_type := 2;
   t_forecast_interface_tab (2).quantity := 150;
   t_forecast_interface_tab (2).process_status := 2;
   t_forecast_interface_tab (2).confidence_percentage := 100;
   t_forecast_designator_tab (2).organization_id := 207;
   t_forecast_designator_tab (2).forecast_designator := 'SK-FORECST';
   t_forecast_interface_tab (3).inventory_item_id := 3921;
   t_forecast_interface_tab (3).forecast_designator := 'SK-FORECST';
   t_forecast_interface_tab (3).organization_id := 207;
   t_forecast_interface_tab (3).forecast_date := TO_DATE ('19-FEB-2019');
   t_forecast_interface_tab (3).bucket_type := 2;
   t_forecast_interface_tab (3).quantity := 200;
   t_forecast_interface_tab (3).process_status := 2;
   t_forecast_interface_tab (3).confidence_percentage := 100;
   t_forecast_designator_tab (3).organization_id := 207;
   t_forecast_designator_tab (3).forecast_designator := 'SK-FORECST';
   var_bool := mrp_forecast_interface_pk.mrp_forecast_interface ( t_forecast_interface_tab,
                                                                  t_forecast_designator_tab);

   DBMS_OUTPUT.put_line (  'Return Status = ' || t_forecast_interface_tab (1).process_status);

   DBMS_OUTPUT.put_line ( 'Error Message = ' || t_forecast_interface_tab (1).error_message);

   COMMIT;
   
END;

Assim quando há algum carregamento que possa ser feito em alto volume fica mais fácil para o usuário e mais prático.

Deixe uma resposta

Powered by WordPress.com. Tema: Baskerville 2 por Anders Noren

Acima ↑

%d blogueiros gostam disto: