66: IF (l_del_lines_count = 0) THEN
67: resultout := 'COMPLETE:NOT_SHIPPED';
68: END IF;
69: END IF;
70: WF_ENGINE.SetItemAttrText(
71: itemtype => itemtype,
72: itemkey => itemkey,
73: aname => 'NOTIFICATION_TO_ROLE',
74: avalue => FND_GLOBAL.USER_NAME);
190:
191: IF (funcmode = 'RUN') THEN
192:
193: l_delivery_id := itemkey;
194: l_organization_id := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ORG_ID',FALSE);
195: l_actual_date := WF_ENGINE.GetItemAttrDate(itemtype,itemkey,'ACTUAL_DATE',FALSE);
196:
197: OPEN get_pickup_stop_id;
198: FETCH get_pickup_stop_id into l_pickup_stop_id;
191: IF (funcmode = 'RUN') THEN
192:
193: l_delivery_id := itemkey;
194: l_organization_id := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ORG_ID',FALSE);
195: l_actual_date := WF_ENGINE.GetItemAttrDate(itemtype,itemkey,'ACTUAL_DATE',FALSE);
196:
197: OPEN get_pickup_stop_id;
198: FETCH get_pickup_stop_id into l_pickup_stop_id;
199: CLOSE get_pickup_stop_id ;
251: WHERE delivery_id = l_delivery_id;
252: resultout := 'COMPLETE:FAILURE';
253: END IF;
254:
255: WF_ENGINE.SetItemAttrText(
256: itemtype => itemtype,
257: itemkey => itemkey,
258: aname => 'SCPOD_INTRANSIT_MSG',
259: avalue => l_msg_data);
369: -- RUN mode - normal process execution
370: IF (funcmode = 'RUN') THEN
371:
372: l_delivery_id := itemkey;
373: l_organization_id := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ORG_ID',FALSE);
374: l_actual_date := WF_ENGINE.GetItemAttrDate(itemtype,itemkey,'ACTUAL_DATE',FALSE);
375: l_intransit_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'INTRANSIT_FLAG',FALSE);
376: l_action_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ACTION_FLAG',FALSE);
377: l_close_trip_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CLOSE_TRIP_FLAG',FALSE);
370: IF (funcmode = 'RUN') THEN
371:
372: l_delivery_id := itemkey;
373: l_organization_id := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ORG_ID',FALSE);
374: l_actual_date := WF_ENGINE.GetItemAttrDate(itemtype,itemkey,'ACTUAL_DATE',FALSE);
375: l_intransit_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'INTRANSIT_FLAG',FALSE);
376: l_action_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ACTION_FLAG',FALSE);
377: l_close_trip_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CLOSE_TRIP_FLAG',FALSE);
378: l_stage_del_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'STAGE_DEL_FLAG',FALSE);
371:
372: l_delivery_id := itemkey;
373: l_organization_id := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ORG_ID',FALSE);
374: l_actual_date := WF_ENGINE.GetItemAttrDate(itemtype,itemkey,'ACTUAL_DATE',FALSE);
375: l_intransit_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'INTRANSIT_FLAG',FALSE);
376: l_action_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ACTION_FLAG',FALSE);
377: l_close_trip_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CLOSE_TRIP_FLAG',FALSE);
378: l_stage_del_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'STAGE_DEL_FLAG',FALSE);
379: l_send_945_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SEND_945_FLAG',FALSE);
372: l_delivery_id := itemkey;
373: l_organization_id := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ORG_ID',FALSE);
374: l_actual_date := WF_ENGINE.GetItemAttrDate(itemtype,itemkey,'ACTUAL_DATE',FALSE);
375: l_intransit_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'INTRANSIT_FLAG',FALSE);
376: l_action_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ACTION_FLAG',FALSE);
377: l_close_trip_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CLOSE_TRIP_FLAG',FALSE);
378: l_stage_del_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'STAGE_DEL_FLAG',FALSE);
379: l_send_945_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SEND_945_FLAG',FALSE);
380: l_bill_of_lading_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CREATE_BOL_FLAG',FALSE);
373: l_organization_id := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ORG_ID',FALSE);
374: l_actual_date := WF_ENGINE.GetItemAttrDate(itemtype,itemkey,'ACTUAL_DATE',FALSE);
375: l_intransit_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'INTRANSIT_FLAG',FALSE);
376: l_action_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ACTION_FLAG',FALSE);
377: l_close_trip_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CLOSE_TRIP_FLAG',FALSE);
378: l_stage_del_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'STAGE_DEL_FLAG',FALSE);
379: l_send_945_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SEND_945_FLAG',FALSE);
380: l_bill_of_lading_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CREATE_BOL_FLAG',FALSE);
381: l_mc_bill_of_lading_flag:= WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CREATE_MC_BOL_FLAG',FALSE);
374: l_actual_date := WF_ENGINE.GetItemAttrDate(itemtype,itemkey,'ACTUAL_DATE',FALSE);
375: l_intransit_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'INTRANSIT_FLAG',FALSE);
376: l_action_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ACTION_FLAG',FALSE);
377: l_close_trip_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CLOSE_TRIP_FLAG',FALSE);
378: l_stage_del_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'STAGE_DEL_FLAG',FALSE);
379: l_send_945_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SEND_945_FLAG',FALSE);
380: l_bill_of_lading_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CREATE_BOL_FLAG',FALSE);
381: l_mc_bill_of_lading_flag:= WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CREATE_MC_BOL_FLAG',FALSE);
382: l_ship_method_code := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SHIP_METHOD_CODE',FALSE);
375: l_intransit_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'INTRANSIT_FLAG',FALSE);
376: l_action_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ACTION_FLAG',FALSE);
377: l_close_trip_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CLOSE_TRIP_FLAG',FALSE);
378: l_stage_del_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'STAGE_DEL_FLAG',FALSE);
379: l_send_945_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SEND_945_FLAG',FALSE);
380: l_bill_of_lading_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CREATE_BOL_FLAG',FALSE);
381: l_mc_bill_of_lading_flag:= WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CREATE_MC_BOL_FLAG',FALSE);
382: l_ship_method_code := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SHIP_METHOD_CODE',FALSE);
383: l_report_set_id := WF_ENGINE.GetItemAttrNumber(itemtype,itemkey,'REPORT_SET_ID',FALSE);
376: l_action_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ACTION_FLAG',FALSE);
377: l_close_trip_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CLOSE_TRIP_FLAG',FALSE);
378: l_stage_del_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'STAGE_DEL_FLAG',FALSE);
379: l_send_945_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SEND_945_FLAG',FALSE);
380: l_bill_of_lading_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CREATE_BOL_FLAG',FALSE);
381: l_mc_bill_of_lading_flag:= WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CREATE_MC_BOL_FLAG',FALSE);
382: l_ship_method_code := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SHIP_METHOD_CODE',FALSE);
383: l_report_set_id := WF_ENGINE.GetItemAttrNumber(itemtype,itemkey,'REPORT_SET_ID',FALSE);
384: l_sc_rule_id := WF_ENGINE.GetItemAttrNumber(itemtype,itemkey,'SC_RULE_ID',FALSE);
377: l_close_trip_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CLOSE_TRIP_FLAG',FALSE);
378: l_stage_del_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'STAGE_DEL_FLAG',FALSE);
379: l_send_945_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SEND_945_FLAG',FALSE);
380: l_bill_of_lading_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CREATE_BOL_FLAG',FALSE);
381: l_mc_bill_of_lading_flag:= WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CREATE_MC_BOL_FLAG',FALSE);
382: l_ship_method_code := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SHIP_METHOD_CODE',FALSE);
383: l_report_set_id := WF_ENGINE.GetItemAttrNumber(itemtype,itemkey,'REPORT_SET_ID',FALSE);
384: l_sc_rule_id := WF_ENGINE.GetItemAttrNumber(itemtype,itemkey,'SC_RULE_ID',FALSE);
385:
378: l_stage_del_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'STAGE_DEL_FLAG',FALSE);
379: l_send_945_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SEND_945_FLAG',FALSE);
380: l_bill_of_lading_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CREATE_BOL_FLAG',FALSE);
381: l_mc_bill_of_lading_flag:= WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CREATE_MC_BOL_FLAG',FALSE);
382: l_ship_method_code := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SHIP_METHOD_CODE',FALSE);
383: l_report_set_id := WF_ENGINE.GetItemAttrNumber(itemtype,itemkey,'REPORT_SET_ID',FALSE);
384: l_sc_rule_id := WF_ENGINE.GetItemAttrNumber(itemtype,itemkey,'SC_RULE_ID',FALSE);
385:
386:
379: l_send_945_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SEND_945_FLAG',FALSE);
380: l_bill_of_lading_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CREATE_BOL_FLAG',FALSE);
381: l_mc_bill_of_lading_flag:= WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CREATE_MC_BOL_FLAG',FALSE);
382: l_ship_method_code := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SHIP_METHOD_CODE',FALSE);
383: l_report_set_id := WF_ENGINE.GetItemAttrNumber(itemtype,itemkey,'REPORT_SET_ID',FALSE);
384: l_sc_rule_id := WF_ENGINE.GetItemAttrNumber(itemtype,itemkey,'SC_RULE_ID',FALSE);
385:
386:
387: WSH_NEW_DELIVERIES_PVT.Populate_Record (l_delivery_id,l_delivery_info,l_return_status);
380: l_bill_of_lading_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CREATE_BOL_FLAG',FALSE);
381: l_mc_bill_of_lading_flag:= WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CREATE_MC_BOL_FLAG',FALSE);
382: l_ship_method_code := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SHIP_METHOD_CODE',FALSE);
383: l_report_set_id := WF_ENGINE.GetItemAttrNumber(itemtype,itemkey,'REPORT_SET_ID',FALSE);
384: l_sc_rule_id := WF_ENGINE.GetItemAttrNumber(itemtype,itemkey,'SC_RULE_ID',FALSE);
385:
386:
387: WSH_NEW_DELIVERIES_PVT.Populate_Record (l_delivery_id,l_delivery_info,l_return_status);
388: l_rec_attr_tab(l_rec_attr_tab.COUNT + 1) := l_delivery_info;
477: WHERE delivery_id = l_delivery_id;
478: resultout := 'COMPLETE:FAILURE';
479: END IF;
480:
481: WF_ENGINE.SetItemAttrText(
482: itemtype => itemtype,
483: itemkey => itemkey,
484: aname => 'SCPOD_DEL_CLOSE_MSG',
485: avalue => l_msg_data);
607: END IF;
608:
609:
610: l_msg_buffer := FND_MESSAGE.Get;
611: WF_ENGINE.SetItemAttrText(
612: itemtype => itemtype,
613: itemkey => itemkey,
614: aname => 'SCPOD_INTERFACE_MSG',
615: avalue => l_msg_buffer);
694: -- RUN mode - normal process execution
695: IF (funcmode = 'RUN') THEN
696:
697: l_delivery_ids(l_delivery_ids.COUNT + 1) := itemkey;
698: l_organization_id := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ORG_ID',FALSE);
699: l_report_set_id := WF_ENGINE.GetItemAttrNumber(itemtype,itemkey,'REPORT_SET_ID',FALSE);
700:
701: IF (l_report_set_id is not null) THEN
702: IF l_debug_on THEN
695: IF (funcmode = 'RUN') THEN
696:
697: l_delivery_ids(l_delivery_ids.COUNT + 1) := itemkey;
698: l_organization_id := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ORG_ID',FALSE);
699: l_report_set_id := WF_ENGINE.GetItemAttrNumber(itemtype,itemkey,'REPORT_SET_ID',FALSE);
700:
701: IF (l_report_set_id is not null) THEN
702: IF l_debug_on THEN
703: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DOCUMENT_SETS.PRINT_DOCUMENT_SETS',
808: END IF;
809:
810: -- RUN mode - normal process execution
811: IF (funcmode = 'RUN') THEN
812: l_intransit_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'INTRANSIT_FLAG',TRUE);
813: IF (l_intransit_flag = 'Y') THEN
814: resultout := 'COMPLETE:Y';
815: ELSE
816: resultout := 'COMPLETE:N';
884: END IF;
885:
886: -- RUN mode - normal process execution
887: IF (funcmode = 'RUN') THEN
888: l_defer_interface_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'DEFER_INTERFACE_FLAG',FALSE);
889: IF (l_defer_interface_flag = 'Y') THEN
890: resultout := 'COMPLETE:Y';
891: ELSE
892: resultout := 'COMPLETE:N';
961: END IF;
962:
963: -- RUN mode - normal process execution
964: IF (funcmode = 'RUN') THEN
965: l_close_flag := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CLOSE_TRIP_FLAG',FALSE);
966: IF (l_close_flag = 'Y') THEN
967: resultout := 'COMPLETE:Y';
968: ELSE
969: resultout := 'COMPLETE:N';
1049: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_SHIPPING_PARAMS_PVT.GET',
1050: WSH_DEBUG_SV.C_PROC_LEVEL);
1051: END IF;
1052:
1053: l_organization_id := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ORG_ID',FALSE);
1054: WSH_SHIPPING_PARAMS_PVT.Get(p_organization_id => l_organization_id,
1055: x_param_info => l_param_info,
1056: x_return_status => l_return_status);
1057: IF l_debug_on THEN
1164: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_SHIPPING_PARAMS_PVT.GET',
1165: WSH_DEBUG_SV.C_PROC_LEVEL);
1166: END IF;
1167:
1168: l_organization_id := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ORG_ID',FALSE);
1169: WSH_SHIPPING_PARAMS_PVT.Get(p_organization_id => l_organization_id,
1170: x_param_info => l_param_info,
1171: x_return_status => l_return_status);
1172: IF l_debug_on THEN
1273:
1274: -- RUN mode - normal process execution
1275: IF (funcmode = 'RUN') THEN
1276: l_delivery_id := itemkey;
1277: l_organization_id := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ORG_ID',FALSE);
1278:
1279:
1280: IF l_debug_on THEN
1281: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_ITM_EXPORT_SCREENING.SCREEN_EVENT_DELIVERIES',
1382:
1383: -- RUN mode - normal process execution
1384: IF (funcmode = 'RUN') THEN
1385:
1386: l_organization_id := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'ORG_ID',FALSE);
1387: OPEN get_global_parameters;
1388: FETCH get_global_parameters into l_gl_enable_sc_flag;
1389: CLOSE get_global_parameters ;
1390:
1641: -- correctly for executing a function activity.
1642: IF (funcmode = 'SET_CTX') THEN
1643: -- FND_GLOBAL.Apps_Initialize(FND_GLOBAL.USER_ID,FND_GLOBAL.RESP_ID, FND_GLOBAL.RESP_APPL_ID);
1644:
1645: -- Any caller that calls the WF_ENGINE can set this to TRUE in which case
1646: -- we will reset apps context to that of the user who created the wf item.
1647: IF WSH_WF_STD.G_RESET_APPS_CONTEXT THEN
1648: l_org_id := to_number(wf_engine.GetItemAttrText( itemtype,itemkey,'ORG_ID'));
1649:
1644:
1645: -- Any caller that calls the WF_ENGINE can set this to TRUE in which case
1646: -- we will reset apps context to that of the user who created the wf item.
1647: IF WSH_WF_STD.G_RESET_APPS_CONTEXT THEN
1648: l_org_id := to_number(wf_engine.GetItemAttrText( itemtype,itemkey,'ORG_ID'));
1649:
1650: IF l_org_id is null THEN
1651: RAISE NO_DATA_FOUND;
1652: ELSE
1662: RETURN;
1663: END IF;
1664: IF (funcmode = 'TEST_CTX') THEN
1665: IF WSH_WF_STD.G_RESET_APPS_CONTEXT THEN
1666: l_org_id := to_number(wf_engine.GetItemAttrText( itemtype,itemkey,'ORG_ID'));
1667: IF l_debug_on THEN
1668: wsh_debug_sv.log (l_module_name, 'l_wf_org_id', l_org_id);
1669: END IF;
1670: IF l_org_id IS NULL THEN