Skip to main content
Question

cursor on event action

  • February 16, 2022
  • 9 replies
  • 271 views

Forum|alt.badge.img+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 replies.

9 replies

Forum|alt.badge.img+12
  • Hero
  • February 16, 2022

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

Also, where is cursor “cs” used?

 

Thanks,

Joe Kaufman


Forum|alt.badge.img+9
  • Author
  • Sidekick (Partner)
  • February 16, 2022

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

 


Forum|alt.badge.img+12
  • Hero
  • February 16, 2022

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


dsj
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • February 16, 2022

Hi @Christophe BUSSI  do you get any errors?

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


Forum|alt.badge.img+9
  • Author
  • Sidekick (Partner)
  • February 16, 2022

Hi @dsj ,

I have this error : 

Do you have a specific syntax  ?

can you send a print screen ?

 

Regards,

Christophe


ZTC ZTC JGOTA
Hero (Customer)
Forum|alt.badge.img+14
  • Hero (Customer)
  • February 16, 2022

You need to declare ORDER_NO


Forum|alt.badge.img+9
  • Author
  • Sidekick (Partner)
  • February 16, 2022

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


Forum|alt.badge.img+7
  • Hero (Employee)
  • February 16, 2022

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 :)


dsj
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • February 17, 2022

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