Tuesday, June 19, 2007

Registering a table AD_DD.register_table in Oracle Applications 11i Ebusiness suite

Registering a table in Oracle Applications 11i Ebusiness suite to be used in Alerts and Flexfields

Flexfields and Oracle Alert are the only features or products that require the custom tables to be registered in Oracle Applications (Application Object Library) before they can be used. Custom application tables can be registered by using the AD_DD PL/SQL Package. If you are planning to use custom tables either in Alerts or in Flexfields, they need to be registered. The following methods describe how you can register the tables.

  • ADD_DD.REGISTER_TABLE
ad_dd.register_table ('Application short name', 'EMAIL_TEMPLATES', 'T');


  • ADD_DD.REGISTER_COLUMN


ad_dd.register_column ('Application short name',
'EMAIL_TEMPLATES',
'EMAIL_TEMPLATE_ID',--Column
1,--Sequence
'number',--type
4,--width
'N',
'N'
);



  • Register all the columns one by one . Now you can use these custom table in your flex field definitions and in Oracle Alerts

Setting proxy in UTL_HTTP package method calls for Oracle 9i, 10g

Oracle provides PL/SQL  UTL_HTTP package for calling HTTP from Oracle database. While using UTL_HTTP, it is required to set the proxy settings when calling a URL which is out side the firewall or beyond the proxy. In order to set the proxy, Oracle provides the following methods to set the proxy information.

Utl_Http.Set_Proxy (
  proxy => 'yourproxy',
  no_proxy_domains => 'yourdomains' );

req := Utl_Http.Begin_Request (
  url => v_url,
  method => 'GET' );

Utl_Http.Set_Authentication (
  r => req,
  username => 'username',

  password => 'password',
  scheme => 'Basic',
  for_proxy => false );

Monday, June 18, 2007

Querying group name from JTF_RS_GROUPS_VL using Group ID in Oracle 11i Ebusiness suite

SELECT group_name FROM jtf_rs_groups_vl WHERE group_id = p_group_id;

pass p_group_id as the parameter.

Retrieving HR Person ID from Email address in Oracle Applications 11i

Retrieving HR Person ID from Email address in Oracle Applications 11i eBusiness Suite.

Use the following query to retrieve the HR person ID for any employee by using the email address. This can be used in any modules of Oracle Applications 11i.

SELECT person_id FROM per_people_x WHERE
                UPPER(email_address) = p_email
and current_employee_flag = 'Y';

jtf_notes used for Notes module in Oracle

jtf_notes used for Notes module in Oracle

Oracle Applications use jtf_notes for storing all notes related information across various modules. The tables used are jtf_notes_B, jtf_note_types. There is a translation table called jtf_notes_tl

FND_MSG_PUB for error logging in Oracle Applications

FND_MSG_PUB for error logging in Oracle Applications.

Use the following snipped of code while calling any seeded API in Oracle Applications, like CRM, or Financials.

Put this block exactly under the section where you invoke the private or public API. The errors raised in the API are logged in the following API. Use this code while error logging or while debugging. Comment out the code before moving into production.

IF ( FND_MSG_PUB.Count_Msg > 0) THEN
FOR i IN 1..FND_MSG_PUB.Count_Msg    LOOP
FND_MSG_PUB.Get(p_msg_index     => i,
          p_encoded       => 'F',
          p_data          => out_message,
          p_msg_index_OUT => l_msg_index_OUT );
dbms_output.put_line('l_msg_data :' ||out_message);
END LOOP;
END IF;

Calling cs_servicerequest_pvt for updating service request in Oracle

Calling cs_servicerequest_pvt for updating service request in Oracle Applications

cs_servicerequest_pvt.Update_ServiceRequest(
    P_API_VERSION                   => 3.0,
    P_INIT_MSG_LIST                 => FND_API.G_TRUE,
    P_COMMIT                        => FND_API.G_FALSE,
    P_VALIDATION_LEVEL              => fnd_api.G_VALID_LEVEL_NONE ,
    X_RETURN_STATUS                 => out_status,
    X_MSG_COUNT                     => x_msg_count,
    X_MSG_DATA                      => out_message,
    P_REQUEST_ID                    => x_sr_id,      --in_request_id ,
    P_OBJECT_VERSION_NUMBER         => m_obj_version,
    P_LAST_UPDATED_BY               => m_user_id,
    P_LAST_UPDATE_DATE              => m_update_date,
    P_SERVICE_REQUEST_REC           => m_sr_rec_upd,
    P_NOTES                         => m_notes_tbl,
    P_CONTACTS                      => m_contacts_tbl,
    X_INTERACTION_ID                => X_INTER_ID,
    X_WORKFLOW_PROCESS_ID           => X_WORKFLOW_ID);