Monday, 7 March 2016

New Features in Oracle apps R12

What's new on Oracle R12:

1. Multi-org Access Control (MOAC)
    - Access Multiple Operating Units Within a Single Application Responsibility.
    - Set column MULTI_ORG_CATEGORY on table FND_CONCURRENT_PROGRAMS to 'S' - single or 'M' - Multi,
      for Multi-org Access.
    - Set MO_GLOBAL.SET_POLICY_CONTEXT('S', ORG_ID); when running views on SQL tools
2. Enhanced TCA model
    - HZ_CUSTOMER_PROFILES replace AR_CUSTOMER_PROFILES (11i)
    - AR_ADDRESSES_V replace RA_ADDRESSES (11i)
    - AR_SITE_USES_V replace RA_SITE_USES (11i)
    - AR_CUSTOMERS replace RA_CUSTOMERS (11i)
    - HZ_CONTACT_POINTS where OWNER_TABLE_NAME = 'HZ_PARTIES' and
      CONTACT_POINT_TYPE = 'PHONE' replace RA_PHONES (11i)
    - AR_CONTACTS_V replace RA_CONTACTS
3. SLA - Sub-ledger Accounting (see GL Tables)
    - Reference columns on table GL_JE_LINES are no more used.
    Sub ledger data retrieved from below tables.

 1. GL_JE_BATCHES (je_batch_id)

     => GL_JE_HEADERS (je_batch_id)

 2. GL_JE_HEADERS (je_header_id)

     => GL_JE_LINES (je_header_id)

 3. GL_JE_LINES (je_header_id, je_line_num)

     => GL_IMPORT_REFERENCES (je_header_id, je_line_num)

 4. GL_IMPORT_REFERENCES (gl_sl_link_table, gl_sl_link_id)

     => XLA_AE_LINES (gl_sl_link_table, gl_sl_link_id)

 5. XLA_AE_LINES (application_id, ae_header_id)

      => XLA_AE_HEADERS (application_id, ae_header_id)

 6. XLA_AE_HEADERS (application_id, event_id)

     => XLA_EVENTS (application_id, event_id)

 7. XLA_EVENTS (application_id, entity_id)

     => XLA.XLA_TRANSACTION_ENTITIES (application_id, entity_id)
 8.  XLA.XLA_TRANSACTION_ENTITIES(SOURCE_ID_INT_1)
            => Subledger tables
4. New Payments and Bank Model (see AP Payment tables)
    - CE_BANK_ACCOUNTS replace AP_BANK_ACCOUNTS_ALL (11i)
    - CE_BANK_ACCT_USES_ALL replace AP_BANK_ACCOUNT_USES_ALL(11i)
    - CE_BANK_BRANCHES_V replace AP_BANK_BRANCHS_ALL(11i)
    - New table added:  AP_INVOICE_LINES_ALL


5. E-business Tax
    - ZX_TAXES_B – Tax codes are stored
    - All tax related tables from Payables and Receivables are no longer use

Query to Fetch Concurrent program details

Conc Prog Details Query -
SELECT frt.responsibility_name,
                frg.request_group_name,
                frg.description
   FROM fnd_request_groups frg
              ,fnd_request_group_units frgu
              ,fnd_concurrent_programs fcp
              ,fnd_concurrent_programs_tl fcpt
              ,fnd_responsibility_tl frt
              ,fnd_responsibility frs
  WHERE frgu.unit_application_id = fcp.application_id
  AND   frgu.request_unit_id = fcp.concurrent_program_id
  AND   frg.request_group_id = frgu.request_group_id
  AND   frg.application_id = frgu.application_id
  AND   fcpt.source_lang = USERENV('LANG')
  AND   fcp.application_id = fcpt.application_id
  AND   fcp.concurrent_program_id = fcpt.concurrent_program_id
  AND   frs.application_id = frt.application_id
  AND   frs.responsibility_id = frt.responsibility_id
  AND   frt.source_lang = USERENV('LANG')
  AND   frs.request_group_id = frg.request_group_id
  AND   frs.application_id = frg.application_id
 -- AND   fcp.concurrent_program_name = :CONC_PROG_SHORT_NAME
  AND   fcpt.user_concurrent_program_name = :USER_CONC_PROG_NAME

Query to Fetch ValueSet details

Value set details Query -
select ffvs.flex_value_set_id ,
    ffvs.flex_value_set_name ,
    ffvs.description set_description ,
    ffvs.validation_type,
    ffvt.value_column_name ,
    ffvt.meaning_column_name ,
    ffvt.id_column_name ,
    ffvt.application_table_name ,
    ffvt.additional_where_clause
FROM fnd_flex_value_sets ffvs ,
    fnd_flex_validation_tables ffvt
WHERE ffvs.flex_value_set_id = ffvt.flex_value_set_id
AND ffvs.flex_value_set_name = :VALUE_SET_NAME;

Thursday, 19 November 2015

Enable Debug Profile Options

Set values as below:

FND: Debug: YES
FND: DEBUG LEVEL: STATEMENT
INV: DEBUG TRACE YES
INV: DEBUG Level: 102
INV: Debug File = /tmp/invdbg_AA.db
MRP: Debug Mode: Yes

This debug setting is helpful when something is going wrong during a concurrent program.
Run the standard program or API.

Check the log.

Disabling a BOM Routing and then Adding same routing again.

Pass the values to API like this:

