Tuesday, September 8, 2015

Custom Web ADI (Download)

Here I will go through the steps to create a custom Web ADI to download the data from a custom table.


For introduction you can refer below post:


Responsibility: Desktop Integration Manager

 > Create Integrator
XXAK: Test Download ADI
XXAKTESTDWNADI

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 ‘Table’

To get your custom table here, you need to register it first.
Please follow below link(s)




Apply


Create Content

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

Test Query

Apply

Create Uploader – Not Required
Submit

Create Layout


Responsibility: Desktop Integrator

> Define Layout

Change the placement as ‘Line’





Select ‘Protect Sheet’, ‘Apply Filters’ and ‘Data Entry Rows’ as required








Create Mapping

Responsibility: Desktop Integrator

 > Define Mapping

Mapping for ‘Interface’ and ‘Content’ data











Source Columns are referencing SQL Query (Content)
Target Columns are referencing the table (Interface)


Apply





Completed


Add a form function and add to the specified responsibility menu

Responsibility: Application Developer
          > Application > Function


Type: SSWA servlet function
HTML_call : BneApplicationService
Parameter: bne:page=BneCreateDoc&bne:integrator=20003:XXAKTESTDWNADI_XINTG&bne:layout=20003:XXAKTESTDWNADI


select integrator_app_id || ':' || integrator_code integrator
        , application_id || ':' || layout_code layouts
  from bne_layouts_b
 where integrator_code like 'XXAK%'










Before you run the ADI you need to amend some Excel settings, please follow below link


Select appropriate ‘Viewer’, ‘Layout’, and ’Content’