> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SAP IDoc Connector V1 (Deprecated)

> Send and receive SAP IDoc files using the SAP IDoc V1 connector with NetWeaver RFC, Classic RFC, JCO, or SOAP connection methods.

export const SlasTab = ({siteName = "CData Arc"}) => <>
    <p><em>サービスレベルアグリーメント（SLA）の設定に関する設定です。</em></p>
    <p>
      SLA を使用すると、フロー内のコネクタが送受信すると見込まれるボリュームを設定し、そのボリュームを達成すると見込まれる期間を設定できます。{siteName} は、SLA が達成されない場合にユーザーへ警告するメールを送信し、SLA を<em>At Risk</em> としてマークします。これは、SLA が間もなく達成されない場合に<em>Violated</em> としてマークされることを意味します。これにより、ユーザーは介入してSLA が達成されない理由を特定し、適切な対応を取る機会を得られます。At Risk 期間の終了時点でもSLA が達成されない場合、SLA はviolated としてマークされ、ユーザーに再度通知されます。
    </p>
    <p>
      SLA を定義するには、<strong>Expected Volume</strong> をオンに切り替え、<strong>Settings</strong> タブをクリックします。
    </p>
    <img src="/public/images/sla_empty.png" alt="SLA Empty" />
    <ul>
      <li>コネクタに送信と受信の個別のアクションがある場合は、ラジオボタンを使用してSLA がどちらの方向に適用されるかを指定します。</li>
      <li>ウィンドウの<strong>Expect at least</strong> 部分で、次を設定します。
        <ul>
          <li>処理を見込む最小トランザクション数（ボリューム）を設定します。</li>
          <li><strong>Every</strong> フィールドを使用して期間を指定します。</li>
          <li>SLA を有効にするタイミングを指定します。<strong>Starting on</strong> を選択した場合は、日付および時刻フィールドを入力します。</li>
          <li>SLA を有効にしたい曜日のチェックボックスをオンにします。必要に応じて、ドロップダウンで<strong>Everyday</strong> を選択します。</li>
        </ul>
      </li>
      <li>ウィンドウの<strong>Set status to 'At Risk'</strong> 部分で、SLA をAt Risk としてマークするタイミングを指定します。
        <ul>
          <li>デフォルトでは、SLA が違反状態になるまで通知は送信されません。これを変更するには、<strong>Send an 'At Risk' notification</strong> をオンにします。</li>
        </ul>
      </li>
    </ul>
    <p>
      次の例は、月曜日から金曜日まで毎日1000 件のファイルを受信すると見込むコネクタ向けに設定されたSLA を示しています。1000 件のファイルが受信されていない場合、期間の終了の1時間前にAt Risk 通知が送信されます。
    </p>
    <img src="/public/images/sla_defined.png" alt="SLA Configuration Example" />
    <Note>
      必要に応じてSLA アラートをオフにすることができます。これはメンテナンスウィンドウ中に役立ちます。navbar で<strong>Settings</strong> をクリックし、<strong>Alerts &gt; General Alerts</strong> に移動します。タブレットと鉛筆のアイコンをクリックして編集し、<strong>SLA Alerts</strong> 設定のチェックを外します。
    </Note>
  </>;

export const AlertsTab = ({siteNameShort = "Arc"}) => <>
    <p><em>アラートの設定に関する設定です。</em></p>
    <p>
      サービスレベルアグリーメント（SLA）を実行する前に、通知用のメールアラートをセットアップする必要があります。デフォルトでは、{siteNameShort} は<a href="/26.3/self-hosted/ja/getting-started/administration/settings/alerts">Alerts</a> タブのグローバル設定を使用します。このコネクタに別の設定を使用するには、<strong>Override global setting</strong> をオンに切り替えます。
    </p>
    <p>
      デフォルトではエラーアラートが有効になっており、エラーが発生するたびにメールが送信されます。これをオフにするには、<strong>Enable</strong> チェックボックスのチェックを外します。
    </p>
    <p>
      <strong>Subject</strong>（必須）を入力します。<strong>Allow {siteNameShort}Script in Subject</strong> をチェックすると、<strong>Subject</strong> フィールドで{siteNameShort}Script を使用できます。これを選択すると、<strong>{siteNameShort}Script エディタ</strong>ボタンが表示されます（<img src="/public/images/rest_arcscript_editor.png" alt="arcscript editor button" style={{
  display: 'inline',
  verticalAlign: 'middle',
  margin: 0
}} />）。
    </p>
    <p>
      必要に応じて<strong>Recipient</strong> のメールアドレスをカンマ区切りのリストで入力します。
    </p>
  </>;

