57: cln_debug_pub.Add('funcmode:' || p_funcmode, 2);
58: cln_debug_pub.Add('resultout:' || x_resultout, 2);
59: END IF;
60:
61: l_po_doc_id := wf_engine.GetActivityAttrText(p_itemtype,p_itemkey,p_actid,'DOCUMENT_ID');
62: IF (g_debug_level <= 1) THEN
63: cln_debug_pub.Add('PO Document ID ' || l_po_doc_id, 1);
64: END IF;
65:
62: IF (g_debug_level <= 1) THEN
63: cln_debug_pub.Add('PO Document ID ' || l_po_doc_id, 1);
64: END IF;
65:
66: l_po_doc_type := wf_engine.GetActivityAttrText(p_itemtype,p_itemkey,p_actid,'DOCUMENT_TYPE');
67: IF (g_debug_level <= 1) THEN
68: cln_debug_pub.Add('PO Document Type ' || l_po_doc_type, 1);
69: END IF;
70:
67: IF (g_debug_level <= 1) THEN
68: cln_debug_pub.Add('PO Document Type ' || l_po_doc_type, 1);
69: END IF;
70:
71: l_po_rev_num := wf_engine.GetActivityAttrText(p_itemtype,p_itemkey,p_actid,'PO_REVISION_NUM');
72: IF (g_debug_level <= 1) THEN
73: cln_debug_pub.Add('PO Document Revision Number ' || l_po_rev_num, 1);
74: END IF;
75:
162: cln_debug_pub.Add('PO_RELEASE_NUM = '|| l_po_rel_num , 1);
163: cln_debug_pub.Add('PO_REL_REV_NUM = '|| l_po_rel_rev_num , 1);
164: END IF;
165:
166: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_TRANSACTION_TYPE', 'M4R');
167: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_TRANSACTION_SUBTYPE', '7B5_OSFM_WO');
168: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_ID', l_party_id);
169: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_SITE_ID', l_party_site_id);
170: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_TYPE', 'S');
163: cln_debug_pub.Add('PO_REL_REV_NUM = '|| l_po_rel_rev_num , 1);
164: END IF;
165:
166: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_TRANSACTION_TYPE', 'M4R');
167: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_TRANSACTION_SUBTYPE', '7B5_OSFM_WO');
168: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_ID', l_party_id);
169: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_SITE_ID', l_party_site_id);
170: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_TYPE', 'S');
171: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ORG_ID', l_org_id);
164: END IF;
165:
166: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_TRANSACTION_TYPE', 'M4R');
167: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_TRANSACTION_SUBTYPE', '7B5_OSFM_WO');
168: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_ID', l_party_id);
169: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_SITE_ID', l_party_site_id);
170: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_TYPE', 'S');
171: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ORG_ID', l_org_id);
172: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_RELEASE_ID', l_po_rel_id);
165:
166: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_TRANSACTION_TYPE', 'M4R');
167: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_TRANSACTION_SUBTYPE', '7B5_OSFM_WO');
168: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_ID', l_party_id);
169: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_SITE_ID', l_party_site_id);
170: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_TYPE', 'S');
171: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ORG_ID', l_org_id);
172: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_RELEASE_ID', l_po_rel_id);
173: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_HEADER_ID', l_po_header_id);
166: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_TRANSACTION_TYPE', 'M4R');
167: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_TRANSACTION_SUBTYPE', '7B5_OSFM_WO');
168: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_ID', l_party_id);
169: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_SITE_ID', l_party_site_id);
170: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_TYPE', 'S');
171: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ORG_ID', l_org_id);
172: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_RELEASE_ID', l_po_rel_id);
173: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_HEADER_ID', l_po_header_id);
174: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_RELEASE_NUM', l_po_rel_num);
167: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_TRANSACTION_SUBTYPE', '7B5_OSFM_WO');
168: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_ID', l_party_id);
169: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_SITE_ID', l_party_site_id);
170: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_TYPE', 'S');
171: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ORG_ID', l_org_id);
172: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_RELEASE_ID', l_po_rel_id);
173: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_HEADER_ID', l_po_header_id);
174: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_RELEASE_NUM', l_po_rel_num);
175: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_REVISION_NUM', l_po_rev_num);
168: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_ID', l_party_id);
169: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_SITE_ID', l_party_site_id);
170: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_TYPE', 'S');
171: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ORG_ID', l_org_id);
172: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_RELEASE_ID', l_po_rel_id);
173: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_HEADER_ID', l_po_header_id);
174: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_RELEASE_NUM', l_po_rel_num);
175: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_REVISION_NUM', l_po_rev_num);
176: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_REL_REV_NUM', l_po_rel_rev_num);
169: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_SITE_ID', l_party_site_id);
170: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_TYPE', 'S');
171: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ORG_ID', l_org_id);
172: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_RELEASE_ID', l_po_rel_id);
173: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_HEADER_ID', l_po_header_id);
174: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_RELEASE_NUM', l_po_rel_num);
175: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_REVISION_NUM', l_po_rev_num);
176: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_REL_REV_NUM', l_po_rel_rev_num);
177:
170: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ECX_PARTY_TYPE', 'S');
171: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ORG_ID', l_org_id);
172: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_RELEASE_ID', l_po_rel_id);
173: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_HEADER_ID', l_po_header_id);
174: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_RELEASE_NUM', l_po_rel_num);
175: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_REVISION_NUM', l_po_rev_num);
176: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_REL_REV_NUM', l_po_rel_rev_num);
177:
178: IF (g_debug_level <= 1) THEN
171: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'ORG_ID', l_org_id);
172: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_RELEASE_ID', l_po_rel_id);
173: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_HEADER_ID', l_po_header_id);
174: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_RELEASE_NUM', l_po_rel_num);
175: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_REVISION_NUM', l_po_rev_num);
176: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_REL_REV_NUM', l_po_rel_rev_num);
177:
178: IF (g_debug_level <= 1) THEN
179: cln_debug_pub.Add('Workflow Attributes set', 1);
172: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_RELEASE_ID', l_po_rel_id);
173: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_HEADER_ID', l_po_header_id);
174: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_RELEASE_NUM', l_po_rel_num);
175: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_REVISION_NUM', l_po_rev_num);
176: wf_engine.SetItemAttrText(p_itemtype, p_itemkey, 'PO_REL_REV_NUM', l_po_rel_rev_num);
177:
178: IF (g_debug_level <= 1) THEN
179: cln_debug_pub.Add('Workflow Attributes set', 1);
180: END IF;
308: END IF;
309:
310:
311: -- read wf item attributes into local variable, begins
312: l_po_header_id := wf_engine.GetActivityAttrText(p_itemtype,p_itemkey,p_actid,'PO_HEADER_ID');
313: IF (g_debug_level <= 1) THEN
314: cln_debug_pub.Add('PO Header ID ' || l_po_header_id, 1);
315: END IF;
316:
313: IF (g_debug_level <= 1) THEN
314: cln_debug_pub.Add('PO Header ID ' || l_po_header_id, 1);
315: END IF;
316:
317: l_po_rel_id := wf_engine.GetActivityAttrText(p_itemtype,p_itemkey,p_actid,'PO_RELEASE_ID');
318: IF (g_debug_level <= 1) THEN
319: cln_debug_pub.Add('PO Release ID ' || l_po_rel_id, 1);
320: END IF;
321:
318: IF (g_debug_level <= 1) THEN
319: cln_debug_pub.Add('PO Release ID ' || l_po_rel_id, 1);
320: END IF;
321:
322: l_po_doc_type := wf_engine.GetActivityAttrText(p_itemtype,p_itemkey,p_actid,'DOCUMENT_TYPE');
323: IF (g_debug_level <= 1) THEN
324: cln_debug_pub.Add('PO Document Type ' || l_po_doc_type, 1);
325: END IF;
326:
323: IF (g_debug_level <= 1) THEN
324: cln_debug_pub.Add('PO Document Type ' || l_po_doc_type, 1);
325: END IF;
326:
327: l_po_rev_num := wf_engine.GetActivityAttrText(p_itemtype,p_itemkey,p_actid,'PO_REVISION_NUM');
328: IF (g_debug_level <= 1) THEN
329: cln_debug_pub.Add('PO Revision Number ' || l_po_rev_num, 1);
330: END IF;
331:
328: IF (g_debug_level <= 1) THEN
329: cln_debug_pub.Add('PO Revision Number ' || l_po_rev_num, 1);
330: END IF;
331:
332: l_po_rel_num := wf_engine.GetActivityAttrText(p_itemtype,p_itemkey,p_actid,'PO_RELEASE_NUM');
333: IF (g_debug_level <= 1) THEN
334: cln_debug_pub.Add('PO Release Number ' || l_po_rel_num, 1);
335: END IF;
336:
333: IF (g_debug_level <= 1) THEN
334: cln_debug_pub.Add('PO Release Number ' || l_po_rel_num, 1);
335: END IF;
336:
337: l_po_rel_rev_num := wf_engine.GetActivityAttrText(p_itemtype,p_itemkey,p_actid,'PO_REL_REV_NUM');
338: IF (g_debug_level <= 1) THEN
339: cln_debug_pub.Add('PO Release Revision Number ' || l_po_rel_rev_num, 1);
340: END IF;
341:
338: IF (g_debug_level <= 1) THEN
339: cln_debug_pub.Add('PO Release Revision Number ' || l_po_rel_rev_num, 1);
340: END IF;
341:
342: l_org_id := wf_engine.GetActivityAttrText(p_itemtype,p_itemkey,p_actid,'ORG_ID');
343: IF (g_debug_level <= 1) THEN
344: cln_debug_pub.Add('Org ID ' || l_org_id, 1);
345: END IF;
346:
343: IF (g_debug_level <= 1) THEN
344: cln_debug_pub.Add('Org ID ' || l_org_id, 1);
345: END IF;
346:
347: l_party_id := wf_engine.GetActivityAttrText(p_itemtype,p_itemkey,p_actid,'ECX_PARTY_ID');
348: IF (g_debug_level <= 1) THEN
349: cln_debug_pub.Add('Party ID ' || l_party_id, 1);
350: END IF;
351:
348: IF (g_debug_level <= 1) THEN
349: cln_debug_pub.Add('Party ID ' || l_party_id, 1);
350: END IF;
351:
352: l_party_site_id := wf_engine.GetActivityAttrText(p_itemtype,p_itemkey,p_actid,'ECX_PARTY_SITE_ID');
353: IF (g_debug_level <= 1) THEN
354: cln_debug_pub.Add('Party Site ID ' || l_party_site_id, 1);
355: END IF;
356: -- read wf item attributes into local variable, ends
814: l_raise_flag := 'N';
815:
816: END LOOP;
817:
818: x_resultout := wf_engine.eng_completed;
819:
820: IF (g_debug_level <= 2) THEN
821: cln_debug_pub.Add('Exiting the M4R_7B5_OSFM_PKG.PROCESS_WO procedure', 2);
822: END IF;