Sitemap

Wednesday, May 6, 2015

Enable Managed Attachments for Oracle EBS Forms don't have FND Attachments configured at form level

For EBS forms that have FND Attachments enabled at the "Form" level one can configure Managed Attachments by populating the AXF_FND_MAP table (either using the AXF_MANAGED_ATTACHMENT_DATA.sql script or manually) and additional parameters can be added by populating the AXF_MA_PARAMETERS table.

For EBS forms and/or custom forms that have FND Attachments enabled at "Form Function" level only, you will need to use an alternate approach and manually add entries to the AXF_CONFIGS / AXF_COMMANDS / AXF_COMMAND_PARAMETERS tables.

You will need to collect the following values:

  • Entity (businessObjectType): the EBS entity/module (for example: AP_INVOICES)
  • Primary Key (businessObjectKey1) and Data Block Object (businessObjectValue1); the forms data block and attribute that holds the primary key value for the record (for example: INV_SUM_FOLDER.INVOICE_ID)
  • Formfunction name for the EBS form (for example: AP_APXINWKB)


DECLARE
my_entity VARCHAR2(255) := 'your_ebsentity'; --example: AP_INVOICES
my_formfunction VARCHAR2(255) := 'your_formfunction'; --example: AP_APXINWKB
my_datablockname VARCHAR2(255) := 'your_forms_datablock_name'; --example: INV_SUM_FOLDER
my_fieldname VARCHAR2(255) := 'your_datablock_fieldname'; --example: INVOICE_ID

v_formId AXF_CONFIGS.FORMID%TYPE;
v_eventId AXF_COMMANDS.EVENTID%TYPE;
v_solutionendpoint AXF_CONFIGS.SOLUTIONENDPOINT%TYPE;

BEGIN
select AXF_CONFIGS_SEQ.NEXTVAL into v_formId from dual;
select SOLUTIONENDPOINT into v_solutionendpoint from AXF_CONFIGS where formfunction='AXF_MANAGED_ATTACHMENTS';

Insert into AXF_CONFIGS (FORMID,FORMFUNCTION,SOLUTIONENDPOINT,ENTITYNAME,LOGENABLED,DATABLOCKNAME,CREATED_BY,CREATION_DATE,LAST_UPDATE_DATE,LAST_UPDATED_BY,LAST_UPDATE_LOGIN) values (v_formId,my_formfunction,v_solutionendpoint,null,'YES','AXF_DEFAULT',0,sysdate,sysdate,0,0);

select AXF_COMMANDS_SEQ.NEXTVAL into v_eventId from dual;
Insert into AXF_COMMANDS (EVENTID,FORMID,EVENTNAME,DISPLAYMENU,COMMANDNAMESPACE,REQUIRESCONVERSATION,SORTBY,SOLUTIONNAMESPACE,MENUTYPE,SPECIAL,RESPONSIBILITY,CREATED_BY,CREATION_DATE,LAST_UPDATE_DATE,LAST_UPDATED_BY,LAST_UPDATE_LOGIN) values (v_eventId,v_formId,'ZOOM','Managed Attachments','UCM_Managed_Attachments','NO',3,'UCM_Managed_Attachments','ZOOM',null,null,0,sysdate,sysdate,0,0);

Insert into AXF_COMMAND_PARAMETERS (PARAMETERID,EVENTID,PARAMETERNAME,DATASOURCENAME,DATABLOCKNAME,FIELDNAME,CONSTANTVALUE,CREATED_BY,CREATION_DATE,LAST_UPDATE_DATE,LAST_UPDATED_BY,LAST_UPDATE_LOGIN) values (AXF_COMMAND_PARAMETERS_SEQ.NEXTVAL,v_eventId,'application','CONSTANT',null,null,'EBS_instanceA',0,sysdate,sysdate,0,0);

Insert into AXF_COMMAND_PARAMETERS (PARAMETERID,EVENTID,PARAMETERNAME,DATASOURCENAME,DATABLOCKNAME,FIELDNAME,CONSTANTVALUE,CREATED_BY,CREATION_DATE,LAST_UPDATE_DATE,LAST_UPDATED_BY,LAST_UPDATE_LOGIN) values (AXF_COMMAND_PARAMETERS_SEQ.NEXTVAL,v_eventId,'businessObjectType','CONSTANT',null,null,my_entity,0,sysdate,sysdate,0,0);

Insert into AXF_COMMAND_PARAMETERS (PARAMETERID,EVENTID,PARAMETERNAME,DATASOURCENAME,DATABLOCKNAME,FIELDNAME,CONSTANTVALUE,CREATED_BY,CREATION_DATE,LAST_UPDATE_DATE,LAST_UPDATED_BY,LAST_UPDATE_LOGIN) values (AXF_COMMAND_PARAMETERS_SEQ.NEXTVAL,v_eventId,'businessObjectKey1','CONSTANT',null,null,my_datablockname||'.'||my_fieldname,0,sysdate,sysdate,0,0);

Insert into AXF_COMMAND_PARAMETERS (PARAMETERID,EVENTID,PARAMETERNAME,DATASOURCENAME,DATABLOCKNAME,FIELDNAME,CONSTANTVALUE,CREATED_BY,CREATION_DATE,LAST_UPDATE_DATE,LAST_UPDATED_BY,LAST_UPDATE_LOGIN) values (AXF_COMMAND_PARAMETERS_SEQ.NEXTVAL,v_eventId,'businessObjectValue1','DATA',my_datablockname,my_fieldname,null,0,sysdate,sysdate,0,0);

END;
/

The following screenshot displays the entries for transactions in Receivables.

No comments:

Post a Comment