export const Message = () => <>
    <p><em>Message 設定は、コネクタがメッセージを検索する方法と、処理後にメッセージを管理する方法を決定します。</em></p>
    <p><strong>Note：</strong> 以下の設定は非推奨となり、デフォルトで非表示になっています。以前に有効化またはデフォルト以外の値に設定されていたコネクタにのみ表示されます。処理済みファイルのコピーを保持するには、フロー内のコネクタを右クリックし、<strong>成功パスを表示</strong>を選択して、成功パスを<a href="/26.3/self-hosted/ja/connectors/file">File コネクタ</a>に接続してください。</p>
    <table>
      <thead>
        <tr><th>設定</th><th>説明</th></tr>
      </thead>
      <tbody>
        <tr>
          <td><strong>Sent フォルダに保存</strong>（非推奨）</td>
          <td>コネクタが処理したファイルをSent フォルダにコピーします。デフォルトで無効です。Sent フォルダに保存されたファイルは<a href="/26.3/self-hosted/ja/getting-started/administration/settings/encryption-at-rest">保存データの暗号化</a>の対象外です。</td>
        </tr>
        <tr>
          <td><strong>Sent フォルダのスキーム</strong>（非推奨）</td>
          <td>選択した時間間隔で<strong>Sent</strong> フォルダ内のファイルをグループ化します。<strong>Sent フォルダに保存</strong>が有効な場合のみ適用されます。</td>
        </tr>
      </tbody>
    </table>
  </>;

export const MiscConnector = () => <>
    <p><em>Miscellaneous 設定は、特定のユースケース向けの設定です。</em></p>
    <table>
      <thead>
        <tr>
          <th>設定</th>
          <th>説明</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><strong>Other Settings</strong></td>
          <td>非表示のコネクタ設定をセミコロン区切りのリストで設定できます（例：<code>setting1=value1;setting2=value2</code>）。通常のコネクタのユースケースや機能では、これらの設定の使用は必要ありません。</td>
        </tr>
      </tbody>
    </table>
  </>;

export const Logging = () => <>
    <p><em>ログの作成と保存を制御する設定です。</em></p>
    <table>
      <thead>
        <tr>
          <th>設定</th>
          <th>説明</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><strong>Log Level</strong></td>
          <td>コネクタが生成するログの詳細度です。サポートを依頼する際は、これを<strong>Debug</strong> に設定してください。</td>
        </tr>
        <tr>
          <td><strong>Log Subfolder Scheme</strong></td>
          <td>選択した間隔に従って、コネクタがLogs フォルダ内のファイルをグループ化するよう指示します。<strong>Weekly</strong> オプション（デフォルト）は、コネクタが毎週新しいサブフォルダを作成し、その週のすべてのログをそのフォルダに保存するよう指示します。この設定を空白のままにすると、コネクタはすべてのログをLogs フォルダに直接保存します。多数のトランザクションを処理するコネクタでは、サブフォルダを使用することでログを整理しやすくなり、パフォーマンスが向上します。</td>
        </tr>
        <tr>
          <td><strong>Log Messages</strong></td>
          <td>処理したファイルのログエントリにファイル自体のコピーを含めるには、これをオンにします。これを無効にすると、<strong>Transactions</strong> タブからファイルのコピーをダウンロードできなくなる場合があります。</td>
        </tr>
      </tbody>
    </table>
  </>;

export const MacrosExamples = ({extraMacros = []}) => <>
    <p>
      %Ext% や %ShortDate% などの一部のマクロは引数を必要としませんが、引数を必要とするものもあります。
      引数を取るすべてのマクロは次の構文を使用します。<code>%Macro:argument%</code>
    </p>

    <p>引数を取るマクロの例を次に示します。</p>

    <ul>
      <li>%Header:headername%：<code>headername</code> はメッセージ上のヘッダーの名前です。</li>
      <li>%Header:mycustomheader% は、入力メッセージに設定された<code>mycustomheader</code> ヘッダーの値に解決されます。</li>
      <li>%Header:ponum% は、入力メッセージに設定された<code>ponum</code> ヘッダーの値に解決されます。</li>
      <li>%RegexFilename:pattern%：<code>pattern</code> は正規表現パターンです。例えば、<code>%RegexFilename:^([\w][A-Za-z]+)%</code> は、ファイル名の最初の単語にマッチしてそれに解決され、大文字・小文字を区別しません（<code>test_file.xml</code> は<code>test</code> に解決されます）。</li>
      <li>%Vault:vaultitem%：<code>vaultitem</code> は<a href="/26.3/self-hosted/ja/getting-started/administration/settings/global-settings-vault">Vault</a> 内のアイテムの名前です。例えば、<code>%Vault:companyname%</code> は、Vault に保存された<code>companyname</code> アイテムの値に解決されます。</li>
      <li>%DateFormat:format%：<code>format</code> は許容される日付形式です（詳細は<a href="/26.3/self-hosted/ja/scripting/value-formatters/date-formatters#sample-date-formats">日付形式のサンプル</a>を参照してください）。例えば、<code>%DateFormat:yyyy-MM-dd-HH-mm-ss-fff%</code> は、ファイルの日付とタイムスタンプに解決されます。</li>
      {extraMacros.filter(item => item.example).map(item => <li key={`ex-${item.name}`}>{item.example}</li>)}
    </ul>

    <p>次の例に示すように、より高度なマクロを作成することもできます。</p>

    <ul>
      <li>1 つのファイル名で複数のマクロを組み合わせる：<code>%DateFormat:yyyy-MM-dd-HH-mm-ss-fff%%EXT%</code></li>
      <li>マクロの外側にテキストを含める：<code>MyFile_%DateFormat:yyyy-MM-dd-HH-mm-ss-fff%</code></li>
      <li>マクロの内側にテキストを含める：<code>%DateFormat:'DateProcessed-'yyyy-MM-dd_'TimeProcessed-'HH-mm-ss%</code></li>
    </ul>
  </>;

