Skip to Content

Create Service Consumption Model for Business Partner and Sales Order Item Cube

test
0 %
Create Service Consumption Model for Business Partner and Sales Order Item Cube
Details
// Explore More Tutorials

Create Service Consumption Model for Business Partner and Sales Order Item Cube

Requires Customer/Partner License

10/15/2019

Create Service Consumption Model for Business Partner and Sales Order Item Cube.

You will learn

  • How to create destination
  • How to create service consumption model for business partner and sales order item cube


Step 1: Copying the inbound service URL
  1. Logon to SAP S/4HANA Cloud system as administrator.

    Copying the inbound service URL

  2. Go to Communication Management and select Communication Arrangement.

    Copying the inbound service URL

  3. Select the communication arrangement that you have created.

    Copying the inbound service URL

  4. Select OAuth 2.0 Details in the inbound communication area.

    Copying the inbound service URL

  5. Copy the user name and SAML2 audience for later use.

    Copying the inbound service URL

Log on to answer question
Step 2: Create destination with basic authentication
  1. Log on to the SAP Cloud Platform cockpit as administrator.

    Create destination with basic authentication

  2. Choose your global account.

    Create destination with basic authentication

  3. Select Subaccounts.

    Create destination with basic authentication

  4. Select your Cloud Foundry subaccount.

    Create destination with basic authentication

  5. Choose the space that you have created for your ABAP environment during the setup.

    Create destination with basic authentication

  6. Go to the service market place for the selected space, search for destination and select it.

    Create destination with basic authentication

  7. Click Instances.

    Create destination with basic authentication

  8. Choose your instance.

    Create destination with basic authentication

  9. Select Destinations.

    Create destination with basic authentication

  10. Click New Destination.

    Create destination with basic authentication

  11. Enter destination configuration:

    • Name: your destination name
    • Type: HTTP
    • Description: your description
    • URL: Service URL from communication arrangement (Inbound Services screen -> ODataV2 service Business Partner Integration)
    • (without /sap/opu/odata/sap/API_BUSINESS_PARTNER)
    • Proxy Type: Internet
    • Authentication: BasicAuthentication
    • User: <Communication user name from Oauth2.0 Details>
    • Password:

    Create destination with basic authentication

  12. Check connection.

    Create destination with basic authentication

Log on to answer question
Step 3: Create Custom CDS View in SAP S/4HANA Cloud
  1. Logon to your S/4HANA Cloud system, navigate to Extensibility and open the Custom CDS Views tile.

    Create Custom CDS View in SAP S/4HANA Cloud

  2. Click Create to create your custom CDS view.

    Create Custom CDS View in SAP S/4HANA Cloud

  3. Name your CDS view YY1_SALESORDERITEMCUBEXXX and click Add and select Add Primary Data Source.

    Create Custom CDS View in SAP S/4HANA Cloud

  4. Search for I_SalesOrderItemCube, select it and click Add.

    Create Custom CDS View in SAP S/4HANA Cloud

  5. Click Add and select Add Associated Data Source.

    Create Custom CDS View in SAP S/4HANA Cloud

  6. Search for I_BusinessUser, select it and click Add.

    Create Custom CDS View in SAP S/4HANA Cloud

  7. Select Yes and move on.

    Create Custom CDS View in SAP S/4HANA Cloud

  8. Select External API and click on the butterfly symbol.

    Create Custom CDS View in SAP S/4HANA Cloud

  9. In the field section search for following fields and add them to your CDS view.

    • SalesOrder
    • SalesOrderItem
    • _CreatedBy.BusinessPartner
    • _SalesOrder.OverallSDProcessStatus
    • CreationDate
    • NetAmountInDisplayCurrency
    • DisplayCurrency
    Create Custom CDS View in SAP S/4HANA Cloud
  10. Go to properties and check your result.

    Create Custom CDS View in SAP S/4HANA Cloud

  11. Switch to Parameters and set following manual default values:

    • P_ExchangeRateType: EUR
    • P_DisplayCurrency: M

    Click Publish.

    Create Custom CDS View in SAP S/4HANA Cloud
