127: ******************/
128: l_reason_cnt NUMBER;
129: l_text_cnt NUMBER;
130: l_header_cnt NUMBER;
131: l_cost_adjust_id cm_adjs_dtl.cost_adjust_id%TYPE;
132: l_adjust_cost cm_adjs_dtl.adjust_cost%TYPE;
133: l_adjust_status cm_adjs_dtl.adjust_status%TYPE;
134: l_start_date DATE;
135: l_end_date DATE;
128: l_reason_cnt NUMBER;
129: l_text_cnt NUMBER;
130: l_header_cnt NUMBER;
131: l_cost_adjust_id cm_adjs_dtl.cost_adjust_id%TYPE;
132: l_adjust_cost cm_adjs_dtl.adjust_cost%TYPE;
133: l_adjust_status cm_adjs_dtl.adjust_status%TYPE;
134: l_start_date DATE;
135: l_end_date DATE;
136: l_gl_posted_ind NUMBER;
129: l_text_cnt NUMBER;
130: l_header_cnt NUMBER;
131: l_cost_adjust_id cm_adjs_dtl.cost_adjust_id%TYPE;
132: l_adjust_cost cm_adjs_dtl.adjust_cost%TYPE;
133: l_adjust_status cm_adjs_dtl.adjust_status%TYPE;
134: l_start_date DATE;
135: l_end_date DATE;
136: l_gl_posted_ind NUMBER;
137: BEGIN
162: p_adjustment_rec.period_id,
163: p_adjustment_rec.cost_Type_id,
164: p_adjustment_rec.organization_id,
165: p_adjustment_rec.inventory_item_id
166: FROM cm_adjs_dtl
167: WHERE
168: cost_adjust_id = p_adjustment_rec.cost_adjust_id
169: AND ROWNUM = 1;
170: EXCEPTION
650: END IF;
651: BEGIN
652: SELECT cost_adjust_id, adjust_status
653: INTO p_adjustment_rec.cost_adjust_id, l_adjust_status
654: FROM cm_adjs_dtl
655: WHERE organization_id = p_adjustment_rec.organization_id
656: AND cost_type_id = p_adjustment_rec.cost_type_id
657: AND inventory_item_id = p_adjustment_rec.inventory_item_id
658: AND period_id = p_adjustment_rec.period_id
692: * Gl posted indicator validation *
693: *********************************/
694: /* Don't allow to update/delete GL posted adjustments */
695: SELECT nvl(gl_posted_ind,0) INTO l_gl_posted_ind
696: FROM cm_adjs_dtl
697: WHERE cost_adjust_id = p_adjustment_rec.cost_adjust_id
698: AND rownum = 1;
699:
700: IF l_gl_posted_ind = 1 THEN
941: * Local Variables *
942: ******************/
943: l_api_name CONSTANT VARCHAR2(30) := 'UPDATE_ACTUAL_COST_ADJUSTMENT';
944: l_api_version CONSTANT NUMBER := 1.0 ;
945: l_cost_adjust_id CM_ADJS_DTL.COST_ADJUST_ID%TYPE;
946: l_header_exists BOOLEAN;
947: l_detail_exists BOOLEAN;
948: user_cnt NUMBER;
949: l_user_id FND_USER.USER_ID%TYPE ;
1134: * Local Variables *
1135: ******************/
1136: l_api_name CONSTANT VARCHAR2(30) := 'DELETE_ACTUAL_COST_ADJUSTMENT';
1137: l_api_version CONSTANT NUMBER := 1.0 ;
1138: l_cost_adjust_id CM_ADJS_DTL.COST_ADJUST_ID%TYPE;
1139: l_header_exists BOOLEAN;
1140: l_detail_exists BOOLEAN;
1141: user_cnt NUMBER;
1142: l_user_id FND_USER.USER_ID%TYPE ;
1324: * Local Variables *
1325: ******************/
1326: l_api_name CONSTANT VARCHAR2(30) := 'GET_ACTUAL_COST_ADJUSTMENT';
1327: l_api_version CONSTANT NUMBER := 1.0 ;
1328: l_cost_adjust_id CM_ADJS_DTL.COST_ADJUST_ID%TYPE;
1329: l_header_exists BOOLEAN;
1330: l_detail_exists BOOLEAN;
1331: user_cnt NUMBER;
1332: l_user_id FND_USER.USER_ID%TYPE ;