958: -- -----------------------------------------------------------------------------
959: -- Get the current time from the Warehouse
960: -- ----------------------------------------------------------------------------
961:
962: l_cursor := DBMS_SQL.open_cursor;
963: /* see if the end period for the previous push exists */
964:
965:
966:
968:
969: l_stmt := 'select sysdate
970: from dual@'
971: || g_target_link;
972: DBMS_SQL.parse (l_cursor, l_stmt, DBMS_SQL.native);
973: DBMS_SQL.define_column (l_cursor, 1, g_wh_curr_push_start_date);
974: l_dummy := DBMS_SQL.EXECUTE (l_cursor);
975:
976: IF DBMS_SQL.fetch_rows (l_cursor) <> 0
969: l_stmt := 'select sysdate
970: from dual@'
971: || g_target_link;
972: DBMS_SQL.parse (l_cursor, l_stmt, DBMS_SQL.native);
973: DBMS_SQL.define_column (l_cursor, 1, g_wh_curr_push_start_date);
974: l_dummy := DBMS_SQL.EXECUTE (l_cursor);
975:
976: IF DBMS_SQL.fetch_rows (l_cursor) <> 0
977: THEN
970: from dual@'
971: || g_target_link;
972: DBMS_SQL.parse (l_cursor, l_stmt, DBMS_SQL.native);
973: DBMS_SQL.define_column (l_cursor, 1, g_wh_curr_push_start_date);
974: l_dummy := DBMS_SQL.EXECUTE (l_cursor);
975:
976: IF DBMS_SQL.fetch_rows (l_cursor) <> 0
977: THEN
978: DBMS_SQL.column_value (l_cursor, 1, g_wh_curr_push_start_date);
972: DBMS_SQL.parse (l_cursor, l_stmt, DBMS_SQL.native);
973: DBMS_SQL.define_column (l_cursor, 1, g_wh_curr_push_start_date);
974: l_dummy := DBMS_SQL.EXECUTE (l_cursor);
975:
976: IF DBMS_SQL.fetch_rows (l_cursor) <> 0
977: THEN
978: DBMS_SQL.column_value (l_cursor, 1, g_wh_curr_push_start_date);
979: END IF;
980:
974: l_dummy := DBMS_SQL.EXECUTE (l_cursor);
975:
976: IF DBMS_SQL.fetch_rows (l_cursor) <> 0
977: THEN
978: DBMS_SQL.column_value (l_cursor, 1, g_wh_curr_push_start_date);
979: END IF;
980:
981: DBMS_SQL.close_cursor (l_cursor);
982:
977: THEN
978: DBMS_SQL.column_value (l_cursor, 1, g_wh_curr_push_start_date);
979: END IF;
980:
981: DBMS_SQL.close_cursor (l_cursor);
982:
983:
984: -- ----------------------------------------------------------------------------
985: -- get the start date of the last push
1104: OPEN cv FOR l_stmt USING g_object_name;
1105: FETCH cv INTO l_elementid;
1106: CLOSE cv;
1107: l_conc_id := fnd_global.conc_request_id;
1108: cid := DBMS_SQL.open_cursor;
1109: /* Insert into the Detail */
1110: l_stmt :=
1111: 'INSERT INTO EDW_Push_Detail_Log@'
1112: || g_target_link
1132: :x_lastupdby, :x_lastupdlogin, :x_period_start, :x_period_end,
1133: :x_objname, :x_objid, :x_objtype, :x_concid)';
1134: put_debug_msg ('Running: ');
1135: put_debug_msg (l_stmt);
1136: DBMS_SQL.parse (cid, l_stmt, DBMS_SQL.native);
1137: DBMS_SQL.bind_variable (cid, ':x_instance', g_instance_code);
1138: DBMS_SQL.bind_variable (cid, ':x_status', p_status);
1139: DBMS_SQL.bind_variable (cid, ':x_start', g_local_curr_push_start_date);
1140: DBMS_SQL.bind_variable (cid, ':x_end', g_local_curr_push_end_date);
1133: :x_objname, :x_objid, :x_objtype, :x_concid)';
1134: put_debug_msg ('Running: ');
1135: put_debug_msg (l_stmt);
1136: DBMS_SQL.parse (cid, l_stmt, DBMS_SQL.native);
1137: DBMS_SQL.bind_variable (cid, ':x_instance', g_instance_code);
1138: DBMS_SQL.bind_variable (cid, ':x_status', p_status);
1139: DBMS_SQL.bind_variable (cid, ':x_start', g_local_curr_push_start_date);
1140: DBMS_SQL.bind_variable (cid, ':x_end', g_local_curr_push_end_date);
1141: DBMS_SQL.bind_variable (cid, ':x_whstart', g_wh_curr_push_start_date);
1134: put_debug_msg ('Running: ');
1135: put_debug_msg (l_stmt);
1136: DBMS_SQL.parse (cid, l_stmt, DBMS_SQL.native);
1137: DBMS_SQL.bind_variable (cid, ':x_instance', g_instance_code);
1138: DBMS_SQL.bind_variable (cid, ':x_status', p_status);
1139: DBMS_SQL.bind_variable (cid, ':x_start', g_local_curr_push_start_date);
1140: DBMS_SQL.bind_variable (cid, ':x_end', g_local_curr_push_end_date);
1141: DBMS_SQL.bind_variable (cid, ':x_whstart', g_wh_curr_push_start_date);
1142: DBMS_SQL.bind_variable (cid, ':x_whend', g_wh_curr_push_end_date);
1135: put_debug_msg (l_stmt);
1136: DBMS_SQL.parse (cid, l_stmt, DBMS_SQL.native);
1137: DBMS_SQL.bind_variable (cid, ':x_instance', g_instance_code);
1138: DBMS_SQL.bind_variable (cid, ':x_status', p_status);
1139: DBMS_SQL.bind_variable (cid, ':x_start', g_local_curr_push_start_date);
1140: DBMS_SQL.bind_variable (cid, ':x_end', g_local_curr_push_end_date);
1141: DBMS_SQL.bind_variable (cid, ':x_whstart', g_wh_curr_push_start_date);
1142: DBMS_SQL.bind_variable (cid, ':x_whend', g_wh_curr_push_end_date);
1143: DBMS_SQL.bind_variable (cid, ':x_no_pushed', p_no_of_records);
1136: DBMS_SQL.parse (cid, l_stmt, DBMS_SQL.native);
1137: DBMS_SQL.bind_variable (cid, ':x_instance', g_instance_code);
1138: DBMS_SQL.bind_variable (cid, ':x_status', p_status);
1139: DBMS_SQL.bind_variable (cid, ':x_start', g_local_curr_push_start_date);
1140: DBMS_SQL.bind_variable (cid, ':x_end', g_local_curr_push_end_date);
1141: DBMS_SQL.bind_variable (cid, ':x_whstart', g_wh_curr_push_start_date);
1142: DBMS_SQL.bind_variable (cid, ':x_whend', g_wh_curr_push_end_date);
1143: DBMS_SQL.bind_variable (cid, ':x_no_pushed', p_no_of_records);
1144: DBMS_SQL.bind_variable (cid, ':x_message', p_exception_message);
1137: DBMS_SQL.bind_variable (cid, ':x_instance', g_instance_code);
1138: DBMS_SQL.bind_variable (cid, ':x_status', p_status);
1139: DBMS_SQL.bind_variable (cid, ':x_start', g_local_curr_push_start_date);
1140: DBMS_SQL.bind_variable (cid, ':x_end', g_local_curr_push_end_date);
1141: DBMS_SQL.bind_variable (cid, ':x_whstart', g_wh_curr_push_start_date);
1142: DBMS_SQL.bind_variable (cid, ':x_whend', g_wh_curr_push_end_date);
1143: DBMS_SQL.bind_variable (cid, ':x_no_pushed', p_no_of_records);
1144: DBMS_SQL.bind_variable (cid, ':x_message', p_exception_message);
1145: DBMS_SQL.bind_variable (cid, ':x_createdby', g_user_id);
1138: DBMS_SQL.bind_variable (cid, ':x_status', p_status);
1139: DBMS_SQL.bind_variable (cid, ':x_start', g_local_curr_push_start_date);
1140: DBMS_SQL.bind_variable (cid, ':x_end', g_local_curr_push_end_date);
1141: DBMS_SQL.bind_variable (cid, ':x_whstart', g_wh_curr_push_start_date);
1142: DBMS_SQL.bind_variable (cid, ':x_whend', g_wh_curr_push_end_date);
1143: DBMS_SQL.bind_variable (cid, ':x_no_pushed', p_no_of_records);
1144: DBMS_SQL.bind_variable (cid, ':x_message', p_exception_message);
1145: DBMS_SQL.bind_variable (cid, ':x_createdby', g_user_id);
1146: DBMS_SQL.bind_variable (
1139: DBMS_SQL.bind_variable (cid, ':x_start', g_local_curr_push_start_date);
1140: DBMS_SQL.bind_variable (cid, ':x_end', g_local_curr_push_end_date);
1141: DBMS_SQL.bind_variable (cid, ':x_whstart', g_wh_curr_push_start_date);
1142: DBMS_SQL.bind_variable (cid, ':x_whend', g_wh_curr_push_end_date);
1143: DBMS_SQL.bind_variable (cid, ':x_no_pushed', p_no_of_records);
1144: DBMS_SQL.bind_variable (cid, ':x_message', p_exception_message);
1145: DBMS_SQL.bind_variable (cid, ':x_createdby', g_user_id);
1146: DBMS_SQL.bind_variable (
1147: cid,
1140: DBMS_SQL.bind_variable (cid, ':x_end', g_local_curr_push_end_date);
1141: DBMS_SQL.bind_variable (cid, ':x_whstart', g_wh_curr_push_start_date);
1142: DBMS_SQL.bind_variable (cid, ':x_whend', g_wh_curr_push_end_date);
1143: DBMS_SQL.bind_variable (cid, ':x_no_pushed', p_no_of_records);
1144: DBMS_SQL.bind_variable (cid, ':x_message', p_exception_message);
1145: DBMS_SQL.bind_variable (cid, ':x_createdby', g_user_id);
1146: DBMS_SQL.bind_variable (
1147: cid,
1148: ':x_creationdate',
1141: DBMS_SQL.bind_variable (cid, ':x_whstart', g_wh_curr_push_start_date);
1142: DBMS_SQL.bind_variable (cid, ':x_whend', g_wh_curr_push_end_date);
1143: DBMS_SQL.bind_variable (cid, ':x_no_pushed', p_no_of_records);
1144: DBMS_SQL.bind_variable (cid, ':x_message', p_exception_message);
1145: DBMS_SQL.bind_variable (cid, ':x_createdby', g_user_id);
1146: DBMS_SQL.bind_variable (
1147: cid,
1148: ':x_creationdate',
1149: g_wh_curr_push_start_date
1142: DBMS_SQL.bind_variable (cid, ':x_whend', g_wh_curr_push_end_date);
1143: DBMS_SQL.bind_variable (cid, ':x_no_pushed', p_no_of_records);
1144: DBMS_SQL.bind_variable (cid, ':x_message', p_exception_message);
1145: DBMS_SQL.bind_variable (cid, ':x_createdby', g_user_id);
1146: DBMS_SQL.bind_variable (
1147: cid,
1148: ':x_creationdate',
1149: g_wh_curr_push_start_date
1150: );
1147: cid,
1148: ':x_creationdate',
1149: g_wh_curr_push_start_date
1150: );
1151: DBMS_SQL.bind_variable (
1152: cid,
1153: ':x_lastupddate',
1154: g_wh_curr_push_start_date
1155: );
1152: cid,
1153: ':x_lastupddate',
1154: g_wh_curr_push_start_date
1155: );
1156: DBMS_SQL.bind_variable (cid, ':x_lastupdby', g_user_id);
1157: DBMS_SQL.bind_variable (cid, ':x_lastupdlogin', g_login_id);
1158: DBMS_SQL.bind_variable (cid, ':x_period_start', p_period_start);
1159: DBMS_SQL.bind_variable (cid, ':x_period_end', p_period_end);
1160: DBMS_SQL.bind_variable (cid, ':x_objname', g_object_name);
1153: ':x_lastupddate',
1154: g_wh_curr_push_start_date
1155: );
1156: DBMS_SQL.bind_variable (cid, ':x_lastupdby', g_user_id);
1157: DBMS_SQL.bind_variable (cid, ':x_lastupdlogin', g_login_id);
1158: DBMS_SQL.bind_variable (cid, ':x_period_start', p_period_start);
1159: DBMS_SQL.bind_variable (cid, ':x_period_end', p_period_end);
1160: DBMS_SQL.bind_variable (cid, ':x_objname', g_object_name);
1161: DBMS_SQL.bind_variable (cid, ':x_objid', l_elementid);
1154: g_wh_curr_push_start_date
1155: );
1156: DBMS_SQL.bind_variable (cid, ':x_lastupdby', g_user_id);
1157: DBMS_SQL.bind_variable (cid, ':x_lastupdlogin', g_login_id);
1158: DBMS_SQL.bind_variable (cid, ':x_period_start', p_period_start);
1159: DBMS_SQL.bind_variable (cid, ':x_period_end', p_period_end);
1160: DBMS_SQL.bind_variable (cid, ':x_objname', g_object_name);
1161: DBMS_SQL.bind_variable (cid, ':x_objid', l_elementid);
1162: DBMS_SQL.bind_variable (cid, ':x_objtype', g_object_type);
1155: );
1156: DBMS_SQL.bind_variable (cid, ':x_lastupdby', g_user_id);
1157: DBMS_SQL.bind_variable (cid, ':x_lastupdlogin', g_login_id);
1158: DBMS_SQL.bind_variable (cid, ':x_period_start', p_period_start);
1159: DBMS_SQL.bind_variable (cid, ':x_period_end', p_period_end);
1160: DBMS_SQL.bind_variable (cid, ':x_objname', g_object_name);
1161: DBMS_SQL.bind_variable (cid, ':x_objid', l_elementid);
1162: DBMS_SQL.bind_variable (cid, ':x_objtype', g_object_type);
1163: DBMS_SQL.bind_variable (cid, ':x_concid', l_conc_id);
1156: DBMS_SQL.bind_variable (cid, ':x_lastupdby', g_user_id);
1157: DBMS_SQL.bind_variable (cid, ':x_lastupdlogin', g_login_id);
1158: DBMS_SQL.bind_variable (cid, ':x_period_start', p_period_start);
1159: DBMS_SQL.bind_variable (cid, ':x_period_end', p_period_end);
1160: DBMS_SQL.bind_variable (cid, ':x_objname', g_object_name);
1161: DBMS_SQL.bind_variable (cid, ':x_objid', l_elementid);
1162: DBMS_SQL.bind_variable (cid, ':x_objtype', g_object_type);
1163: DBMS_SQL.bind_variable (cid, ':x_concid', l_conc_id);
1164: l_dummy := DBMS_SQL.EXECUTE (cid);
1157: DBMS_SQL.bind_variable (cid, ':x_lastupdlogin', g_login_id);
1158: DBMS_SQL.bind_variable (cid, ':x_period_start', p_period_start);
1159: DBMS_SQL.bind_variable (cid, ':x_period_end', p_period_end);
1160: DBMS_SQL.bind_variable (cid, ':x_objname', g_object_name);
1161: DBMS_SQL.bind_variable (cid, ':x_objid', l_elementid);
1162: DBMS_SQL.bind_variable (cid, ':x_objtype', g_object_type);
1163: DBMS_SQL.bind_variable (cid, ':x_concid', l_conc_id);
1164: l_dummy := DBMS_SQL.EXECUTE (cid);
1165: DBMS_SQL.close_cursor (cid);
1158: DBMS_SQL.bind_variable (cid, ':x_period_start', p_period_start);
1159: DBMS_SQL.bind_variable (cid, ':x_period_end', p_period_end);
1160: DBMS_SQL.bind_variable (cid, ':x_objname', g_object_name);
1161: DBMS_SQL.bind_variable (cid, ':x_objid', l_elementid);
1162: DBMS_SQL.bind_variable (cid, ':x_objtype', g_object_type);
1163: DBMS_SQL.bind_variable (cid, ':x_concid', l_conc_id);
1164: l_dummy := DBMS_SQL.EXECUTE (cid);
1165: DBMS_SQL.close_cursor (cid);
1166:
1159: DBMS_SQL.bind_variable (cid, ':x_period_end', p_period_end);
1160: DBMS_SQL.bind_variable (cid, ':x_objname', g_object_name);
1161: DBMS_SQL.bind_variable (cid, ':x_objid', l_elementid);
1162: DBMS_SQL.bind_variable (cid, ':x_objtype', g_object_type);
1163: DBMS_SQL.bind_variable (cid, ':x_concid', l_conc_id);
1164: l_dummy := DBMS_SQL.EXECUTE (cid);
1165: DBMS_SQL.close_cursor (cid);
1166:
1167: put_debug_msg ('********** End Procedure : Staging_Log');
1160: DBMS_SQL.bind_variable (cid, ':x_objname', g_object_name);
1161: DBMS_SQL.bind_variable (cid, ':x_objid', l_elementid);
1162: DBMS_SQL.bind_variable (cid, ':x_objtype', g_object_type);
1163: DBMS_SQL.bind_variable (cid, ':x_concid', l_conc_id);
1164: l_dummy := DBMS_SQL.EXECUTE (cid);
1165: DBMS_SQL.close_cursor (cid);
1166:
1167: put_debug_msg ('********** End Procedure : Staging_Log');
1168: EXCEPTION
1161: DBMS_SQL.bind_variable (cid, ':x_objid', l_elementid);
1162: DBMS_SQL.bind_variable (cid, ':x_objtype', g_object_type);
1163: DBMS_SQL.bind_variable (cid, ':x_concid', l_conc_id);
1164: l_dummy := DBMS_SQL.EXECUTE (cid);
1165: DBMS_SQL.close_cursor (cid);
1166:
1167: put_debug_msg ('********** End Procedure : Staging_Log');
1168: EXCEPTION
1169: WHEN OTHERS
1190: put_debug_msg (
1191: ' Get current time in wh clock in '
1192: || g_wh_curr_push_end_date
1193: );
1194: l_cursor := DBMS_SQL.open_cursor;
1195: /* see if the end period for the previous push exists */
1196:
1197:
1198: l_stmt := 'select sysdate
1197:
1198: l_stmt := 'select sysdate
1199: from dual@'
1200: || g_target_link;
1201: DBMS_SQL.parse (l_cursor, l_stmt, DBMS_SQL.native);
1202: DBMS_SQL.define_column (l_cursor, 1, g_wh_curr_push_end_date);
1203: l_dummy := DBMS_SQL.EXECUTE (l_cursor);
1204:
1205: IF DBMS_SQL.fetch_rows (l_cursor) <> 0
1198: l_stmt := 'select sysdate
1199: from dual@'
1200: || g_target_link;
1201: DBMS_SQL.parse (l_cursor, l_stmt, DBMS_SQL.native);
1202: DBMS_SQL.define_column (l_cursor, 1, g_wh_curr_push_end_date);
1203: l_dummy := DBMS_SQL.EXECUTE (l_cursor);
1204:
1205: IF DBMS_SQL.fetch_rows (l_cursor) <> 0
1206: THEN
1199: from dual@'
1200: || g_target_link;
1201: DBMS_SQL.parse (l_cursor, l_stmt, DBMS_SQL.native);
1202: DBMS_SQL.define_column (l_cursor, 1, g_wh_curr_push_end_date);
1203: l_dummy := DBMS_SQL.EXECUTE (l_cursor);
1204:
1205: IF DBMS_SQL.fetch_rows (l_cursor) <> 0
1206: THEN
1207: DBMS_SQL.column_value (l_cursor, 1, g_wh_curr_push_end_date);
1201: DBMS_SQL.parse (l_cursor, l_stmt, DBMS_SQL.native);
1202: DBMS_SQL.define_column (l_cursor, 1, g_wh_curr_push_end_date);
1203: l_dummy := DBMS_SQL.EXECUTE (l_cursor);
1204:
1205: IF DBMS_SQL.fetch_rows (l_cursor) <> 0
1206: THEN
1207: DBMS_SQL.column_value (l_cursor, 1, g_wh_curr_push_end_date);
1208: END IF;
1209:
1203: l_dummy := DBMS_SQL.EXECUTE (l_cursor);
1204:
1205: IF DBMS_SQL.fetch_rows (l_cursor) <> 0
1206: THEN
1207: DBMS_SQL.column_value (l_cursor, 1, g_wh_curr_push_end_date);
1208: END IF;
1209:
1210: DBMS_SQL.close_cursor (l_cursor);
1211: g_local_curr_push_end_date := SYSDATE;
1206: THEN
1207: DBMS_SQL.column_value (l_cursor, 1, g_wh_curr_push_end_date);
1208: END IF;
1209:
1210: DBMS_SQL.close_cursor (l_cursor);
1211: g_local_curr_push_end_date := SYSDATE;
1212: put_debug_msg (' G_wh_curr_push_end_date IS :');
1213: put_debug_msg (fnd_date.date_to_displaydt (g_wh_curr_push_end_date));
1214: put_debug_msg ('********** End Procedure : Set_Push_End_Dates');
1237: INTO l_nls_language
1238: FROM fnd_languages
1239: WHERE language_code = l_lang_code;
1240:
1241: cid := DBMS_SQL.open_cursor;
1242: DBMS_SQL.parse (
1243: cid,
1244: 'ALTER SESSION SET NLS_LANGUAGE = '
1245: || l_nls_language,
1238: FROM fnd_languages
1239: WHERE language_code = l_lang_code;
1240:
1241: cid := DBMS_SQL.open_cursor;
1242: DBMS_SQL.parse (
1243: cid,
1244: 'ALTER SESSION SET NLS_LANGUAGE = '
1245: || l_nls_language,
1246: DBMS_SQL.native
1242: DBMS_SQL.parse (
1243: cid,
1244: 'ALTER SESSION SET NLS_LANGUAGE = '
1245: || l_nls_language,
1246: DBMS_SQL.native
1247: );
1248: l_dummy_int := DBMS_SQL.EXECUTE (cid);
1249: put_debug_msg ( 'Set NLS language to '
1250: || l_nls_language);
1244: 'ALTER SESSION SET NLS_LANGUAGE = '
1245: || l_nls_language,
1246: DBMS_SQL.native
1247: );
1248: l_dummy_int := DBMS_SQL.EXECUTE (cid);
1249: put_debug_msg ( 'Set NLS language to '
1250: || l_nls_language);
1251: put_debug_msg ('********** End Procedure : set_wh_language');
1252: RETURN TRUE;
1521: || g_target_link
1522: || ' where relation_long_name = :longname';
1523: put_debug_msg ('Running: ');
1524: put_debug_msg (stmt);
1525: cid := DBMS_SQL.open_cursor;
1526: DBMS_SQL.parse (cid, stmt, DBMS_SQL.native);
1527: DBMS_SQL.bind_variable (cid, ':longname', p_object_logical_name);
1528: DBMS_SQL.define_column (cid, 1, l_obj_short_name, 100);
1529: l_dummy := DBMS_SQL.execute_and_fetch (cid);
1522: || ' where relation_long_name = :longname';
1523: put_debug_msg ('Running: ');
1524: put_debug_msg (stmt);
1525: cid := DBMS_SQL.open_cursor;
1526: DBMS_SQL.parse (cid, stmt, DBMS_SQL.native);
1527: DBMS_SQL.bind_variable (cid, ':longname', p_object_logical_name);
1528: DBMS_SQL.define_column (cid, 1, l_obj_short_name, 100);
1529: l_dummy := DBMS_SQL.execute_and_fetch (cid);
1530: DBMS_SQL.column_value (cid, 1, l_obj_short_name);
1523: put_debug_msg ('Running: ');
1524: put_debug_msg (stmt);
1525: cid := DBMS_SQL.open_cursor;
1526: DBMS_SQL.parse (cid, stmt, DBMS_SQL.native);
1527: DBMS_SQL.bind_variable (cid, ':longname', p_object_logical_name);
1528: DBMS_SQL.define_column (cid, 1, l_obj_short_name, 100);
1529: l_dummy := DBMS_SQL.execute_and_fetch (cid);
1530: DBMS_SQL.column_value (cid, 1, l_obj_short_name);
1531: DBMS_SQL.close_cursor (cid);
1524: put_debug_msg (stmt);
1525: cid := DBMS_SQL.open_cursor;
1526: DBMS_SQL.parse (cid, stmt, DBMS_SQL.native);
1527: DBMS_SQL.bind_variable (cid, ':longname', p_object_logical_name);
1528: DBMS_SQL.define_column (cid, 1, l_obj_short_name, 100);
1529: l_dummy := DBMS_SQL.execute_and_fetch (cid);
1530: DBMS_SQL.column_value (cid, 1, l_obj_short_name);
1531: DBMS_SQL.close_cursor (cid);
1532: l_date := get_last_push_date (l_obj_short_name);
1525: cid := DBMS_SQL.open_cursor;
1526: DBMS_SQL.parse (cid, stmt, DBMS_SQL.native);
1527: DBMS_SQL.bind_variable (cid, ':longname', p_object_logical_name);
1528: DBMS_SQL.define_column (cid, 1, l_obj_short_name, 100);
1529: l_dummy := DBMS_SQL.execute_and_fetch (cid);
1530: DBMS_SQL.column_value (cid, 1, l_obj_short_name);
1531: DBMS_SQL.close_cursor (cid);
1532: l_date := get_last_push_date (l_obj_short_name);
1533: ELSE
1526: DBMS_SQL.parse (cid, stmt, DBMS_SQL.native);
1527: DBMS_SQL.bind_variable (cid, ':longname', p_object_logical_name);
1528: DBMS_SQL.define_column (cid, 1, l_obj_short_name, 100);
1529: l_dummy := DBMS_SQL.execute_and_fetch (cid);
1530: DBMS_SQL.column_value (cid, 1, l_obj_short_name);
1531: DBMS_SQL.close_cursor (cid);
1532: l_date := get_last_push_date (l_obj_short_name);
1533: ELSE
1534: l_date := NULL;
1527: DBMS_SQL.bind_variable (cid, ':longname', p_object_logical_name);
1528: DBMS_SQL.define_column (cid, 1, l_obj_short_name, 100);
1529: l_dummy := DBMS_SQL.execute_and_fetch (cid);
1530: DBMS_SQL.column_value (cid, 1, l_obj_short_name);
1531: DBMS_SQL.close_cursor (cid);
1532: l_date := get_last_push_date (l_obj_short_name);
1533: ELSE
1534: l_date := NULL;
1535: END IF;
1550: put_debug_msg ('********** Start Function : get_last_push_date');
1551:
1552:
1553: /* l_stmt := ' ALTER SESSION SET global_names = false';
1554: l_cid := DBMS_SQL.OPEN_CURSOR;
1555: DBMS_SQL.PARSE(l_cid, l_stmt, DBMS_SQL.NATIVE);
1556: l_dummy := DBMS_SQL.EXECUTE(l_cid);
1557: DBMS_SQL.CLOSE_CURSOR(l_cid); */
1558: --edw_misc_util.globalnamesoff;
1551:
1552:
1553: /* l_stmt := ' ALTER SESSION SET global_names = false';
1554: l_cid := DBMS_SQL.OPEN_CURSOR;
1555: DBMS_SQL.PARSE(l_cid, l_stmt, DBMS_SQL.NATIVE);
1556: l_dummy := DBMS_SQL.EXECUTE(l_cid);
1557: DBMS_SQL.CLOSE_CURSOR(l_cid); */
1558: --edw_misc_util.globalnamesoff;
1559:
1552:
1553: /* l_stmt := ' ALTER SESSION SET global_names = false';
1554: l_cid := DBMS_SQL.OPEN_CURSOR;
1555: DBMS_SQL.PARSE(l_cid, l_stmt, DBMS_SQL.NATIVE);
1556: l_dummy := DBMS_SQL.EXECUTE(l_cid);
1557: DBMS_SQL.CLOSE_CURSOR(l_cid); */
1558: --edw_misc_util.globalnamesoff;
1559:
1560: IF (g_source_link IS NULL)
1553: /* l_stmt := ' ALTER SESSION SET global_names = false';
1554: l_cid := DBMS_SQL.OPEN_CURSOR;
1555: DBMS_SQL.PARSE(l_cid, l_stmt, DBMS_SQL.NATIVE);
1556: l_dummy := DBMS_SQL.EXECUTE(l_cid);
1557: DBMS_SQL.CLOSE_CURSOR(l_cid); */
1558: --edw_misc_util.globalnamesoff;
1559:
1560: IF (g_source_link IS NULL)
1561: OR (g_target_link IS NULL)
1575: || ' where object_name=:s and push_status=''SUCCESS'' and '
1576: || ' instance_code=(select instance_code from edw_local_instance))';
1577: put_debug_msg ('Running: ');
1578: put_debug_msg (l_stmt);
1579: l_cid := DBMS_SQL.open_cursor;
1580: DBMS_SQL.parse (l_cid, l_stmt, DBMS_SQL.native);
1581: DBMS_SQL.bind_variable (l_cid, ':s', p_object);
1582: DBMS_SQL.define_column (l_cid, 1, l_date);
1583: l_dummy := DBMS_SQL.EXECUTE (l_cid);
1576: || ' instance_code=(select instance_code from edw_local_instance))';
1577: put_debug_msg ('Running: ');
1578: put_debug_msg (l_stmt);
1579: l_cid := DBMS_SQL.open_cursor;
1580: DBMS_SQL.parse (l_cid, l_stmt, DBMS_SQL.native);
1581: DBMS_SQL.bind_variable (l_cid, ':s', p_object);
1582: DBMS_SQL.define_column (l_cid, 1, l_date);
1583: l_dummy := DBMS_SQL.EXECUTE (l_cid);
1584:
1577: put_debug_msg ('Running: ');
1578: put_debug_msg (l_stmt);
1579: l_cid := DBMS_SQL.open_cursor;
1580: DBMS_SQL.parse (l_cid, l_stmt, DBMS_SQL.native);
1581: DBMS_SQL.bind_variable (l_cid, ':s', p_object);
1582: DBMS_SQL.define_column (l_cid, 1, l_date);
1583: l_dummy := DBMS_SQL.EXECUTE (l_cid);
1584:
1585: IF DBMS_SQL.fetch_rows (l_cid) <> 0
1578: put_debug_msg (l_stmt);
1579: l_cid := DBMS_SQL.open_cursor;
1580: DBMS_SQL.parse (l_cid, l_stmt, DBMS_SQL.native);
1581: DBMS_SQL.bind_variable (l_cid, ':s', p_object);
1582: DBMS_SQL.define_column (l_cid, 1, l_date);
1583: l_dummy := DBMS_SQL.EXECUTE (l_cid);
1584:
1585: IF DBMS_SQL.fetch_rows (l_cid) <> 0
1586: THEN
1579: l_cid := DBMS_SQL.open_cursor;
1580: DBMS_SQL.parse (l_cid, l_stmt, DBMS_SQL.native);
1581: DBMS_SQL.bind_variable (l_cid, ':s', p_object);
1582: DBMS_SQL.define_column (l_cid, 1, l_date);
1583: l_dummy := DBMS_SQL.EXECUTE (l_cid);
1584:
1585: IF DBMS_SQL.fetch_rows (l_cid) <> 0
1586: THEN
1587: DBMS_SQL.column_value (l_cid, 1, l_date);
1581: DBMS_SQL.bind_variable (l_cid, ':s', p_object);
1582: DBMS_SQL.define_column (l_cid, 1, l_date);
1583: l_dummy := DBMS_SQL.EXECUTE (l_cid);
1584:
1585: IF DBMS_SQL.fetch_rows (l_cid) <> 0
1586: THEN
1587: DBMS_SQL.column_value (l_cid, 1, l_date);
1588: END IF;
1589:
1583: l_dummy := DBMS_SQL.EXECUTE (l_cid);
1584:
1585: IF DBMS_SQL.fetch_rows (l_cid) <> 0
1586: THEN
1587: DBMS_SQL.column_value (l_cid, 1, l_date);
1588: END IF;
1589:
1590: DBMS_SQL.close_cursor (l_cid);
1591: l_date := NVL (l_date, TO_DATE ('01/01/1950', 'MM/DD/YYYY'));
1586: THEN
1587: DBMS_SQL.column_value (l_cid, 1, l_date);
1588: END IF;
1589:
1590: DBMS_SQL.close_cursor (l_cid);
1591: l_date := NVL (l_date, TO_DATE ('01/01/1950', 'MM/DD/YYYY'));
1592: l_datedt := fnd_date.date_to_displaydt (l_date);
1593: put_debug_msg ('********** End Function : get_last_push_date');
1594: RETURN l_datedt;