export const MacrosTable = ({siteName = "CData Arc", extraMacros = []}) => <>
    <p>
      ファイル命名戦略でマクロを使用すると、データの整理効率と文脈の理解を高めることができます。
      ファイル名にマクロを組み込むことで、識別子、タイムスタンプ、ヘッダー情報などの関連情報を
      動的に含めることができ、各ファイルに有用な文脈を提供します。
    </p>

    <p>{siteName} は次のマクロをサポートしています。これらはすべて次の構文を使用します。<code>%Macro%</code></p>

    <table>
      <thead>
        <tr><th>マクロ</th><th>説明</th></tr>
      </thead>
      <tbody>
        <tr><td>ConnectorID</td><td>コネクタのConnectorID に評価されます。</td></tr>
        <tr><td>ConnectorName</td><td>コネクタの名前に評価されます。ファイル名やパスに接続名を含めることができます。例えば、どのデータベース接続が生成したかによってバックアップファイルにタグを付けるために使用できます。</td></tr>
        <tr><td>Ext</td><td>コネクタが現在処理しているファイルの拡張子に評価されます。</td></tr>
        <tr><td>Filename</td><td>コネクタが現在処理しているファイルのファイル名（拡張子を含む）に評価されます。</td></tr>
        <tr><td>FilenameNoExt</td><td>コネクタが現在処理しているファイルのファイル名（拡張子を除く）に評価されます。</td></tr>
        <tr><td>MessageId</td><td>コネクタが出力しているメッセージのMessageId に評価されます。</td></tr>
        <tr><td>RegexFilename:<em>pattern</em></td><td>コネクタが現在処理しているファイルのファイル名に正規表現パターンを適用します。</td></tr>
        <tr><td>Header:<em>headername</em></td><td>コネクタが現在処理しているメッセージ上の対象ヘッダー（<code>headername</code>）の値に評価されます。</td></tr>
        <tr><td>LongDate</td><td>システムの現在の日時を長い形式（例：Wednesday, January 24, 2024）で評価します。</td></tr>
        <tr><td>ShortDate</td><td>システムの現在の日時をyyyy-MM-dd 形式（例：2024-01-24）で評価します。</td></tr>
        <tr><td>DateFormat:<em>format</em></td><td>システムの現在の日時を指定された形式（<code>format</code>）で評価します。利用可能な日時形式については、<a href="/26.3/self-hosted/ja/scripting/value-formatters/date-formatters#date-formats-with-literal-characters">日付形式のサンプル</a>を参照してください。</td></tr>
        <tr><td>Vault:<em>vaultitem</em></td><td>指定されたVault アイテムの値に評価されます。</td></tr>
        {extraMacros.map(item => <tr key={item.name}>
            <td>{item.name}</td>
            <td>{item.description}</td>
          </tr>)}
      </tbody>
    </table>
  </>;

export const Performance = () => <>
    <p><em>コネクタへのリソースの割り当てに関する設定です。</em></p>
    <table>
      <thead>
        <tr>
          <th>設定</th>
          <th>説明</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><strong>Max Workers</strong></td>
          <td>このコネクタでファイルを処理するためにスレッドプールから消費されるワーカースレッドの最大数です。設定すると、<a href="/26.3/self-hosted/ja/getting-started/administration/settings/advanced-settings">Advanced Settings</a> ページの<a href="/26.3/self-hosted/ja/getting-started/administration/settings/performance-settings">Performance Settings</a> 部分にあるデフォルト設定が上書きされます。</td>
        </tr>
        <tr>
          <td><strong>Max Files</strong></td>
          <td>コネクタに割り当てられた各スレッドが送信するファイルの最大数です。設定すると、<a href="/26.3/self-hosted/ja/getting-started/administration/settings/advanced-settings">Advanced Settings</a> ページの<a href="/26.3/self-hosted/ja/getting-started/administration/settings/performance-settings">Performance Settings</a> 部分にあるデフォルト設定が上書きされます。</td>
        </tr>
      </tbody>
    </table>
  </>;

export const siteNameShort = "Arc";

export const siteName = "CData Arc";

