68: END Call_WF_API_to_set_date_Att;
69:
70: PROCEDURE set_ag_wf_attributes(
71: itemtype IN VARCHAR2,
72: wf_itemkey IN VARCHAR2,
73: x_coa_id IN NUMBER,
74: x_bom_cost_element_id IN NUMBER,
75: x_bom_resource_id IN NUMBER,
76: x_category_id IN NUMBER,
169:
170: -- Initialize workflow item attributes
171:
172: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
173: itemkey => wf_itemkey,
174: aname => 'CHART_OF_ACCOUNTS_ID',
175: avalue => x_coa_id );
176:
177: --< Shared Proc FPJ Start >
186: x_bom_resource_unit => l_bom_resource_unit,
187: x_bom_cost_element_id => l_bom_cost_element_id);
188:
189: po_wf_util_pkg.SetItemAttrNumber( itemtype => itemtype,
190: itemkey => wf_itemkey,
191: aname => 'BOM_COST_ELEMENT_ID',
192: avalue => l_bom_cost_element_id );
193: ELSE
194: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
191: aname => 'BOM_COST_ELEMENT_ID',
192: avalue => l_bom_cost_element_id );
193: ELSE
194: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
195: itemkey => wf_itemkey,
196: aname => 'BOM_COST_ELEMENT_ID',
197: avalue => x_bom_cost_element_id );
198: END IF;
199: --< Shared Proc FPJ End >
198: END IF;
199: --< Shared Proc FPJ End >
200:
201: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
202: itemkey => wf_itemkey,
203: aname => 'BOM_RESOURCE_ID',
204: avalue => x_bom_resource_id );
205: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
206: itemkey => wf_itemkey,
202: itemkey => wf_itemkey,
203: aname => 'BOM_RESOURCE_ID',
204: avalue => x_bom_resource_id );
205: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
206: itemkey => wf_itemkey,
207: aname => 'CATEGORY_ID',
208: avalue => x_category_id );
209: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
210: itemkey => wf_itemkey,
206: itemkey => wf_itemkey,
207: aname => 'CATEGORY_ID',
208: avalue => x_category_id );
209: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
210: itemkey => wf_itemkey,
211: aname => 'DELIVER_TO_LOCATION_ID',
212: avalue => x_deliver_to_location_id );
213: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
214: itemkey => wf_itemkey,
210: itemkey => wf_itemkey,
211: aname => 'DELIVER_TO_LOCATION_ID',
212: avalue => x_deliver_to_location_id );
213: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
214: itemkey => wf_itemkey,
215: aname => 'DESTINATION_ORGANIZATION_ID',
216: avalue => x_destination_organization_id );
217: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
218: itemkey => wf_itemkey,
214: itemkey => wf_itemkey,
215: aname => 'DESTINATION_ORGANIZATION_ID',
216: avalue => x_destination_organization_id );
217: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
218: itemkey => wf_itemkey,
219: aname => 'DESTINATION_SUBINVENTORY',
220: avalue => x_destination_subinventory );
221: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
222: itemkey => wf_itemkey,
218: itemkey => wf_itemkey,
219: aname => 'DESTINATION_SUBINVENTORY',
220: avalue => x_destination_subinventory );
221: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
222: itemkey => wf_itemkey,
223: aname => 'DESTINATION_TYPE_CODE',
224: avalue => x_destination_type_code );
225: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
226: itemkey => wf_itemkey,
222: itemkey => wf_itemkey,
223: aname => 'DESTINATION_TYPE_CODE',
224: avalue => x_destination_type_code );
225: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
226: itemkey => wf_itemkey,
227: aname => 'PO_ENCUMBRANCE_FLAG',
228: avalue => x_po_encumberance_flag );
229:
230: -- Header
231:
232: If header_att1 is not null then
233: begin
234: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
235: itemkey => wf_itemkey,
236: aname => 'HEADER_ATT1',
237: avalue => header_att1 );
238: exception when others then
239: null;
242:
243: If header_att2 is not null then
244: begin
245: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
246: itemkey => wf_itemkey,
247: aname => 'HEADER_ATT2',
248: avalue => header_att2 );
249: exception when others then
250: null;
253:
254: If header_att3 is not null then
255: begin
256: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
257: itemkey => wf_itemkey,
258: aname => 'HEADER_ATT3',
259: avalue => header_att3 );
260: exception when others then
261: null;
264:
265: If header_att4 is not null then
266: begin
267: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
268: itemkey => wf_itemkey,
269: aname => 'HEADER_ATT4',
270: avalue => header_att4 );
271: exception when others then
272: null;
275:
276: If header_att5 is not null then
277: begin
278: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
279: itemkey => wf_itemkey,
280: aname => 'HEADER_ATT5',
281: avalue => header_att5 );
282: exception when others then
283: null;
286:
287: If header_att6 is not null then
288: begin
289: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
290: itemkey => wf_itemkey,
291: aname => 'HEADER_ATT6',
292: avalue => header_att6 );
293: exception when others then
294: null;
297:
298: If header_att7 is not null then
299: begin
300: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
301: itemkey => wf_itemkey,
302: aname => 'HEADER_ATT7',
303: avalue => header_att7 );
304: exception when others then
305: null;
308:
309: If header_att8 is not null then
310: begin
311: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
312: itemkey => wf_itemkey,
313: aname => 'HEADER_ATT8',
314: avalue => header_att8 );
315: exception when others then
316: null;
319:
320: If header_att9 is not null then
321: begin
322: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
323: itemkey => wf_itemkey,
324: aname => 'HEADER_ATT9',
325: avalue => header_att9 );
326: exception when others then
327: null;
330:
331: If header_att10 is not null then
332: begin
333: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
334: itemkey => wf_itemkey,
335: aname => 'HEADER_ATT10',
336: avalue => header_att10 );
337: exception when others then
338: null;
341:
342: If header_att11 is not null then
343: begin
344: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
345: itemkey => wf_itemkey,
346: aname => 'HEADER_ATT11',
347: avalue => header_att11 );
348: exception when others then
349: null;
352:
353: If header_att12 is not null then
354: begin
355: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
356: itemkey => wf_itemkey,
357: aname => 'HEADER_ATT12',
358: avalue => header_att12 );
359: exception when others then
360: null;
363:
364: If header_att13 is not null then
365: begin
366: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
367: itemkey => wf_itemkey,
368: aname => 'HEADER_ATT13',
369: avalue => header_att13 );
370: exception when others then
371: null;
374:
375: If header_att14 is not null then
376: begin
377: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
378: itemkey => wf_itemkey,
379: aname => 'HEADER_ATT14',
380: avalue => header_att14 );
381: exception when others then
382: null;
385:
386: If header_att15 is not null then
387: begin
388: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
389: itemkey => wf_itemkey,
390: aname => 'HEADER_ATT15',
391: avalue => header_att15 );
392: exception when others then
393: null;
398:
399: If line_att1 is not null then
400: begin
401: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
402: itemkey => wf_itemkey,
403: aname => 'LINE_ATT1',
404: avalue => line_att1 );
405: exception when others then
406: null;
409:
410: If line_att2 is not null then
411: begin
412: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
413: itemkey => wf_itemkey,
414: aname => 'LINE_ATT2',
415: avalue => line_att2 );
416: exception when others then
417: null;
420:
421: If line_att3 is not null then
422: begin
423: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
424: itemkey => wf_itemkey,
425: aname => 'LINE_ATT3',
426: avalue => line_att3 );
427: exception when others then
428: null;
431:
432: If line_att4 is not null then
433: begin
434: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
435: itemkey => wf_itemkey,
436: aname => 'LINE_ATT4',
437: avalue => line_att4 );
438: exception when others then
439: null;
442:
443: If line_att5 is not null then
444: begin
445: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
446: itemkey => wf_itemkey,
447: aname => 'LINE_ATT5',
448: avalue => line_att5 );
449: exception when others then
450: null;
453:
454: If line_att6 is not null then
455: begin
456: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
457: itemkey => wf_itemkey,
458: aname => 'LINE_ATT6',
459: avalue => line_att6 );
460: exception when others then
461: null;
464:
465: If line_att7 is not null then
466: begin
467: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
468: itemkey => wf_itemkey,
469: aname => 'LINE_ATT7',
470: avalue => line_att7 );
471: exception when others then
472: null;
475:
476: If line_att8 is not null then
477: begin
478: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
479: itemkey => wf_itemkey,
480: aname => 'LINE_ATT8',
481: avalue => line_att8 );
482: exception when others then
483: null;
486:
487: If line_att9 is not null then
488: begin
489: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
490: itemkey => wf_itemkey,
491: aname => 'LINE_ATT9',
492: avalue => line_att9 );
493: exception when others then
494: null;
497:
498: If line_att10 is not null then
499: begin
500: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
501: itemkey => wf_itemkey,
502: aname => 'LINE_ATT10',
503: avalue => line_att10 );
504: exception when others then
505: null;
508:
509: If line_att11 is not null then
510: begin
511: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
512: itemkey => wf_itemkey,
513: aname => 'LINE_ATT11',
514: avalue => line_att11 );
515: exception when others then
516: null;
519:
520: If line_att12 is not null then
521: begin
522: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
523: itemkey => wf_itemkey,
524: aname => 'LINE_ATT12',
525: avalue => line_att12 );
526: exception when others then
527: null;
530:
531: If line_att13 is not null then
532: begin
533: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
534: itemkey => wf_itemkey,
535: aname => 'LINE_ATT13',
536: avalue => line_att13 );
537: exception when others then
538: null;
541:
542: If line_att14 is not null then
543: begin
544: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
545: itemkey => wf_itemkey,
546: aname => 'LINE_ATT14',
547: avalue => line_att14 );
548: exception when others then
549: null;
552:
553: If line_att15 is not null then
554: begin
555: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
556: itemkey => wf_itemkey,
557: aname => 'LINE_ATT15',
558: avalue => line_att15 );
559: exception when others then
560: null;
565:
566: If shipment_att1 is not null then
567: begin
568: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
569: itemkey => wf_itemkey,
570: aname => 'SHIPMENT_ATT1',
571: avalue => shipment_att1 );
572: exception when others then
573: null;
576:
577: If shipment_att2 is not null then
578: begin
579: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
580: itemkey => wf_itemkey,
581: aname => 'SHIPMENT_ATT2',
582: avalue => shipment_att2 );
583: exception when others then
584: null;
587:
588: If shipment_att3 is not null then
589: begin
590: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
591: itemkey => wf_itemkey,
592: aname => 'SHIPMENT_ATT3',
593: avalue => shipment_att3 );
594: exception when others then
595: null;
598:
599: If shipment_att4 is not null then
600: begin
601: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
602: itemkey => wf_itemkey,
603: aname => 'SHIPMENT_ATT4',
604: avalue => shipment_att4 );
605: exception when others then
606: null;
609:
610: If shipment_att5 is not null then
611: begin
612: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
613: itemkey => wf_itemkey,
614: aname => 'SHIPMENT_ATT5',
615: avalue => shipment_att5 );
616: exception when others then
617: null;
620:
621: If shipment_att6 is not null then
622: begin
623: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
624: itemkey => wf_itemkey,
625: aname => 'SHIPMENT_ATT6',
626: avalue => shipment_att6 );
627: exception when others then
628: null;
631:
632: If shipment_att7 is not null then
633: begin
634: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
635: itemkey => wf_itemkey,
636: aname => 'SHIPMENT_ATT7',
637: avalue => shipment_att7 );
638: exception when others then
639: null;
642:
643: If shipment_att8 is not null then
644: begin
645: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
646: itemkey => wf_itemkey,
647: aname => 'SHIPMENT_ATT8',
648: avalue => shipment_att8 );
649: exception when others then
650: null;
653:
654: If shipment_att9 is not null then
655: begin
656: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
657: itemkey => wf_itemkey,
658: aname => 'SHIPMENT_ATT9',
659: avalue => shipment_att9 );
660: exception when others then
661: null;
664:
665: If shipment_att10 is not null then
666: begin
667: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
668: itemkey => wf_itemkey,
669: aname => 'SHIPMENT_ATT10',
670: avalue => shipment_att10 );
671: exception when others then
672: null;
675:
676: If shipment_att11 is not null then
677: begin
678: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
679: itemkey => wf_itemkey,
680: aname => 'SHIPMENT_ATT11',
681: avalue => shipment_att11 );
682: exception when others then
683: null;
686:
687: If shipment_att12 is not null then
688: begin
689: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
690: itemkey => wf_itemkey,
691: aname => 'SHIPMENT_ATT12',
692: avalue => shipment_att12 );
693: exception when others then
694: null;
697:
698: If shipment_att13 is not null then
699: begin
700: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
701: itemkey => wf_itemkey,
702: aname => 'SHIPMENT_ATT13',
703: avalue => shipment_att13 );
704: exception when others then
705: null;
708:
709: If shipment_att14 is not null then
710: begin
711: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
712: itemkey => wf_itemkey,
713: aname => 'SHIPMENT_ATT14',
714: avalue => shipment_att14 );
715: exception when others then
716: null;
719:
720: If shipment_att15 is not null then
721: begin
722: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
723: itemkey => wf_itemkey,
724: aname => 'SHIPMENT_ATT15',
725: avalue => shipment_att15 );
726: exception when others then
727: null;
732:
733: If distribution_att1 is not null then
734: begin
735: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
736: itemkey => wf_itemkey,
737: aname => 'DISTRIBUTION_ATT1',
738: avalue => distribution_att1 );
739: exception when others then
740: null;
743:
744: If distribution_att2 is not null then
745: begin
746: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
747: itemkey => wf_itemkey,
748: aname => 'DISTRIBUTION_ATT2',
749: avalue => distribution_att2 );
750: exception when others then
751: null;
754:
755: If distribution_att3 is not null then
756: begin
757: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
758: itemkey => wf_itemkey,
759: aname => 'DISTRIBUTION_ATT3',
760: avalue => distribution_att3 );
761: exception when others then
762: null;
765:
766: If distribution_att4 is not null then
767: begin
768: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
769: itemkey => wf_itemkey,
770: aname => 'DISTRIBUTION_ATT4',
771: avalue => distribution_att4 );
772: exception when others then
773: null;
776:
777: If distribution_att5 is not null then
778: begin
779: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
780: itemkey => wf_itemkey,
781: aname => 'DISTRIBUTION_ATT5',
782: avalue => distribution_att5 );
783: exception when others then
784: null;
787:
788: If distribution_att6 is not null then
789: begin
790: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
791: itemkey => wf_itemkey,
792: aname => 'DISTRIBUTION_ATT6',
793: avalue => distribution_att6 );
794: exception when others then
795: null;
798:
799: If distribution_att7 is not null then
800: begin
801: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
802: itemkey => wf_itemkey,
803: aname => 'DISTRIBUTION_ATT7',
804: avalue => distribution_att7 );
805: exception when others then
806: null;
809:
810: If distribution_att8 is not null then
811: begin
812: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
813: itemkey => wf_itemkey,
814: aname => 'DISTRIBUTION_ATT8',
815: avalue => distribution_att8 );
816: exception when others then
817: null;
820:
821: If distribution_att9 is not null then
822: begin
823: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
824: itemkey => wf_itemkey,
825: aname => 'DISTRIBUTION_ATT9',
826: avalue => distribution_att9 );
827: exception when others then
828: null;
831:
832: If distribution_att10 is not null then
833: begin
834: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
835: itemkey => wf_itemkey,
836: aname => 'DISTRIBUTION_ATT10',
837: avalue => distribution_att10 );
838: exception when others then
839: null;
842:
843: If distribution_att11 is not null then
844: begin
845: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
846: itemkey => wf_itemkey,
847: aname => 'DISTRIBUTION_ATT11',
848: avalue => distribution_att11 );
849: exception when others then
850: null;
853:
854: If distribution_att12 is not null then
855: begin
856: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
857: itemkey => wf_itemkey,
858: aname => 'DISTRIBUTION_ATT12',
859: avalue => distribution_att12 );
860: exception when others then
861: null;
864:
865: If distribution_att13 is not null then
866: begin
867: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
868: itemkey => wf_itemkey,
869: aname => 'DISTRIBUTION_ATT13',
870: avalue => distribution_att13 );
871: exception when others then
872: null;
875:
876: If distribution_att14 is not null then
877: begin
878: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
879: itemkey => wf_itemkey,
880: aname => 'DISTRIBUTION_ATT14',
881: avalue => distribution_att14 );
882: exception when others then
883: null;
886:
887: If distribution_att15 is not null then
888: begin
889: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
890: itemkey => wf_itemkey,
891: aname => 'DISTRIBUTION_ATT15',
892: avalue => distribution_att15 );
893: exception when others then
894: null;
895: end;
896: end if;
897:
898: po_wf_util_pkg.SetItemAttrDate ( itemtype => itemtype,
899: itemkey => wf_itemkey,
900: aname => 'EXPENDITURE_ITEM_DATE',
901: avalue => x_expenditure_item_date );
902: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
903: itemkey => wf_itemkey,
899: itemkey => wf_itemkey,
900: aname => 'EXPENDITURE_ITEM_DATE',
901: avalue => x_expenditure_item_date );
902: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
903: itemkey => wf_itemkey,
904: aname => 'EXPENDITURE_ORGANIZATION_ID',
905: avalue => x_expenditure_organization_id );
906: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
907: itemkey => wf_itemkey,
903: itemkey => wf_itemkey,
904: aname => 'EXPENDITURE_ORGANIZATION_ID',
905: avalue => x_expenditure_organization_id );
906: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
907: itemkey => wf_itemkey,
908: aname => 'EXPENDITURE_TYPE',
909: avalue => x_expenditure_type );
910: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
911: itemkey => wf_itemkey,
907: itemkey => wf_itemkey,
908: aname => 'EXPENDITURE_TYPE',
909: avalue => x_expenditure_type );
910: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
911: itemkey => wf_itemkey,
912: aname => 'ITEM_ID',
913: avalue => x_item_id );
914: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
915: itemkey => wf_itemkey,
911: itemkey => wf_itemkey,
912: aname => 'ITEM_ID',
913: avalue => x_item_id );
914: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
915: itemkey => wf_itemkey,
916: aname => 'LINE_TYPE_ID',
917: avalue => x_line_type_id );
918: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
919: itemkey => wf_itemkey,
915: itemkey => wf_itemkey,
916: aname => 'LINE_TYPE_ID',
917: avalue => x_line_type_id );
918: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
919: itemkey => wf_itemkey,
920: aname => 'PA_BILLABLE_FLAG',
921: avalue => x_result_billable_flag );
922: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
923: itemkey => wf_itemkey,
919: itemkey => wf_itemkey,
920: aname => 'PA_BILLABLE_FLAG',
921: avalue => x_result_billable_flag );
922: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
923: itemkey => wf_itemkey,
924: aname => 'PREPARER_ID',
925: avalue => x_agent_id );
926: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
927: itemkey => wf_itemkey,
923: itemkey => wf_itemkey,
924: aname => 'PREPARER_ID',
925: avalue => x_agent_id );
926: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
927: itemkey => wf_itemkey,
928: aname => 'PROJECT_ID',
929: avalue => x_project_id );
930: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
931: itemkey => wf_itemkey,
927: itemkey => wf_itemkey,
928: aname => 'PROJECT_ID',
929: avalue => x_project_id );
930: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
931: itemkey => wf_itemkey,
932: aname => 'SOURCE_DOCUMENT_HEADER_ID',
933: avalue => x_from_header_id);
934: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
935: itemkey => wf_itemkey,
931: itemkey => wf_itemkey,
932: aname => 'SOURCE_DOCUMENT_HEADER_ID',
933: avalue => x_from_header_id);
934: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
935: itemkey => wf_itemkey,
936: aname => 'SOURCE_DOCUMENT_LINE_ID',
937: avalue => x_from_line_id );
938: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
939: itemkey => wf_itemkey,
935: itemkey => wf_itemkey,
936: aname => 'SOURCE_DOCUMENT_LINE_ID',
937: avalue => x_from_line_id );
938: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
939: itemkey => wf_itemkey,
940: aname => 'SOURCE_DOCUMENT_TYPE_CODE',
941: avalue => x_from_type_lookup_code );
942: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
943: itemkey => wf_itemkey,
939: itemkey => wf_itemkey,
940: aname => 'SOURCE_DOCUMENT_TYPE_CODE',
941: avalue => x_from_type_lookup_code );
942: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
943: itemkey => wf_itemkey,
944: aname => 'TASK_ID',
945: avalue => x_task_id );
946: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
947: itemkey => wf_itemkey,
943: itemkey => wf_itemkey,
944: aname => 'TASK_ID',
945: avalue => x_task_id );
946: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
947: itemkey => wf_itemkey,
948: aname => 'TO_PERSON_ID',
949: avalue => x_deliver_to_person_id );
950: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
951: itemkey => wf_itemkey,
947: itemkey => wf_itemkey,
948: aname => 'TO_PERSON_ID',
949: avalue => x_deliver_to_person_id );
950: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
951: itemkey => wf_itemkey,
952: aname => 'TYPE_LOOKUP_CODE',
953: avalue => x_type_lookup_code );
954: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
955: itemkey => wf_itemkey,
951: itemkey => wf_itemkey,
952: aname => 'TYPE_LOOKUP_CODE',
953: avalue => x_type_lookup_code );
954: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
955: itemkey => wf_itemkey,
956: aname => 'VENDOR_ID',
957: avalue => x_vendor_id );
958: -- B1548597 Common Receiving RVK
959: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
956: aname => 'VENDOR_ID',
957: avalue => x_vendor_id );
958: -- B1548597 Common Receiving RVK
959: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
960: itemkey => wf_itemkey,
961: aname => 'VENDOR_SITE_ID',
962: avalue => x_vendor_site_id );
963: -- B1548597 Common Receiving End RVK
964: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
961: aname => 'VENDOR_SITE_ID',
962: avalue => x_vendor_site_id );
963: -- B1548597 Common Receiving End RVK
964: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
965: itemkey => wf_itemkey,
966: aname => 'WIP_ENTITY_ID',
967: avalue => x_wip_entity_id );
968:
969: --< Shared Proc FPJ Start >
977: x_entity_name => l_entity_name,
978: x_entity_type => l_wip_entity_type);
979:
980: po_wf_util_pkg.SetItemAttrText( itemtype => itemtype,
981: itemkey => wf_itemkey,
982: aname => 'WIP_ENTITY_TYPE',
983: avalue => l_wip_entity_type );
984: ELSE
985: po_wf_util_pkg.SetItemAttrText( itemtype => itemtype,
982: aname => 'WIP_ENTITY_TYPE',
983: avalue => l_wip_entity_type );
984: ELSE
985: po_wf_util_pkg.SetItemAttrText( itemtype => itemtype,
986: itemkey => wf_itemkey,
987: aname => 'WIP_ENTITY_TYPE',
988: avalue => x_wip_entity_type );
989: END IF;
990: --< Shared Proc FPJ End >
989: END IF;
990: --< Shared Proc FPJ End >
991:
992: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
993: itemkey => wf_itemkey,
994: aname => 'WIP_LINE_ID',
995: avalue => x_wip_line_id );
996: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
997: itemkey => wf_itemkey,
993: itemkey => wf_itemkey,
994: aname => 'WIP_LINE_ID',
995: avalue => x_wip_line_id );
996: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
997: itemkey => wf_itemkey,
998: aname => 'WIP_OPERATION_SEQ_NUM',
999: avalue => x_wip_operation_seq_num );
1000: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
1001: itemkey => wf_itemkey,
997: itemkey => wf_itemkey,
998: aname => 'WIP_OPERATION_SEQ_NUM',
999: avalue => x_wip_operation_seq_num );
1000: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
1001: itemkey => wf_itemkey,
1002: aname => 'WIP_REPETITIVE_SCHEDULE_ID',
1003: avalue => x_wip_repetitive_schedule_id );
1004: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
1005: itemkey => wf_itemkey,
1001: itemkey => wf_itemkey,
1002: aname => 'WIP_REPETITIVE_SCHEDULE_ID',
1003: avalue => x_wip_repetitive_schedule_id );
1004: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
1005: itemkey => wf_itemkey,
1006: aname => 'WIP_RESOURCE_SEQ_NUM',
1007: avalue => x_wip_resource_seq_num );
1008:
1009: --< Shared Proc FPJ Start >
1007: avalue => x_wip_resource_seq_num );
1008:
1009: --< Shared Proc FPJ Start >
1010: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
1011: itemkey => wf_itemkey,
1012: aname => 'ACCOUNT_GENERATION_FLOW_TYPE',
1013: avalue => x_account_generation_flow_type );
1014: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
1015: itemkey => wf_itemkey,
1011: itemkey => wf_itemkey,
1012: aname => 'ACCOUNT_GENERATION_FLOW_TYPE',
1013: avalue => x_account_generation_flow_type );
1014: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
1015: itemkey => wf_itemkey,
1016: aname => 'SHIP_TO_OU_COA_ID',
1017: avalue => x_ship_to_ou_coa_id );
1018: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
1019: itemkey => wf_itemkey,
1015: itemkey => wf_itemkey,
1016: aname => 'SHIP_TO_OU_COA_ID',
1017: avalue => x_ship_to_ou_coa_id );
1018: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
1019: itemkey => wf_itemkey,
1020: aname => 'SHIP_TO_OU_ID',
1021: avalue => x_ship_to_ou_id );
1022: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
1023: itemkey => wf_itemkey,
1019: itemkey => wf_itemkey,
1020: aname => 'SHIP_TO_OU_ID',
1021: avalue => x_ship_to_ou_id );
1022: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
1023: itemkey => wf_itemkey,
1024: aname => 'PURCHASING_OU_ID',
1025: avalue => x_purchasing_ou_id );
1026: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
1027: itemkey => wf_itemkey,
1023: itemkey => wf_itemkey,
1024: aname => 'PURCHASING_OU_ID',
1025: avalue => x_purchasing_ou_id );
1026: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
1027: itemkey => wf_itemkey,
1028: aname => 'TRANSACTION_FLOW_HEADER_ID',
1029: avalue => x_transaction_flow_header_id );
1030: IF (x_is_SPS_distribution = TRUE) THEN
1031: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
1028: aname => 'TRANSACTION_FLOW_HEADER_ID',
1029: avalue => x_transaction_flow_header_id );
1030: IF (x_is_SPS_distribution = TRUE) THEN
1031: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
1032: itemkey => wf_itemkey,
1033: aname => 'IS_SPS_DISTRIBUTION',
1034: avalue => 'Y' );
1035: ELSE
1036: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
1033: aname => 'IS_SPS_DISTRIBUTION',
1034: avalue => 'Y' );
1035: ELSE
1036: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
1037: itemkey => wf_itemkey,
1038: aname => 'IS_SPS_DISTRIBUTION',
1039: avalue => 'N' );
1040: END IF;
1041: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
1038: aname => 'IS_SPS_DISTRIBUTION',
1039: avalue => 'N' );
1040: END IF;
1041: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
1042: itemkey => wf_itemkey,
1043: aname => 'DEST_CHARGE_ACCOUNT_ID',
1044: avalue => x_dest_charge_account_id );
1045: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
1046: itemkey => wf_itemkey,
1042: itemkey => wf_itemkey,
1043: aname => 'DEST_CHARGE_ACCOUNT_ID',
1044: avalue => x_dest_charge_account_id );
1045: po_wf_util_pkg.SetItemAttrNumber ( itemtype => itemtype,
1046: itemkey => wf_itemkey,
1047: aname => 'DEST_VARIANCE_ACCOUNT_ID',
1048: avalue => x_dest_variance_account_id );
1049: --< Shared Proc FPJ End >
1050:
1053: --shipment price, converted to the functional currency (Bug 3463242).
1054: --unit_price will be taken into consideration when generating accounts.
1055:
1056: PO_WF_UTIL_PKG.SetItemAttrNumber ( itemtype => itemtype,
1057: itemkey => wf_itemkey,
1058: aname => 'UNIT_PRICE',
1059: -- Bug 3463242:
1060: avalue => p_func_unit_price );
1061:
1074: l_progress := '020';
1075:
1076: po_wf_util_pkg.SetItemAttrText (
1077: itemtype => itemtype,
1078: itemkey => wf_itemkey,
1079: aname => 'IS_ADVANCE_DISTRIBUTION',
1080: avalue => 'Y' );
1081:
1082: po_wf_util_pkg.SetItemAttrText (
1080: avalue => 'Y' );
1081:
1082: po_wf_util_pkg.SetItemAttrText (
1083: itemtype => itemtype,
1084: itemkey => wf_itemkey,
1085: aname => 'IS_FINANCING_DISTRIBUTION',
1086: avalue => 'N' );
1087:
1088: ELSE
1091: l_progress := '030';
1092:
1093: po_wf_util_pkg.SetItemAttrText (
1094: itemtype => itemtype,
1095: itemkey => wf_itemkey,
1096: aname => 'IS_ADVANCE_DISTRIBUTION',
1097: avalue => 'N' );
1098:
1099: po_wf_util_pkg.SetItemAttrText (
1097: avalue => 'N' );
1098:
1099: po_wf_util_pkg.SetItemAttrText (
1100: itemtype => itemtype,
1101: itemkey => wf_itemkey,
1102: aname => 'IS_FINANCING_DISTRIBUTION',
1103: avalue => 'Y' );
1104:
1105: END IF; --is payment type advance or not
1111: l_progress := '040';
1112:
1113: po_wf_util_pkg.SetItemAttrText (
1114: itemtype => itemtype,
1115: itemkey => wf_itemkey,
1116: aname => 'IS_ADVANCE_DISTRIBUTION',
1117: avalue => 'N' );
1118:
1119: po_wf_util_pkg.SetItemAttrText (
1117: avalue => 'N' );
1118:
1119: po_wf_util_pkg.SetItemAttrText (
1120: itemtype => itemtype,
1121: itemkey => wf_itemkey,
1122: aname => 'IS_FINANCING_DISTRIBUTION',
1123: avalue => 'N' );
1124:
1125: END IF; --is distribution type check
1131:
1132: IF g_debug_stmt THEN
1133: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
1134: p_token => l_progress,
1135: p_message => 'Set WF item UNIT_PRICE to ' ||
1136: PO_WF_UTIL_PKG.GetItemAttrNumber (
1137: itemtype => itemtype,
1138: itemkey => wf_itemkey,
1139: aname => 'UNIT_PRICE')
1134: p_token => l_progress,
1135: p_message => 'Set WF item UNIT_PRICE to ' ||
1136: PO_WF_UTIL_PKG.GetItemAttrNumber (
1137: itemtype => itemtype,
1138: itemkey => wf_itemkey,
1139: aname => 'UNIT_PRICE')
1140: );
1141: END IF;
1142:
1143: --
1144:
1145: l_progress := '060';
1146:
1147: -- Done setting WF item attributes
1148: IF g_debug_stmt THEN
1149: PO_DEBUG.debug_end(p_log_head => g_log_head||l_api_name);
1150: END IF;
1151:
1151:
1152: END set_ag_wf_attributes;
1153:
1154: PROCEDURE derive_pa_params(itemtype IN VARCHAR2,
1155: wf_itemkey IN VARCHAR2,
1156: x_project_id IN NUMBER,
1157: x_task_id IN NUMBER,
1158: x_expenditure_type IN VARCHAR2,
1159: x_vendor_id IN NUMBER,
1232: WHEN OTHERS THEN
1233: NULL;
1234: END;
1235:
1236: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'CLASS_CODE',
1237: l_class_code);
1238: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'DIRECT_FLAG',
1239: l_direct_flag);
1240: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'EXPENDITURE_CATEGORY',
1234: END;
1235:
1236: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'CLASS_CODE',
1237: l_class_code);
1238: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'DIRECT_FLAG',
1239: l_direct_flag);
1240: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'EXPENDITURE_CATEGORY',
1241: l_expenditure_category);
1242: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'EXPENDITURE_ORG_NAME',
1236: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'CLASS_CODE',
1237: l_class_code);
1238: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'DIRECT_FLAG',
1239: l_direct_flag);
1240: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'EXPENDITURE_CATEGORY',
1241: l_expenditure_category);
1242: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'EXPENDITURE_ORG_NAME',
1243: l_expenditure_org_name);
1244: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PROJECT_NUMBER',
1238: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'DIRECT_FLAG',
1239: l_direct_flag);
1240: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'EXPENDITURE_CATEGORY',
1241: l_expenditure_category);
1242: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'EXPENDITURE_ORG_NAME',
1243: l_expenditure_org_name);
1244: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PROJECT_NUMBER',
1245: l_project_number);
1246: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PROJECT_ORGANIZATION_NAME',
1240: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'EXPENDITURE_CATEGORY',
1241: l_expenditure_category);
1242: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'EXPENDITURE_ORG_NAME',
1243: l_expenditure_org_name);
1244: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PROJECT_NUMBER',
1245: l_project_number);
1246: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PROJECT_ORGANIZATION_NAME',
1247: l_project_organization_name);
1248: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey,'PROJECT_ORGANIZATION_ID',
1242: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'EXPENDITURE_ORG_NAME',
1243: l_expenditure_org_name);
1244: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PROJECT_NUMBER',
1245: l_project_number);
1246: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PROJECT_ORGANIZATION_NAME',
1247: l_project_organization_name);
1248: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey,'PROJECT_ORGANIZATION_ID',
1249: l_project_organization_id);
1250: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PROJECT_TYPE',
1244: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PROJECT_NUMBER',
1245: l_project_number);
1246: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PROJECT_ORGANIZATION_NAME',
1247: l_project_organization_name);
1248: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey,'PROJECT_ORGANIZATION_ID',
1249: l_project_organization_id);
1250: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PROJECT_TYPE',
1251: l_project_type);
1252: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PUBLIC_SECTOR_FLAG',
1246: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PROJECT_ORGANIZATION_NAME',
1247: l_project_organization_name);
1248: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey,'PROJECT_ORGANIZATION_ID',
1249: l_project_organization_id);
1250: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PROJECT_TYPE',
1251: l_project_type);
1252: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PUBLIC_SECTOR_FLAG',
1253: l_public_sector_flag);
1254: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'REVENUE_CATEGORY',
1248: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey,'PROJECT_ORGANIZATION_ID',
1249: l_project_organization_id);
1250: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PROJECT_TYPE',
1251: l_project_type);
1252: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PUBLIC_SECTOR_FLAG',
1253: l_public_sector_flag);
1254: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'REVENUE_CATEGORY',
1255: l_revenue_category);
1256: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TASK_NUMBER',
1250: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PROJECT_TYPE',
1251: l_project_type);
1252: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PUBLIC_SECTOR_FLAG',
1253: l_public_sector_flag);
1254: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'REVENUE_CATEGORY',
1255: l_revenue_category);
1256: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TASK_NUMBER',
1257: l_task_number);
1258: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TASK_ORGANIZATION_NAME',
1252: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'PUBLIC_SECTOR_FLAG',
1253: l_public_sector_flag);
1254: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'REVENUE_CATEGORY',
1255: l_revenue_category);
1256: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TASK_NUMBER',
1257: l_task_number);
1258: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TASK_ORGANIZATION_NAME',
1259: l_task_organization_name);
1260: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey, 'TASK_ORGANIZATION_ID',
1254: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'REVENUE_CATEGORY',
1255: l_revenue_category);
1256: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TASK_NUMBER',
1257: l_task_number);
1258: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TASK_ORGANIZATION_NAME',
1259: l_task_organization_name);
1260: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey, 'TASK_ORGANIZATION_ID',
1261: l_task_organization_id);
1262: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TASK_SERVICE_TYPE',
1256: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TASK_NUMBER',
1257: l_task_number);
1258: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TASK_ORGANIZATION_NAME',
1259: l_task_organization_name);
1260: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey, 'TASK_ORGANIZATION_ID',
1261: l_task_organization_id);
1262: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TASK_SERVICE_TYPE',
1263: l_task_service_type);
1264: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey, 'TOP_TASK_ID',
1258: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TASK_ORGANIZATION_NAME',
1259: l_task_organization_name);
1260: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey, 'TASK_ORGANIZATION_ID',
1261: l_task_organization_id);
1262: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TASK_SERVICE_TYPE',
1263: l_task_service_type);
1264: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey, 'TOP_TASK_ID',
1265: l_top_task_id);
1266: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TOP_TASK_NUMBER',
1260: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey, 'TASK_ORGANIZATION_ID',
1261: l_task_organization_id);
1262: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TASK_SERVICE_TYPE',
1263: l_task_service_type);
1264: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey, 'TOP_TASK_ID',
1265: l_top_task_id);
1266: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TOP_TASK_NUMBER',
1267: l_top_task_number);
1268: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey, 'VENDOR_EMPLOYEE_ID',
1262: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TASK_SERVICE_TYPE',
1263: l_task_service_type);
1264: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey, 'TOP_TASK_ID',
1265: l_top_task_id);
1266: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TOP_TASK_NUMBER',
1267: l_top_task_number);
1268: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey, 'VENDOR_EMPLOYEE_ID',
1269: l_vendor_employee_id);
1270: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'VENDOR_EMPLOYEE_NUMBER',
1264: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey, 'TOP_TASK_ID',
1265: l_top_task_id);
1266: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TOP_TASK_NUMBER',
1267: l_top_task_number);
1268: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey, 'VENDOR_EMPLOYEE_ID',
1269: l_vendor_employee_id);
1270: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'VENDOR_EMPLOYEE_NUMBER',
1271: l_vendor_employee_number);
1272: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'VENDOR_TYPE',
1266: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'TOP_TASK_NUMBER',
1267: l_top_task_number);
1268: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey, 'VENDOR_EMPLOYEE_ID',
1269: l_vendor_employee_id);
1270: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'VENDOR_EMPLOYEE_NUMBER',
1271: l_vendor_employee_number);
1272: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'VENDOR_TYPE',
1273: l_vendor_type);
1274: -- OGM stores award_set id into award_id column and derives award_id
1268: Call_WF_API_to_set_no_Att (ItemType, Wf_Itemkey, 'VENDOR_EMPLOYEE_ID',
1269: l_vendor_employee_id);
1270: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'VENDOR_EMPLOYEE_NUMBER',
1271: l_vendor_employee_number);
1272: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'VENDOR_TYPE',
1273: l_vendor_type);
1274: -- OGM stores award_set id into award_id column and derives award_id
1275: -- from ADLs table.
1276: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'AWARD_SET_ID',
1272: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'VENDOR_TYPE',
1273: l_vendor_type);
1274: -- OGM stores award_set id into award_id column and derives award_id
1275: -- from ADLs table.
1276: Call_WF_API_to_set_Att (ItemType, Wf_Itemkey, 'AWARD_SET_ID',
1277: X_Award_id); --OGM_0.0 change
1278: END IF; -- IF (x_project_id IS NOT NULL)
1279: -- done setting AP project accounting attributes.
1280:
1326: END all_returned_segments_null_sv;
1327:
1328: PROCEDURE generate_destination_accounts(
1329: itemtype IN VARCHAR2,
1330: wf_itemkey IN VARCHAR2,
1331: p_is_SPS_distribution IN BOOLEAN,
1332: x_insert_if_new IN BOOLEAN,
1333: x_account_generation_flow_type IN VARCHAR2,
1334: x_coa_id IN NUMBER,
1395: l_progress := '010';
1396:
1397: -- Bug 1497909 : Set the encumbrance date for validation
1398: po_wf_util_pkg.SetItemAttrDate(itemtype => itemtype,
1399: itemkey => wf_itemkey,
1400: aname => 'ENCUMBRANCE_DATE',
1401: avalue => x_gl_encumbered_date);
1402:
1403: x_success := FND_FLEX_WORKFLOW.GENERATE_PARTIAL (
1401: avalue => x_gl_encumbered_date);
1402:
1403: x_success := FND_FLEX_WORKFLOW.GENERATE_PARTIAL (
1404: ItemType,
1405: Wf_Itemkey,
1406: 'GENERATE_DEST_CHARGE_ACCOUNT',
1407: l_block_activity_label,
1408: x_insert_if_new,
1409: ccid,
1444: p_message => 'Terminating the workflow because'||
1445: ' invalid dest charge account was generated.');
1446: END IF;
1447:
1448: wf_engine.CompleteActivity(itemtype, wf_itemkey,
1449: 'BLOCK_DEST_VAR_ACC_GENERATE', 'FAILURE');
1450: EXCEPTION
1451: WHEN OTHERS THEN
1452: IF g_debug_stmt THEN
1453: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
1454: p_token => l_progress,
1455: p_message =>
1456: 'Exception when completing WF for dest accounts '||
1457: 'Item key='|| Wf_Itemkey);
1458: END IF;
1459:
1460: IF g_debug_unexp THEN
1461: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name,
1477: l_progress := '030';
1478: IF x_success THEN
1479: l_progress := '040';
1480: po_wf_util_pkg.SetItemAttrNumber(itemtype => itemtype,
1481: itemkey => wf_itemkey,
1482: aname => 'DEST_CHARGE_ACCOUNT_ID',
1483: avalue => x_dest_charge_account_id );
1484:
1485: IF g_debug_stmt THEN
1491: l_progress := '050';
1492:
1493: -- Bug 1497909 : Set the encumbrance date for validation
1494: po_wf_util_pkg.SetItemAttrDate(itemtype => itemtype,
1495: itemkey => wf_itemkey,
1496: aname => 'ENCUMBRANCE_DATE',
1497: avalue => x_gl_encumbered_date);
1498:
1499: x_success := FND_FLEX_WORKFLOW.GENERATE_PARTIAL (
1497: avalue => x_gl_encumbered_date);
1498:
1499: x_success := FND_FLEX_WORKFLOW.GENERATE_PARTIAL (
1500: ItemType,
1501: Wf_Itemkey,
1502: 'GENERATE_DEST_VARIANCE_ACCOUNT',
1503: 'BLOCK_DEST_VAR_ACC_GENERATE',
1504: x_insert_if_new,
1505: ccid,
1536: l_progress := '080';
1537: IF x_success THEN
1538: l_progress := '090';
1539: po_wf_util_pkg.SetItemAttrNumber(itemtype => itemtype,
1540: itemkey => wf_itemkey,
1541: aname => 'DEST_VARIANCE_ACCOUNT_ID',
1542: avalue => x_dest_variance_account_id );
1543: END IF; -- IF x_success (DEST_VARIANCE_ACCOUNT)
1544: END IF; -- IF x_success (DEST_CHARGE_ACCOUNT)
1671: x_po_encumberance_flag VARCHAR2,
1672: x_gl_encumbered_date DATE,
1673:
1674: -- because of changes due to WF synch mode this input parameter is not used.
1675: wf_itemkey IN OUT NOCOPY VARCHAR2,
1676: x_new_combination IN OUT NOCOPY BOOLEAN,
1677:
1678: header_att1 VARCHAR2, header_att2 VARCHAR2, header_att3 VARCHAR2,
1679: header_att4 VARCHAR2, header_att5 VARCHAR2, header_att6 VARCHAR2,
1749:
1750: -- Note from bug5075361: We probably don't need to keep the clearcache
1751: -- at the beginning of the procedure since they're called at the end
1752: -- but it doesn't hurt to keep them anyway
1753: wf_item.clearcache;
1754:
1755: ItemType := 'POWFPOAG'; -- PO Account Generator Workflow
1756: x_appl_short_name := 'SQLGL';
1757: x_flex_field_code := 'GL#';
1775: l_distribution_type := nvl(p_distribution_type, 'NOT PREPAYMENT');
1776:
1777: l_progress := '020';
1778:
1779: Wf_Itemkey := FND_FLEX_WORKFLOW.initialize(x_appl_short_name,
1780: x_flex_field_code,
1781: x_flex_field_struc_num,
1782: ItemType);
1783:
1785: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
1786: p_token => l_progress,
1787: p_message => 'x_account_generation_flow_type='
1788: || x_account_generation_flow_type
1789: || 'item_key=' || wf_itemkey);
1790: END IF;
1791:
1792: l_progress := '030';
1793:
1790: END IF;
1791:
1792: l_progress := '030';
1793:
1794: IF ( ItemType IS NOT NULL ) AND ( Wf_Itemkey IS NOT NULL) THEN -- (
1795:
1796: l_progress := '040';
1797:
1798: -- Moved the calling of AP routine to get raw and derived parameters for
1796: l_progress := '040';
1797:
1798: -- Moved the calling of AP routine to get raw and derived parameters for
1799: -- project accounting accounts into this new private procedure called
1800: -- derive_pa_params(). This procedure also sets the PA related WF item
1801: -- attributes that are derived from the PA API. It also sets the
1802: -- AWARD_SET_ID attribute if project_id is not null.
1803:
1804: derive_pa_params(itemtype,
1801: -- attributes that are derived from the PA API. It also sets the
1802: -- AWARD_SET_ID attribute if project_id is not null.
1803:
1804: derive_pa_params(itemtype,
1805: wf_itemkey,
1806: x_project_id,
1807: x_task_id,
1808: x_expenditure_type,
1809: x_vendor_id,
1817: -- this new private procedure called set_ag_wf_attributes(). This makes
1818: -- the procedure Start_Workflow() more modular and more readable.
1819:
1820: set_ag_wf_attributes(itemtype,
1821: wf_itemkey,
1822: x_coa_id,
1823: x_bom_cost_element_id,
1824: x_bom_resource_id,
1825: x_category_id,
1902: x_block_activity_label := NULL;
1903:
1904: -- Bug 1497909 : Set the encumbrance date for validation
1905: po_wf_util_pkg.SetItemAttrDate(itemtype => itemtype,
1906: itemkey => wf_itemkey,
1907: aname => 'ENCUMBRANCE_DATE',
1908: avalue => x_gl_encumbered_date);
1909:
1910: IF g_debug_stmt THEN
1913: p_message => 'Before calling FND_FLEX_WORKFLOW.generate_partial');
1914: END IF;
1915:
1916: x_success := FND_FLEX_WORKFLOW.GENERATE_PARTIAL ( ItemType,
1917: Wf_Itemkey,
1918: 'DEFAULT_CHARGE_ACC_GENERATION',
1919: x_block_activity_label,
1920: x_insert_if_new,
1921: ccid,
1951: ' Account was generated.');
1952: END IF;
1953:
1954:
1955: wf_engine.CompleteActivity(itemtype, wf_itemkey,
1956: 'BLOCK_BUDGET_ACC_GENERATION', 'FAILURE');
1957: EXCEPTION
1958: WHEN OTHERS THEN
1959: IF g_debug_stmt THEN
1959: IF g_debug_stmt THEN
1960: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
1961: p_token => l_progress,
1962: p_message => 'Exception when completing WF.' ||
1963: ' item_key='||Wf_Itemkey);
1964: END IF;
1965:
1966: IF g_debug_unexp THEN
1967: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name,
2023:
2024: l_progress := '130';
2025:
2026: po_wf_util_pkg.SetItemAttrNumber(itemtype => itemtype,
2027: itemkey => wf_itemkey,
2028: aname => 'CODE_COMBINATION_ID',
2029: avalue => x_code_combination_id );
2030:
2031: -- Generate Budget Account if encumbrance is on
2051: l_progress := '140';
2052:
2053: -- Bug 1497909 : Set the encumbrance date for validation
2054: po_wf_util_pkg.SetItemAttrDate(itemtype => itemtype,
2055: itemkey => wf_itemkey,
2056: aname => 'ENCUMBRANCE_DATE',
2057: avalue => x_gl_encumbered_date);
2058:
2059: x_success := FND_FLEX_WORKFLOW.GENERATE_PARTIAL(
2057: avalue => x_gl_encumbered_date);
2058:
2059: x_success := FND_FLEX_WORKFLOW.GENERATE_PARTIAL(
2060: ItemType,
2061: Wf_Itemkey,
2062: 'DEFAULT_BUDGET_ACC_GENERATION',
2063: x_block_activity_label,
2064: x_insert_if_new,
2065: ccid,
2113:
2114: l_progress := '170';
2115:
2116: po_wf_util_pkg.SetItemAttrNumber(itemtype => itemtype,
2117: itemkey => wf_itemkey,
2118: aname => 'BUDGET_ACCOUNT_ID',
2119: avalue => x_budget_account_id );
2120:
2121: -- Generate Accrual Account
2150: END IF;
2151:
2152: -- Bug 1497909 : Set the encumbrance date for validation
2153: po_wf_util_pkg.SetItemAttrDate(itemtype => itemtype,
2154: itemkey => wf_itemkey,
2155: aname => 'ENCUMBRANCE_DATE',
2156: avalue => x_gl_encumbered_date);
2157:
2158: x_success := FND_FLEX_WORKFLOW.GENERATE_PARTIAL (
2156: avalue => x_gl_encumbered_date);
2157:
2158: x_success := FND_FLEX_WORKFLOW.GENERATE_PARTIAL (
2159: ItemType,
2160: Wf_Itemkey,
2161: 'DEFAULT_ACCRUAL_ACC_GENERATION',
2162: x_block_activity_label,
2163: x_insert_if_new,
2164: ccid,
2193:
2194: l_progress := '190';
2195:
2196: po_wf_util_pkg.SetItemAttrNumber(itemtype => itemtype,
2197: itemkey => wf_itemkey,
2198: aname => 'ACCRUAL_ACCOUNT_ID',
2199: avalue => x_accrual_account_id );
2200:
2201: IF g_debug_stmt THEN
2207: l_progress := '200';
2208:
2209: -- Bug 1497909 : Set the encumbrance date for validation
2210: po_wf_util_pkg.SetItemAttrDate(itemtype => itemtype,
2211: itemkey => wf_itemkey,
2212: aname => 'ENCUMBRANCE_DATE',
2213: avalue => x_gl_encumbered_date);
2214:
2215: -- Generate Variance Account
2214:
2215: -- Generate Variance Account
2216: x_success := FND_FLEX_WORKFLOW.GENERATE_PARTIAL(
2217: ItemType,
2218: Wf_Itemkey,
2219: 'DEFAULT_VARIANCE_ACC_GENERATION',
2220: 'BLOCK_VARIANCE_ACC_GENERATION',
2221: x_insert_if_new,
2222: ccid,
2305:
2306: --< Shared Proc FPJ Start >
2307: generate_destination_accounts(
2308: itemtype, -- IN VARCHAR2
2309: wf_itemkey, -- IN VARCHAR2,
2310: x_is_SPS_distribution, -- IN BOOLEAN
2311: x_insert_if_new, -- IN BOOLEAN,
2312: x_account_generation_flow_type, -- IN VARCHAR2,
2313: x_coa_id, -- IN NUMBER,
2369: END IF;
2370:
2371: PO_WF_UTIL_PKG.clear_wf_cache; -- bug5075361
2372: RETURN FALSE;
2373: END IF; -- IF ( ItemType IS NOT NULL ) AND ( Wf_Itemkey IS NOT NULL) -- )
2374:
2375: IF g_debug_stmt THEN
2376: PO_DEBUG.debug_end(p_log_head => g_log_head||l_api_name);
2377: END IF;
2451: x_po_encumberance_flag VARCHAR2,
2452: x_gl_encumbered_date DATE,
2453:
2454: -- because of changes due to WF synch mode this input parameter is not used.
2455: wf_itemkey IN OUT NOCOPY VARCHAR2,
2456: x_new_combination IN OUT NOCOPY BOOLEAN,
2457:
2458: header_att1 VARCHAR2, header_att2 VARCHAR2, header_att3 VARCHAR2,
2459: header_att4 VARCHAR2, header_att5 VARCHAR2, header_att6 VARCHAR2,
2630: x_gl_encumbered_date,
2631:
2632: -- because of changes due to WF synch mode this input parameter is not
2633: -- used.
2634: wf_itemkey,
2635: x_new_combination,
2636:
2637: header_att1, header_att2, header_att3, header_att4, header_att5,
2638: header_att6, header_att7, header_att8, header_att9, header_att10,
2791: x_gl_encumbered_date,
2792:
2793: -- because of changes due to WF synch mode this input parameter is not
2794: -- used.
2795: wf_itemkey,
2796: x_new_combination,
2797:
2798: header_att1, header_att2, header_att3, header_att4, header_att5,
2799: header_att6, header_att7, header_att8, header_att9, header_att10,
2948: x_po_encumberance_flag VARCHAR2,
2949: x_gl_encumbered_date DATE,
2950:
2951: -- because of changes due to WF synch mode this input parameter is not used.
2952: wf_itemkey IN OUT NOCOPY VARCHAR2,
2953: x_new_combination IN OUT NOCOPY BOOLEAN,
2954:
2955: header_att1 VARCHAR2, header_att2 VARCHAR2, header_att3 VARCHAR2,
2956: header_att4 VARCHAR2, header_att5 VARCHAR2, header_att6 VARCHAR2,
3062: x_gl_encumbered_date,
3063:
3064: -- because of changes due to WF synch mode this input
3065: -- parameter is not used.
3066: wf_itemkey,
3067: x_new_combination,
3068:
3069: header_att1, header_att2, header_att3,
3070: header_att4, header_att5, header_att6,