Solved

Method [x] is a function or has parameters that are not supported. Only IN parameters are supported.

  • 14 October 2020
  • 9 replies
  • 437 views

Badge +3

I am attempting to create a database task that will close old customer order lines on a weekly basis assuming certain criteria are met (which I have in a SQL statement).  However, when I go to set up the New Database Task and choose “Select Method” and then choose the API, I get the following pop-up.

 

“Method [CLOSE_CUSTOMER_ORDER_API.CLOSE_ORDER_LINE__] is a function or has parameters that are not supported.  Only IN parameters are supported.”

 

Am I missing something?  Or is this not possible?

icon

Best answer by Technical Outlaws 14 October 2020, 15:04

View original

9 replies

Userlevel 5
Badge +11

Database Tasks will only support procedures with IN arguments.

 

Check CLOSE_CUSTOMER_ORDER_API.Close_Order_Line__, the first 2 arguments are IN OUT, this is not supported.

Badge +3

So, is there no way to actually get Customer Orders to auto-close on a scheduled basis?

Userlevel 5
Badge +11

I wouldn’t say no just yet, need to check for another API method that we can invoke that is also compatible as a scheduled database task.

Userlevel 5
Badge +11

Hi @aprough,

Have you run the process manually and used the debugger to see which API is called?

Badge +3

@GPIE .  I have not (actually didn’t know I could).  I will see if I can figure that out.  Thx.

Userlevel 5
Badge +11

It’s pretty straight forward…

Press CTRL+SHIFT+D in IFS to open Debug Console.

Run the process in IFS.

Find the specific process command, select the PL/SQL Details tab.

You can see below in the bottom panes what the API call is.

You can then use Copy Special to capture the code, for example...

-- Context: frmPurchaseOrder
-- Module: Ifs.Application.Purch_.dll
-- Namespace: Ifs.Application.Purch_
-- Object: frmPurchaseOrder
-- Method: DataRecordStateEvent

DECLARE
   -- p0 -> __lsResult
   p0_ VARCHAR2(32000) := NULL;

   -- p1 -> __sObjid
   p1_ VARCHAR2(32000) := 'AAAZQvAAMAAAjnMAAK';

   -- p2 -> __lsObjversion
   p2_ VARCHAR2(32000) := '20200608161217';

   -- p3 -> __lsAttr
   p3_ VARCHAR2(32000) := NULL;

   -- p4 -> __sAction
   p4_ VARCHAR2(32000) := 'DO';

BEGIN
    IFSAPP.Log_SYS.Init_Debug_Session_('gb');
    
IFSAPP.PURCHASE_ORDER_API.CONFIRM__( p0_ , p1_ , p2_ , p3_ , p4_ );

   ----------------------------------
   ---Dbms_Output Section---
   ----------------------------------
   Dbms_Output.Put_Line('p0_ -> __lsResult');
   Dbms_Output.Put_Line(p0_);
   Dbms_Output.New_Line;

   Dbms_Output.Put_Line('p1_ -> __sObjid');
   Dbms_Output.Put_Line(p1_);
   Dbms_Output.New_Line;

   Dbms_Output.Put_Line('p2_ -> __lsObjversion');
   Dbms_Output.Put_Line(p2_);
   Dbms_Output.New_Line;

   Dbms_Output.Put_Line('p3_ -> __lsAttr');
   Dbms_Output.Put_Line(p3_);
   Dbms_Output.New_Line;

   Dbms_Output.Put_Line('p4_ -> __sAction');
   Dbms_Output.Put_Line(p4_);
   ----------------------------------

END;

 

Userlevel 7

So, is there no way to actually get Customer Orders to auto-close on a scheduled basis?

You can setup a migration job with that method and schedule it to run as often as you'd like. Just specify your conditions in the where clause carefully. 

Userlevel 7

  

So, is there no way to actually get Customer Orders to auto-close on a scheduled basis?

You can setup a migration job with that method and schedule it to run as often as you'd like. Just specify your conditions in the where clause carefully. 

 

 

Just add whatever conditions you want in the where clause and the schedule the job.
 

 

    

Badge +3

@anmise .  Thank you; that worked perfectly!  I was working through this process but running into a situation where I had two different methods (one to return the objid and one to do the close_order_line_) which was not working.  I had no idea I could skip that for something like this.

Reply