32: -- Arguments
33: -- p_module Name of the module
34: -- p_action_type Entered, Exited Successfully, or Exited with Failure
35: -- Example
36: -- GCS_TRANSLATION_PKG.Module_Log_Write
37: -- Notes
38: --
39: PROCEDURE Module_Log_Write
40: (p_module VARCHAR2,
60: -- p_module Name of the module
61: -- p_level Logging level
62: -- p_text Text to write
63: -- Example
64: -- GCS_TRANSLATION_PKG.Write_To_Log
65: -- Notes
66: --
67: PROCEDURE Write_To_Log
68: (p_module VARCHAR2,
104: -- p_ledger_id The ledger in FEM_BALANCES.
105: -- p_entity_id Entity on which the translation is being performed.
106: -- p_line_item_id Line Item Id of retained earnings selected for the hierarchy.
107: -- Example
108: -- GCS_TRANSLATION_PKG.Get_RE_Data_Exists
109: -- Notes
110: --
111:
112: FUNCTION Get_RE_Data_Exists(
442: ' ''EXPENSE'', tgt.xlate_ptd_dr - tgt.xlate_ptd_cr,' || g_nl ||
443: ' tgt.xlate_ytd_dr - tgt.xlate_ytd_cr),' || g_nl ||
444: 'fxata.number_assign_value * (tgt.xlate_ytd_dr - tgt.xlate_ytd_cr),' || g_nl ||
445: 'tgt.xlate_ptd_dr, tgt.xlate_ptd_cr, tgt.xlate_ytd_dr, tgt.xlate_ytd_cr, sysdate, ' ||
446: gcs_translation_pkg.g_fnd_user_id || ', sysdate, ' ||
447: gcs_translation_pkg.g_fnd_user_id || ', ' ||
448: gcs_translation_pkg.g_fnd_login_id || g_nl ||
449: 'FROM gcs_translation_gt, tgt,' || g_nl ||
450: ' fem_ln_items_attr li,' || g_nl ||
443: ' tgt.xlate_ytd_dr - tgt.xlate_ytd_cr),' || g_nl ||
444: 'fxata.number_assign_value * (tgt.xlate_ytd_dr - tgt.xlate_ytd_cr),' || g_nl ||
445: 'tgt.xlate_ptd_dr, tgt.xlate_ptd_cr, tgt.xlate_ytd_dr, tgt.xlate_ytd_cr, sysdate, ' ||
446: gcs_translation_pkg.g_fnd_user_id || ', sysdate, ' ||
447: gcs_translation_pkg.g_fnd_user_id || ', ' ||
448: gcs_translation_pkg.g_fnd_login_id || g_nl ||
449: 'FROM gcs_translation_gt, tgt,' || g_nl ||
450: ' fem_ln_items_attr li,' || g_nl ||
451: ' fem_ext_acct_types_attr fxata' || g_nl ||
444: 'fxata.number_assign_value * (tgt.xlate_ytd_dr - tgt.xlate_ytd_cr),' || g_nl ||
445: 'tgt.xlate_ptd_dr, tgt.xlate_ptd_cr, tgt.xlate_ytd_dr, tgt.xlate_ytd_cr, sysdate, ' ||
446: gcs_translation_pkg.g_fnd_user_id || ', sysdate, ' ||
447: gcs_translation_pkg.g_fnd_user_id || ', ' ||
448: gcs_translation_pkg.g_fnd_login_id || g_nl ||
449: 'FROM gcs_translation_gt, tgt,' || g_nl ||
450: ' fem_ln_items_attr li,' || g_nl ||
451: ' fem_ext_acct_types_attr fxata' || g_nl ||
452: 'WHERE li.line_item_id = tgt.line_item_id' || g_nl ||
449: 'FROM gcs_translation_gt, tgt,' || g_nl ||
450: ' fem_ln_items_attr li,' || g_nl ||
451: ' fem_ext_acct_types_attr fxata' || g_nl ||
452: 'WHERE li.line_item_id = tgt.line_item_id' || g_nl ||
453: 'AND li.attribute_id = ' || gcs_translation_pkg.g_li_acct_type_attr_id || g_nl ||
454: 'AND li.version_id = ' || gcs_translation_pkg.g_li_acct_type_v_id || g_nl ||
455: 'AND fxata.ext_account_type_code = li.dim_attribute_varchar_label' || g_nl ||
456: 'AND fxata.attribute_id = ' || gcs_translation_pkg.g_xat_sign_attr_id || g_nl ||
457: 'AND fxata.version_id = ' || gcs_translation_pkg.g_xat_sign_v_id);
450: ' fem_ln_items_attr li,' || g_nl ||
451: ' fem_ext_acct_types_attr fxata' || g_nl ||
452: 'WHERE li.line_item_id = tgt.line_item_id' || g_nl ||
453: 'AND li.attribute_id = ' || gcs_translation_pkg.g_li_acct_type_attr_id || g_nl ||
454: 'AND li.version_id = ' || gcs_translation_pkg.g_li_acct_type_v_id || g_nl ||
455: 'AND fxata.ext_account_type_code = li.dim_attribute_varchar_label' || g_nl ||
456: 'AND fxata.attribute_id = ' || gcs_translation_pkg.g_xat_sign_attr_id || g_nl ||
457: 'AND fxata.version_id = ' || gcs_translation_pkg.g_xat_sign_v_id);
458:
452: 'WHERE li.line_item_id = tgt.line_item_id' || g_nl ||
453: 'AND li.attribute_id = ' || gcs_translation_pkg.g_li_acct_type_attr_id || g_nl ||
454: 'AND li.version_id = ' || gcs_translation_pkg.g_li_acct_type_v_id || g_nl ||
455: 'AND fxata.ext_account_type_code = li.dim_attribute_varchar_label' || g_nl ||
456: 'AND fxata.attribute_id = ' || gcs_translation_pkg.g_xat_sign_attr_id || g_nl ||
457: 'AND fxata.version_id = ' || gcs_translation_pkg.g_xat_sign_v_id);
458:
459: INSERT /*+ parallel (gcs_entry_lines) */ INTO gcs_entry_lines(
460: entry_id, line_item_id, company_cost_center_org_id,
453: 'AND li.attribute_id = ' || gcs_translation_pkg.g_li_acct_type_attr_id || g_nl ||
454: 'AND li.version_id = ' || gcs_translation_pkg.g_li_acct_type_v_id || g_nl ||
455: 'AND fxata.ext_account_type_code = li.dim_attribute_varchar_label' || g_nl ||
456: 'AND fxata.attribute_id = ' || gcs_translation_pkg.g_xat_sign_attr_id || g_nl ||
457: 'AND fxata.version_id = ' || gcs_translation_pkg.g_xat_sign_v_id);
458:
459: INSERT /*+ parallel (gcs_entry_lines) */ INTO gcs_entry_lines(
460: entry_id, line_item_id, company_cost_center_org_id,
461: intercompany_id, financial_elem_id,
495: 'EXPENSE', tgt.xlate_ptd_dr - tgt.xlate_ptd_cr,
496: tgt.xlate_ytd_dr - tgt.xlate_ytd_cr),
497: fxata.number_assign_value * (tgt.xlate_ytd_dr - tgt.xlate_ytd_cr),
498: tgt.xlate_ptd_dr, tgt.xlate_ptd_cr, tgt.xlate_ytd_dr, tgt.xlate_ytd_cr,
499: sysdate, gcs_translation_pkg.g_fnd_user_id, sysdate,
500: gcs_translation_pkg.g_fnd_user_id, gcs_translation_pkg.g_fnd_login_id
501: FROM gcs_translation_gt tgt,
502: fem_ln_items_attr li,
503: fem_ext_acct_types_attr fxata
496: tgt.xlate_ytd_dr - tgt.xlate_ytd_cr),
497: fxata.number_assign_value * (tgt.xlate_ytd_dr - tgt.xlate_ytd_cr),
498: tgt.xlate_ptd_dr, tgt.xlate_ptd_cr, tgt.xlate_ytd_dr, tgt.xlate_ytd_cr,
499: sysdate, gcs_translation_pkg.g_fnd_user_id, sysdate,
500: gcs_translation_pkg.g_fnd_user_id, gcs_translation_pkg.g_fnd_login_id
501: FROM gcs_translation_gt tgt,
502: fem_ln_items_attr li,
503: fem_ext_acct_types_attr fxata
504: WHERE li.line_item_id = tgt.line_item_id
501: FROM gcs_translation_gt tgt,
502: fem_ln_items_attr li,
503: fem_ext_acct_types_attr fxata
504: WHERE li.line_item_id = tgt.line_item_id
505: AND li.attribute_id = gcs_translation_pkg.g_li_acct_type_attr_id
506: AND li.version_id = gcs_translation_pkg.g_li_acct_type_v_id
507: AND fxata.ext_account_type_code = li.dim_attribute_varchar_member
508: AND fxata.attribute_id = gcs_translation_pkg.g_xat_sign_attr_id
509: AND fxata.version_id = gcs_translation_pkg.g_xat_sign_v_id;
502: fem_ln_items_attr li,
503: fem_ext_acct_types_attr fxata
504: WHERE li.line_item_id = tgt.line_item_id
505: AND li.attribute_id = gcs_translation_pkg.g_li_acct_type_attr_id
506: AND li.version_id = gcs_translation_pkg.g_li_acct_type_v_id
507: AND fxata.ext_account_type_code = li.dim_attribute_varchar_member
508: AND fxata.attribute_id = gcs_translation_pkg.g_xat_sign_attr_id
509: AND fxata.version_id = gcs_translation_pkg.g_xat_sign_v_id;
510:
504: WHERE li.line_item_id = tgt.line_item_id
505: AND li.attribute_id = gcs_translation_pkg.g_li_acct_type_attr_id
506: AND li.version_id = gcs_translation_pkg.g_li_acct_type_v_id
507: AND fxata.ext_account_type_code = li.dim_attribute_varchar_member
508: AND fxata.attribute_id = gcs_translation_pkg.g_xat_sign_attr_id
509: AND fxata.version_id = gcs_translation_pkg.g_xat_sign_v_id;
510:
511: write_to_log(module, FND_LOG.LEVEL_PROCEDURE,g_module_success);
512: EXCEPTION
505: AND li.attribute_id = gcs_translation_pkg.g_li_acct_type_attr_id
506: AND li.version_id = gcs_translation_pkg.g_li_acct_type_v_id
507: AND fxata.ext_account_type_code = li.dim_attribute_varchar_member
508: AND fxata.attribute_id = gcs_translation_pkg.g_xat_sign_attr_id
509: AND fxata.version_id = gcs_translation_pkg.g_xat_sign_v_id;
510:
511: write_to_log(module, FND_LOG.LEVEL_PROCEDURE,g_module_success);
512: EXCEPTION
513: WHEN GCS_CCY_ENTRY_CREATE_FAILED THEN
511: write_to_log(module, FND_LOG.LEVEL_PROCEDURE,g_module_success);
512: EXCEPTION
513: WHEN GCS_CCY_ENTRY_CREATE_FAILED THEN
514: module_log_write(module, g_module_failure);
515: raise GCS_TRANSLATION_PKG.GCS_CCY_SUBPROGRAM_RAISED;
516: WHEN OTHERS THEN
517: FND_MESSAGE.set_name('GCS', 'GCS_CCY_NEW_ENTRY_UNEXP_ERR');
518: GCS_TRANSLATION_PKG.g_error_text := FND_MESSAGE.get;
519: write_to_log(module, FND_LOG.LEVEL_UNEXPECTED, GCS_TRANSLATION_PKG.g_error_text);
514: module_log_write(module, g_module_failure);
515: raise GCS_TRANSLATION_PKG.GCS_CCY_SUBPROGRAM_RAISED;
516: WHEN OTHERS THEN
517: FND_MESSAGE.set_name('GCS', 'GCS_CCY_NEW_ENTRY_UNEXP_ERR');
518: GCS_TRANSLATION_PKG.g_error_text := FND_MESSAGE.get;
519: write_to_log(module, FND_LOG.LEVEL_UNEXPECTED, GCS_TRANSLATION_PKG.g_error_text);
520: write_to_log(module, FND_LOG.LEVEL_UNEXPECTED, SQLERRM);
521: module_log_write(module, g_module_failure);
522: raise GCS_TRANSLATION_PKG.GCS_CCY_SUBPROGRAM_RAISED;
515: raise GCS_TRANSLATION_PKG.GCS_CCY_SUBPROGRAM_RAISED;
516: WHEN OTHERS THEN
517: FND_MESSAGE.set_name('GCS', 'GCS_CCY_NEW_ENTRY_UNEXP_ERR');
518: GCS_TRANSLATION_PKG.g_error_text := FND_MESSAGE.get;
519: write_to_log(module, FND_LOG.LEVEL_UNEXPECTED, GCS_TRANSLATION_PKG.g_error_text);
520: write_to_log(module, FND_LOG.LEVEL_UNEXPECTED, SQLERRM);
521: module_log_write(module, g_module_failure);
522: raise GCS_TRANSLATION_PKG.GCS_CCY_SUBPROGRAM_RAISED;
523:
518: GCS_TRANSLATION_PKG.g_error_text := FND_MESSAGE.get;
519: write_to_log(module, FND_LOG.LEVEL_UNEXPECTED, GCS_TRANSLATION_PKG.g_error_text);
520: write_to_log(module, FND_LOG.LEVEL_UNEXPECTED, SQLERRM);
521: module_log_write(module, g_module_failure);
522: raise GCS_TRANSLATION_PKG.GCS_CCY_SUBPROGRAM_RAISED;
523:
524:
525: write_to_log(module, FND_LOG.LEVEL_PROCEDURE,g_module_success);
526: END Create_New_Entry;