Port Types & Setup

Transaction: WE21
You'll need to define a port in SAP so that it can exchange documents with your translator. This is where SAP will drop off outbound transactions and pick up inbound transactions. The port may actually be a directory on the filesystem, an ABAP program, or a near real-time connection via ALE/tRFC.

Type
Description
ABAP
Requires a custom ABAP program to process output or to generate the input. IDocs do not actually leave SAP with this port type.
XML
Essentially the same as FILE, except that the IDoc is exported/imported in XML format rather than the traditional IDoc format.
FILE
Simply drops off or picks up an IDoc from a file system directory.
tRFC
Send and receive the IDoc using native ALE
Internet
Obsolete; don’t use. Sends the IDoc as an e-mail attachment
CPI-C
Obsolete; only use for connecting to R/2 systems

Screen Usage

sap-tx-we21.png

File and XML ports

For these port types, you'll need to define:
  1. Outbound directory where IDocs will be deposited
    1. For EDI, this is generally the logical path EDI_GLOBAL_PATH; however, you can use transaction AL11 to see the logical directories available to you. You can also select a physical directory (even a remote one) if that's what you need.
  2. Version of the IDocs to be generated (generally, 4.x in 4.6C)
  3. Function module used to determine the file name format (to prevent overwriting).
    1. Note: Don't just specify an outbound file name; subsequent runs will overwrite the file.
    2. Note: EDI_PATH_CREATE_CLIENT_DOCNUM is generally a good choice
  4. Whether the remote system/extender can be started automatically. If yes,
    1. The RFC destination (see SM59) used to start the remote system
    2. The directory and script used to invoke the remote system
  5. Inbound directory where IDocs will be retrieved; however, it is recommended the external system tell SAP the directory and filename at runtime via RFC.
  6. Status directory where IDoc statuses will be retrieved; however, it is recommended the external system tell SAP the directory and filename at runtime via RFC.

For the FILE and XML ports where the external subsystem is invoked, rfcexec, startrfc, and the command script are needed in the external system environment.

SAP provides the first two -- talk to your friendly local Basis administrator to get them. The command script is either provided by the application vendor or must be created in-house by the client (that's you).