DBA Data[Home] [Help]

APPS.MSD_CL_PRE_PROCESS dependencies on MSD_ST_LEVEL_ORG_ASSCNS

Line 334: ' INSERT INTO MSD_ST_LEVEL_ORG_ASSCNS '

330:
331:
332: v_sql_stmt := 02;
333: lv_sql_stmt :=
334: ' INSERT INTO MSD_ST_LEVEL_ORG_ASSCNS '
335: ||' (INSTANCE , '
336: ||' LEVEL_ID, '
337: ||' LEVEL_VALUE, '
338: ||' SR_LEVEL_PK, '

Line 8195: lv_batch_id msd_st_level_org_asscns.batch_id%TYPE;

8191: TYPE RowidTab IS TABLE OF ROWID INDEX BY BINARY_INTEGER;
8192:
8193: lb_rowid RowidTab;
8194: lv_sql_stmt VARCHAR2(4000);
8195: lv_batch_id msd_st_level_org_asscns.batch_id%TYPE;
8196: lv_message_text msc_errors.error_text%TYPE;
8197: lv_debug BOOLEAN := msc_cl_pre_process.v_debug;
8198: lv_current_user NUMBER := msc_cl_pre_process.v_current_user;
8199: lv_current_date DATE := msc_cl_pre_process.v_current_date;

Line 8217: FROM msd_st_level_org_asscns

8213: WHERE instance_id=p_instance_id;
8214:
8215: CURSOR c1(p_batch_id NUMBER)IS
8216: SELECT rowid
8217: FROM msd_st_level_org_asscns
8218: WHERE process_flag IN (G_IN_PROCESS,G_ERROR_FLG)
8219: AND sr_instance_code = p_instance_code
8220: AND batch_id = p_batch_id;
8221:

Line 8242: 'UPDATE msd_st_level_org_asscns'

8238:
8239: v_sql_stmt := 02;
8240:
8241: lv_sql_stmt :=
8242: 'UPDATE msd_st_level_org_asscns'
8243: ||' SET batch_id = :lv_batch_id '
8244: ||' WHERE process_flag IN ('||G_IN_PROCESS||','||G_ERROR_FLG||')'
8245: ||' AND sr_instance_code = :lv_instance_code'
8246: ||' AND NVL(batch_id,'||NULL_VALUE||') = '||NULL_VALUE

Line 8265: UPDATE msd_st_level_org_asscns

8261: CLOSE c1;
8262:
8263: v_sql_stmt := 03;
8264: FORALL j IN 1..lb_rowid.COUNT
8265: UPDATE msd_st_level_org_asscns
8266: SET st_transaction_id = msd_st_level_org_asscns_s.NEXTVAL,
8267: last_update_date = lv_current_date,
8268: last_updated_by = lv_current_user,
8269: creation_date = lv_current_date,

Line 8266: SET st_transaction_id = msd_st_level_org_asscns_s.NEXTVAL,

8262:
8263: v_sql_stmt := 03;
8264: FORALL j IN 1..lb_rowid.COUNT
8265: UPDATE msd_st_level_org_asscns
8266: SET st_transaction_id = msd_st_level_org_asscns_s.NEXTVAL,
8267: last_update_date = lv_current_date,
8268: last_updated_by = lv_current_user,
8269: creation_date = lv_current_date,
8270: created_by = lv_current_user

