Hello,
I want to park an order when a condition in the shop order operation is happening. Execute it directly generates a a mutation issue, so I need to execute the park action n the background.
For that, I have created the following code in a custom event:
declare
p0_ VARCHAR2(32000) := NULL;
p1_ VARCHAR2(32000) := NULL;
p2_ VARCHAR2(32000) := NULL;
p3_ VARCHAR2(32000) := NULL;
attr_ VARCHAR2(32000) := NULL;
begin
p0_ := '&NEW:ORDER_NO';
p1_ := '&NEW:RELEASE_NO';
p2_ := '&NEW:SEQUENCE_NO';
p3_ := 'PARK_REASON'||chr(31)||'QUALITY'||chr(30)||'PARK_MRB_NO'||chr(31)||''||chr(30)||'PARK_CHANGE_ORD_NO'||chr(31)||''||chr(30)||'PARK_ORG_CODE'||chr(31)||''||chr(30)||'PARK_PERSON_ID'||chr(31)|| '#USER_ID#'||chr(30)||'PARK_LOCATION_NO'||chr(31)||''||chr(30)||'PARK_NOTE'||chr(31)||'Nota'||chr(30);
Client_SYS.Clear_Attr(attr_);
CLIENT_SYS.ADD_TO_ATTR('ORDER_NO_', p0_, attr_);
CLIENT_SYS.ADD_TO_ATTR('RELEASE_NO_', p1_, attr_);
CLIENT_SYS.ADD_TO_ATTR('SEQUENCE_NO_', p2_, attr_);
CLIENT_SYS.ADD_TO_ATTR('PARK_ATTR_', p3_, attr_);
transaction_sys.deferred_call('Shop_Ord_API.Park','PARAMETER',attr_,'Park Order No '|| p0_,sysdate);
end;
System is raising the following error:
Field [PARK_REASON] in Shop Order has an invalid value format. The value is: "QUALITYSTATE_BEFORE_PARKStarted". ORA-20124: ShopOrd.FORMAT2
I think I am doing something wrong when I am including all the parameters into “attr_” variable. Instead to take “p3_” variable as a set of attributes, system is taking them as anothers.
Could you please help me to figure out how to perform this background action?
Thanks in advance,
JuanFran