Mashup
What is Mashup?
Mashups is an easiest way to integrate external systems in Cloud Solutions.
Mashups are used to integrate data from SAP’s cloud solution with data provided by an online Web service or application. Users can access the content provided by these Web services and applications. For Example, Mashups can include Web searches, company or industry business information, or online map searches. Before starting the mashup, you should have some basic knowledge in web development.
I will take a simple example but will try to use a complex scenario so that you all will know in and out of mashup and how it works.
- Add a Mashup to an SAP Floorplan.
- Add a Mashup to Your Floorplan that you have designed.
There are four different mashup types:
URL Mashup
- A mashup that sends data from SAP’s cloud solution to the URL of an online service provider.
- The service provider uses the data, for example, to perform a search, and the results are displayed in a new browser window.
HTML Mashups
- A mashup that embeds an HTML or JavaScript based Web page directly on a screen.
Data Mashups
- A mashup combines and displays data from both internal and external sources.
- To create a data mashup, an integrated authoring tool is used to transform or merge external Web services with internal business data using industry-standard Web service protocols.
Custom Mashups
- A mashup that has been created as an add-on solution by SAP.
You can create new data, URL, and HTML mashups. Custom mashups can be created only by SAP.
Save this article as PDF? Click here to download
Process Flow to create Custom Mashup
We will discuss process flow steps one by one with an example.
- Prerequisites
- Create Business Object
- Create a PTP Package
- Create a Mashup Port Binding
- Create an URL / HTML Mashup
- Adding mashup in Custom screen
- Assign this Mashup to Business user
- Testing
- Troubleshooting
Step 1: Prerequisites
- Login into the SDK. Select your solution from “My Solution” window.
- You must enable the admin mode for the solution in which you create the mashup to ensure that the system saves your content and any changes you make in the solution. To enable, open your solution in SDK and select Administration -> Switch On/Off Admin Mode in SAP Solution.
Step 2: Create Business Object
- Create a custom Business Object Mashup.
- Define two elements as shown in the below screenshot.
- Save and Activate.
For more information about the Custom Business Object creation,
see http://blog.sankaranss.com/2016/03/29/sap-byd-business-object/
Step 3: Create a PTP Package
If the mashup is going to return data that is entered automatically into the cloud solution, then you need to create a port type package for the mashup.
Procedure to create PTP Package:
- Create screens for the Custom BO.
For more information about the Screen creation, see http://blog.sankaranss.com/2016/04/28/sap-byd-screen-types/
- In the Solution Explorer, right-click the project folder and select Add New Item.
- The Add New Item dialog box opens.
- Select Port Type Package.
- In the Name field, enter a name for the port type package. Select Port Type Package.
- Click Add.
- The Select Business Object dialog box opens. You choose your Bo name (for example, mashup) and click Ok.
The port type package is added to your project. Your solution should look something like in the below screenshot.
- Double-click the port type package.
The port type package opens in the user interface designer.
- Create the required structure depends on our requirement, as follows:
- To add a port type, select the root node and then click +.
- To add a parameter, right click on the port type and choose Add Parameter. As per our requirement, add two parameters and rename it as FirstName and LastName.
- Save and activate your changes.
Step 4: Create a Mashup Port Binding
Certain fields on screens are predefined as screen out-ports and in-ports. These screen out-ports and inports are grouped together as a port binding.
The port binding defines the type of information that can be used in the mashup and defines on which screens you can use the mashup. The mashup category specifies which port bindings are available. However, you can also create your own port bindings for your solutions, if required.
Procedure to create a Mashup Port Binding:
- Create a Mashup Port Binding. Add -> New -> Mashup Port Binding. Enter a name for the port binding and click Add.
- You can see your port binding package under Mashup Configuration.
- Right-click the port binding, and choose Open.
The UI designer opens, displaying a dialog box that contains the name of the port binding in the title.
Set all fields like…
- Description
- Category (of your choice)
- Choose Inport Type Package which you’ve created in Create a PTP Package step 4.
- Inport Type Reference as Input (you have mentioned this name when creating the port type package) and leave the rest blank.
- Save and activate your changes.
Step 5: Create an URL / HTML Mashup
Depends on your requirement, you can create either URL or HTML mashup. Here you can learn both URL and HRML Mashup creation.
5.1 Create an URL Mashup
- Create an URL Mashup as shown below.
- QAF Builder pops up asking you to enter details of URL Mashup.
- Select the same category which you used in step 4.
- In the OVS of Port Binding, you will now be able to see your PTP Package. Select it.
- Type in some name and Description (optional).
- Enter the “URL” of the external application. For your reference here I have attached some simple URL. I will keep this URL open.
- http://sankaranss.com/test/mashup.php – it accepts two parameters: first and last
- http://sankaranss.com/test/search.html – Open Custom Search Engine
- http://sankaranss.com/test/calc.html – It will simply open calculator screen.
- HTTP Method: GET / POST
- In the table below URL Information section, click “Add” twice and Enter first and last as URL parameter and click on Parameter Binding OVS. You should now be able to see the parameters you created in Step 3 as shown in below screenshot.
- Select FirstName in first URL Parameter and LastName in last URL Parameter.
- Click the Preview link to display the end result of the mashup.
- Save and Close.
Finally, Your URL Mashup looks like as shown in below screenshot.
5.2 Create an HTML Mashup
- Create an HTML Mashup as shown below.
- QAF Builder pops up asking you to enter details of HTML Mashup.Create an HTML Mashup as shown below.
- Select the same category which you used in step 4.
- In the OVS of Port Binding, you will now be able to see your PTP Package. Select it.
- Type in some name and Description (optional).
- Depending on what you have selected, do one of the following:
- Enter a URL
- Choose the type as a URL and then enter the custom URL. For your reference here I have attached some simple URL. I will keep this URL open.
- http://sankaranss.com/test/calc2.html – Search Engine embedded in SAP / Custom screen
- http://sankaranss.com/test/search.html – calculator embedded in SAP / Custom screen
- Click the Preview link to display the end result of the mashup.
- Choose the type as a URL and then enter the custom URL. For your reference here I have attached some simple URL. I will keep this URL open.
- Enter HTML Code
- In the HTML Code Editor, you can copy or enter your own HTML code. In the later article, we will clearly see about HTML Code, which is used in Mashup.
- Click Save and Close.
- Enter a URL
Finally, Your HTML Mashup looks like as shown in below screenshot.
Step 6: Adding mashup in Custom screen / SAP Screen
Now our Mashup is ready, let us proceed with adding it on SAP/ Custom screen. In step 5, we created both URL and HTML mashup. Here we going to learn how to add that mashup in SAP / Custom Screen.
6.1 Adding URL Mashup in Custom Screen
- We need the screen to communicate with Mashup which is the prime reason to create URL Mashup with parameters. So, we need a way to send out data from our BO instance to Mashup. For this, we need an outport to be configured as shown in the below screenshot.
- Select the same PTP Package which you created in Step 3
- Bind the parameters of your data model structure.
- We need to create an anchor for Outport by selecting Anchor from its Extensibility properties. Outport now has an identity of its own.
- You can now refer floorplan anchor created in the previous point in the Referenced Anchors section so that Outport knows where to populate data.Extensibility -> Referenced Anchors -> (Click three dot) -> In Anchors Modelling click + button -> Referfloorplan anchor created in the previous point
- Save and Close.
6.2 Adding HTML Mashup in Custom Screen
- We are going to add simple search HTML Mashup without any outport / Inport. In the later article we will clearly see about this topic.
- Configuration Explorer -> Your_Project_MAIN -> Src -> <Your Project Folder> -> Massup -> Pipe -> (here you can see all your URL / HTML / Data Mashup) -> Choose your Mashup -> Drag and Drop your HTML Mashup into the Screen.
6.3 Adding HTML Mashup in SAP Screen
- Log in as a business user and navigate to SAP Floorplan. For example, Sales Order QA screen
- Click on “Adapt” and then on “Enter Adaptation Mode” on the top contextual menu and then on “Edit Screen” from the same menu.
- Click on “Mashups and Web Services”. You should be able to see your Mashup in the list as shown in the below screenshot. Enable it and Leave the Adaptation mode.
Step 7: Assign this Mashup to Business user
- Log in as a business user and navigate to the QA Screen by creating a custom BO instance or SAP Floorplan.
- Click on “Adapt” and then on “Enter Adaptation Mode” on the top contextual menu and then on “Edit Screen” from the same menu.
- Click on “Mashups and Web Services”. You should be able to see your Mashup in the list as shown in the below screenshot.
- Save and Publish the changes. Leave Adaptation Mode.
Add URL Mashup in Custom Screen.
Add HTML Mashup in SAP Screen (Sales Order Screen).
Step 8: Testing
8.1 Test URL Mashup
- Log in as a business user.
- Navigate to the QA Screen by creating a custom BO instance.
- You should now be able to see a new button “Web Services”.
- Enter the value and click the Webservice button. It will navigate to the custom page with the value you have entered in QA Screen.
URL Mashup in Custom Screen (The first and two field value passed to the third party software):
8.2 Test HTML Mashup
- Log in as a business user.
- Navigate to the QA Screen by creating a custom BO instance or SAP Floorplan.
Ex : 1.HTML Mashup in custom Screen(Search Engine in custom screen itself):
Ex : 2.HTML Mashup in SAP Screen (Sales Order – Enable calculator in Sales Order Screen):
Step 9: Troubleshooting
- For URL Mashups, make sure that you disable popup blocker.
- SAP Cloud sites run on https but when you try to bring in mashups which fetch content from HTTP, they will be blocked by browsers. You can notice small popup by browsers indicating that they blocked some content from being displayed. In this case, you should enable MixedMode for browsers.
If you see below error message in your case, please make sure to click No.
To read more about cloud application studio, click SAP Cloud Application Studio . This is our professional blog, which helps to develop an SAP product. To download this article as pdf click here.
Hi Sakaran,
Thanks for great blog post.
I've already created a HTML mashup with port bindings and it's working.
I want to create a new URL mashup using the same port binding but when I right click and add a new URL mashup I get the following.
We don't have SSO configured in our tenant. Currently 1611.
Thanks,
Vincent
Hi @Vincent
I have the solution 😀
In administrator->Configure Single-On