export const extraMacros = [{
  name: "ARCKEY",
  description: "Evaluates to the key for the external message archive."
}, {
  name: "CIMTYP",
  description: "Evaluates to the custom extension defined by the user."
}, {
  name: "CREDAT",
  description: "Evaluates to the creation date of the IDoc."
}, {
  name: "CRETIM",
  description: "Evaluates to the creation time of the IDoc."
}, {
  name: "DIRECT",
  description: "Evaluates to the direction of the IDoc (it indicates if the IDoc is inbound or outbound)."
}, {
  name: "DOCNUM",
  description: "Evaluates to the unique number assigned to the IDoc."
}, {
  name: "DOCREL",
  description: "Evaluates to the SAP release number for the IDoc."
}, {
  name: "EXPRSS",
  description: "Evaluates to the value of the EXPRSS flag."
}, {
  name: "IDOCTYP",
  description: "Evaluates to the name of the basic type of the IDoc."
}, {
  name: "MANDT",
  description: "Evaluates to the client number."
}, {
  name: "MESCOD",
  description: "Evaluates to the message code."
}, {
  name: "MESFCT",
  description: "Evaluates to the message function."
}, {
  name: "MESTYP",
  description: "Evaluates to the message type."
}, {
  name: "OUTMOD",
  description: "Evaluates to the output mode."
}, {
  name: "RCVLAD",
  description: "Evaluates to the recipient's logical address."
}, {
  name: "RCVPFC",
  description: "Evaluates to the recipient's partner function."
}, {
  name: "RCVPOR",
  description: "Evaluates to the receiver port value."
}, {
  name: "RCVPRN",
  description: "Evaluates to the receiver partner number."
}, {
  name: "RCVPRT",
  description: "Evaluates to the receiver partner type."
}, {
  name: "RCVSAD",
  description: "Evaluates to the recipient's address."
}, {
  name: "REFGRP",
  description: "Evaluates to the message group (such as EDI Message Group)."
}, {
  name: "REFINT",
  description: "Evaluates to the transmission file (such as EDI Interchange)."
}, {
  name: "REFMES",
  description: "Evaluates to the message (such as EDI Message)."
}, {
  name: "SERIAL",
  description: "Evaluates to the EDI serialization field."
}, {
  name: "SNDLAD",
  description: "Evaluates to the sender's logical address."
}, {
  name: "SNDPFC",
  description: "Evaluates to the sender's partner function."
}, {
  name: "SNDPOR",
  description: "Evaluates to the sender's port."
}, {
  name: "SNDPRN",
  description: "Evaluates to the sender's partner number."
}, {
  name: "SNDPRT",
  description: "Evaluates to the sender's partner type."
}, {
  name: "SNDSAD",
  description: "Evaluates to the sender's address."
}, {
  name: "STATUS",
  description: "Evaluates to the status of the IDoc."
}, {
  name: "STD",
  description: "Evaluates to a flag indicating the EDI standard."
}, {
  name: "STDMES",
  description: "Evaluates to the EDI message type."
}, {
  name: "STDVRS",
  description: "Evaluates to the EDI standard, version and release."
}, {
  name: "TABNAM",
  description: "Evaluates to the name of the table structure."
}, {
  name: "TEST",
  description: "Evaluates to the value of the test flag."
}];

The SAP IDoc connector supports sending and receiving IDoc files to and from a variety of SAP systems. It is a data container that is used to exchange information between SAP and another process that can understand the syntax and semantics of the data.

## Overview

IDoc connectors can connect to SAP using the following methods:

**Windows**

* NetWeaver RFC SDK
* Classic RFC SDK
* Classic RFC SDK with Unicode support
* SOAP (send-only)

**Java**

* Java connector (JCO)
* SOAP (send-only)

IDoc connectors can send and retrieve files formatted either as raw IDoc or as IDoc XML.

## Connector Configuration

This section contains all of the configurable connector properties.

### Settings Tab

#### Host Configuration

*Settings related to establishing the connection to the SAP system.*

