Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Well After 2 years of wishing for this it is finally here.  I spend some time testing this out , so I thought I would put this together to help everyone utilize/learn this functionality... And if I miss something then you can Help me as this is my first attempt at using it.

I will be using http://www.webservicex.net/stockquote.asmx?WSDL   as my WSDL

(Note Modifications are needed to this WSDL.. ByDesign only supports one PortType so you will need to remove all but one definition in this file)

First Lets Create a new "External Web Service Integration"

Select the WSDL File you wish to integrate with

Hit next... (I do not have any Schema Documents with the WSDL so I am not including it in this Tutorial But might in the future)

Then Hit finish

Now you have Created a *.wsid file in your Solution  Right Click and activate it.

Next you will need to Define a Communication Scenario

Review your Data and finish. and Activate the newly created *.csd File

Now you will need to log into Bydesign as a Key User... And create a new Communication Agreement  (Under Application and user Management)

After Choosing the Business Partner click next.

On the Technical Data Section click "Edit Advanced Settings"

Fill out the following settings (these are specific for the webservice mentioned above)

Complete the Setup Process....

Now back in Bydesign studio  Create a new BO I named it StockBO

import AP.Common.GDT as apCommonGDT;
businessobject StockBO {
                    element StockQuoteID : ID;
                       element StockSymbol : LANGUAGEINDEPENDENT_Text;
                    element StockPrice : LANGUAGEINDEPENDENT_Text;
}

and then created the Script file for the Before Save

import ABSL;
var requestQuote:Library::ExternalWebServiceIntegration1.GetQuote.Request;
requestQuote.symbol = this.StockSymbol;
// Call the external web service Calculator in the format (<request variable>,”<business partner ID>”,”<communication scenario name”) and prepare the response variable
var responseQuote = Library::ExternalWebServiceIntegration1.GetQuote(requestQuote, "1000000", "CommunicationScenario1");
// Capture the communication faults that occurred during execution
var commFault = responseQuote.CommunicationFault;
this.StockPrice = responseQuote.GetQuoteResult;

I created a QAF (Quick Activity Floorplan) previewed it and

It Worked that was easy.. well should be for you now.. there was a lot of trial and error and documentation searching on my side...

Now are there some things I would do different... Probably..

  • I would try to use a "Application Integration"... But could not find info on calling it..
  • If my Webservice had a Schema Doc then my result would be easier to read..
  • I could go on and Parse my String to have only the Price but you get the Idea...
  • If I did a B2B communication I would probably use a BCO (http://scn.sap.com/docs/DOC-31216) so the BusinessPartnerId could be set per instance for scalable solutions

I was so Excited about the new Feature I had to give it a quick go and thought I would share it with everyone out there.

15 Comments
Labels in this area