cancel
Showing results for 
Search instead for 
Did you mean: 

Defining Multiple Views on a List Report via adaption project

tursko
Participant
0 Kudos
250

I am currently attempting to adapt a standard SAP Fiori list report and I'm running into some rendering issues. On my List report adaption project I want to create a couple of tabs (multiple views). I have found an SAP delivered variant that actually does this: My Maintenance Requests.

I attempted to do something similar in my manifest, but when I launch the app preview nothing renders and I don't get any concerning errors in the console.

{
      "changeType": "appdescr_ui_generic_app_setMainPage",
      "content": {
        "page": {
          "customer.ListReport|C_MaintWorkRequestOverviewTP": {
            "entitySet": "C_MaintWorkRequestOverviewTP",
            "component": {
              "name": "sap.suite.ui.generic.template.ListReport",
              "list": true,
              "settings": {
                "condensedTableLayout": true,
                "variantManagementHidden": false,
                "enableTableFilterInPageVariant": false,
                "isWorklist": true,
                "quickVariantSelectionX": {
                  "enableAutoBinding": true,
                  "showCounts": true,
                  "variants": {
                    "10": {
                      "key": "_tabDraftTest",
                      "annotationPath": "com.sap.vocabularies.UI.v1.SelectionPresentationVariant#CreateDrafts"
                    }
                  }
                }
              }
            }
          }
        }
      }
      <br>
Does anyone have any experience with this?

References I used: https://help.sap.com/docs/ABAP_PLATFORM_NEW/468a97775123488ab3345a0c48cadd8f/a2b24a69baef4b91af2293c...

Accepted Solutions (1)

Accepted Solutions (1)

tursko
Participant
0 Kudos

I was able to figure it out after some research/POC work. You'll need to add this change to the manifest variant when you're doing adaptations at the CUSTOMER_BASE layer.

The important thing here is the "propertyPath." This is the path in the manifest where the changes have to be added. If you were to look at the manifest of a Fiori List Report application that contains multiple views, you'll notice it has "quickVariantSelectionX" and the JSON hierarchy path is: "component/settings/quickVariantSelectionX/variants/" + "key".

So in my case I used: "component/settings/quickVariantSelectionX/variants/10", 10 is my key to define a new variant. Then you can add your actual tab "key" and "annotationPath." The annotation path can either be local annotations or CDS based annotations.

{
      "changeType": "appdescr_ui_generic_app_changePageConfiguration",
      "content": {
        "parentPage": {
          "component": "sap.suite.ui.generic.template.ListReport",
          "entitySet": "C_MaintWorkRequestOverviewTP"
        },
        "entityPropertyChange": {
          "propertyPath": "component/settings/quickVariantSelectionX/variants/10",
          "operation": "UPSERT",
          "propertyValue": {
            "key": "_tabTest",
            "annotationPath": "com.sap.vocabularies.UI.v1.SelectionPresentationVariant#PhaseReqTechnicalAssitanceReqd"
          }
        }
      }
}



Answers (0)