next, click in Deactive Single Sign-On, finally in the SDK add Port.
Great article Sakaran.
Thanks for your great support
Nice article.
Can you help me how mashup servers talks with tenants ,how they communicate with physical mashup servers. Through proxy or something else?
If,
Hi Sankaran,
Now I want to create Data Mashup, I want to call a webservice which return a string, to display it at the floorplan, which step I need to do?
Thanks a lot.
Best Regards,
Benny
I would prefer SOAP / REST web service for this scenario. I hope this article will help you. http://blog.sankaranss.com/2016/10/18/rest-webservice-sap-byd/
Hi sakaran,
Thanks for the great post anyway,
i'm trying to do what you did in this post, but why the web service button doesn't appear in my screen?
please help me, thank you
What is your scenario?
Hi Sakaran,
Thanks for great blog post.
I’ve done all steps as you mention in your document but the “pipes” folder under “Mashup” folder not It did not appear how to appear the pipes folder that contain all mashups??.
Hi Haitham,
I hope the mashup you created in Mashup Authoring screen is not reflected in PDI, can you please try to create the mashup again and when login screen appears enter the same credential as the PDI user login , then create the mashup and come back to PDI and refresh the PDI solution, you should also see the created mashup under the MashupAuthoring folder under MashupConfiguration object . Now the pipes folder will be created and you can see your mashup.
Regards,
Vignesh
Hi Sankaran,
I have created a URL mashup via Mashup Authoring. How can i add this to the AccountList screen ? The mashpup doesnt show up in adapt mode.
Hi Sankaran,
I have the Problem that I get a 500 Internal Server Error when I create a Mashup.
It seems like its an issue with business user roles, because when I create a Mashup without the pdi role i don't get this error. But when I create the mashup without the pdi role it won't show up in the applications studio in the mashup folder.
Do you know how to fix that?
I have the same problem. Did you manage to fix it?
I had the same problem and it was a language issue. After selecting English for my PDI User I could save and activate the Mashup.
Hi Sankaran,
Could you please tell when should we create mashup from SDK instead of creating from frontend.
Regards,
Suchetha