Thursday, September 24, 2015

Default Parameters - Web ADI

Sometimes you need to default parameters for end users while creating the document.

Like Integrator/Viewer/Reporting/Layout/Content etc.



There are some parameters you need to set achieve this.
Go to the respective form function
Navigation: Application Developer > Application > Function > ‘Form’ Tab > Parameters

Frequently used parameters

> &bne:validation=Y this used to be True or False
> &bne:rows=all Flagged rows : The parameters are FLAGGED or ALL it may be case sensitive
> &bne:viewer=BNE:EXCEL2010
> &bne:content
    >> Content value

select application_id || ':' || content_code content
  from bne_contents_tl
 where user_name like 'XXAK%'
   and language = 'US'

>&bne:integrator
>&bne:layout
    >> Integrator and layout Values

select integrator_app_id || ':' || integrator_code integrator
     , b.application_id || ':' || a.layout_code layouts
  from bne_layouts_tl a
      ,bne_layouts_b  b
 where user_name like 'XXAK%'
   and a.layout_code = b.layout_code
   and language = 'US'

>&bne:allow  'Yes' 'No' -- used for 'Upload Parameter' window to appear or not 
>&bne:import=N / Y : This will set 'Automatically submit Transaction import' to No or Yes when uploading transactions to the interface.
>&bne:import=Y/N : Whether you import automatically or not
>&bne:importPost=Y/N Y : Indicates  'Posting errors to suspense' should be set.
>&bne:importSummary=Y/N : Import in Summary Mode or full
>&bne:importFlex=IMPORTVALIDATION : Description Flexfield validation

Example: bne:page=BneCreateDoc&bne:viewer=BNE:EXCEL2010&bne:reporting=N&bne:integrator=20003:XXAKTESTADI_XINTG&bne:layout=20003:XXAKTESTADI&bne:content=20003:XXAKTESTADI_CNT2&bne:rows=ALL


> Once these values are defaulted correctly then set the profile option
"BNE Allow Set Parameters" at the appropriate level to enforce the default values.

> Clear the cache or stop and restart apache to ensure that the change has taken effect
Navigation: Functional Administrator > Core Services > Caching Framework > Global Configuration > Clear All Cache

Tuesday, September 15, 2015

Web ADI - Errors

Here, I am listing few errors which I came across

Exception Name: oracle.apps.bne.exception.BneFatalException - Error loading class: Log File Bookmark: 236030

Reason: The above error will occur when trying to access "Create Document".
    > Check if there is any space between parameters in the 'Form' tag.

For Parameter details please follow the 'Add a form function and add to specified responsibility menu'  section of this post: Web ADI (Download)

--------------

Exception Name:oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the primary key oracle.jbo.Key

ReasonYou are using the same name or you have deleted the interface from application using 'Delete' icon but it's metadata still remains in BNE table(s)

Add a new Interface with a different name
OR
Delete the Interface from backend (If it is a custom BNE) : Delete Interface

-----------------
Exception Name: CANNOT EXECUTE SQL STATEMENT - A LOW LEVEL API CALL FAILED

Reason: Field length is greater than 80 characters, amend the select statement.
----------------

For Excel related errors please follow the below post:

Thursday, September 10, 2015

Enable Trace/Debug - Web ADI

Set the following System Profile Options:

Navigation: System Administrator > Profile > System
                    > BNE%Log%

BNE Server Log Filename : Any Name (Ex: WebADI.log)
BNE Server Log Level    : ERROR
BNE Server Log Path     : Provide the full directory path as per your convenient

> Bounce the Apache Server (adstpall.sh)

>Trace/debug statements will keep increasing the file for every run, to avoid excessive growth of the log file select the appropriate 'BNE Server Log Level' options

Options are: REQUIRED | CRITICAL ERROR | ERROR | WARNING | INFORMATION | DETAIL | TRACE

-- Web ADI Profile Values
select a.profile_option_name
      ,a.user_profile_option_name
      ,a.description
      ,c.profile_option_value
  from fnd_profile_options_tl a
      ,fnd_profile_options b
      ,fnd_profile_option_values c
where b.profile_option_id   = c.profile_option_id
   and a.profile_option_name = b.profile_option_name
   and b.profile_option_name like 'BNE%_LOG%'
   and a.language            = 'US'
;

Custom Web ADI (Download/Upload)

Now we will integrate the download and upload ADIs. We will use the same custom table and packaged procedure used separately in download and upload.


Responsibility: Desktop Integration Manager
> Create Integrator

 XXAK: Test Web ADI
XXAKTESTWEBADI

Check the box for ‘Display in Create Document Page’



Add these three functions
Code:
BNE_ADI_DEFINE_MAPPING
BNE_CREATE_DOCUMENT
BNE_ADI_CREATE_DOCUMENT


Interface type here would be ‘API Procedure’
Package Name: xxak_testadi_pkg
Procedure/Function Name: load_record
API Returns : Error Message



Apply
You can click on ‘Update’ and change prompt and other details required


Create Content
Content type would be ‘SQL Query’
Query : SELECT order_number
      ,start_date
      ,end_date
      ,business_area
      ,batch_number
      ,status
  FROM XXAK_WEB_ADI_DOWNLAOD_TBL
Test Query


Apply

Create Uploader
Uploader: From Template
Select check boxes as below

Skip ‘Create Importer’
Submit


Define Layout
Navigation: Desktop Integrator -> Define Layout -> Select the Integrator


Go > Create

Change the Placement to 'Line'


Next

Apply

Create Mapping
Responsibility: Desktop Integrator
        > Define Mapping
  • Mapping between ‘Interface’ and ‘Content’ data
Apply

Add a form function and add to specified responsibility menu

Responsibility: Application Developer
           > Application > Function
Type: SSWA servlet function
HTML Call: BneApplicationService
Parameter: bne:page=BneCreateDoc&bne:integrator=20003:XXAKTESTWEBADI_XINTG&bne:layout=20003:XXAKTESTWEBADI
select integrator_app_id || ':' || integrator_code integrator
     , application_id || ':' || layout_code layouts
  from bne_layouts_b
 where integrator_code like 'XXAK%'
Add this Function to the specified Menu and go to the related responsibility
Create Document