Table of Contents
Overview
This section will show the customization options of Insight Creator.
- Login to SAP
- Go to the Insight Zap Insight Creator transaction in ‘/DPS/RAINBOW_IMG’ (T-code). You might want to save this transaction in your favorites.
Another option is to navigate from the main Insight Creator screen via Goto -> Customizing
The following window will open:
Creator IMG Main screen
Environment Data
Maintain Env Data
Click on ‘Execute’ Button
The following window will open:
Creator IMG Maintain Environment Data screen
The following customization structures are available (use the left panel to switch between structures:
Configuration:
- Via Selection Screen -> Save required – Defines what will happen when the variant report is executed via selection screen and not saved. When the option is checked and ‘Back’ button is clicked the report will not run.
- Log Active – Activate the log in transaction ‘/DPS/RAINBOW_LOG’.
Fiori Front-End-Server:
- Define the RFC Destination of Fiori Front-End Server.
ITS:
- Define the URL and port of the ITS Server.
Groups
Define Groups
This option enables one to create a group to collect reports (for example Finance, Procurement, Sales, etc.).
You can use this groups also for authorization purposes
Click on ‘Execute’ Button
The following window will open:
Creator IMG Groups
Important Note:
The Group 1MY is delivered with the system and serves as the default Group in case no other Group was selected.
Toolbar Functions
In addition to built-in Insight Zap Creator functionality, it is possible to extend variants with (custom) Toolbar Functions. Toolbar Functions are manifested as push buttons at the Creator toolbar. Adding Toolbar Functions, turn a simple report into an Operative one, e.g. adding Update delivery date at Purchase Orders Report. Functions are built of two parts: Function definition (Creator level) and function usage (Variant level).
Function usage is done by a simple assignment function to the Creator variant. The assignment consists of two parts: Setting of function name and its UI attributes. Attributes can be adapted from function definition or set manually.
In case the Creator is built of a specific Toolbar Function (Source of type Function) the outcome will be a whiteboard Excel-like screen. From this screen, users may key-in rows of data, select the records, and press the Toolbar function thereafter. Another way to utilize the Toolbar Function is by uploading an Excel file in the structure of that Toolbar Function and pressing the button upon completion.
In addition to manual execution by user (in the UI), it’s possible to execute the function directly w/o displaying ALV. This can be done by scheduling a report /DPS/RET_RAINBOW and setting Function under Direct Execution. In such a case, processing messages will be written to the application log under object /DPS/RAINBOW. Logs can be displayed in transaction /DPS/RAINBOW_APPLOG.
In order to code Toolbar functions, developer key is needed since it contains code developed in DEV, tested in QA and shipped thereafter to Prod for general use.
Following is a clear description of the steps needed in order to code a specific Functionality that gets a few parameters as input and yields in return something. It could be updating PO data, locking customers or clearing invoices – all are viable use cases of the Toolbar function framework.
However, in case the toolbar function implements a call to a single Function Module (BAPIs included), then Toolbar Function: ‘Generate
Code From Function Call’ could be utilized. This function allows the developer to generate the implementation class of the toolbar function out of a function
module and test data. Look for further information at the end of this section.
Define Toolbar Funcs
This option enables you to create a button in a variant report.
Click on ‘Execute’ Button
The following window will open:
Creator IMG Functions Selection
Narrow down the list of Toolbar Function and Click on ‘Execute’ Button
Main Screen
Creator IMG Functions
This view cluster enables searching “where used”, defining and editing Toolbar function.
- Select a row and press the “Where Used” button
A popup screen will display the list of variants and the button ID (the ID includes a hot spot to easily view the Insight Creator Variant).
Creator IMG Functions WhereUsed - Click at New entries or Change in order to create a new toolbar function or to edit an existing one.
- Fill in the required input field in the view:
- The icon to the left describes the function implementation status. The statuses are as follow:
- Green icon – The Function is well implemented.
- No color icon – The Function was not yet implemented.
- Red icon – There are multi-Function implementations.
- The unique function name serves as the Toolbar function user-command.
- Group is the function group name. It helps to group function by criteria. See next section on how to define and maintain functions.
- Icon field will be used as the Toolbar button icon
- Icon text, if entered, will be shown on the Toolbar button
- Quick info for icon – Hovering a button will display this text if entered
- Refresh – Marking this checkbox point the system to refresh the whole Report data upon function return. This functionality Refreshes the Report data upon return and is used by Toolbar functions that may affect the presented data. Do note that this functionality may affect performance since the whole report is re-fetched and rendered. The Function may explicitly overrule this Refresh call.
- Inactive – Marking this checkbox notes the system to ignore this Toolbar altogether.
To further define the Toolbar interface, mark the requested record and press the “fields” menu item.
Interface Fields
The following screen will be presented.
Creator IMG Functions Interface
Enter fields properties:
- Field name – the name of the input.
- Data element – the field’s defined DE
- Short description – The default Data Element description.
- Generic – Mark to define fields without a specific data type. Data type will be derived on runtime according to the mapped column.
- Optional checkbox – Point out non-mandatory interface fields
- Short description – Optional field description
- Sequence Number – Integer values that determine the order in which fields are sorted. It’s recommended to leave gaps between sequence numbers (e.g., 10, 20, 30) to simplify the insertion of new fields in the future.
Important note:
You must save all changes before pressing the BAdI Implementation/Where-used button.
Mind the Generate Type button which creates a generic data structure named ts_func_data in which the Toolbar function’s field definition is being declared. Naturally, this functionality will be available only after the BAdI has already been implemented.
In order to implement the Business AddIn (BADI), press
BADI Implementation
The following screen will be presented.
Create BAdI Implementation Screen
The input fields are filled automatically, yet the developer may change them if needed.
It’s highly recommended to check the Copy Sample Class field, in order to get a better understanding of the available functionality.
Pressing the
Create BAdI Implementation Activate Screen
Check all related objects and press the icon
in the following screen, press the /DPS/IF_RET_FUNCTION_BADI~EXECUTE method to view the code.
In order to visit the code again, from the Toolbar Function main screen select the needed function and press the
Create BAdI Implementation View Code
Pressing the marked
Coding Functionality
The following screen will be presented.
The implemented interface includes the following objects:
Create BAdI Implementation Object Model
- IO_SELECTION – Data Selection Class which allows the developer to fetch the data records/cells the user has selected.
- IT_DATA – Untyped data table which contains the entire sent content.
- IO_LOG – Creator Log into which the application messages (log) are being saved
In the majority of the cases, the code should look very much the same:
- Use the IO_SELECTION object methods to fetch the selected records/cells
- Handle cases where no records/cells were selected
- Loop over those selected records/cells
- Move the untyped data in IT_DATA into a typed structure
- Fill the BAPI structures with the required data
- Invoke the BAPI
- Save the messages into the application log using the IO_LOG methods
- Commit work in case of success
- Roll-Back work in case of error
- End up loop
- Rais exception in case needed
The following code is an example of a Toolbar Function to initialize a user Password.
Create BAdI Implementation View Code
Use input parameter IO_SELECTION to get selected rows, columns or cells. You may use advanced options. e.g. in method SELECTED_ROWS_GET, you can set parameter IV_INCLUDE_CELL_SEL to include also rows of selected cells and not explicit selection of (whole) rows:
DATA: lt_row_index TYPE lvc_t_indx.
lt_row_index[] = io_selection->selected_rows_get(
iv_include_cell_sel = abap_false
iv_ignore_single_cell = abap_false
).
If required selection hasn’t been made, raise exception /DPS/CX_RET_FUNC_EXEC_SEL with corresponding textid (NO_CELLS_SELECTED, NO_ROWS_SELECTED or
NO_COLUMNS_SELECTED) to abort process:
IF lt_row_index[] IS INITIAL.
RAISE EXCEPTION TYPE /dps/cx_ret_func_exec_sel
EXPORTING
textid = /dps/cx_ret_func_exec_sel=>no_rows_selected.
ENDIF.
LOOP AT lt_row_index ASSIGNING <lv_row_index>.
READ TABLE it_data ASSIGNING <ls_data> INDEX <lv_row_index>.
For easier work with input table (In order to avoid of dynamic assignments of components every time), just move it to typed structure (Based on the list of fields defined in customizing of Function)
MOVE-CORRESPONDING <ls_data> TO ls_data.
Call the functionality:
CALL FUNCTION ‘BAPI_USER_CHANGE’
EXPORTING
username = ls_data–iv_username
PASSWORD = ls_data–iv_password
PASSWORDX = abap_true
tables
return = lt_return
Messages (BAPIRET2 messages, SYST message, exception and even free text) should be written to log by calling corresponding method of IO_LOG: MSG_SY_ADD, MSG_BAPIRET_ADD, MSG_EXCEPTION_ADD, MSG_TEXT_ADD.
You should set IS_DATA in order to assign the message to specific row (Always use original IT_DATA record, because assignment uses some internal technical fields) Set value of IV_FIELD with field name in case you wish to assign the message to specific field (column):
io_log->msg_bapiret_add(
* is_bapiret = is_bapiret
it_bapiret = lt_return
is_data = <ls_data>
* iv_field = iv_field
).
Set Commit/Roll-Back work in case of success/failure
IF /dcm/cl_msg_util=>return_tab_err_check( lt_return ) = abap_true.
ROLLBACK WORK.
ELSE.
COMMIT WORK.
lv_updated = abap_true.
ENDIF.
ENDLOOP.
In case no changes were made (And data shouldn’t be refreshed), you may raise exception /DPS/CX_RET_FUNC_EXEC_NOT_DONE:
IF lv_updated = abap_false.
RAISE EXCEPTION TYPE /dps/cx_ret_func_exec_not_done
EXPORTING
textid = /dps/cx_ret_func_exec_not_done=>nothing_done.
ENDIF.
Generate Code from FM
in case the toolbar function implements a call to a single Function Module (BAPIs included), then Toolbar Function: ‘Generate Code from Function Call’ could be utilized. This option allows the developer to generate the implementation class of the toolbar function out of a function module and test data. Look for further information at the end of this section.
To follow this low code/no code path, the needed functionality should be first implemented using SAP T-code SE37 (ABAP Function Modules). The input parameters used should be then save as the FM test data directory.
We may now proceed to define the Toolbar function based on that very Function Module.
Follow the above-described process to define the Toolbar header data (main screen) and proceed to the BAdI implementation phase (field definition could be omitted altogether). Upon activating the resulted objects, get back to the main screen and press the
Generate From Function Call Select FM
Select the FM name along with the saved test data and press the Enter key.
The system will generate the interface and the parameters from the selected FM & Test data. It should look something like that:
Generate From Function Call Select Params
Mark as input those fields that should serve as this Toolbar Function input and omit those that use constant values. Press the
You are good to go!
Define Func Groups
This option enables to create a Function Group to a Function in Insight Creator.
Click on ‘Execute’ Button
The following window will open:
Creator IMG Functions Groups
Assignment of functions to groups allows a simpler selection (it allows the user to restrict the list of functions by group).
Formula Functions
Define Formula Func
This option enables to create and add function to ‘Formula’ button
Creator IMG Formula Functions Define
Even though Insight Creator comes with many formulas, you may develop your own custom formulas by creating a class and methods.
Please follow the FAQ on how to develop your own custom formulas .
After developing a new formula you must add it to the Insight Creator customizing as followed:
At the Insight Creator customizing:
- Click on ‘Execute’ Button
to define Insight Creator Formula Functions.
The following window will open:
Creator IMG Formula Functions
- Enter function properties:
- Formula Function Status – shows whether the Formula function was correctly implemented or not.
- Formula name – Unique Formula Function name. The application adds the prefix C_ in-front of the Formula Functions.
- Class name – the class to which the following method belongs to
- Method name – the relevant Class Method
- Function description – Optional Formula Function description.
- Inactive checkbox – deactivate the Formula function
Important note:
There is a Where used button to show Insight Creator Variants that use a selected Function.
Columns
Columns
Insight Zap Creator allows authorization at the column level and offers an easy to use tool to pick Data Elements from (at the column level)
Column Auth Groups
Define Column Authorization Groups. This option enables defining Authorization Groups for columns.
- Click on ‘Execute’ Button
.
The following window will open:
Creator IMG Column Authorization Groups
- Maintain the Authorization Group ID.
Column Field Types
Define Column Field Types. This option enables defining lists and properties of data element fields for columns.
Creator IMG Column Field Types
- Click on ‘Execute’ Button
.
The following window will open:
Creator IMG Column Field Types Activities
- Double-click relevant activity for creation.
Variables
Variable Auth Groups
Define Variable Authorization Groups. This option enables defining Authorization Groups for Variants.
- Click on ‘Execute’ Button
.
The following window will open:
Creator IMG Variable Authorization Groups
- Maintain the Authorization Group ID.
Navigation
Business end-user needs all relevant information in sight or a click away. Navigation is in charge of brining everything closer to the business end-user. It’s possible to define navigation (drilldown) from column to relevant business object, other Creation, other Report or Parameter report.
Maintain Obj Navigation
This option defines the object and activity that can be drilled-down in a field report.
Creator IMG Object Navigation Drilldown Popup
Click on ‘Execute’ Button
The following window will open:
Creator IMG Object Navigation Activities
Assign Nav to Fields
Assign Navigation to Fields (Global). This option defines a connection between a domain and an object that will appear in the ‘Drill Down’ button in all reports.
Click on ‘Execute’ Button
The following window will open:
Creator IMG Object Navigation Assign Domain
Important Note:
You can assign more than one navigation object to a Field. The user will have to choose from all available options upon selecting.
Logs
Delete logs
This option enables to delete running log of
- Click on ‘Execute’ Button
.
The following window will open:
Creator IMG Logs Delete
- Enter relevant parameters and click on ‘Execute’ button
.
Links
Delete Links
Send via Outlook was enhanced with the new option “Content link”.
When being set a (perma) link to the report (via ITS) will be
generated.
The link will navigate directly to the Insight Creator variant with the
selected report variant, ALV layout and the selected rows.
Generated Insight Creator links are saved in DB.
Generated links should be periodically deleted by scheduling a
background job via this customization (report /DPS/RET_LINK_DEL)
It’s recommended to delete links older than one month to avoid large DB space.
- Click on ‘Execute’ Button
.
The following window will open:
Creator IMG Links Delete
- Enter relevant parameters and click on ‘Execute’ button .
Copyright
Copyright
© Copyright 2021 Dpro Ltd. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose without
the express permission of Dpro Innovation Ltd. The information contained herein may be changed without prior
notice.