82: /* Initialize API return status to sucess */
83:
84: x_return_status := FND_API.G_RET_STS_SUCCESS;
85:
86: WSH_Util_Core.PrintLn('Move_Order_Header PVT => '||p_mo_hdr_rec.operation);
87:
88:
89: IF check_required( p_mo_hdr_rec => l_mo_hdr_rec) THEN
90: FND_MESSAGE.SET_NAME('GMI','Required Values Missing');
91: RAISE FND_API.G_EXC_ERROR;
92: END IF;
93:
94:
95: WSH_Util_Core.PrintLn('Move_Order_Header PVT => '||p_mo_hdr_rec.operation);
96:
97: IF l_mo_hdr_rec.operation = INV_GLOBALS.G_OPR_DELETE THEN
98: /* physically delete this row */
99: /* */
96:
97: IF l_mo_hdr_rec.operation = INV_GLOBALS.G_OPR_DELETE THEN
98: /* physically delete this row */
99: /* */
100: WSH_Util_Core.PrintLn('Calling Delete Row');
101: GMI_Move_Order_Header_Util.delete_Row( l_mo_hdr_rec.header_id);
102:
103: ELSE
104:
101: GMI_Move_Order_Header_Util.delete_Row( l_mo_hdr_rec.header_id);
102:
103: ELSE
104:
105: WSH_Util_Core.PrintLn('Calling Insert / Update Row');
106:
107: /* Set Generic defaults */
108: l_mo_hdr_rec.last_update_date := SYSDATE;
109: l_mo_hdr_rec.last_updated_by := FND_GLOBAL.USER_ID;
109: l_mo_hdr_rec.last_updated_by := FND_GLOBAL.USER_ID;
110: l_mo_hdr_rec.last_update_login := FND_GLOBAL.USER_ID;
111:
112: IF l_mo_hdr_rec.operation = INV_GLOBALS.G_OPR_UPDATE THEN
113: WSH_Util_Core.PrintLn('Calling Update Row');
114: gmi_reservation_util.PrintLn('Calling Update Row in move_order hdr pvt');
115: GMI_Move_Order_Header_Util.update_Row( l_mo_hdr_rec);
116:
117: ELSE /* IF l_mo_hdr_rec.operation = INV_GLOBALS.G_OPR_CREATE THEN */
130: INTO l_mo_hdr_rec.header_id
131: FROM DUAL;
132:
133:
134: WSH_Util_Core.PrintLn('Seq Header id => '||l_mo_hdr_rec.header_id);
135: WSH_Util_Core.PrintLn('Calling Insert Row');
136: WSH_Util_Core.PrintLn('Batch Number => ' || l_mo_hdr_rec.request_number);
137: gmi_reservation_util.println('Going to insert row in move_order_hdr_pvt');
138: gmi_reservation_util.println('value of l_mo_hdr_rec.organization_id: '||l_mo_hdr_rec.organization_id);
131: FROM DUAL;
132:
133:
134: WSH_Util_Core.PrintLn('Seq Header id => '||l_mo_hdr_rec.header_id);
135: WSH_Util_Core.PrintLn('Calling Insert Row');
136: WSH_Util_Core.PrintLn('Batch Number => ' || l_mo_hdr_rec.request_number);
137: gmi_reservation_util.println('Going to insert row in move_order_hdr_pvt');
138: gmi_reservation_util.println('value of l_mo_hdr_rec.organization_id: '||l_mo_hdr_rec.organization_id);
139: gmi_reservation_util.println('Value of l_mo_hdr_rec.operation is '||l_mo_hdr_rec.request_number);
132:
133:
134: WSH_Util_Core.PrintLn('Seq Header id => '||l_mo_hdr_rec.header_id);
135: WSH_Util_Core.PrintLn('Calling Insert Row');
136: WSH_Util_Core.PrintLn('Batch Number => ' || l_mo_hdr_rec.request_number);
137: gmi_reservation_util.println('Going to insert row in move_order_hdr_pvt');
138: gmi_reservation_util.println('value of l_mo_hdr_rec.organization_id: '||l_mo_hdr_rec.organization_id);
139: gmi_reservation_util.println('Value of l_mo_hdr_rec.operation is '||l_mo_hdr_rec.request_number);
140: GMI_Move_Order_Header_Util.Insert_Row( l_mo_hdr_rec);
141:
142: END IF;
143: END IF;
144:
145: WSH_Util_Core.PrintLn('Ham Out Of Here No Action');
146: gmi_reservation_util.PrintLn('Ham Out Of Here No Action');
147:
148: x_mo_hdr_rec := l_mo_hdr_rec;
149: WSH_Util_Core.PrintLn('Seq Header id => '||x_mo_hdr_rec.header_id);
145: WSH_Util_Core.PrintLn('Ham Out Of Here No Action');
146: gmi_reservation_util.PrintLn('Ham Out Of Here No Action');
147:
148: x_mo_hdr_rec := l_mo_hdr_rec;
149: WSH_Util_Core.PrintLn('Seq Header id => '||x_mo_hdr_rec.header_id);
150:
151: /* FND_MESSAGE.Set_Name('GMI','Entering_GMI_Create_Move_Order_Header'); */
152: /* FND_MSG_PUB.Add; */
153: /* RAISE FND_API.G_EXC_ERROR; */