> ## 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

> Bidirectional SAP IDoc data exchange supporting NetWeaver RFC, Classic RFC, JCO, and SOAP connection methods.

An SAP IDoc 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. The connector supports sending and receiving IDoc files to and from a variety of SAP systems. You can also use it to translate IDocs without needing to connect to SAP.

## Key Capabilities

* Comprehensive SAP IDoc integration supporting multiple connection methods (NetWeaver RFC SDK, Classic RFC SDK, JCO, and SOAP)
* Bidirectional data exchange with support for raw IDoc and IDoc XML formats
* Automatic schema refresh and validation with control record header management for multi-SAP-system routing

## 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, receive, and translate files formatted either as raw IDoc or as IDoc XML.

## Prerequisites

If you are using the SAP IDoc connector in [Send](https://docs.arc.cdata.com/26.3/cloud/ja/connectors/sap-idoc/sap-idoc-send.md) or [Receive](https://docs.arc.cdata.com/26.3/cloud/ja/connectors/sap-idoc/sap-idoc-receive.md) mode, you must have a live SAP IDoc system and a clear network path to that system from Arc. You also need to install the necessary dependencies on your machine. Follow the instructions below for your connection type.

> [!NOTE]
>
> If you are using the connector in [Translate](https://docs.arc.cdata.com/26.3/cloud/ja/connectors/sap-idoc/sap-idoc-translate.md) mode, these prerequisites are not required.

### Using NetWeaver RFC SDK

The following libraries from the NetWeaver RFC SDK must be placed into the Arc `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`.

### Using Classic RFC SDK

The non-Unicode library does not require anything other than librfc32.dll. Place librfc32.dll into the Arc `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.

### Using Classic RFC SDK with Unicode Support

The following libraries from the SAP RFC SDK must be placed into the Arc `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.

### 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](https://docs.arc.cdata.com/26.3/cloud/ja/connectors/sap-idoc/sap-idoc-send.md) IDocs to SAP. You must use a different connection type to [receive](https://docs.arc.cdata.com/26.3/cloud/ja/connectors/sap-idoc/sap-idoc-receive.md) IDocs from SAP.

> [!NOTE]
>
> This requires enabling SOAP connections on the SAP system.

## Add a Connection

To allow Arc to send or receive SAP data, you must first establish a connection to SAP. You have two ways to establish this connection:

* Add a SAP IDoc connector to your flow. Then, in the **Settings** tab, click **Create** next to the Connection drop-down list.
* Open the Arc **Settings** page, then open the **Connections** tab. Click **Add**, select **SAP IDoc**, and click **Next**.

> [!NOTE]
>
> * The login process is only required the first time the connection is created.
> * Connections to SAP IDoc can be re-used across multiple SAP IDoc connectors.

### Enter Connection Settings

After opening a new connection dialogue, give it a **Name**, then complete the other options.

#### Host Configuration

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

| Setting | Description |
| - | - |
| **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. |

#### 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. |

Click **Test Connection** to ensure that Arc can connect to SAP with the provided information. If an error occurs, check all fields and try again.

Click **Add Connection** to save your changes.

> [!TIP]
>
> Establishing a connection is not required if you are translating an IDoc.

## Settings Tab

| 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. |
| **Connection** | Choose a connection from the list. |

### Select an Action

When you add an SAP IDoc connector to a [flow](https://docs.arc.cdata.com/26.3/cloud/ja/flows/flows.md), you must choose the action that the connector should perform. The **Settings** tab then updates to display the relevant options.

The following table outlines the available actions. Click the links in the table to access the specific settings for each action.

| Action | Description |
| - | - |
| [Send](https://docs.arc.cdata.com/26.3/cloud/ja/connectors/sap-idoc/sap-idoc-send.md) | Connector settings specific to sending IDoc files to SAP. |
| [Receive](https://docs.arc.cdata.com/26.3/cloud/ja/connectors/sap-idoc/sap-idoc-receive.md) | Connector settings specific to receiving IDoc files from SAP. |
| [Translate](https://docs.arc.cdata.com/26.3/cloud/ja/connectors/sap-idoc/sap-idoc-translate.md) | Connector settings specific to translating IDoc files. |

## Automation Tab

### Automation Settings

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

| Action | 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

*コネクタへのリソースの割り当てに関する設定です。*

<table><thead><tr><th>設定</th>
<th>説明</th></tr></thead>
<tbody><tr><td>**Max Workers**</td>
<td>このコネクタでファイルを処理するためにスレッドプールから消費されるワーカースレッドの最大数です。設定すると、[Advanced Settings](https://docs.arc.cdata.com/26.3/cloud/ja/getting-started/administration/settings/advanced-settings.md) ページの[Performance Settings](https://docs.arc.cdata.com/26.3/cloud/ja/getting-started/administration/settings/performance-settings.md) 部分にあるデフォルト設定が上書きされます。</td></tr>
<tr><td>**Max Files**</td>
<td>コネクタに割り当てられた各スレッドが送信するファイルの最大数です。設定すると、[Advanced Settings](https://docs.arc.cdata.com/26.3/cloud/ja/getting-started/administration/settings/advanced-settings.md) ページの[Performance Settings](https://docs.arc.cdata.com/26.3/cloud/ja/getting-started/administration/settings/performance-settings.md) 部分にあるデフォルト設定が上書きされます。</td></tr></tbody></table>

## Alerts Tab

*アラートの設定に関する設定です。*

サービスレベルアグリーメント（SLA）を実行する前に、通知用のメールアラートをセットアップする必要があります。デフォルトでは、Arc は[Alerts](./Settings-Page#alerts) タブのグローバル設定を使用します。このコネクタに別の設定を使用するには、**Override global setting** をオンに切り替えます。

デフォルトではエラーアラートが有効になっており、エラーが発生するたびにメールが送信されます。これをオフにするには、**Enable** チェックボックスのチェックを外します。

**Subject**（必須）を入力します。**Allow ArcScript in Subject** をチェックすると、**Subject** フィールドでArcScript を使用できます。これを選択すると、**ArcScript エディタ**ボタンが表示されます（![arcscript editor button](https://docs.arc.cdata.com/26.3/images/rest_arcscript_editor.png)）。

必要に応じて**Recipient** のメールアドレスをカンマ区切りのリストで入力します。

## SLAs Tab

*サービスレベルアグリーメント（SLA）の設定に関する設定です。*

SLA を使用すると、フロー内のコネクタが送受信すると見込まれるボリュームを設定し、そのボリュームを達成すると見込まれる期間を設定できます。CData Arc は、SLA が達成されない場合にユーザーへ警告するメールを送信し、SLA を*At Risk* としてマークします。これは、SLA が間もなく達成されない場合に*Violated* としてマークされることを意味します。これにより、ユーザーは介入してSLA が達成されない理由を特定し、適切な対応を取る機会を得られます。At Risk 期間の終了時点でもSLA が達成されない場合、SLA はviolated としてマークされ、ユーザーに再度通知されます。

SLA を定義するには、**Expected Volume** をオンに切り替え、**Settings** タブをクリックします。

![SLA Empty](https://docs.arc.cdata.com/26.3/images/sla_empty.png)
<ul><li>コネクタに送信と受信の個別のアクションがある場合は、ラジオボタンを使用してSLA がどちらの方向に適用されるかを指定します。</li>
<li>ウィンドウの**Expect at least** 部分で、次を設定します。
<ul><li>処理を見込む最小トランザクション数（ボリューム）を設定します。</li>
<li>**Every** フィールドを使用して期間を指定します。</li>
<li>SLA を有効にするタイミングを指定します。**Starting on** を選択した場合は、日付および時刻フィールドを入力します。</li>
<li>SLA を有効にしたい曜日のチェックボックスをオンにします。必要に応じて、ドロップダウンで**Everyday** を選択します。</li></ul></li>
<li>ウィンドウの**Set status to 'At Risk'** 部分で、SLA をAt Risk としてマークするタイミングを指定します。
<ul><li>デフォルトでは、SLA が違反状態になるまで通知は送信されません。これを変更するには、**Send an 'At Risk' notification** をオンにします。</li></ul></li></ul>

次の例は、月曜日から金曜日まで毎日1000 件のファイルを受信すると見込むコネクタ向けに設定されたSLA を示しています。1000 件のファイルが受信されていない場合、期間の終了の1時間前にAt Risk 通知が送信されます。

![SLA Configuration Example](https://docs.arc.cdata.com/26.3/images/sla_defined.png)

> [!NOTE]
>
> 必要に応じてSLA アラートをオフにすることができます。これはメンテナンスウィンドウ中に役立ちます。navbar で**Settings** をクリックし、**Alerts > General Alerts** に移動します。タブレットと鉛筆のアイコンをクリックして編集し、**SLA Alerts** 設定のチェックを外します。

## Advanced Tab

#### Logging

*ログの作成と保存を制御する設定です。*

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

#### Other Settings

#### Processing Delay

<table><thead><tr><th>設定</th>
<th>説明</th></tr></thead>
<tbody><tr><td>**Processing Delay**</td>
<td>**Transactions** タブに配置されたファイルの処理を遅延させる時間（秒単位）です。これはレガシー設定です。ベストプラクティスは、この設定の代わりに[File コネクタを使用](./Designing-a-Flow#interacting-with-the-local-file-system)してローカルファイルシステムを管理することです。</td></tr></tbody></table>

*Miscellaneous 設定は、特定のユースケース向けの設定です。*

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

## ログタブ

**ログ**タブには、このコネクタが生成したサービスログが一覧表示されます。各行はログファイルを表し、更新日時、ファイル名、サイズ、ステータスが表示されます。特定のログを検索するには検索バーまたはステータスフィルタを使用し、ファイル名をクリックしてプレビューまたはダウンロードするか、**すべてのログをダウンロード**をクリックしてすべてのログを単一のzipファイルとしてダウンロードします。

## Establishing a Connection

### Configuring Services

In addition to the [prerequisites](#prerequisites) described above, you must add the following services 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.

### Print View

コネクタの**Transactions** タブでSAP IDoc ドキュメントを表示する場合、印刷プレビュー形式で表示するか、生データとして表示できます。デフォルトでは、次の画像に示すように、ドキュメントはプレビュー形式で表示されます。

![SAP IDoc print preview](https://docs.arc.cdata.com/26.3/images/idoc_print_preview.png)

プレビュー形式では、データが読みやすいレイアウトで表示されます。右上隅の**Raw View** トグルを使用すると、書式設定されていないドキュメントを表示できます。

## Macros

ファイル命名戦略でマクロを使用すると、データの整理効率と文脈の理解を高めることができます。
ファイル名にマクロを組み込むことで、識別子、タイムスタンプ、ヘッダー情報などの関連情報を
動的に含めることができ、各ファイルに有用な文脈を提供します。

CData Arc は次のマクロをサポートしています。これらはすべて次の構文を使用します。`%Macro%`

<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:*pattern*</td><td>コネクタが現在処理しているファイルのファイル名に正規表現パターンを適用します。</td></tr>
<tr><td>Header:*headername*</td><td>コネクタが現在処理しているメッセージ上の対象ヘッダー（`headername`）の値に評価されます。</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:*format*</td><td>システムの現在の日時を指定された形式（`format`）で評価します。利用可能な日時形式については、[日付形式のサンプル](https://docs.arc.cdata.com/26.3/cloud/ja/scripting/value-formatters/date-formatters.md#date-formats-with-literal-characters)を参照してください。</td></tr>
<tr><td>Vault:*vaultitem*</td><td>指定されたVault アイテムの値に評価されます。</td></tr></tbody></table>

### Examples

%Ext% や %ShortDate% などの一部のマクロは引数を必要としませんが、引数を必要とするものもあります。
引数を取るすべてのマクロは次の構文を使用します。`%Macro:argument%`

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

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

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

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.