Skip to Content
Technical Articles

Configure My Inbox app in SAP BTP portal using OData provisioning(TASKPROCESSING & SWF_TCM) approach NEO(not on-premise)

Here comes the implementation process of fetching workitems from SAP system(s) to My Inbox app in SAP Cloud platform which is lately called as SAP BTP (Business Technology platform) portal.

Follow the below step by step procedure to accomplish the requirement.

Step 1: Ensure you have the workitems assigned to you in SBWP T-code in SAP system.

Go to SBWP T-code in SAP system

Step 2: OData Provisioning service should be enabled in the Cockpit

OData%20Provisioning%20Service%20in%20Cockpit

OData Provisioning Service in Cockpit

Services –> OData Provisioning –> Configure OData Provisioning

Step 3: Assign GW_User and GW_Admin roles to your ID.

Assign the GW_User role to all users who access the My Inbox. The GW_Admin role is only assigned to the user who does the OData configurations in cockpit.

Assign%20Roles%20in%20Cockpit

Assign Roles in Cockpit

Cockpit –> Roles –> Select Role –> Assign with the user id

Step 4: Configure OData destination in cockpit to your backend system by taking the reference of the following values.

Name : Destination_OData (relevant name to your system)

Type: HTTP

Description: Destination for OData Provisioning service

URL: URL of the portal site 

Proxy Type : OnPremise (it needs to through the cloud connector to access client backend systems)/ HTTP (for trial purpose)

Authentication: SAPAssertionSSO

Location ID: known to cockpit admin

Issuer SID: Portal SID

Issuer Client: Portal client

Recipient SID: SID of SAP backend system

Recipient Client: client Number of SAP system

Certificate: **********  (SAPAssertionSSO)

Signing Key: **********  (SAPAssertionSSO)

Note: Authentication can be Basic Authentication also provided the RFC ID and password should be noted.

There is a signing key and certificate maintained in the Destination. In the backend system, the certificate is maintained. When the destination details are sent to the backend system, it unencrypts the certificate using the signing key and checks if it is matching with backend certificate. If it is matching, then only it will allow the SSO. We have to make sure the certificate is active in the back end system

Note: Suppose workitems from more than one system are required, you need to create a gateway in ECC system (or a separate central hub as a gateway) and create destinations for the other systems in SM59. Assign TASKPROCESSING 02 OData service to the System Aliases of those destinations in /IWFND/MAINT_SERVICE. Provide the details of the Gateway ECC system in the destination created above. (This process explained in the below steps)

 

Step 5: Register the OData service TASKPROCESSING 002 to above Odata Destination created above

Services –> OData Provisioning –> Go to service –> Register –> Select your destination(Destination_OData) –> Search for TASKPROCESSING

Register TASKPROCESSING Service

TASKPROCESSING%2002

TASKPROCESSING 02

Service%20Details

Service Details

Note: You can change the destination assigned by clicking on Assign Destination button and also Unassign a Destination by clicking on Unassign button

Step 6: Create another new Destination on the account level which points to Gateway As a Service

Name: Destination_Accountlevel

Type: HTTP

Description: Destination to the gateway

ProxyType: OnPremise