Log on to answer question
Step 4: Create custom communication scenarios
  1. Navigate to Extensibility and select Custom Communication Scenario.

    Create custom communication scenarios

  2. Click New.

    Create custom communication scenarios

  3. Create a communication scenario:

    • Communication Scenario ID: Salesorderitemcubexxx
    • Description: Sales order item cube

    Click New.

    Create custom communication scenarios
  4. Click + to add an inbound service.

    Create custom communication scenarios

  5. Search for YY1_SalesOrderItemCubeXXX, select it and click OK.

    Create custom communication scenarios

  6. Select your inbound service and click Publish.

    Create custom communication scenarios

Log on to answer question
Step 5: Download metadata for business partner
  1. Go to the SAP API Business Hub and select the OData service for business partner: (https://api.sap.com/api/API_BUSINESS_PARTNER/overview).

    Copy the production URL.

    Download metadata for business partner

  2. Now open a browser of your choice and past the production URL with your hostname and port.
    Add also $metadata at the end, like following:

    URL https://{host}:{port}/sap/opu/odata/sap/API_BUSINESS_PARTNER/$metadata

    Login with you communication user and password to see your metadata.

    Download metadata for business partner

  3. You can see the metadata. Save your metadata as an edmx file.

    Create communication system

  4. Use bupa.edmx and select all files as file type.

    Download metadata for business partner

Log on to answer question
Step 6: Create service consumption model for business partner
  1. Switch to Eclipse an create a package:

    • Name: Z_Package_XXX
    • Description: My Package

    Click Next.

    Create service consumption model for business partner
  2. Click Next.

    Create service consumption model for business partner

  3. Click Finish.

    Create service consumption model for business partner

  4. Select File > New > Other…

    Create service consumption model for business partner

  5. Search Service Consumption Model, select it and click Next.

    Create service consumption model for business partner

  6. Create a service consumption model.

    • Name: Z_BUSINESSPARTNER_XXX
    • Description: Service Consumption Model for business partner

    Select your metadata bupa.edmx and click Next.

    Create service consumption model for business partner
  7. Click Next.

    Create service consumption model for business partner

  8. Click Next.

    Create service consumption model for business partner

  9. Click Finish.

    Create service consumption model for business partner

  10. Check your result.

    Create service consumption model for business partner

Log on to answer question
Step 7: Create service consumption model for sales order item
  1. Navigate to Communication Management and select Communication Arrangement.

    Create service consumption model for sales order item

  2. Search for your communication arrangement yy1_salesorderitemcubexxx and select it.

    Create service consumption model for sales order item

  3. Copy the service URL of your communication arrangement.

    Create service consumption model for sales order item

  4. Paste the copied service URL in your browser, add /$metadata at the end of your URL and login with you communication user and password to see your metadata.

    Create service consumption model for sales order item

  5. You can see the metadata. Save your metadata as an edmx file.
    Use salesorder.edmx and select all files as file type.

    Create service consumption model for sales order item

    Create service consumption model for sales order item

  6. Go to Eclipse and select File > New > Other…

    Create service consumption model for sales order item

  7. Search Service Consumption Model, select it and click Next.

    Create service consumption model for sales order item

  8. Create a service consumption model.

    • Name: Z_SALESORDERITEMCUBE_XXX
    • Description: Service Consumption Model for SalesOrderItemCube

    Select your metadata salesorder.edmx and click Next.

    Create service consumption model for sales order item
  9. Click Next.

    Create service consumption model for sales order item

  10. Click Next.

    Create service consumption model for sales order item

  11. Click Finish.

    Create service consumption model for sales order item

  12. Check your result.

    Create service consumption model for sales order item

Log on to answer question
Step 8: Test yourself
With which user do you logon to see your metadata
×

Next Steps

Prerequisites

  • Create a developer user in a SAP Cloud Platform ABAP Environment system.
  • Download Eclipse Photon or Oxygen and install ABAP Development Tools (ADT). See https://tools.hana.ondemand.com/#abap.
Back to top