Configure Custom Fields in Reports

Every report that should be custom fields enabled must be modified in the RDF-file. Reports not changed will not have custom fields available. Customers have to edit layout to show custom fields on the actual printout..

Having the correct access privileges

In order to add custom fields to reports or to use the Report Designer on-line mode a developer should have necessary access privileges to access certain forms and logical units. Therefore a user should have the FND_ENDUSER and FND_DEVELOPER roles assigned.

Adding the Custom Field data to the Reporting XML

Three changes to the RDF code are required for each LU in each report

  1. Connect LU:s (often more than one) to a Report Block using a meta data method call. Also clear the table from connections to keep a well maintained Meta data table.
  2. Bring up the rowkey(s) in the cursor.
  3. Make a call(s) to add custom fields to the XML.

Code modification needed

Newly generated RDFs from the Developer Studio (after APP8 SP1) will contain the new changes required for supporting custom fields. Existing RDFs have to be modified according to the below shown changes.

DEFINE PKG                = MODULE_RPI
DEFINE VIEW               = MODULE_REP
...
CREATE OR REPLACE VIEW &VIEW AS
Report_SYS.Define_Report_('&VIEW','&MODULE','&LU', 'Component Information','&TABLE','&PKG..&METHOD',7);
Report_Lu_Definition_API. Clear_Custom_Fields_For_Report(‘MODULE_REP’);
Report_Lu_Definition_API.Enable_Custom_Fields_for_LU(‘MODULE_REP’,  ‘Module’, ‘MODULES/MODULE’);
 
CREATE OR REPLACE PACKAGE BODY &PKG AS
...
   CURSOR get_module IS
      SELECT module, name, description, version, version_desc, rowkey
         FROM module_tab
         WHERE Report_SYS.Parse_Parameter(module, component_) = 'TRUE'
         AND   Report_SYS.Parse_Parameter(version, version_) = 'TRUE';
...
BEGIN
...
FOR master_ IN get_module LOOP
...       IF (do_xml_) THEN
         .
         .
         Xml_Record_Writer_SYS.Add_Custom_Fields(xml_stream_, ‘Module’,master_.rowkey,‘MODULE_REP’, lang_code);
         Xml_Record_Writer_SYS.End_Element(xml_stream_, 'MODULE');   
      END IF;
END LOOP;

 

Report_Lu_Definition_API.Clear_Custom_Fields_For_Report(<Report_Id>)

Variable Description
Report_Id Id of the report. This is generally the report view name.

 

Report_Lu_Definition_API.Enable_Custom_Fields_for_LU(<Report_Id>, <LU name>, <XML Xpath>)

Variable Description
Report_Id Id of the report. This is generally the report view name.
LU name The name of the Logical Unit where the custom fields are add to.
XML Xpath The path in the Report Schema where the custom fields should be add at design time.

 

Xml_Record_Writer_SYS.Add_Custom_Fields(<Xml_Stream>, <LU name>, <Row_key>, <Report_Id>, <Language>)

Variable Description
Xml_Stream The CLOB field in the RDF which has the generated XML data
LU name The name of the Logical Unit where the custom fields are add to.
Row_key Row key of the custom field
Report_Id Id of the report. This is generally the report view name.
Language If the Logical Unit has custom fields which are enumerations then the language to which the enumerations should be translated to should be passed. This can be a language from the RDF business logic (e.g customer's or supplier's language). Pass null if this is not used. If you pass null and enumerations do exists, then the language set for the archive item is taken. If this is also null, then the session language is taken.

 

Adding Custom Fields data fields on to the Report Layout

Layout should be manually alter to place the desired custom fields on the desired place on the layout. When operating in the online mode the report designer tool is  capable of identifying the available custom fields of the report. More information can be found in Report Designer guide.

Controlling Custom Fields on Reports

1. Report level controlling

Entire Report can be enabled or disabled for custom fields, this can be done from the report definition.Custom Field Report Definitions

2. Attribute level controlling

Each Custom filed can be individually controlled, whether its possible to add it to a report or not, this can be done from the particular custom fields.   Enable Custom Fields In Reports

Q & A

1. What if rowkey is missing in my table/view?

In views, it is called objkey, in tables it is called rowkey. If it is missing, you can not use Custom Fields for this LU. Skip it.

2. Where do I place the Custom Field XML?

Place it as the last simple item just before the first new block.

3. I do everything right, but no Custom Field shows up in the XML?

  1. Check the report Configuration if the report has been enabled for custom fields.
  2. Check in IFS Enterprise Explorer that a Custom Field attribute has been added to the LU you are connecting.
  3. Check if the RDF business logic has the necessary code to generate the XML with the custom field.
  4. Check if data is available for the Custom Field you added.