One of the more tedious aspects to configuring XSI is setting up each carrier (Express Delivery Company) in the XSI Cockpit (VTRC). UPS and Fedex used to provide a mechanism for loading much of the data via SAP Business Connector (see http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/1b17c690-0201-0010-17b1-a362e172a094), however this is no longer supported by either carrier or by SAP.
After configuring XSI at multiple client sites, we at Blue Harbors decided to build a simple Java based tool to automate much of the XSI carrier setup. Before you can implement the tool you’ll need to download the Java Development Kit (aka JDK or Java SE – http://www.oracle.com/technetwork/java/javase/downloads/index.html) and the SAP Java Connector (aka JCo – http://service.sap.com/connectors).
The java code for the config server is provided below:
You’ll also need server and logon files, samples are provided below:
You’ll also need to setup an RFC destination in SM59 to point to the server. It would something like this:
After you compile and execute the server, you should be able to do a connection test from SM59. Obviously the server must be running inside the client network and have visibility to SAP.
VTRC essentially calls the following BAPIs to retrieve the config data:
BAPI_CAR_PRVD_META
BAPI_CAR_PRVD_NUMBER_RANGE
BAPI_CAR_PRVD_PRDCD
BAPI_CAR_PRVD_ROUTING
BAPI_CAR_PRVD_SRVC_CD
BAPI_CAR_PRVD_TRACK_STATUS
BAPI_CAR_PRVD_TRKS
BAPI_CAR_PRVD_URL
The sample server included with this blog post listens for the 3 functions in bold, however the others can be implemented easily by copying the code for one of the functions.
To read the config data, it looks for pipe delimited text files with the following naming convention:
<BAPI parameter name>_<Express Delivery Company>
Files to load Fedex metadata would look something like this:
META_DATA_ FEDEX.csv
META_DATA_DESC_TST_FEDEX.csv
The file structures must match the BAPI parameter structures, in this case BAPICARMETA and BAPICARMETAT.
Now it’s simply a matter of loading the config. Create the Express Delivery Company in VTRC first and enter the name of the RFC destination. Then click “Non-SAP System”, then “Load all master data”. If all goes well it should look something like this: