Audience:

This blog is for beginner developers in OpenText VIM. It also gives fair idea to developer on how to approach extensions of standard VIM Analytics report (/n/opt/VIM_VA2) with custom fields.

 

Prerequisites:

  1. The blog is relevant if your VIM Analytics is running on a SAP NetWeaver AS ABAP 7.40 SP05 or higher and if the data selection is configured to be done with ABAP CDS views.
  2. Custom field is enabled in VIM customizing via transaction code /n/OPT/VIM_1CX1. In our case we are taking CUSTOM_FIELD0 field which is present in header table /OPT/VIM_1HEAD.

Customizing%20in%20/n/OPT/VIM_1CX1

Table%20/OPT/VIM_1HEAD

 

Scenario:

We have requirement of extending one of the most important and central reporting standard report VIM Analytics (transaction code /n/opt/VIM_VA2). The blog is only relevant if your VIM Analytics is running on a SAP NetWeaver AS ABAP 7.40 SP05 or higher and if the data selection is configured to be done with ABAP CDS views. The involvement of SAP HANA and CDS actually makes the report processing and responding quite fast.

Initial screen of VIM Analytics report (/n/opt/VIM_VA2) looks like:

VAN%20Initial%20Screen

VAN Initial Screen

 

On execution, output looks like following screen. On this screen, we need to add an additional custom field which already exits in the VIM header table(from Table /OPT/VIM_1HEAD, field CUSTOM_FIELD0).

 

VAN%20report%20result%20screen

VAN report result screen

 

Steps to add custom field:

 

  1. Append the field CUSTOM_FIELD0 via Append Structure option to standard structure /OPT/VVA2_OUT_DOC_HDR_ST (VIM Analytics 2: Document Header List Fields)  which is the VIM Analytics report output ALV structure.[Note: In case you want to add field to report line item view, Append custom field to structure /OPT/VVA2_OUT_LINE_ITEM_ST. In case you want to add field to report process view, Append custom field to structure /OPT/VVA2_OUT_WORK_ITEM_ST.]

    Enhanced%20structure%20/OPT/VVA2_OUT_DOC_HDR_ST

  2. Append the field CUSTOM_FIELD0 to structure /OPT/VVA2_CDS_DOC_HDR_ST (VIM Analytics 2: SAP CDS Document Header List Fields). This is to fetch header data from CDS view.

    Enhanced%20structure%20/OPT/VVA2_CDS_DOC_HDR_ST

  3. Now run the /n/OPT/SPRO transaction and navigate to Vendor Invoice Management > Cross Component Configuration > VIM Analytics (New) > Maintain Customizing Profiles. Select the DEFAULT profile and navigate to Define Field Mapping. Add the following details as a new line in Field Mapping for this custom field.

    Selection Mode Use ABAP CDS views
    View Type Header View
    Database Field Name CUSTOM_FIELD0_O
    Input/Output field of data selection Output Field (as for report output)
    Application Field Name CUSTOM_FIELD0
    Field%20Mapping

  4. Till now, we have done the changes in ALV structure for output and the Field Mapping. In previous step, we define Database Field Name CUSTOM_FIELD0_O. This is the only disconnect we are left with as of now.

    Now to flow data to this Output Database Field Name from Database we need to enhance CDS views based on which the report is running.(a) Enhance the CDS view /OPT/VVA2_DPO to include this field to be returned from view as below:

    CDS%20view%20/OPT/VVA2_DPO

    (b) And also we can observe, the CDS view /OPT/VVA2_DPO has the base view /OPT/VVA2_COMO which we also need to enhance to let data flow from the underlying base table .

    CDS%20view%20/OPT/VVA2_COMO

     

Now when we run the report /n/opt/VIM_VA2 (VIM Analytics) and change the report layout, we can see the additional field we added in the list and upon selection the output will show the additional field with data.

Executing%20/n/opt/VIM_VA2

Executing /n/opt/VIM_VA2

 

I hope above blog will be somewhat useful for basic understanding and working of enhancements in OpenText VIM (VAN to be more precise).

Randa Khaled

Randa Khaled

Author Since: November 19, 2020

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x