18: -- RUN mode - normal process execution
19: --
20: if (funcmode = 'RUN') then
21:
22: OE_STANDARD_WF.Set_Msg_Context(actid);
23:
24: l_header_id := to_number(itemkey);
25:
26: OE_ORDER_CLOSE_UTIL.Close_Order
32: );
33:
34: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
35: resultout := 'COMPLETE:INCOMPLETE';
36: OE_STANDARD_WF.Save_Messages;
37: OE_STANDARD_WF.Clear_Msg_Context;
38: return;
39: ELSIF l_return_status = 'H' THEN
40: resultout := 'COMPLETE:ON_HOLD';
33:
34: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
35: resultout := 'COMPLETE:INCOMPLETE';
36: OE_STANDARD_WF.Save_Messages;
37: OE_STANDARD_WF.Clear_Msg_Context;
38: return;
39: ELSIF l_return_status = 'H' THEN
40: resultout := 'COMPLETE:ON_HOLD';
41: OE_STANDARD_WF.Save_Messages;
37: OE_STANDARD_WF.Clear_Msg_Context;
38: return;
39: ELSIF l_return_status = 'H' THEN
40: resultout := 'COMPLETE:ON_HOLD';
41: OE_STANDARD_WF.Save_Messages;
42: OE_STANDARD_WF.Clear_Msg_Context;
43: return;
44: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
45: -- start data fix project
38: return;
39: ELSIF l_return_status = 'H' THEN
40: resultout := 'COMPLETE:ON_HOLD';
41: OE_STANDARD_WF.Save_Messages;
42: OE_STANDARD_WF.Clear_Msg_Context;
43: return;
44: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
45: -- start data fix project
46: -- OE_STANDARD_WF.Save_Messages;
42: OE_STANDARD_WF.Clear_Msg_Context;
43: return;
44: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
45: -- start data fix project
46: -- OE_STANDARD_WF.Save_Messages;
47: -- OE_STANDARD_WF.Clear_Msg_Context;
48: -- end data fix project
49: app_exception.raise_exception;
50: END IF;
43: return;
44: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
45: -- start data fix project
46: -- OE_STANDARD_WF.Save_Messages;
47: -- OE_STANDARD_WF.Clear_Msg_Context;
48: -- end data fix project
49: app_exception.raise_exception;
50: END IF;
51:
49: app_exception.raise_exception;
50: END IF;
51:
52: resultout := 'COMPLETE:COMPLETE';
53: OE_STANDARD_WF.Clear_Msg_Context;
54: return;
55:
56: end if; -- End for 'RUN' mode
57:
87: -- in the case of an exception.
88: wf_core.context('OE_Close_WF', 'Close_Order',
89: itemtype, itemkey, to_char(actid), funcmode);
90: -- start data fix project
91: OE_STANDARD_WF.Add_Error_Activity_Msg(p_actid => actid,
92: p_itemtype => itemtype,
93: p_itemkey => itemkey);
94: OE_STANDARD_WF.Save_Messages;
95: OE_STANDARD_WF.Clear_Msg_Context;
90: -- start data fix project
91: OE_STANDARD_WF.Add_Error_Activity_Msg(p_actid => actid,
92: p_itemtype => itemtype,
93: p_itemkey => itemkey);
94: OE_STANDARD_WF.Save_Messages;
95: OE_STANDARD_WF.Clear_Msg_Context;
96: -- end data fix project
97: raise;
98: END Close_Order;
91: OE_STANDARD_WF.Add_Error_Activity_Msg(p_actid => actid,
92: p_itemtype => itemtype,
93: p_itemkey => itemkey);
94: OE_STANDARD_WF.Save_Messages;
95: OE_STANDARD_WF.Clear_Msg_Context;
96: -- end data fix project
97: raise;
98: END Close_Order;
99:
114: -- RUN mode - normal process execution
115: --
116: if (funcmode = 'RUN') then
117:
118: OE_STANDARD_WF.Set_Msg_Context(actid);
119:
120: l_line_id := to_number(itemkey);
121:
122: OE_ORDER_CLOSE_UTIL.Close_Line
128: );
129:
130: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
131: resultout := 'COMPLETE:INCOMPLETE';
132: OE_STANDARD_WF.Save_Messages;
133: OE_STANDARD_WF.Clear_Msg_Context;
134: return;
135: ELSIF l_return_status = 'H' THEN
136: resultout := 'COMPLETE:ON_HOLD';
129:
130: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
131: resultout := 'COMPLETE:INCOMPLETE';
132: OE_STANDARD_WF.Save_Messages;
133: OE_STANDARD_WF.Clear_Msg_Context;
134: return;
135: ELSIF l_return_status = 'H' THEN
136: resultout := 'COMPLETE:ON_HOLD';
137: OE_STANDARD_WF.Save_Messages;
133: OE_STANDARD_WF.Clear_Msg_Context;
134: return;
135: ELSIF l_return_status = 'H' THEN
136: resultout := 'COMPLETE:ON_HOLD';
137: OE_STANDARD_WF.Save_Messages;
138: OE_STANDARD_WF.Clear_Msg_Context;
139: return;
140: ELSIF l_return_status = 'C' THEN
141: resultout := OE_GLOBALS.G_WFR_COMPLETE || ':' || OE_GLOBALS.G_WFR_PENDING_ACCEPTANCE;
134: return;
135: ELSIF l_return_status = 'H' THEN
136: resultout := 'COMPLETE:ON_HOLD';
137: OE_STANDARD_WF.Save_Messages;
138: OE_STANDARD_WF.Clear_Msg_Context;
139: return;
140: ELSIF l_return_status = 'C' THEN
141: resultout := OE_GLOBALS.G_WFR_COMPLETE || ':' || OE_GLOBALS.G_WFR_PENDING_ACCEPTANCE;
142: OE_STANDARD_WF.Save_Messages;
138: OE_STANDARD_WF.Clear_Msg_Context;
139: return;
140: ELSIF l_return_status = 'C' THEN
141: resultout := OE_GLOBALS.G_WFR_COMPLETE || ':' || OE_GLOBALS.G_WFR_PENDING_ACCEPTANCE;
142: OE_STANDARD_WF.Save_Messages;
143: OE_STANDARD_WF.Clear_Msg_Context;
144: return;
145: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
146: -- start data fix project
139: return;
140: ELSIF l_return_status = 'C' THEN
141: resultout := OE_GLOBALS.G_WFR_COMPLETE || ':' || OE_GLOBALS.G_WFR_PENDING_ACCEPTANCE;
142: OE_STANDARD_WF.Save_Messages;
143: OE_STANDARD_WF.Clear_Msg_Context;
144: return;
145: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
146: -- start data fix project
147: -- OE_STANDARD_WF.Save_Messages;
143: OE_STANDARD_WF.Clear_Msg_Context;
144: return;
145: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
146: -- start data fix project
147: -- OE_STANDARD_WF.Save_Messages;
148: -- OE_STANDARD_WF.Clear_Msg_Context;
149: -- end data fix project
150: app_exception.raise_exception;
151: END IF;
144: return;
145: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
146: -- start data fix project
147: -- OE_STANDARD_WF.Save_Messages;
148: -- OE_STANDARD_WF.Clear_Msg_Context;
149: -- end data fix project
150: app_exception.raise_exception;
151: END IF;
152:
150: app_exception.raise_exception;
151: END IF;
152:
153: resultout := 'COMPLETE:COMPLETE';
154: OE_STANDARD_WF.Clear_Msg_Context;
155: return;
156:
157: end if; -- End for 'RUN' mode
158:
188: -- in the case of an exception.
189: wf_core.context('OE_Close_WF', 'Close_Line',
190: itemtype, itemkey, to_char(actid), funcmode);
191: -- start data fix project
192: OE_STANDARD_WF.Add_Error_Activity_Msg(p_actid => actid,
193: p_itemtype => itemtype,
194: p_itemkey => itemkey);
195: OE_STANDARD_WF.Save_Messages;
196: OE_STANDARD_WF.Clear_Msg_Context;
191: -- start data fix project
192: OE_STANDARD_WF.Add_Error_Activity_Msg(p_actid => actid,
193: p_itemtype => itemtype,
194: p_itemkey => itemkey);
195: OE_STANDARD_WF.Save_Messages;
196: OE_STANDARD_WF.Clear_Msg_Context;
197: -- end data fix project
198: raise;
199: END Close_Line;
192: OE_STANDARD_WF.Add_Error_Activity_Msg(p_actid => actid,
193: p_itemtype => itemtype,
194: p_itemkey => itemkey);
195: OE_STANDARD_WF.Save_Messages;
196: OE_STANDARD_WF.Clear_Msg_Context;
197: -- end data fix project
198: raise;
199: END Close_Line;
200: