Financial Management Blog Posts by SAP
Get financial management insights from blog posts by SAP experts. Find and share tips on how to increase efficiency, reduce risk, and optimize working capital.
cancel
Showing results for 
Search instead for 
Did you mean: 
Angelou
Product and Topic Expert
Product and Topic Expert
1,422

Our application can be integrated to On-premise systems such as SAP BW via Smart Data Integration (SDI) through HANA Adapter. You can see the series of steps on how it can be done here on this blog post SAP PaPM Cloud Integration with SAP BW.

Both SAP PaPM Cloud SM and UM supports OdataV4. In addition, SAP PaPM Cloud UM is designed also to support ODataV2. Therefore, on this blog post, I will show you how both SAP PaPM Cloud SM and UM can be integrated with On-premise (BW) and consume data records using OData Service with Cloud Connector.

For you to have preview how the Integration Architecture looks like, here’s a simple visualization:

Angelou_15-1726224194606.png

ODataV4 and ODataV2 has a different step-by-step procedure on how it is being created on the BW System. Let’s start first on how we can create the service in BW for ODataV4.

Creation of an OdataV4 service in SEGW:

With NW750, in SEGW, ODataV4 project can be created. Though it is not recommended as described on SAP Note SAP Note 2485370, project creation will still go through, and users can generate runtime objects that can be use on the service that will be created.

Project Creation.png

Once the Project is created. Users can import the DDIC structure to the Data Model. In this example, I will be using the DDIC Table generated from an existing ADSO

  1. On the created Project in SEGW, press right click to Data Model
  2. Choose Import
  3. Then choose DDIC Structure
  4. Add Entity name
  5. Search the existing Table generated from ADSO
  6. Choose Inbound Table generated from ADSO
  7. Next

7 steps.png

Once the DDIC table was chosen, users may now proceed on fields mapping that will be required for the scenario.

  1. Choose the required fields
  2. Next
  3. Ensure that you have Key field
  4. Finish

2024-09-13_12-57-15.png

On this Import example above, I have imported an existing ADSO using BW Fields rather than BW InfoObject. as the system does not allow fields that contains “/BIC” as its technical field name for ODataV4 project type in SEGW.

For more information, please refer to the official documentation Importing a DDIC Structure.

Once everything is mapped, users can generate the runtime objects which are Service ID, Classes that will be needed for the service creation.

Generated Service Definition.png

With the created OdataV4 Project. We can now move to Registration and Publishing of the Service.

A.      Registration of the ODataV4 Service

1. Go to SAP back-end Service Administration via tcode /iwbep/v4_admin. Then Register Group

Angelou_0-1726228599337.png

2. Fill up the necessary details to create the Service Group.

Angelou_1-1726228626427.png

3. After filling up the creation of Service group, the system will ask if you would like to register an existing service. Fill up the information with the Generated Runtime objects details from previous steps.

2024-09-13_14-00-02.png

Note: We have used the Extension of Model and Provider as changes are still needed for the generated runtime objects. Since PaPM Cloud SM Model View Odata only supports OdataV4, users have to perform a Code based implementation. 

SAMPLE CODE:

METHOD /iwbep/if_v4_dp_basic~read_entity_list.
    DATA: lv_entity_type_name TYPE /iwbep/if_v4_med_element=>ty_e_med_internal_name,
          ls_done_list        TYPE /iwbep/if_v4_requ_basic_list=>ty_s_todo_process_list,
          ls_todo_list        TYPE /iwbep/if_v4_requ_basic_list=>ty_s_todo_list,
          lt_data             TYPE STANDARD TABLE OF /BIC/AZQAM_DEMO2.
    io_request->get_entity_type( IMPORTING ev_entity_type_name = lv_entity_type_name ).
    io_request->get_todos( IMPORTING es_todo_list = ls_todo_list ).

    CASE lv_entity_type_name.
      WHEN 'DEMO_ENTITY'.
        SELECT * FROM /BIC/AZQAM_DEMO2
         INTO CORRESPONDING FIELDS OF TABLE @lt_data.

        IF ls_todo_list-return-count = abap_true.
          io_response->set_count( lines( lt_data ) ).
        ENDIF.

        io_response->set_busi_data( it_busi_data = lt_data ).
        io_response->set_is_done( ls_done_list ).
      WHEN OTHERS.
        super->/iwbep/if_v4_dp_basic~read_entity_list( io_request  = io_request
                                                       io_response = io_response ).
    ENDCASE.
  ENDMETHOD.

Disclaimer: For any issues with the Odata V4 code based implementation, please refer to blog post: OData V4 code based implementation - Overview.

4. Once done, we can proceed on assigning the service to the created Group.

Assigning Service.png

B.  Publish the ODataV4 Service

1. Go to SAP Gateway Service Administration via tcode /iwfnd/v4_admin. Then choose Publish Service Groups.

Publish Service Group Service 1.png

2. Search and select the Service Group created from previous steps. Then choose, Publish Service Groups

Publish Service Group 2.png

3. Once the service is published, go to transaction code /iwbep/v4_admin. Choose the assigned service created from previous steps and do Service Test to Gateway Client like the image below.

SAP Backend Service Administration.png

4. Choose the Entity set from the project created from SEGW. With this, it will generate the request URL .

Choosing of Entity.png

 5. Execute the request URL to show the data records available in OdataV4 format.
Execute the entity set.png

With these results, we can now proceed on the next steps to create a connection between our BW and SAP PaPM Cloud SM / UM. But before that, let me show you first how we can create the ODataV2 service in BW.

Creation of an OdataV2 service in SEGW:

With the current version of NW750, in SEGW transaction code, OdataV2 service can be generated.

For the step-by-step procedure, you may refer to Creating a Service Builder Project.

Create Project OdataV2.png

Once the Project is created. Users can import the DDIC structure to the Data Model. It could be your ADSO, Table or Views.

ODataV2 Import DDIC.png

For more information, please refer to the official documentation Importing a DDIC Structure.

If mapping of all fields and setting a primary are done, users may now proceed on mapping the Service Implementation to the Data Source.

  1. Under the project created, expand the folder Service Implementation.
  2. Right Click to the Entity Set generated from Import.
  3. Choose Map data to source.

ABC Map data to Source.png

After the previous Step C, users need to maintain the Data Source Attributes.

  1. Choose the Type ‘Business Entity’
  2. Go to Help button
  3. Choose SADL Model Type ‘DDIC Dictionary’ (This one is used for our example)
  4. Choose the Model that was imported from previous step
  5. Press Continue
  6. Press again Continue to finalize the mapping to data source

ABC Map data to source Part 2.png

Upon pressing the continue button from Step F. The UI will look like the image below. To finalize the mapping, users need to click the Generate Mapping button on top of the table of the mapped fields.

Note: Unlike in ODataV4 project type. ODataV2 in SEGW accepts BW ADSO that contains InfoObject fields with “/BIC” as its mapped technical name like the image below.Generate Mapping SEGW.png

Once all the fields are mapped, users now need to Generate the Runtime Objects.

  1. Press Generate Runtime Objects.
  2. All values on the pop-up windows are system generated, users may proceed to press Continue button.
  3. Add $TMP on package.
  4. Press Save button

Generate Runtime Object.png

When it is saved, it will provide a message log below that the Runtime Objects for the Project created were generated successfully.

Logs og Generated Runtime Object.png

A.      Publishing of the ODataV2 Service

The Runtime Objects and Service were successfully generated. But this still needs to be published for the user to make it appear on the Active services in our BW system.

  1. Go to transaction code: /IWFND/MAINT_SERVICE.
  2. Choose Add Service button.

Adding Service.png      3. Search for the Technical Service name using the Service generated from pressing Generate Runtime Objects from previous step.

  1. Select the searched Service.
  2. Choose Add Selected Service
  3. Add $TMP
  4. Press Continue

Add Selected Service.png

B.      Calling the ODataV2 Service

Since the service is already created, registered, and published, users may now proceed to call the ODataV2 service.

  1. Go back to transaction code: /IWFND/MAINT_SERVICE and filter outby searching the service created.
    MAINT_SERVICE Searching.png
  2. Calling the service in the Gateway Client
  1. Double click the published service.
  2. Under ICF Nodes section, choose Gateway Client 
    ICFNODES going to Gateway Client.png

     3. In the Gateway Client, press Execute button to verify if the service is successfully implemented. It will return status_code 200 means that the service can be called successfully.
Executed in Gateway Client.png     4. Let’s call now the Entity set that was imported from previous step.

  1. On the header, press EntitySets.
  2. Choose the EntitySet created from previous steps.
  3. Press Execute button.
  4. See all available data records in the HTTP Response in XML format.

Result from GatewayClient ODataV2.png

With the successful execution, this service path can now be called in our SAP PaPM Cloud UM as this is the model that supports ODataV2.

Let’s proceed now on the creation of Connection between your BW and SAP PaPM Cloud SM or UM.

Creation of Connection in Cloud Connector

A.      Registering your SAP PaPM Cloud SM Instance or Tenant

On registration of your tenant in the Cloud Connector, please refer to the blog post Integration: Setup SAP PaPM Cloud to use RFA FI-GL and FI-GLI to post to your ECC under the section of A. in Cloud Connector: Registering your SAP PaPM Cloud Instance or Tenant.

B. In Cloud Connector: Register your internal System in the created Sub-account

  1. Choose the Subaccount that needs to be connected to the On-premise system
  2. Choose Cloud to On-Premise from the left menu pane
  3. Follow the steps that are being shown in the GIF below:

Adding of Internal System.gif

C.      In Cloud Connector: Register the resources of the added Internal System

The resources to be registered is the URL Path /sap. This is for the connection to know where the request will direct.

Adding Resurces in CC.png

SAP BTP: Double check the Cloud Connector

If Sections A to C were completed, you should see the same reflecting in BTP > Cloud Connectors as Connected / Available

Connected
this means your Subaccount is connected in Cloud Connector

Available
this means your Internal system has resources added path (like /sap)

Connected BTP.png

SAP BTP: Create Destination

Now that everything is configured in Cloud connector, Destination Administrator may now proceed to create a new Destination (HTTP Destination)

  1. Under your subaccount, go to Destinations.
  2. Choose New Destination
  3. Fill the Destination Fields with information from your HTTP Connection
  4. Add the Client of the Internal system in the Properties
  5. Save the configuration.

Adding Destination.png

Note: Credentials (Username and Password) that will be used in Creation of Destination must have access to the artifacts to be consumed from On-premise system, this is to avoid any issues when it comes to authorization when using the destination.

SAP PaPM Cloud SM Modeling – OdataV4

1. Create the Connection according to your Destination and Service details.
CON DETAILS.png

2. In your Modeling screen, create now the Model View OData maintaining the connection created from previous step. MVOData.png

 3. By choosing the connection, PaPM Cloud SM will be able to detect all available fields from the Odata service that Modeler can use in the Fields Mapping.

MVOData Mapping.png

With the successful connection, activation and execution will return a successful log. Modeler can now validate the consumed data records in the Show screen and use it for Complex Calculations and Reporting in SAP PaPM Cloud SM.

MVOData Show Screen.png

As mentioned from the introduction of this blog post, ODataV2 is not supported in SAP PaPM Cloud SM as it only supports ODataV4 service. See documentation: Model View OData .

With this, let’s move to the next procedures of this blog post.

SAP PaPM Cloud UM Modeling - ODataV2

  1. Creation of Connection that will use the Destination created from previous step.
  1. Add the Connection ID.
  2. Put the description of the Connection.
  3. Use the destination created from previous step.
  4. Add the existing service path from generated service.
  5. Add Default Key Field.
  6. Choose Create

Connection in UM.png

With the successful creation, the EntitySet created from previous step will be visible in the UI of SAP PaPM Cloud Universal Model where the user can perform the field mapping.

Created Connection in UM V2.png

For further information with the creation of Connection and mapping, please refer to Manage Connections: Odata Service.

2. Fetch the data records of the OdataV2 service using Reader function.

In SAP PaPM Cloud Universal Model, to fetch the available data records in an Odata Service, users need to create a Reader function on top of the synced Model Entity from our connection.

Reader config UM.png

Users may now execute the Reader function. Data records are available under the Show Data screen of the Reader and the Synced Model Entity from Connection. See steps from the image below:

Reader:

Show Screen of ODataV2.png

 Synced Model Entity:

Show screen of ME.png

Now, I have shown you how ODataV4 in SAP PaPM Cloud SM and ODataV2 in SAP PaPM Cloud Universal Model are successfully consumed via connection. Since Universal Model also supports ODataV4. Let me show it to you as well.

Technically, the steps are the same, users just must change the service path that is being used for ODataV4. Let’s proceed on the next step below

SAP PaPM Cloud UM Modeling – OdataV4

The service root used from the creation of Connection in SAP PaPM Cloud SM can be used as well in the creation of connection in SAP PaPM Cloud UM since we are going to consume the same ODataV4 service.

  1. Creation of Connection that will use the Destination created from previous step.
  1. Add the Connection ID.
  2. Put the description of the Connection.
  3. Use the destination created from previous step.
  4. Add the existing service path from generated service. (Same from PaPM Cloud SM)
  5. Add Default Key Field.
  6. Choose Create

Con for ODV4 UM.png

Once the connection is created, it will show the available Entity set we have from the BW system then users may now perform the mapping of relevant fields for the scenario.

Created ODV4 UM CON.png

For further information with the creation of Connection and mapping, please refer to Manage Connections: Odata Service.

2. Fetch the data records of the OdataV4 service using Reader function.

READER ODV4 UM.png

Similar from ODataV2, in OdataV4, Reader Function should be RUN as well to fetch the data records to our Synced Model Entity and to the Reader function. Follow the steps in the image below for reference.

Reader:

Show screen of Reader V4.png

 Model Entity:

Show Screen of ME V4.png

Thank you so much for reaching here until the last step of our integration topic! After reading all through the steps of this blog post, we can conclude that in Integration between BW and SAP PaPM Cloud via OData service is possible with scenarios listed below:

  • SAP PaPM Cloud Standard Model – it only supports ODataV4 service.
  • SAP PaPM Cloud Universal Model – it supports ODataV2 and ODataV4 services.

I hope now you have learned the other way on how to integrate BW to our SAP PaPM Cloud Application.

See you again soon! On to the next integration topic 😊.