ZAPP_INTEGRATOR
===============

Purpose
=======

In the SAP Enterprise Portal there is the Application Integrator (http://help.sap.com/saphelp_nw70/helpdata/en/70/5a3842134bad04e10000000a1550b0/frameset.htm) which allows to integrate different backend systems in the Portal UI. This project tried to do the same based on the NetWeaver Web Application Server ABAP only.

Transaction Launcher
====================

The first thing the ZAPP_INTEGRATOR supports is a BSP Page that accepts parameters like the SAP Enterprise Portal Action Handler "SAPTransactionLauncher" (http://help.sap.com/saphelp_nw70/helpdata/en/af/ce571400fa458a8ad8936fdd49d75a/frameset.htm):

TCode=SU01
Technique=SSD
ApplicationParameter=USR02-BNAME%3dBCUSER
OkCode=SHOW
System=SAP_R3

Currently not supported parameters:

GuiType=WinGUI - WinGUI is the Default GUI
ProcessFirstScreen 
UseSPO1 
DynamicParameter 
UseFrog 

Example URL:

http://<yourserver.domain.com>:<port>/sap/bc/bsp/sap/zapp_integrator/transaction.htm?TCode=SU01&Technique=SSD&ApplicationParameter=USR02-BNAME%3DBCUSER&OkCode=SHOW&System=NSP

The special characters needed to provide more than one ApplicationParameter are:

= equals %3d
; equals %3b

But have a look into the transaction_test.htm page coming with the BSP application there I use the cl_bsp_runtime=>construct_bsp_url method to build the URL dynamically.

How does it work?
=================

The transaction.htm page will read all the parameters passed and will use a little bit of JavaScript to read the SAP Logon Ticket (MYSAPSSO2 Cookie). All that is passed to the tx.sapssd page which takes the input and creates a SSD (Structured Storage Document) or SSF (SAP Shortcut File) using the class ZCL_APP_INTEGRATOR. 

Setup
=====

To install this package using SAPLink, you have to Install the Plugin for BSP Pages available at http://code.google.com/p/saplink/wiki/pluginList.

Also you have to manually create and import the file tx-template.sapssd with the MIME Type "application/vnd.sap-gui" to the MIME folder of the BSP Application. Here are the steps to create this file:

1. As a prerequisite I expect that your Portal System Landscape contains a WebAS ABAP system with the Alias SAP_R3
2. Logon to your SAP Enterprise Portal using Firefox
3. Open the URL: http://<PortalServerFullQualifiedHostname>:<Port>/irj/servlet/prt/portal/prtroot/com.sap.portal.appintegrator.sap.Transaction?System=SAP_R3&Technique=SSD&TCode=SU01&OkCode=SHOW&GuiType=WinGUI&ApplicationParameter=USR02-BNAME%3dBCUSER
4. Save this file locally
5. Open the file with a HEX Editor like XVI32 from http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm 
6. Point the cursor somewhere after the SAP Logon Ticket string. I've chosen  HEX Address D2F
7. Choose Edit -> Block mark
8. Point the cursor somewhere below. I've chosen  HEX Address 1275
9. Choose Edit -> Block mark again. The marked text should be displayed in red
10. Copy the Block to the Clipboard using CTRL + C
11. Point the cursor to HEX Address A04 where you should see the beginning of the Text /STARTGUI
12. Choose Edit -> Block copy/overwrite
13. Save the File

Please check the CONSTRUCTOR method of the ZCL_APP_INTEGRATOR class to adopt the connection settings to your own needs. By default you can maintain a mapping between the system alias and logical system name in the table ZAPP_INT_MAP coming with this package.

If you want to single sign on to other than the local systems you have to install the local system's certificate which you can download from transaction STRUSTSSO2 in the other systems. They also have to share the same domain name like example.com.