93: ,p_msg_data OUT NOCOPY Varchar2
94:
95: )
96: IS
97: l_Line_Scredit_rec OE_Order_PUB.Line_Scredit_Rec_Type;
98: l_old_Line_Scredit_rec OE_Order_PUB.Line_Scredit_Rec_Type;
99: l_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
100: l_old_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
101: l_control_rec OE_GLOBALS.Control_Rec_Type;
94:
95: )
96: IS
97: l_Line_Scredit_rec OE_Order_PUB.Line_Scredit_Rec_Type;
98: l_old_Line_Scredit_rec OE_Order_PUB.Line_Scredit_Rec_Type;
99: l_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
100: l_old_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
101: l_control_rec OE_GLOBALS.Control_Rec_Type;
102: l_return_status Varchar2(30);
95: )
96: IS
97: l_Line_Scredit_rec OE_Order_PUB.Line_Scredit_Rec_Type;
98: l_old_Line_Scredit_rec OE_Order_PUB.Line_Scredit_Rec_Type;
99: l_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
100: l_old_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
101: l_control_rec OE_GLOBALS.Control_Rec_Type;
102: l_return_status Varchar2(30);
103: l_x_header_rec OE_Order_PUB.Header_Rec_Type;
96: IS
97: l_Line_Scredit_rec OE_Order_PUB.Line_Scredit_Rec_Type;
98: l_old_Line_Scredit_rec OE_Order_PUB.Line_Scredit_Rec_Type;
99: l_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
100: l_old_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
101: l_control_rec OE_GLOBALS.Control_Rec_Type;
102: l_return_status Varchar2(30);
103: l_x_header_rec OE_Order_PUB.Header_Rec_Type;
104: l_x_Header_Adj_rec OE_Order_PUB.Header_Adj_Rec_Type;
99: l_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
100: l_old_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
101: l_control_rec OE_GLOBALS.Control_Rec_Type;
102: l_return_status Varchar2(30);
103: l_x_header_rec OE_Order_PUB.Header_Rec_Type;
104: l_x_Header_Adj_rec OE_Order_PUB.Header_Adj_Rec_Type;
105: l_x_Header_Adj_tbl OE_Order_PUB.Header_Adj_Tbl_Type;
106: l_x_Header_Scredit_rec OE_Order_PUB.Header_Scredit_Rec_Type;
107: l_x_Header_Scredit_tbl OE_Order_PUB.Header_Scredit_Tbl_Type;
100: l_old_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
101: l_control_rec OE_GLOBALS.Control_Rec_Type;
102: l_return_status Varchar2(30);
103: l_x_header_rec OE_Order_PUB.Header_Rec_Type;
104: l_x_Header_Adj_rec OE_Order_PUB.Header_Adj_Rec_Type;
105: l_x_Header_Adj_tbl OE_Order_PUB.Header_Adj_Tbl_Type;
106: l_x_Header_Scredit_rec OE_Order_PUB.Header_Scredit_Rec_Type;
107: l_x_Header_Scredit_tbl OE_Order_PUB.Header_Scredit_Tbl_Type;
108: l_x_line_rec OE_Order_PUB.Line_Rec_Type;
101: l_control_rec OE_GLOBALS.Control_Rec_Type;
102: l_return_status Varchar2(30);
103: l_x_header_rec OE_Order_PUB.Header_Rec_Type;
104: l_x_Header_Adj_rec OE_Order_PUB.Header_Adj_Rec_Type;
105: l_x_Header_Adj_tbl OE_Order_PUB.Header_Adj_Tbl_Type;
106: l_x_Header_Scredit_rec OE_Order_PUB.Header_Scredit_Rec_Type;
107: l_x_Header_Scredit_tbl OE_Order_PUB.Header_Scredit_Tbl_Type;
108: l_x_line_rec OE_Order_PUB.Line_Rec_Type;
109: l_x_line_tbl OE_Order_PUB.Line_Tbl_Type;
102: l_return_status Varchar2(30);
103: l_x_header_rec OE_Order_PUB.Header_Rec_Type;
104: l_x_Header_Adj_rec OE_Order_PUB.Header_Adj_Rec_Type;
105: l_x_Header_Adj_tbl OE_Order_PUB.Header_Adj_Tbl_Type;
106: l_x_Header_Scredit_rec OE_Order_PUB.Header_Scredit_Rec_Type;
107: l_x_Header_Scredit_tbl OE_Order_PUB.Header_Scredit_Tbl_Type;
108: l_x_line_rec OE_Order_PUB.Line_Rec_Type;
109: l_x_line_tbl OE_Order_PUB.Line_Tbl_Type;
110: l_x_Line_Adj_rec OE_Order_PUB.Line_Adj_Rec_Type;
103: l_x_header_rec OE_Order_PUB.Header_Rec_Type;
104: l_x_Header_Adj_rec OE_Order_PUB.Header_Adj_Rec_Type;
105: l_x_Header_Adj_tbl OE_Order_PUB.Header_Adj_Tbl_Type;
106: l_x_Header_Scredit_rec OE_Order_PUB.Header_Scredit_Rec_Type;
107: l_x_Header_Scredit_tbl OE_Order_PUB.Header_Scredit_Tbl_Type;
108: l_x_line_rec OE_Order_PUB.Line_Rec_Type;
109: l_x_line_tbl OE_Order_PUB.Line_Tbl_Type;
110: l_x_Line_Adj_rec OE_Order_PUB.Line_Adj_Rec_Type;
111: l_x_Line_Adj_tbl OE_Order_PUB.Line_Adj_Tbl_Type;
104: l_x_Header_Adj_rec OE_Order_PUB.Header_Adj_Rec_Type;
105: l_x_Header_Adj_tbl OE_Order_PUB.Header_Adj_Tbl_Type;
106: l_x_Header_Scredit_rec OE_Order_PUB.Header_Scredit_Rec_Type;
107: l_x_Header_Scredit_tbl OE_Order_PUB.Header_Scredit_Tbl_Type;
108: l_x_line_rec OE_Order_PUB.Line_Rec_Type;
109: l_x_line_tbl OE_Order_PUB.Line_Tbl_Type;
110: l_x_Line_Adj_rec OE_Order_PUB.Line_Adj_Rec_Type;
111: l_x_Line_Adj_tbl OE_Order_PUB.Line_Adj_Tbl_Type;
112: l_x_Line_Scredit_rec OE_Order_PUB.Line_Scredit_Rec_Type;
105: l_x_Header_Adj_tbl OE_Order_PUB.Header_Adj_Tbl_Type;
106: l_x_Header_Scredit_rec OE_Order_PUB.Header_Scredit_Rec_Type;
107: l_x_Header_Scredit_tbl OE_Order_PUB.Header_Scredit_Tbl_Type;
108: l_x_line_rec OE_Order_PUB.Line_Rec_Type;
109: l_x_line_tbl OE_Order_PUB.Line_Tbl_Type;
110: l_x_Line_Adj_rec OE_Order_PUB.Line_Adj_Rec_Type;
111: l_x_Line_Adj_tbl OE_Order_PUB.Line_Adj_Tbl_Type;
112: l_x_Line_Scredit_rec OE_Order_PUB.Line_Scredit_Rec_Type;
113: l_x_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
106: l_x_Header_Scredit_rec OE_Order_PUB.Header_Scredit_Rec_Type;
107: l_x_Header_Scredit_tbl OE_Order_PUB.Header_Scredit_Tbl_Type;
108: l_x_line_rec OE_Order_PUB.Line_Rec_Type;
109: l_x_line_tbl OE_Order_PUB.Line_Tbl_Type;
110: l_x_Line_Adj_rec OE_Order_PUB.Line_Adj_Rec_Type;
111: l_x_Line_Adj_tbl OE_Order_PUB.Line_Adj_Tbl_Type;
112: l_x_Line_Scredit_rec OE_Order_PUB.Line_Scredit_Rec_Type;
113: l_x_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
114: l_x_Lot_Serial_rec OE_Order_PUB.Lot_Serial_Rec_Type;
107: l_x_Header_Scredit_tbl OE_Order_PUB.Header_Scredit_Tbl_Type;
108: l_x_line_rec OE_Order_PUB.Line_Rec_Type;
109: l_x_line_tbl OE_Order_PUB.Line_Tbl_Type;
110: l_x_Line_Adj_rec OE_Order_PUB.Line_Adj_Rec_Type;
111: l_x_Line_Adj_tbl OE_Order_PUB.Line_Adj_Tbl_Type;
112: l_x_Line_Scredit_rec OE_Order_PUB.Line_Scredit_Rec_Type;
113: l_x_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
114: l_x_Lot_Serial_rec OE_Order_PUB.Lot_Serial_Rec_Type;
115: l_x_Lot_Serial_tbl OE_Order_PUB.Lot_Serial_Tbl_Type;
108: l_x_line_rec OE_Order_PUB.Line_Rec_Type;
109: l_x_line_tbl OE_Order_PUB.Line_Tbl_Type;
110: l_x_Line_Adj_rec OE_Order_PUB.Line_Adj_Rec_Type;
111: l_x_Line_Adj_tbl OE_Order_PUB.Line_Adj_Tbl_Type;
112: l_x_Line_Scredit_rec OE_Order_PUB.Line_Scredit_Rec_Type;
113: l_x_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
114: l_x_Lot_Serial_rec OE_Order_PUB.Lot_Serial_Rec_Type;
115: l_x_Lot_Serial_tbl OE_Order_PUB.Lot_Serial_Tbl_Type;
116: l_x_action_request_tbl OE_Order_PUB.request_tbl_type;
109: l_x_line_tbl OE_Order_PUB.Line_Tbl_Type;
110: l_x_Line_Adj_rec OE_Order_PUB.Line_Adj_Rec_Type;
111: l_x_Line_Adj_tbl OE_Order_PUB.Line_Adj_Tbl_Type;
112: l_x_Line_Scredit_rec OE_Order_PUB.Line_Scredit_Rec_Type;
113: l_x_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
114: l_x_Lot_Serial_rec OE_Order_PUB.Lot_Serial_Rec_Type;
115: l_x_Lot_Serial_tbl OE_Order_PUB.Lot_Serial_Tbl_Type;
116: l_x_action_request_tbl OE_Order_PUB.request_tbl_type;
117: l_x_Header_price_Att_tbl OE_Order_PUB.Header_Price_Att_Tbl_Type;
110: l_x_Line_Adj_rec OE_Order_PUB.Line_Adj_Rec_Type;
111: l_x_Line_Adj_tbl OE_Order_PUB.Line_Adj_Tbl_Type;
112: l_x_Line_Scredit_rec OE_Order_PUB.Line_Scredit_Rec_Type;
113: l_x_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
114: l_x_Lot_Serial_rec OE_Order_PUB.Lot_Serial_Rec_Type;
115: l_x_Lot_Serial_tbl OE_Order_PUB.Lot_Serial_Tbl_Type;
116: l_x_action_request_tbl OE_Order_PUB.request_tbl_type;
117: l_x_Header_price_Att_tbl OE_Order_PUB.Header_Price_Att_Tbl_Type;
118: l_x_Header_Adj_Att_tbl OE_Order_PUB.Header_Adj_Att_Tbl_Type;
111: l_x_Line_Adj_tbl OE_Order_PUB.Line_Adj_Tbl_Type;
112: l_x_Line_Scredit_rec OE_Order_PUB.Line_Scredit_Rec_Type;
113: l_x_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
114: l_x_Lot_Serial_rec OE_Order_PUB.Lot_Serial_Rec_Type;
115: l_x_Lot_Serial_tbl OE_Order_PUB.Lot_Serial_Tbl_Type;
116: l_x_action_request_tbl OE_Order_PUB.request_tbl_type;
117: l_x_Header_price_Att_tbl OE_Order_PUB.Header_Price_Att_Tbl_Type;
118: l_x_Header_Adj_Att_tbl OE_Order_PUB.Header_Adj_Att_Tbl_Type;
119: l_x_Header_Adj_Assoc_tbl OE_Order_PUB.Header_Adj_Assoc_Tbl_Type;
112: l_x_Line_Scredit_rec OE_Order_PUB.Line_Scredit_Rec_Type;
113: l_x_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
114: l_x_Lot_Serial_rec OE_Order_PUB.Lot_Serial_Rec_Type;
115: l_x_Lot_Serial_tbl OE_Order_PUB.Lot_Serial_Tbl_Type;
116: l_x_action_request_tbl OE_Order_PUB.request_tbl_type;
117: l_x_Header_price_Att_tbl OE_Order_PUB.Header_Price_Att_Tbl_Type;
118: l_x_Header_Adj_Att_tbl OE_Order_PUB.Header_Adj_Att_Tbl_Type;
119: l_x_Header_Adj_Assoc_tbl OE_Order_PUB.Header_Adj_Assoc_Tbl_Type;
120: l_x_Line_price_Att_tbl OE_Order_PUB.Line_Price_Att_Tbl_Type;
113: l_x_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
114: l_x_Lot_Serial_rec OE_Order_PUB.Lot_Serial_Rec_Type;
115: l_x_Lot_Serial_tbl OE_Order_PUB.Lot_Serial_Tbl_Type;
116: l_x_action_request_tbl OE_Order_PUB.request_tbl_type;
117: l_x_Header_price_Att_tbl OE_Order_PUB.Header_Price_Att_Tbl_Type;
118: l_x_Header_Adj_Att_tbl OE_Order_PUB.Header_Adj_Att_Tbl_Type;
119: l_x_Header_Adj_Assoc_tbl OE_Order_PUB.Header_Adj_Assoc_Tbl_Type;
120: l_x_Line_price_Att_tbl OE_Order_PUB.Line_Price_Att_Tbl_Type;
121: l_x_Line_Adj_Att_tbl OE_Order_PUB.Line_Adj_Att_Tbl_Type;
114: l_x_Lot_Serial_rec OE_Order_PUB.Lot_Serial_Rec_Type;
115: l_x_Lot_Serial_tbl OE_Order_PUB.Lot_Serial_Tbl_Type;
116: l_x_action_request_tbl OE_Order_PUB.request_tbl_type;
117: l_x_Header_price_Att_tbl OE_Order_PUB.Header_Price_Att_Tbl_Type;
118: l_x_Header_Adj_Att_tbl OE_Order_PUB.Header_Adj_Att_Tbl_Type;
119: l_x_Header_Adj_Assoc_tbl OE_Order_PUB.Header_Adj_Assoc_Tbl_Type;
120: l_x_Line_price_Att_tbl OE_Order_PUB.Line_Price_Att_Tbl_Type;
121: l_x_Line_Adj_Att_tbl OE_Order_PUB.Line_Adj_Att_Tbl_Type;
122: l_x_Line_Adj_Assoc_tbl OE_Order_PUB.Line_Adj_Assoc_Tbl_Type;
115: l_x_Lot_Serial_tbl OE_Order_PUB.Lot_Serial_Tbl_Type;
116: l_x_action_request_tbl OE_Order_PUB.request_tbl_type;
117: l_x_Header_price_Att_tbl OE_Order_PUB.Header_Price_Att_Tbl_Type;
118: l_x_Header_Adj_Att_tbl OE_Order_PUB.Header_Adj_Att_Tbl_Type;
119: l_x_Header_Adj_Assoc_tbl OE_Order_PUB.Header_Adj_Assoc_Tbl_Type;
120: l_x_Line_price_Att_tbl OE_Order_PUB.Line_Price_Att_Tbl_Type;
121: l_x_Line_Adj_Att_tbl OE_Order_PUB.Line_Adj_Att_Tbl_Type;
122: l_x_Line_Adj_Assoc_tbl OE_Order_PUB.Line_Adj_Assoc_Tbl_Type;
123:
116: l_x_action_request_tbl OE_Order_PUB.request_tbl_type;
117: l_x_Header_price_Att_tbl OE_Order_PUB.Header_Price_Att_Tbl_Type;
118: l_x_Header_Adj_Att_tbl OE_Order_PUB.Header_Adj_Att_Tbl_Type;
119: l_x_Header_Adj_Assoc_tbl OE_Order_PUB.Header_Adj_Assoc_Tbl_Type;
120: l_x_Line_price_Att_tbl OE_Order_PUB.Line_Price_Att_Tbl_Type;
121: l_x_Line_Adj_Att_tbl OE_Order_PUB.Line_Adj_Att_Tbl_Type;
122: l_x_Line_Adj_Assoc_tbl OE_Order_PUB.Line_Adj_Assoc_Tbl_Type;
123:
124:
117: l_x_Header_price_Att_tbl OE_Order_PUB.Header_Price_Att_Tbl_Type;
118: l_x_Header_Adj_Att_tbl OE_Order_PUB.Header_Adj_Att_Tbl_Type;
119: l_x_Header_Adj_Assoc_tbl OE_Order_PUB.Header_Adj_Assoc_Tbl_Type;
120: l_x_Line_price_Att_tbl OE_Order_PUB.Line_Price_Att_Tbl_Type;
121: l_x_Line_Adj_Att_tbl OE_Order_PUB.Line_Adj_Att_Tbl_Type;
122: l_x_Line_Adj_Assoc_tbl OE_Order_PUB.Line_Adj_Assoc_Tbl_Type;
123:
124:
125: Cursor C_OLD_R_SALES_CREDIT_ID(P_Line_ID Number) IS
118: l_x_Header_Adj_Att_tbl OE_Order_PUB.Header_Adj_Att_Tbl_Type;
119: l_x_Header_Adj_Assoc_tbl OE_Order_PUB.Header_Adj_Assoc_Tbl_Type;
120: l_x_Line_price_Att_tbl OE_Order_PUB.Line_Price_Att_Tbl_Type;
121: l_x_Line_Adj_Att_tbl OE_Order_PUB.Line_Adj_Att_Tbl_Type;
122: l_x_Line_Adj_Assoc_tbl OE_Order_PUB.Line_Adj_Assoc_Tbl_Type;
123:
124:
125: Cursor C_OLD_R_SALES_CREDIT_ID(P_Line_ID Number) IS
126: SELECT Sales_Credit_ID
141: FROM OE_SALES_CREDITS
142: WHERE Line_ID = P_Line_ID;
143: I Number;
144: --serla begin
145: l_x_Header_Payment_tbl OE_Order_PUB.Header_Payment_Tbl_Type;
146: l_x_Line_Payment_tbl OE_Order_PUB.Line_Payment_Tbl_Type;
147: --serla end
148: --
149: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
142: WHERE Line_ID = P_Line_ID;
143: I Number;
144: --serla begin
145: l_x_Header_Payment_tbl OE_Order_PUB.Header_Payment_Tbl_Type;
146: l_x_Line_Payment_tbl OE_Order_PUB.Line_Payment_Tbl_Type;
147: --serla end
148: --
149: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
150: --
303:
304:
305: -- Populate Line_Scredit table for Inserts
306: For I in 1 .. g_Line_Multi_Scredit_Count Loop
307: l_Line_Scredit_rec := OE_Order_PUB.G_MISS_Line_SCREDIT_REC;
308: l_Line_Scredit_rec.operation := OE_GLOBALS.G_OPR_CREATE;
309: l_Line_Scredit_rec.Line_id := p_Line_id;
310: l_Line_Scredit_rec.SalesRep_Id
311: := g_Line_Multi_Scredit_Tbl(I).SalesRep_Id;
333: -- changes end for bug 3742335
334: l_Line_Scredit_rec.Sales_Group_Id := g_Line_Multi_Scredit_Tbl(I).Sales_Group_Id; --5692017
335: l_Line_Scredit_rec.Sales_Group_updated_flag := g_Line_Multi_Scredit_Tbl(I).Sales_Group_updated_flag; --5692017
336: l_x_Line_Scredit_tbl(I) := l_Line_Scredit_rec;
337: l_old_Line_Scredit_tbl(I) := OE_Order_PUB.G_MISS_Line_SCREDIT_REC;
338: END loop;
339:
340: -- Call OE_Order_PVT.Process_order
341: OE_DELAYED_REQUESTS_PVT.Clear_Request(x_return_status => l_return_status);