Documente Academic
Documente Profesional
Documente Cultură
2. Validation Programme
cursor mtl_transaction_header is
select xmt.rowid, xmt.* from xx_material_transactions xmt;
begin
lv_org_id :=null;
lv_error_message :=null;
lv_subinventory_code :=null;
lv_inventory_item_id :=null;
lv_uom := null;
lv_transaction_type_id := null;
lv_transaction_type_name := null;
lv_source_name := null;
---- gv_error_location :=null;
open org_check(i.organization_id);
fetch ORG_check INTO LV_ORG_ID;
CLOSE ORG_CHECK;
IF LV_ORG_ID IS NULL THEN
LV_ERROR_MESSAGE :='This Organization does not exit'||i.organization_id;
end if;
open transaction_type_check(i.transaction_type_id);
fetch transaction_type_check into lv_transaction_type_id,
lv_transaction_type_name;
close transaction_type_check;
if lv_transaction_type_id is null then
lv_error_message :=' This transaction type is not defined' ||
i.transaction_type_id;
end if;
open source_check(i.source_code);
fetch source_check into lv_source_name;
close source_check;
if lv_source_name is null then
lv_error_message :='This source type does not exit '|| i.source_code;
end if;
END LOOP;
commit;
end XX_VALIDATION;
end XX_TRANSACTIONS_VALIDATION;