Purpose
Use a web service to facilitate data entry

Solution
Call up the web service via a JavaScript function

In this example we use the Google Geo API to determine the city for a given postal code and country. We add a small button in the SAP address entry screen which determines the name of the city via the web service and fills in the SAP GUI "City" field:

 

GuiXT Script
 

PGuiXT
Pushbutton F[Postal Code/City]+(0,73) _
   "@0D\QCity from postal code@" _
   size=(1,1) _
   process="city_from_postal_code.txt"

InputScript "city_from_postal_code.txt" 

GuiXT
// determine city via JavaScript / Google web api
CallJS city = city_from_postal_code  _
    "&F[ADDR1_DATA-POST_CODE1]"  _
    "&F[ADDR1_DATA-COUNTRY]"

// Set city
if V[city]
  Set F[ADDR1_DATA-CITY1] "&V[city]"
 Return
else
  Return "E: No city found for this postal code" -statusline
endif

JavaScript function

JavaScript

Components
InputAssistant + Controls