Wednesday, October 14, 2015

Creating Lookup and Lookup Values through API



The custom lookup parameters can be passed to the below API’s to insert data into Oracle standard tables fnd_lookup_values and fnd_lookup_types                                              
*fnd_lookup_types_pkg.insert_row
*fnd_lookup_values_pkg.insert_row

Sample script with description to upload the lookup and lookup values is explained below

 fnd_lookup_types_pkg.insert_row
(x_rowid                  => ln_rowid,                               
x_lookup_type             => 'XXTEST',--Lookup Type
x_security_group_id       => 0,       --Security Group Id
x_view_application_id     => 0,       -- Application Id (0-AOL)
x_application_id          => 0,       -- Application Id (0-AOL)
x_customization_level     => 'U',     --User
x_meaning                 => 'XXTEST',--Meaning for Lookup
x_description             => 'XXTEST',--Description for Lookup
x_creation_date           => SYSDATE,
x_created_by              => -1,
x_last_update_date        => SYSDATE,
x_last_updated_by         => -1,
x_last_update_login       => -1
);

fnd_lookup_values_pkg.insert_row
 (x_rowid                   => ln_rowid1,
 x_lookup_type              => 'XXTEST', 
 x_security_group_id        => 0,
 x_view_application_id      => 0,
 x_lookup_code              => 'XXHR_INFO',
 x_tag                      => NULL,
 x_attribute_category       => NULL,
 x_attribute1               => NULL,
 x_attribute2               => NULL,
 x_attribute3               => NULL,
 x_attribute4               => NULL,
 x_enabled_flag             => 'Y',
 x_start_date_active        => TO_DATE ('01-JAN-1950','DD-MON-YYYY'),
 x_end_date_active          => NULL,
 x_territory_code           => NULL,
 x_attribute5               => NULL,
 x_attribute6               => NULL,
 x_attribute7               => NULL,
 x_attribute8               => NULL,
 x_attribute9               => NULL,
 x_attribute10              => NULL,
 x_attribute11              => NULL,
 x_attribute12              => NULL,
 x_attribute13              => NULL,
 x_attribute14              => NULL,
 x_attribute15              => NULL,
 x_meaning                  => 'XXHR Information',--Lookup Meaning
 x_description              => NULL,
 x_creation_date            => SYSDATE,
 x_created_by               => -1,
 x_last_update_date         => SYSDATE,
 x_last_updated_by          => -1,
 x_last_update_login        => -1
 );

Screenshot of Lookup Created in application

 

--Sheeba Satish

4 comments:

  1. from where to get x_rowid ?

    ReplyDelete
  2. This helped. Thanks. Can we create DFF as well using script?

    ReplyDelete
  3. If i have to create a lookup in Order Management, where do we need to change that in script.

    ReplyDelete