URL: FQDN (Fully Qualified Domain Name: provided by basis) (https://hostname:port)

Authentication: ApptoSSO

Location ID: cockpit admin knows

Additional Properties

Sap-client: client number

WebIDEEnabled: true

WebIDESystem: Destination_Accountlevel

WebIDEUsage: odata_gen

Step 7: Find Fiori cloud edition provided My Inbox application in subscriptions: crossfndfioriinbox

Subscriptions –> crossfndfioriinbox

crossfindfioriinbox%20Subscription

crossfindfioriinbox Subscription

Map the Account level Destination (Destination_Accountlevel) to the Fiori application.

When you click on edit–> It enables a dropdown with all the destinations in cockpit –> Select your account level destination and save.

Map%20the%20account%20level%20destination

Map the account level destination

Now that all the configurations at the cockpit level are completed, Let’s configure My Inbox Tile in the Portal site.

Step 8: Create a new Tile in Portal Site

Open Portal Site à Apps à (+) Create a new Tile à Select App Resource à select subscribed app

My%20Inbox%20App%20Properties

My Inbox App Properties

When%20you%20select%20App%20Resource

When you select App Resource

In the Visualization Tab, select dynamic tile and add the service URL parameter value as /sap/opu/odata/IWPGW/TASKPROCESSING;mo;v=2/TaskCollection/$count/?$filter=Status eq ‘READY’ or Status eq ‘RESERVED’ or Status eq ‘IN_PROGRESS’ or Status eq ‘EXECUTED’

Add the property tcmURL:  /sap/opu/odata/IWPGW/TASKPROCESSING;mo;v=2

Visualization%20Tab

Visualization Tab

Properties%20Tab

Properties Tab

Step 9: Test the app

Publish the site and test the My Inbox app. You can see the count on the Tile and the workitems will be visible onclick.

Here comes the end of a successful implementation of My Inbox configuration in BTP portal but it’s not end of the story.

A BTP cockpit can have multiple portal sites which can be from different line of businesses. In the Fiori app subscription page, you can only select the Destination from a dropdown. With the drop down, you can select only one destination for a Fiori app subscription i.e My Inbox à only one destination in a portal site which is respective to a single business. FIRST COME FIRST SERVE

BUT, If 2 line of businesses (portal sites) wants to subscribe to the My Inbox app????????????

Don’t worry guys!!!!!

I’m here to provide you a solution

SAP has provided another OData service called as SWF_TCM (Task Consumption Model) similar to TASKPROCESSING 02 OData service. So, now the one who comes second also gets a serve with the new SWF_TCM service.

So, Let’s start what serve will be provided for the second comers

The first 2 steps will be applicable for the multi-origin scenario i.e if work items of more than one back end systems are required to be populated in My Inbox app.

Step 1:  Create RFC Destinations to the other SAP systems

In SM59, create destinations for the SAP systems from which the work items are to be fetched

Create%20Destination%20in%20SAP

Create Destination in SAP

Step 2: Create System Aliases for the RFC Destinations which you created above

Transaction SPRO –> SAP Reference IMG –> SAP Customizing Implementation Guide –> SAP NetWeaver à Gateway –> OData Channel à Configuration –> Connection Settings –> SAP Gateway to SAP System –> Manage SAP System Aliases –> New Entries –> Provide the below details

System%20Alias%20in%20SPRO

System Alias in SPRO

SAP System Alias: Any relevant name

Description: Description of Alias

Local SAP GW: ensure that this checkbox is not selected.

RFC Destination: Select the RFC destination created above

To simplify, No. of SAP systems = No. of Destinations = No. of System Aliases

Step 3: Register the SWF_TCM OData service to the system aliases created above

Transaction /IWFND/MAINT_SERVICE à Search for the SWF_TCM service (Should be in activated position)

Select Add Service

Select the system Alias and provide the details of the SWF_TCM service and register the service to all system aliases.

Register%20Service%20to%20System%20Alias

Register Service to System Alias

Now that the configurations in SAP system are completed, let’s start cockpit configurations.

If you have single SAP system, you can directly jump to this step

Step 4: Create SAP_ODP Destination in BTP cockpit

Destinations –> New Destination

SAP_ODP

SAP_ODP

URL: This should be the absolute path URL of the SAP Cloud Platform OData Provisioning Service on your subaccount.

Select Services –> OData Provisioning tile –> Go to Service.

From the OData Provisioning Administration Admin Space URL, copy the subaccount absolute URL. The subaccount absolute URL is the value, which starts with https:// without /Admin. For example, https://<accountname-p123454343trial>/hanatrial.ondemand.com.

Check connection.

Step 5: Create OData Destination for the SAP system (In case of multi-origin, the system should be gateway)

Follow step 5 in the above approach (OData provisioning using TASKPROCESSING 02)

Considering the same Destination_OData destination.

Step 6: Register the new SWF_TCM OData Service to the above created OData Destination (Destination_OData)

Select your OData destination from the dropdown and search services with SWF_TCM –> Register

Register SWF_TCM to SAP_ODP

Tip: If the destination is not with Basic Authentication, sometimes it do not shows up Register Service list. Then create a dummy destination with basic authentication and in the service details page, Assign the OData destination and make it default thereby un assigning the dummy destination.

Service%20Details

Service Details

Step 7: Configure the Tile in BTP Portal

Follow Step 9 in the above Approach (OData provisioning using TASKPROCESSING 02)

Only the service URL in Visualization and Parameter tcmURL changes from the above approach since we are using SWF_TCM service instead of TASKPROCESSING

My%20Inbox%20Tile%20Visualization%20and%20Parameters

My Inbox Tile Visualization and Parameters

tcmURL: /odp/odata/SAP/SWF_TCM;v=1;mo;

Service URL: /odp/odata/SAP/SWF_TCM;v=1;mo/TaskCollection/$count/?$filter=Status eq ‘READY’ or Status eq ‘RESERVED’ or Status eq ‘IN_PROGRESS’ or Status eq ‘EXECUTED’

Step 8: Publish the site and test the App

The app establishes first call to the gateway system and brings the count value (no. of workitems) and second call goes to the OData system to fetch the work items. That is why we see 2 $batch in the Network trace list. One is for count and the other is for workitems.

 

Issues Encountered:

  • Approve/Reject buttons do not appear for work items:

Resolution: Add the decision keys in workflow

https://userapps.support.sap.com/sap/support/knowledge/en/2421785

  • For some test users, Error message is showing up instead of count in My Inbox Tile

Resloution: Add SWF_TCM role in PFCG

https://help.sap.com/saphelp_ssb/helpdata/en/6f/0e415370107d77e10000000a441470/frameset.htm

 

Now, you should be aware of configuring My Inbox in SCP Portal overcoming the limitation of subscribing crossfindfioriinbox to one Destination in Hana cockpit utilizing the new SWF_TCM OData service.

Thanks to blogs.sap platform to give me this opportunity

Bye and see you in my next blog post!!

 

Regards,

Sindhu

Be the first to leave a comment
You must be Logged on to comment or reply to a post.