Use the below code to insert lookup values in Common Lookups (Application Object Library). You can use this to insert lookup values to other modules also, by changing application id (X_VIEW_APPLICATION_ID).
DECLARE
l_rowid1 NUMBER;
v_lookup_type VARCHAR2(400) := 'LOOKUP_NAME'; -- Name of the Lookup
v_lookup_value_code VARCHAR2(400) := 'VALUE_CODE';
v_lookup_value_meaning VARCHAR2(400) := 'VALUE_MEANING';
v_lookup_value_desc VARCHAR2(400) := 'VALUE_DESCRIPTION';
BEGIN
--You can change values as per your requirement
fnd_lookup_values_pkg.insert_row(
X_ROWID => l_rowid1,
X_LOOKUP_TYPE => v_lookup_type,
X_SECURITY_GROUP_ID => 0,
X_VIEW_APPLICATION_ID => 0,
X_LOOKUP_CODE => v_lookup_value_code,
X_TAG => NULL,
X_ATTRIBUTE_CATEGORY => 'CONTEXT_VALUE', --change it
X_ATTRIBUTE1 => NULL,
X_ATTRIBUTE2 => NULL,
X_ATTRIBUTE3 => NULL,
X_ATTRIBUTE4 => NULL,
X_ENABLED_FLAG => NULL,
X_START_DATE_ACTIVE => sysdate,
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 => v_lookup_value_meaning,
X_DESCRIPTION => v_lookup_value_desc,
X_CREATION_DATE => sysdate,
X_CREATED_BY => -1,
X_LAST_UPDATE_DATE => sysdate,
X_LAST_UPDATED_BY => -1,
X_LAST_UPDATE_LOGIN => -1
);
commit;
END;
Comments
Post a Comment