Skip to main content

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;

 

 

Hi ​@Tim 

It would be good if you could provide some screenshots of your migration job if it already exists.

Here is the solution:

 

Happy data migration.

/Jens


Thanks Jens - I’ll give that a try today!

 

We did get it to work using scripting - we took the activate___ api call and constructed our api thru the Build Place from it - as using it out of the box didn’t work in a background job, which is where I need to run it - to keep everything sequenced correctly. I will post my code later to share what we did!


Reply