Update Mode --
 p_operation_rec(l_upd_cnt).Assembly_Item_Name :='ECJ1VC1H050C';
 p_operation_rec(l_upd_cnt).Organization_Code := 'GLO';
 p_operation_rec(l_upd_cnt).Operation_Sequence_Number :=100;
 p_operation_rec(l_upd_cnt).Operation_Type := 1;
 p_operation_rec(l_upd_cnt).Start_Effective_Date := '09-Nov-2015'; --Existing old effective date
 p_operation_rec(l_upd_cnt).disable_date := TO_DATE('9-Nov-2015, 23:59:59','DD-MON-YYYY, HH24:MI:SS');
 p_operation_rec(l_upd_cnt).Standard_Operation_Code := '10';
 p_operation_rec(l_upd_cnt).Transaction_Type := 'UPDATE';
 While creating the same routing -CREATE mode
 p_operation_rec(l_upd_cnt).Assembly_Item_Name := 'ECJ1VC1H050C';
 p_operation_rec(l_upd_cnt).Organization_Code := 'GLO';
 p_operation_rec(l_upd_cnt).Operation_Sequence_Number :=100;
 p_operation_rec(l_upd_cnt).Operation_Type := 1;
 p_operation_rec(l_upd_cnt).Start_Effective_Date := TO_DATE('10-Nov-2015, 00:00:00','DD-MON-YYYY, HH24:MI:SS');
 p_operation_rec(l_upd_cnt).disable_date := NULL;
 p_operation_rec(l_upd_cnt).Standard_Operation_Code := '10';
 p_operation_rec(l_upd_cnt).Transaction_Type := 'CREATE';

x_rtg_header_rec := bom_rtg_pub.g_miss_rtg_header_rec;
      x_rtg_revision_tbl.DELETE;
      x_operation_tbl.DELETE;
      x_op_resource_tbl.DELETE;
      x_sub_resource_tbl.DELETE;
      x_op_network_tbl.DELETE;
      error_handler.initialize;
      xx_mas_print_log_p ( 'Pass in API' );
      bom_rtg_pub.process_rtg (
        p_bo_identifier         => 'RTG'
      , p_api_version_number    => '1.0'
      , p_init_msg_list         => TRUE
      , p_rtg_header_rec        => l_rtg_header_rec
      , p_operation_tbl         => p_operation_rec
      , p_op_resource_tbl       => l_op_resource_tbl
      , p_sub_resource_tbl      => l_sub_resource_tbl
      , p_op_network_tbl        => l_op_network_tbl
      , x_rtg_header_rec        => x_rtg_header_rec
      , x_rtg_revision_tbl      => x_rtg_revision_tbl
      , x_operation_tbl         => x_operation_tbl
      , x_op_resource_tbl       => x_op_resource_tbl
      , x_sub_resource_tbl      => x_sub_resource_tbl
      , x_op_network_tbl        => x_op_network_tbl
      , x_return_status         => l_return_status
      , x_msg_count             => l_msg_count
      );
      COMMIT;
      xx_mas_print_log_p ( 'BOM_RTG_PUB.PROCESS_RTG' );
      xx_mas_print_log_p ('Return Status for ' || ' = ' || l_return_status );
      xx_mas_print_log_p ('Message Count for ' || ' = ' || l_msg_count );
      error_handler.get_message_list ( l_error_message_list );
      IF l_return_status <> 'S' THEN
        -- Error Processing
        l_err_message := NULL;
        l_err_message_type := NULL;
        FOR k IN 1 .. l_msg_count
        LOOP
          IF l_err_message IS NULL THEN
            l_err_message := SUBSTR (
                              l_error_message_list ( k ).MESSAGE_TEXT
                            , 1
                            , 250
                            );
            xx_mas_print_log_p ('Error in API - l_err_message1:' || l_err_message );
          ELSE
            l_err_message :=
                 l_err_message || '-' || SUBSTR (
                                          l_error_message_list ( k ).MESSAGE_TEXT
                                        , 1
                                        , 250
                                        );
            xx_mas_print_log_p ('Error in API - l_err_message1:' || l_err_message );
          END IF;
          IF l_err_message_type IS NULL THEN
            l_err_message_type := l_error_message_list ( k ).MESSAGE_TYPE;
          ELSE
            l_err_message_type :=
                               l_err_message_type || '-' || l_error_message_list ( k ).MESSAGE_TYPE;
          END IF;
        END LOOP;
END IF;

REGEXP_INSTR

How to use REGEXP_INSTR.
REGEXP_INSTR is used to get multiple values positions in a string.

For Example:
let say we need to find the position of (-) and (*) in single string.

SELECT REGEXP_INSTR (
                   'ABC-CDE&'
                 , '(-|&)'
                 )
          FROM   DUAL;

This will return you 4.

Thursday, 2 April 2015

Steps for compiling a form on UNIX

Steps for compiling a form on UNIX


1. Login into UNIX server

2. Set the environment for the respective instance
a.             Command for setting environment
b.            For ABC instance -> . /evnabc/erpapp/appl/APPSORA.env

3. PLL files are stored in the ‘Resource’ folder under AU TOP.

        a.    PLLs are in this folder -> /evnabc/erpapp/appl/au/12.0.0/resource
        b.    Forms are in folder -> /evnabc/erpapp/appl/au/12.0.0/forms/US

4. Command to compile the form -> frmcmp_batch module=<path with form name.fmb> userid=username/password output_file=<path with form name.fmx> Module_Type=FORM compile_all=Yes

        a. User name would be either APPS or the respective top name

If a form needs to be compiled on the local system then the short cut key is Ctrl+Shift+K and for generating fmx is Ctrl+T in Form Builder (10g).

Useful fusion query for User access

  Table FUN_USER_ROLE_DATA_ASGNMNTS is used for “Manage data access for users”. it will store use and role assignment to data security. Tabl...