Hi
We are using IFS Cloud. I’m trying to load Cost Breakdown structures and want to make them active, suing Migration jobs, Alternately, Use a Background job to set them as Active.
Is this possible?
I’ve tried using Cost_Structure_API.Activate__ but cannot get this to work in an anonymous block.
Here is my code:
DECLARE
attr_ VARCHAR2(5000);
job_id_ NUMBER;
CURSOR get_structures IS
SELECT cost_structure_id,objid, objversion
FROM cost_structure
WHERE state = 'In Progress'
;
BEGIN
FOR c_get_structures IN get_structures
LOOP
client_sys.clear_attr(attr_);
-- client_sys.add_to_attr('INFO_', 'NULL' , attr_);
client_sys.add_to_attr('OBJID_', c_get_structures.objid , attr_);
client_sys.add_to_attr('OBJVERSION_', c_get_structures.objversion , attr_);
client_sys.add_to_attr('ATTR_', '' , attr_);
client_sys.add_to_attr('ACTION_', 'DO' , attr_);
job_id_ := TRANSACTION_SYS.Post_local__('Cost_Structure_API.Activate__', 'PARAMETER', attr_, 'TESTING '||c_get_structures.cost_structure_id , sysdate ,'TRUE');
COMMIT;
END LOOP;
END;