Just following up on this in case anybody had any ideas.
I am interested in the response to this also, we have a number of transactions that show as “DocumentNotCheckedIn”: however there is an attachment attached to the transaction - it can be very frustrating as an end user just sees the “DocumentNotCheckedIn”: and assumes there is an issue with the image being attached when its there. Yeah, it’s odd. This worked up until very recently, with the attachment, and now there’s this and we can’t figure out why.
Hi Mathias, I did get everything to work as a background job. Thanks so much for your help!I’m not totally over the finish line yet, though. I’m running into an issue where these snippets of code:--PROJECT Doc_Reference_Object_API.Create_New_Reference(''&NEW:DOC_CLASS'', ''&NEW:DOC_NO'', ''&NEW:DOC_SHEET'', ''&NEW:DOC_REV'', ''Activity'' , CONCAT(CONCAT(''ACTIVITY_SEQ='',''&VAR_ACTIVITY_SEQ''),''^'') , null , ''001'');--ACTIVITYDoc_Reference_Object_API.Create_New_Reference(''&NEW:DOC_CLASS'', ''&NEW:DOC_NO'', ''&NEW:DOC_SHEET'', ''&NEW:DOC_REV'', ''Project'' , CONCAT(CONCAT(''PROJECT_ID='',''&VAR_PROJECT_ID''),''^'') , null , ''001'');Shows up in Database Background Job as:-Doc_Reference_Object_API.Create_New_Reference('PURCHASE_ORD', '1725450', '1', '1', 'Activity' , var_activity_key , null , '001');----ACTIVITY-Doc_Reference_Object_API.Create_New_Reference('PURCHASE_ORD', '1725450', '1', '1', 'Project' , CONCAT(CO
I’ve narrowed the error down to this:select key_ref into var_key_ref from doc_reference_object where doc_class = ''&NEW:DOC_CLASS'' and doc_no = ''&NEW:DOC_NO'' and doc_sheet = ''&NEW:DOC_SHEET'' and doc_rev = ''&NEW:DOC_REV'' and lu_name like ''PurchaseOrderLine%''If I hard code the key_ref into my code then everything works. I’m just not sure why this is returning no data. Edit: Nevermind. The problem was I did PurchaseOrderLine% when I should’ve just done PurchaseOrder.
Thanks again, Mathias. I was looking at that and I see what you mean about stmt_. You’re thinking something like this?DECLARE --Deferred Call Variables attr_ VARCHAR2(32000); sql_msg_ VARCHAR2(32000); stmt_ VARCHAR2(32000); job_id_ NUMBER; error_text_ VARCHAR2(2000); BEGINstmt_ :='DECLARE --Custom Variables var_key_ref varchar2(2000); var_project_id varchar2(2000); var_activity_seq varchar2(2000);BEGIN select key_ref into var_key_ref from doc_reference_object where doc_class = ''&NEW:DOC_CLASS'' and doc_no = ''&NEW:DOC_NO'' and doc_sheet = ''&NEW:DOC_SHEET'' and doc_rev = ''&NEW:DOC_REV'' and lu_name like ''PurchaseOrderLine%''; select purchase_order_line_part_api.get_project_id(regexp_substr(var_key_ref,''(=)([^=\^]+)(\^)'',1, 2, ''i'', 2), regexp_substr(var_key_ref,''(=)([^=\^]*)(\^)'',1, 1, ''i'', 2), regexp_substr(var_key_ref,''(=)([^=\^]+)(\^)'',1, 3, ''i'', 2)) into var_project_id from dual; select purchase_order_line_pa
Thanks for the explanation, Mathias. I just want to make sure I’m tracking with what you’re saying. I initially put the SELECT in there because I need to get the KEY_REF from DOC_REFERENCE_OBJECT_TAB table in order to get the Project ID and Activity Sequence Number, and I'm not seeing KEY_REF listed as an available &NEW: field when my event uses DOCUMENT_ISSUE_HISTORY_TAB as it's table.Would you suggest having the event use DOC_REFERENCE_OBJECT_TAB, rather than DOCUMENT_ISSUE_HISTORY_TAB, instead? I’m just sure how to get KEY_REF without a select statement.
Already have an account? Login
No account yet? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.