The intent of this blog is to share the experience of how Visual Composer (CE 7.1.1 version) is used to develop a composite application with two SAP Enterprise Services from a PI 7.1 Service Registry. The purpose of the application is to search for Batch ID’s of specified Material Number and Plant Code, and display detail of a selected Batch ID from the list.
The application allows the user to enter a material number and a plant code. Then it would call the first service BatchSimpleByElementsQueryResponse_In with the material number and plant code and display the result as a list of batch ID’s. Then when user selects a Batch ID in the list the detail of the Batch would be displayed by calling the second service BatchByIDQueryResponse_In.
Below steps with screen shots explain how this application was created using VC 7.1.1.
- Start a new model using the Composite View.
- Search for the services from the Service Registry.
- Create a Data Service for the 1st service and select needed data from the In/Out Ports.
- Add a Form View by dragging from the In Port of the Data Service.
- Define Data for the Data Share s1.
- Add Table View for each of the two recordsets in Data Share s1.
- Connect Out Port of the two Table Views to the In Port of the Data Service.
Make sure the Event name is set to “insert” and the Select mode is set to “All data rows”.
- Adjust the View’s Layout as appropriate.
- Add a Table View by dragging from the Out Port of the Data Service.
- Create another Data Service for the 2nd service and select needed data from the In/Out Ports.
- Connect the Out Port of the Table View of the 1st data service to the In Port of the 2nd data service.
- Map the data between the table view and the 2nd data service.
- Add a Form View to display the response data from the Out Port of the 2nd data service.
- The whole picture of the Composite View.
- Test run the application.
This Composite View is composed of two data services, two form views, three table views, and absolutely no coding. The biggest challenge to me was to figure out how to call the first service BatchSimpleByElementsQueryResponse_In that has clustered data structure for the input data. I have searched in SAP SDN for examples or discussions without much luck. Hope this blog will save a little time for others who will implement something similar.