Add-ons can provide additional information and you can integrate them easily into CIS mobile. In contrast to reports add-ons are placed at very specific positions e.g. to display more data relevant to a certain customer order.
Basically, you choose the position in CIS mobile that should display some more information, implement a method that can retrieve the necessary data from the ERP system and embed it in some HTML formatting.
The connecton between add-on placeholders and the corresponding method on VB.NET
Preperations for a new add-on
Turn on the testing mode for add-ons in the settings of CIS mobile. Then navigate to the position where you want to provide the additional information and look for one of the yellow/orange buttons. The name of this button will then be used for the method that needs to be implemented in VB.NET. Open the project "s10cisaddon.sln" where you can find some examples.
Setting to only display placeholders for add-ons
Click on one of the placeholder buttons for an add-on to display a list of all keys and their values that are available at this position. They can be accessed within a dictionary object in the VB.NET add-on project and can be used as input parameters for data retrieving calls to the ERP system. To read the value to a certain key, use the command
GetItem(keys, "name of key")
where "keys" is the dictionary object (input parameter of all add-on methods; please see one of the examples)
GetItem(keys,"VBELN") e.g. will return the order number to the order at that position
Available keys and values to order no. 13925
Retrieve data and format in HTML
To retrieve the required data out of the ERP system you have a couple of possible options:
The simplest case is to just read from a single table and it is sufficient for many situations. For more complex requests you can use BAPIs, the SAP GUI scripting interface or your own ABAP functions.
Please see the examples bundled with CIS mobile and the topics concerning SAP data access in this documentation.
The retrieved raw data is then formatted with HTML5 inside the method in VB.NET and returned as a string back to CIS mobile which will interpret and output the string as HTML in the browser. Just test the output of the raw data by returning a simple textstring. Later you can then improve the design e.g. by putting the data inside of a fancy table.
Add expandable buttons
In every method that needs to be implemented in the add-on project there is an input parameter called "buttons". You can change this parameter in the following way to create a new expandable button (a button with a (+) symbol):
buttons = "Name of the method that will be called | Caption of the button | Text of processing-message"
buttons = "ProductionOrder|" & "Production order" & "|" & "Prodiction order is being read"
(On touching/clicking this button the method "BuildProductionOrder" will be called)
Performance of add-ons
Activate "only testouput" for the add-ons in the CIS mobile settings. All add-ons will then be displayed in orange so you can distinguish them easily from basic CIS mobile functionality. Click on any orange area within the add-on to display the result of a time-measuring. The measure starts on calling the addon and ends as soon as all data is retrieved from the ERP system.
Measuring the performance of an add-on