| Setting                   | Description                                                                                                                                                  |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Connector Id**          | The static, unique identifier for the connector.                                                                                                             |
| **Connector Type**        | Displays the connector name and a description of what it does.                                                                                               |
| **Connector Description** | An optional field to provide a free-form description of the connector and its role in the flow.                                                              |
| **Connect Type**          | The method with which to connect to SAP. See the [Establishing a Connection](#establishing-a-connection) section for your method for additional information. |
| **SAP Host**              | Hostname or IP address of the target SAP system.                                                                                                             |
| **System Number**         | The number by which the target SAP system is defined. Valid values are 0-99, and often this value should be 0.                                               |

#### Client Authentication

*Settings related to authenticating against the SAP system.*

| Setting      | Description                                          |
| ------------ | ---------------------------------------------------- |
| **Client**   | The client that is authenticating to the SAP system. |
| **User**     | The username credential for authentication.          |
| **Password** | The password for the specified user.                 |

#### Receiver Options

*Settings related to receiving IDoc files.*

| Setting           | Description                                                      |
| ----------------- | ---------------------------------------------------------------- |
| **IDoc Receiver** | Whether the connector should retrieve IDoc files from SAP.       |
| **Program ID**    | A unique name that identifies {siteNameShort} to the SAP system. |
| **IDoc Format**   | Whether to receive files as raw IDoc or IDoc XML.                |

#### Control Record Information Options

This section allows you to overwrite the control headers for IDoc files before sending them to SAP. This is useful when you are receiving IDoc files from one SAP system and sending them to another SAP system: in this situation you should change the control record without changing the IDoc file data. See [Sending IDocs to SAP](#sending-idocs-to-sap) for more information.

### Advanced Tab

#### Language Settings

*Settings related to communication language.*

| Setting      | Description                                                                                                                            |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| **Language** | The language value to be used when connecting to the SAP system. Set this to the ISO 639-1 value for the language the SAP system uses. |

#### Gateway

*Settings related to communicating with SAP through a gateway.*

| Setting             | Description                                                         |
| ------------------- | ------------------------------------------------------------------- |
| **Gateway Host**    | The hostname or IP address of the gateway through which to connect. |
| **Gateway Service** | The gateway service to use.                                         |

#### Logon Load Balancing

*Settings related to logging in to the SAP system as a group to enable load balancing.*

| Setting            | Description                            |
| ------------------ | -------------------------------------- |
| **Message Server** | The service name of the load balancer. |
| **System ID**      | Identifies the SAP system.             |
| **Logon Group**    | The group to use when load balancing.  |

#### Secure Network Communications (SNC)

*Settings related to using an external security product to enhance the SAP connection security.*

| Setting                             | Description                                                    |
| ----------------------------------- | -------------------------------------------------------------- |
| **SNC Name**                        | The SNC name for the machine making the connection.            |
| **SNC Partner Name**                | The SNC name of the SAP system the connector is connecting to. |
| **SNC Quality of Protection Level** | The level of protection added by the SNC product.              |
| **SNC Library**                     | The path to the external security product's library.           |

#### Advanced Settings

*Settings not included in the previous categories.*

| Setting              | Description                                                                                                                                                                                                                                                                              |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Processing Delay** | The amount of time (in seconds) by which the processing of files placed in the **Transactions** tab is delayed. This is a legacy setting. Best practice is to [use a File connector](../flows/designing-a-flow#ローカルファイルシステムとのやり取り) to manage local file systems instead of this setting. |
| **Refresh Schema**   | When enabled, the connector attempts to update the schema it uses for parsing when a parsing error occurs. The schema is updated by reaching out to the SAP system and querying for the appropriate schema.                                                                              |

#### Message

<Message />

#### Logging

<Logging />

#### Miscellaneous

<MiscConnector />

### Automation Tab

#### Automation Settings

*Settings related to the automatic processing of files by the connector.*

| Setting            | Description                                                     |
| ------------------ | --------------------------------------------------------------- |
| **Send**           | Whether files arriving at the connector are automatically sent. |
| **Retry Interval** | The amount of time before a failed send is retried.             |
| **Max Attempts**   | The maximum number of times a failed send is retried.           |

#### Performance

<Performance />

### Alerts Tab

<AlertsTab />

### SLAs Tab

<SlasTab />

## Establishing a Connection

### Using NetWeaver RFC SDK

The following libraries from the NetWeaver RFC SDK must be placed into the {siteNameShort} `www\\bin\\x64` folder (`www\\bin\\x86` on 32-bit operating systems):

* sapnwrfc.dll
* icudt30.dll
* icuin30.dll
* icuuc30.dll
* libicudecnumber.dll
* libsapucum.dll

<Note>
  - The .dll names might be different based on the version of the SAP RFC SDK you have installed. The examples above are for version 3.0.

  - You need to add the `sapgw00` service to your listed services for the NetWeaver SDK connection to work on your client machine. You can add it to the services file at `C:\\Windows\\System32\\drivers\\etc\\services`.
</Note>

### Using Classic RFC SDK

The non-Unicode library does not require anything other than librfc32.dll. Place librfc32.dll into the {siteNameShort} `www\\bin\\x64` folder (`www\\bin\\x86` on 32-bit operating systems).

<Note>These libraries are provided in both x86 and x64, so you must use the same platform that the process is using. If the application is running on a 64-bit version of Windows, the process is 64-bit.</Note>

### Using Classic RFC SDK with Unicode Support

The following libraries from the SAP RFC SDK must be placed into the {siteNameShort} `www\\bin\\x64` folder (`www\\bin\\x86` on 32-bit operating systems):

* librfc32u.dll
* icudt30.dll
* icuin30.dll
* icuuc30.dll

<Note>
  - The .dll names might be different based on the version of the SAP RFC SDK you have installed. The examples above are for version 3.0.

  - These libraries are provided in both x86 and x64, so you must use the same platform that the process is using. If the application is running on a 64-bit version of Windows, the process is 64-bit.
</Note>

### Using the Java Connector

To use the Java connector, add sapjco3.jar to the `lib` folder of your Java servlet container.

### Using SOAP

SOAP can only be used to *send* IDocs to SAP. You must use a different connection type to *receive* IDocs from SAP.

<Note>This requires enabling SOAP connections on the SAP system.</Note>

### Configuring Services

In addition to the dependencies above, the following services must be added to `%WINDIR%\\system32\\drivers\\etc\\services`, or `/etc/services` if your system is running Linux or Mac OS X. If SAP NetWeaver is already installed on the machine, no further action is required.

| Service Name | Connector Number/Protocol |
| ------------ | ------------------------- |
| sapdp00      | 3200/tcp                  |
| sapdp01      | 3201/tcp                  |
| sapdp02      | 3202/tcp                  |
| sapdp03      | 3203/tcp                  |
| sapdp04      | 3204/tcp                  |
| sapdp05      | 3205/tcp                  |
| sapdp06      | 3206/tcp                  |
| sapdp07      | 3207/tcp                  |
| sapdp08      | 3208/tcp                  |
| sapdp09      | 3209/tcp                  |
| sapdp10      | 3210/tcp                  |
| sapdp11      | 3211/tcp                  |
| sapdp12      | 3212/tcp                  |
| sapdp13      | 3213/tcp                  |
| sapdp14      | 3214/tcp                  |
| sapdp15      | 3215/tcp                  |
| sapdp16      | 3216/tcp                  |
| sapdp17      | 3217/tcp                  |
| sapdp18      | 3218/tcp                  |
| sapdp19      | 3219/tcp                  |
| sapdp20      | 3220/tcp                  |
| sapdp21      | 3221/tcp                  |
| sapdp22      | 3222/tcp                  |
| sapdp23      | 3223/tcp                  |
| sapdp24      | 3224/tcp                  |
| sapdp25      | 3225/tcp                  |
| sapdp26      | 3226/tcp                  |
| sapdp27      | 3227/tcp                  |
| sapdp28      | 3228/tcp                  |
| sapdp29      | 3229/tcp                  |
| sapdp30      | 3230/tcp                  |
| sapdp31      | 3231/tcp                  |
| sapdp32      | 3232/tcp                  |
| sapdp33      | 3233/tcp                  |
| sapdp34      | 3234/tcp                  |
| sapdp35      | 3235/tcp                  |
| sapdp36      | 3236/tcp                  |
| sapdp37      | 3237/tcp                  |
| sapdp38      | 3238/tcp                  |
| sapdp39      | 3239/tcp                  |
| sapdp40      | 3240/tcp                  |
| sapdp41      | 3241/tcp                  |
| sapdp42      | 3242/tcp                  |
| sapdp43      | 3243/tcp                  |
| sapdp44      | 3244/tcp                  |
| sapdp45      | 3245/tcp                  |
| sapdp46      | 3246/tcp                  |
| sapdp47      | 3247/tcp                  |
| sapdp48      | 3248/tcp                  |
| sapdp49      | 3249/tcp                  |
| sapdp50      | 3250/tcp                  |
| sapdp51      | 3251/tcp                  |
| sapdp52      | 3252/tcp                  |
| sapdp53      | 3253/tcp                  |
| sapdp54      | 3254/tcp                  |
| sapdp55      | 3255/tcp                  |
| sapdp56      | 3256/tcp                  |
| sapdp57      | 3257/tcp                  |
| sapdp58      | 3258/tcp                  |
| sapdp59      | 3259/tcp                  |
| sapdp60      | 3260/tcp                  |
| sapdp61      | 3261/tcp                  |
| sapdp62      | 3262/tcp                  |
| sapdp63      | 3263/tcp                  |
| sapdp64      | 3264/tcp                  |
| sapdp65      | 3265/tcp                  |
| sapdp66      | 3266/tcp                  |
| sapdp67      | 3267/tcp                  |
| sapdp68      | 3268/tcp                  |
| sapdp69      | 3269/tcp                  |
| sapdp70      | 3270/tcp                  |
| sapdp71      | 3271/tcp                  |
| sapdp72      | 3272/tcp                  |
| sapdp73      | 3273/tcp                  |
| sapdp74      | 3274/tcp                  |
| sapdp75      | 3275/tcp                  |
| sapdp76      | 3276/tcp                  |
| sapdp77      | 3277/tcp                  |
| sapdp78      | 3278/tcp                  |
| sapdp79      | 3279/tcp                  |
| sapdp80      | 3280/tcp                  |
| sapdp81      | 3281/tcp                  |
| sapdp82      | 3282/tcp                  |
| sapdp83      | 3283/tcp                  |
| sapdp84      | 3284/tcp                  |
| sapdp85      | 3285/tcp                  |
| sapdp86      | 3286/tcp                  |
| sapdp87      | 3287/tcp                  |
| sapdp88      | 3288/tcp                  |
| sapdp89      | 3289/tcp                  |
| sapdp90      | 3290/tcp                  |
| sapdp91      | 3291/tcp                  |
| sapdp92      | 3292/tcp                  |
| sapdp93      | 3293/tcp                  |
| sapdp94      | 3294/tcp                  |
| sapdp95      | 3295/tcp                  |
| sapdp96      | 3296/tcp                  |
| sapdp97      | 3297/tcp                  |
| sapdp98      | 3298/tcp                  |
| sapdp99      | 3299/tcp                  |
| sapgw00      | 3300/tcp                  |
| sapgw01      | 3301/tcp                  |
| sapgw02      | 3302/tcp                  |
| sapgw03      | 3303/tcp                  |
| sapgw04      | 3304/tcp                  |
| sapgw05      | 3305/tcp                  |
| sapgw06      | 3306/tcp                  |
| sapgw07      | 3307/tcp                  |
| sapgw08      | 3308/tcp                  |
| sapgw09      | 3309/tcp                  |
| sapgw10      | 3310/tcp                  |
| sapgw11      | 3311/tcp                  |
| sapgw12      | 3312/tcp                  |
| sapgw13      | 3313/tcp                  |
| sapgw14      | 3314/tcp                  |
| sapgw15      | 3315/tcp                  |
| sapgw16      | 3316/tcp                  |
| sapgw17      | 3317/tcp                  |
| sapgw18      | 3318/tcp                  |
| sapgw19      | 3319/tcp                  |
| sapgw20      | 3320/tcp                  |
| sapgw21      | 3321/tcp                  |
| sapgw22      | 3322/tcp                  |
| sapgw23      | 3323/tcp                  |
| sapgw24      | 3324/tcp                  |
| sapgw25      | 3325/tcp                  |
| sapgw26      | 3326/tcp                  |
| sapgw27      | 3327/tcp                  |
| sapgw28      | 3328/tcp                  |
| sapgw29      | 3329/tcp                  |
| sapgw30      | 3330/tcp                  |
| sapgw31      | 3331/tcp                  |
| sapgw32      | 3332/tcp                  |
| sapgw33      | 3333/tcp                  |
| sapgw34      | 3334/tcp                  |
| sapgw35      | 3335/tcp                  |
| sapgw36      | 3336/tcp                  |
| sapgw37      | 3337/tcp                  |
| sapgw38      | 3338/tcp                  |
| sapgw39      | 3339/tcp                  |
| sapgw40      | 3340/tcp                  |
| sapgw41      | 3341/tcp                  |
| sapgw42      | 3342/tcp                  |
| sapgw43      | 3343/tcp                  |
| sapgw44      | 3344/tcp                  |
| sapgw45      | 3345/tcp                  |
| sapgw46      | 3346/tcp                  |
| sapgw47      | 3347/tcp                  |
| sapgw48      | 3348/tcp                  |
| sapgw49      | 3349/tcp                  |
| sapgw50      | 3350/tcp                  |
| sapgw51      | 3351/tcp                  |
| sapgw52      | 3352/tcp                  |
| sapgw53      | 3353/tcp                  |
| sapgw54      | 3354/tcp                  |
| sapgw55      | 3355/tcp                  |
| sapgw56      | 3356/tcp                  |
| sapgw57      | 3357/tcp                  |
| sapgw58      | 3358/tcp                  |
| sapgw59      | 3359/tcp                  |
| sapgw60      | 3360/tcp                  |
| sapgw61      | 3361/tcp                  |
| sapgw62      | 3362/tcp                  |
| sapgw63      | 3363/tcp                  |
| sapgw64      | 3364/tcp                  |
| sapgw65      | 3365/tcp                  |
| sapgw66      | 3366/tcp                  |
| sapgw67      | 3367/tcp                  |
| sapgw68      | 3368/tcp                  |
| sapgw69      | 3369/tcp                  |
| sapgw70      | 3370/tcp                  |
| sapgw71      | 3371/tcp                  |
| sapgw72      | 3372/tcp                  |
| sapgw73      | 3373/tcp                  |
| sapgw74      | 3374/tcp                  |
| sapgw75      | 3375/tcp                  |
| sapgw76      | 3376/tcp                  |
| sapgw77      | 3377/tcp                  |
| sapgw78      | 3378/tcp                  |
| sapgw79      | 3379/tcp                  |
| sapgw80      | 3380/tcp                  |
| sapgw81      | 3381/tcp                  |
| sapgw82      | 3382/tcp                  |
| sapgw83      | 3383/tcp                  |
| sapgw84      | 3384/tcp                  |
| sapgw85      | 3385/tcp                  |
| sapgw86      | 3386/tcp                  |
| sapgw87      | 3387/tcp                  |
| sapgw88      | 3388/tcp                  |
| sapgw89      | 3389/tcp                  |
| sapgw90      | 3390/tcp                  |
| sapgw91      | 3391/tcp                  |
| sapgw92      | 3392/tcp                  |
| sapgw93      | 3393/tcp                  |
| sapgw94      | 3394/tcp                  |
| sapgw95      | 3395/tcp                  |
| sapgw96      | 3396/tcp                  |
| sapgw97      | 3397/tcp                  |
| sapgw98      | 3398/tcp                  |
| sapgw99      | 3399/tcp                  |

### Logging on to SAP

The following [settings](#settings-tab) are required to connect with your SAP system.

| Setting           | Description                                                                                                                                                                                                            |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **SAP Host**      | Host name of the target system. Host names can be regular host names defined in a `hosts` file, an IP address like `123.123.123.123`, or an SAProuter address such as `/H/hostname/S/connector/H/host/S/connector/...` |
| **System Number** | The number by which the target system is defined. The valid range is 0 to 99, but in general this is 0.                                                                                                                |
| **Client**        | The client authenticating to the SAP system.                                                                                                                                                                           |
| **User**          | The user that is authenticating to the SAP system.                                                                                                                                                                     |
| **Password**      | The password for the authenticating user.                                                                                                                                                                              |

#### Gateway

When connecting to SAP via a gateway, use the options in the [Gateway](#gateway) section of the **Advanced** tab.

#### Load Balancing

To log on via load balancing, set the properties in the [Logon Load Balancing](#logon-load-balancing) section of the **Advanced** tab.

#### Secure Network Communications (SNC)

To enable secure network communications, check the **Enable SNC** box in the [Secure Network Communications (SNC)](#secure-network-communications-snc) section of the **Advanced** tab. Set **SNC Library** to the .dll of the SNC library you want to use to connect with SAP.

## Sending IDocs to SAP

Once you have configured the IDoc connector to connect to your SAP system, you can begin sending IDoc files to SAP. The IDoc connector can send files formatted in raw IDoc or XML IDoc.

You can configure the connector to automatically insert control record information into the IDoc being sent to SAP: the DOCREL, SNDPOR, SNDPRT, and so on. This makes it easier to process outgoing IDocs to the configured system. Configure these settings in the [Control Record Information Options](#control-record-information-options) section of the **Settings** tab.

Before sending an IDoc to your SAP system, make sure that you have properly configured a partner profile in SAP. If no partner profile in SAP matches the control record information in the IDoc you are sending, the data will not be processed by your SAP system. See [Test Sending an IDoc to SAP](#test-receiving-an-idoc-from-sap) for more information on setting up a partner profile.

<Tip>You can use transaction code WE60 to search for segment documentation for different IDoc types.</Tip>

### Test Sending an IDoc to SAP

To test sending an IDoc to SAP, you first need to configure your SAP system to have a partner profile for {siteNameShort}. The following steps describe how to do this with an ORDERS IDoc.

1. *Create a partner:* Go to transaction code WE20 and define a partner profile. Set **Partn Type** to **KU** for Customer and **Partner No** to a valid customer number.

   <img src="https://mintcdn.com/cdata-arc/j59334epfVQRoK96/public/images/sap-send-profiles.png?fit=max&auto=format&n=j59334epfVQRoK96&q=85&s=ef6fc579b149164a9f0d60fcbfd215e2" alt="Create a Partner" width="810" height="738" data-path="public/images/sap-send-profiles.png" />

2. *Add an inbound parameter for the ORDERS document:* The message type for this document is ORDERS. On the **Inbound Options** tab, set **Process code** to **ORDE** to tell SAP how to create a sales order when a purchase order ORDERS document is received by the SAP system.

   <img src="https://mintcdn.com/cdata-arc/j59334epfVQRoK96/public/images/sap-send-params.png?fit=max&auto=format&n=j59334epfVQRoK96&q=85&s=017655c40d98d908e634182a20f3bd58" alt="Set Parameters" width="703" height="615" data-path="public/images/sap-send-params.png" />

3. *Assign the customer to a sales division:* The customer configured in step one must be assigned to a sales organization, distribution channel, and division. Go to transaction VOE2 to configure these settings in the EDSDC table.

## Receiving IDocs from SAP

Once you have configured the IDoc connector to connect to your SAP system, you can begin receiving IDoc files from SAP. The IDoc connector can receive files formatted in raw IDoc or XML IDoc.

To receive files from SAP, create an RFC destination for {siteNameShort}. You can then check **Enable IDoc Receiver** in the [Receiver Options](#receiver-options) section of the Settings tab, then enter the **Program Id** that you registered in your SAP system for {siteNameShort}.

### Test Receiving an IDoc from SAP

This example describes how to configure your SAP system to send a MATMAS IDoc to {siteNameShort}.

1. *Define a logical system:* First, go to transaction SALE. Then navigate to Basic Settings > Logical Systems > Define Logical System. Create a new entry with a valid name (for example, {siteNameShort}) and description.

2. *Create an RFC destination:* Open transaction code SM59. Click the create button and fill in the fields for the RFC destination described below.

   | Setting             | Description                                                                    |
   | ------------------- | ------------------------------------------------------------------------------ |
   | **RFC Destination** | A unique name for the new destination (for example, {siteNameShort}\_DEST).    |
   | **Connection Type** | **T** for TCP/IP.                                                              |
   | **Description**     | A description for the destination.                                             |
   | **Program Id**      | A unique name that will be set in {siteNameShort} to identify the destination. |
   | **Activation Type** | Select **Registered Server Program**.                                          |

   <img src="https://mintcdn.com/cdata-arc/j59334epfVQRoK96/public/images/sap-rec-dest.png?fit=max&auto=format&n=j59334epfVQRoK96&q=85&s=00fe16eeab9f3880083ced99cd214eee" alt="" width="766" height="782" data-path="public/images/sap-rec-dest.png" />

   After you save the settings, test the connection to make sure you can successfully connect to {siteNameShort}.

3. *Create a processing connector:* Go to transaction code WE21. Create a new Transactional RFC connector with a unique name and the same destination you created in step 2.

   <img src="https://mintcdn.com/cdata-arc/j59334epfVQRoK96/public/images/sap-rec-connector.png?fit=max&auto=format&n=j59334epfVQRoK96&q=85&s=affff62e9ae66bd5dc7649edf259614e" alt="" width="883" height="461" data-path="public/images/sap-rec-connector.png" />

4. *Create a partner profile:* Open transaction WE20. Create a partner profile for the logical system that you added in step 1. Next, add an outbound parameter for the MATMAS document. Set the **Message Type** to **MATMAS**. On the **Outbound Options** tab, set the **Receiver port** to the value of the connector you configured in step 3, set the **Output Mode** to **Transfer IDoc Immed**, and set the IDoc **Basic type** to **MATMAS05**.

   <img src="https://mintcdn.com/cdata-arc/j59334epfVQRoK96/public/images/sap-rec-param.png?fit=max&auto=format&n=j59334epfVQRoK96&q=85&s=060cfbdf30143653fb3a001370e08865" alt="" width="747" height="696" data-path="public/images/sap-rec-param.png" />

5. *Send a test IDoc:* Use transaction BD10 to send a test IDoc to {siteNameShort} for a specified material number. You need to configure the **Message Type** and **Logical System** before sending the message. Use transaction BD87 to monitor outgoing messages and process them again if necessary.

## Macros

<MacrosTable extraMacros={extraMacros} />

### Examples

<MacrosExamples extraMacros={extraMacros} />
