VXL can be used to export data from M3 to Excel using a predefined Excel template. This way you can fill the Excel sheet exactly the way you want.
In this example we will create a function to export a purchase agreement of choice and list all agreement lines. The Excel template looks like this.
We will use the configurator in the web application to create the function. Click "+Configurator" on the "Functions" page to create a new function.
Give the function a name and optional description. The configurator contains a search engine for finding APIs. Select an appropriate environment for API metadata. If no environment contains API metadata, Upload API metadata for an environment. Click next when you're finished.
Browse your local filesystem and select the Excel template file. Input header row and data start row. Header row is used to fetch header names for the configurator. Data start row is used by the VXL engine to start writing data. Since we are listing lines from row 5, this will be entered as start row. Start and end column are the data area. Values are suggested based on the template.
Select an API program or transaction from the list or use Advanced API search. Select max number of rows returned from the API. Sorting API output.
Select input values. This can be either a constant value or a input field in the VXL desktop client user interface. In this example we will use input from the user. The labels in the right columns can be changed.
To get the supplier name we need to run a get API. Click "Add new API transaction" to connect to a get API.
Select CRS620Mi.GetBasicData from the list or use Advanced API search to find the API you want
Select input values to the API. This can be values from a previously run API, a input field or a constant. If an input value matches the output value of the list API, it will be matched automatically.
Map the "Supplier name" column to the SUNM field of the get API. Click save