Question

cursor on event action

  • 16 February 2022
  • 9 replies
  • 216 views

Userlevel 3
Badge +9

Hi,

 

I try to call a cursor with a where condition on an event action but I have an error when I want to save my action. System don’t want to save.

if I delete WHERE condition, it is ok.

 


This topic has been closed for comments

9 replies

Userlevel 6
Badge +12

I don’t see order_no_ declared anywhere. How is that being populated?

Also, where is cursor “cs” used?

 

Thanks,

Joe Kaufman

Userlevel 3
Badge +9

Hi Joe,

order_no_ is on CURSOR cs (order_no_ 

it isn’t used for the moment because I can’t save this script.

 

Regards, 

 

Christophe

 

Userlevel 6
Badge +12

Shows how much I still have to learn about PLSQL (and that I should not review code before I am fully awake…!).

Is it possible it doesn’t like a parameter-based cursor? What happens if you use a literal instead of order_no_, like ‘XXXXX’? Will it still not save? Keep messing with the WHERE clause until it works, then maybe we can figure out what is breaking it?

Need @durette ‘s expert eyes on this…

 

Thanks,

Joe Kaufman

Userlevel 7
Badge +20

Hi @Christophe BUSSI  do you get any errors?

I tries to create a similar event action in 21R2 but seems it allow to save

Userlevel 3
Badge +9

Hi @dsj ,

I have this error : 

Do you have a specific syntax  ?

can you send a print screen ?

 

Regards,

Christophe

Userlevel 6
Badge +14

You need to declare ORDER_NO

Userlevel 3
Badge +9

Hi Everybody,

We identified problem is about character number.

If we have more than  about 980 characters we can’t save script.

I have to create a case because this limit is a real problem.

If somebody can control our analyse , thx a lot.

Regards, Christophe

Userlevel 2
Badge +6

To make your statement shorter you can move your API calls to variables if the event type is custom, and remove double white spaces. I know  it makes the code hard to read but saves on character limitation :)

Userlevel 7
Badge +20

To make your statement shorter you can move your API calls to variables if the event type is custom, and remove double white spaces. I know  it makes the code hard to read but saves on character limitation :)

 

In addition, since you have several client_sys.add_to_attr calls, you could save some characters by using the cheap version of creating the attr :wink:

Eg:

declare 
fs VARCHAR2(1) := chr(31); --field separator
rs VARCHAR2(1) := chr(30); --record separator
attr varchar2(32000);

begin
attr := 'PROJECT_ID'||fs||'&NEW:ORDER_NO'||rs||'COMPANY'||fs||'ONFV'||rs; --add the rest in same format
end;

 

But I really hope IFS will fix this soon.

Cheers!

Damith