Line 8289: (p_table_name => 'MSD_ST_LEVEL_ORG_ASSCNS',

8285: END IF;
8286:
8287: -- Derive the level_id , error out if invalid level name
8288: lv_return := MSC_ST_UTIL.DERIVE_LEVEL_ID
8289: (p_table_name => 'MSD_ST_LEVEL_ORG_ASSCNS',
8290: p_level_name_col => 'LEVEL_NAME',
8291: p_level_id_col => 'LEVEL_ID',
8292: p_severity => G_SEV_ERROR ,
8293: p_message_text => lv_message_text,

Line 8314: (p_table_name => 'MSD_ST_LEVEL_ORG_ASSCNS',

8310: END IF;
8311:
8312: -- Derive the level_id , error out if invalid org level name
8313: lv_return := MSC_ST_UTIL.DERIVE_LEVEL_ID
8314: (p_table_name => 'MSD_ST_LEVEL_ORG_ASSCNS',
8315: p_level_name_col => 'ORG_LEVEL_NAME',
8316: p_level_id_col => 'ORG_LEVEL_ID',
8317: p_severity => G_SEV_ERROR ,
8318: p_message_text => lv_message_text,

Line 8344: UPDATE msd_st_level_org_asscns mloa

8340:
8341: IF (lv_instance_type = G_INS_OTHER) THEN
8342:
8343: --Combinations for Level-Org other than the (Sales rep - OU) and (Ship to Loc - OU) is not valid.
8344: UPDATE msd_st_level_org_asscns mloa
8345: SET process_flag = G_ERROR_FLG,
8346: error_text = lv_message_text
8347: WHERE mloa.process_flag = G_IN_PROCESS
8348: AND mloa.sr_instance_code = p_instance_code

Line 8355: UPDATE msd_st_level_org_asscns mloa

8351:
8352: ELSE
8353:
8354: --Combinations for Level-Org other than the (Sales rep - OU) , (Ship to Loc - OU) and (Item - Org )is not valid.
8355: UPDATE msd_st_level_org_asscns mloa
8356: SET process_flag = G_ERROR_FLG,
8357: error_text = lv_message_text
8358: WHERE mloa.process_flag = G_IN_PROCESS
8359: AND mloa.sr_instance_code = p_instance_code

Line 8383: (p_table_name => 'MSD_ST_LEVEL_ORG_ASSCNS',

8379:
8380: -- Derive SR_LEVEL_PK from msd_level_values or msd_st_level_values
8381:
8382: lv_return := MSC_ST_UTIL.DERIVE_LEVEL_PK
8383: (p_table_name => 'MSD_ST_LEVEL_ORG_ASSCNS',
8384: p_level_val_col => 'LEVEL_VALUE',
8385: p_level_name_col => 'LEVEL_NAME',
8386: p_level_pk_col => 'SR_LEVEL_PK',
8387: p_instance_code => p_instance_code,

Line 8413: (p_table_name => 'MSD_ST_LEVEL_ORG_ASSCNS',

8409:
8410: -- Derive ORG_SR_LEVEL_PK from msd_level_values or msd_st_level_values
8411:
8412: lv_return := MSC_ST_UTIL.DERIVE_LEVEL_PK
8413: (p_table_name => 'MSD_ST_LEVEL_ORG_ASSCNS',
8414: p_level_val_col => 'ORG_LEVEL_VALUE',
8415: p_level_name_col => 'ORG_LEVEL_NAME',
8416: p_level_pk_col => 'ORG_SR_LEVEL_PK',
8417: p_instance_code => p_instance_code,

Line 8433: pEntityName => 'MSD_ST_LEVEL_ORG_ASSCNS',

8429: (ERRBUF => lv_error_text,
8430: RETCODE => lv_return,
8431: pBatchID => lv_batch_id,
8432: pInstanceCode => p_instance_code,
8433: pEntityName => 'MSD_ST_LEVEL_ORG_ASSCNS',
8434: pInstanceID => p_instance_id);
8435:
8436: IF NVL(lv_return,0) <> 0 THEN
8437: RAISE ex_logging_err;

Line 8442: (p_table_name => 'MSD_ST_LEVEL_ORG_ASSCNS',

8438: END IF;
8439:
8440: -- Set the process flag as Valid and populate instance_id
8441: lv_return := MSC_ST_UTIL.SET_PROCESS_FLAG
8442: (p_table_name => 'MSD_ST_LEVEL_ORG_ASSCNS',
8443: p_instance_id => p_instance_id,
8444: p_instance_code => p_instance_code,
8445: p_process_flag => G_VALID,
8446: p_error_text => lv_error_text,

Line 8457: (p_table_name => 'MSD_ST_LEVEL_ORG_ASSCNS',

8453:
8454: -- Inserting all the errored out records into MSC_ERRORS:
8455:
8456: lv_return := MSC_ST_UTIL.LOG_ERROR
8457: (p_table_name => 'MSD_ST_LEVEL_ORG_ASSCNS',
8458: p_instance_code => p_instance_code,
8459: p_row => lv_column_names,
8460: p_severity => G_SEV_ERROR,
8461: p_error_text => lv_error_text,