Skip to content

Commit a90492d

Browse files
committed
Screenshot updated
1 parent 8b238a9 commit a90492d

8 files changed

Lines changed: 107 additions & 44 deletions

tutorials/aif-idoc-monitoring-interface-create/aif-idoc-monitoring-interface-create.md

Lines changed: 107 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,78 @@
11
---
2-
title: Create a Simple IDoc Interface
3-
description: Create a simple IDoc interface to enable monitoring IDocs with SAP Application Interface Framework.
2+
parser: v2
43
auto_validation: true
54
time: 20
65
tags: [ tutorial>beginner, products>sap-s-4hana, tutorial>license]
76
primary_tag: products>sap-application-interface-framework
87
---
98

9+
# Create a Simple IDoc Interface
10+
<!-- description --> Create a simple IDoc interface to enable monitoring IDocs with SAP Application Interface Framework.
11+
1012
## Prerequisites
1113
- You have set up SAP Application Interface Framework
12-
- You have working IDoc communication in place
13-
- SAP S/4HANA 1709 or later, AIF 4.0
14+
- SAP S/4HANA 1709 or later, SAP Application Interface Framework 4.0
15+
- Optionally: You have a working IDoc communication in place
1416

15-
## Details
16-
### You will learn
17+
## You will learn
1718
- How to create a simple IDoc interface
1819
- How to use the IDoc Structure Generator
1920
- How to set up IDoc monitoring in SAP Application Interface Framework
2021

22+
## Intro
2123
In this tutorial, you'll learn how to create a simple IDoc interface that enables you to set up IDoc monitoring. In this process, you'll use the IDoc Structure Generator to create interfaces to display and process IDocs.
2224

25+
> If you don't have a working IDoc scenario in place, the first three steps show you how to set up the IDoc communication with the IDoc message type `FLCUSTOMER_CREATEFROMDATA`. Otherwise, you can skip the first three steps and set up the customizing based on your existing IDoc communication.
26+
2327
---
2428

25-
[ACCORDION-BEGIN [Step 1: ](Create namespace)]
29+
### Create RFC destination
30+
31+
32+
Open your system. Go to **Configuration of RFC Connections** (transaction `SM59`) and choose **Create**.
33+
34+
Enter a destination name following the naming convention `<SID>CLNT<client>`, with `<SID>` being your system ID and `<client>` the client number of your system. As **Connection Type**, choose `3 RFC connection to ABAP system`. Choose **Continue**. The settings for your newly created destination open.
35+
36+
Switch to the **Logon & Security** tab. Maintain **Language** and **Client** and set the `Current User` flag.
37+
38+
![Create RFC destination](idoc-setup-destination.png)
39+
40+
**Save** your changes.
41+
42+
43+
### Create port
44+
45+
Go to **Ports in IDoc processing** (transaction `WE21`), select the **Transactional RFC** node and choose **Create** to create a new port.
46+
47+
In the upcoming dialog, choose `Generate port name` and then **Continue**.
48+
49+
Maintain a description and in the field **RFC destination**, enter the destination you created in the previous step.
50+
51+
![Create port](idoc-setup-port.png)
52+
53+
**Save** your changes.
54+
55+
56+
### Create partner profile
57+
58+
59+
Go to **Partner profiles** (transaction `WE20`) and choose **Create**.
60+
61+
Enter a **Partner no.**, following the naming convention `<SID>CLNT<client>`, `<SID>` being your system ID and `<client>` being the client number of your system. As **Type**, choose `LS` (Logical System).
62+
63+
In tab **Post Processing: Valid Processors**, enter **Ty.** (agent type) `US` (User). As **Agent**, enter your user name.
64+
65+
![Create partner profile](idoc-setup-partner-profile.png)
66+
67+
In the **Inbound** table, choose **Create inbound parameter**. In the upcoming screen, choose or enter **Message Type** `FLCUSTOMER_CREATEFROMDATA` and **Process Code** `BAPI`. Lastly, for **Processing by Function Module**, choose `Trigger immediately`.
68+
69+
![Add inbound processing](idoc-setup-inbound-processing.png)
70+
71+
Navigate back to the partner profile and **Save** your changes.
72+
73+
74+
### Create namespace
75+
2676
The **IDoc Structure Generator** is a report that generates most of the required customizing settings for SAP Application Interface Framework. To be able to use it correctly, you require a namespace.
2777

2878
Open your system. Go to **Customizing** for SAP Application Interface Framework (transaction `/n/AIF/CUST`) and navigate to **Interface Development** > **Define Namespace**.
@@ -37,10 +87,9 @@ Select **New Entries** and enter the following name and description for your new
3787

3888
Press **Enter** to confirm your entry.
3989

40-
[DONE]
41-
[ACCORDION-END]
4290

43-
[ACCORDION-BEGIN [Step 2: ](Create package)]
91+
### Create package
92+
4493
For the next steps, you need to create a package that serves as the destination for your newly created objects.
4594

4695
Go to the **Object Navigator** (transaction `SE80`). From the drop-down menu, select **Package**, enter the name **`ZDEMO`**, and press **Enter** or select **Display or Create Object**. Confirm the dialogue window, enter a meaningful short description for your new package, and select **Confirm**. If prompted, enter a workbench request and confirm again.
@@ -49,10 +98,9 @@ Go to the **Object Navigator** (transaction `SE80`). From the drop-down menu, se
4998

5099
You have successfully created a new package named `ZDEMO`.
51100

52-
[DONE]
53-
[ACCORDION-END]
54101

55-
[ACCORDION-BEGIN [Step 3: ](Generate DDIC structure and interface)]
102+
### Generate DDIC structure and interface
103+
56104
Internally, SAP Application Interface Framework works with DDIC structures, but IDoc Basic Types are not available as DDIC structures. However, the IDoc Structure Generator can create the required DDIC structure for a specific basic type and extension combination.
57105

58106
Open the **IDoc Structure Generator** (transaction `/n/AIF/IDOC_GEN`) and enter the following general information about the IDoc you want to monitor:
@@ -85,7 +133,7 @@ In section **Interface Definition**, enter the following details:
85133

86134
| Field name | Description | Value
87135
| :--------- | :---------- | :-------------
88-
| Namespace | An existing namespace in which the interface should be created | **`DEMO_1`** (the namespace created in step 1)
136+
| Namespace | An existing namespace in which the interface should be created | **`DEMO_1`** (the namespace created in step 4)
89137
| Interface Name | The name of the to be created interface, for example (an abbreviation of) the basic type | **`FCUSTOMER`**
90138
| Interface Version | The version number of the interface | **`1`**
91139
| Interface Description | The short description of the interface | your short description
@@ -98,10 +146,9 @@ When you've entered all the details, press **F8** or select **Execute**. The IDo
98146

99147
![IDoc Structure Generator - Display Logs](idoc-struc-gen-display-logs.png)
100148

101-
[DONE]
102-
[ACCORDION-END]
103149

104-
[ACCORDION-BEGIN [Step 4: ](Create interface-specific single index table)]
150+
### Create interface-specific single index table
151+
105152

106153
It's recommended to implement an interface-specific single index table to ensure full flexibility, especially if you expect a high load of messages or if you plan to define key fields for your interface (now or later).
107154

@@ -123,10 +170,9 @@ Select **New Entries** to create a new entry in **Define Interface-Specific Feat
123170

124171
**Save** your changes.
125172

126-
[DONE]
127-
[ACCORDION-END]
128173

129-
[ACCORDION-BEGIN [Step 5: ](Create recipient for interface)]
174+
### Create recipient for interface
175+
130176
If you want to monitor the newly created interface in the Interface Monitor of the Message Dashboard app, a recipient for the interface is required.
131177

132178
Go to **Customizing** (transaction `/AIF/CUST`) and navigate to **SAP Application Interface Framework** > **Error Handling** > **Define Namespace-Specific Features**. Enter or select your namespace **`DEMO_1`** and select **Continue**.
@@ -137,10 +183,9 @@ In the menu on the left, navigate to **Define Recipients** by double-clicking it
137183

138184
**Save** your changes.
139185

140-
[DONE]
141-
[ACCORDION-END]
142186

143-
[ACCORDION-BEGIN [Step 6: ](Assign recipient to interface)]
187+
### Assign recipient to interface
188+
144189

145190
To be able to see any data in the Interface Monitor or the Message Dashboard, a recipient must be assigned to the interface you want to monitor.
146191

@@ -154,10 +199,9 @@ In the menu on the left, double-click **Assign Recipients Without Key Fields** a
154199

155200
**Save** your changes.
156201

157-
[DONE]
158-
[ACCORDION-END]
159202

160-
[ACCORDION-BEGIN [Step 7: ](Assign users to recipient)]
203+
### Assign users to recipient
204+
161205

162206
Now the users in charge of monitoring the IDoc must be assigned to the recipient.
163207

@@ -171,38 +215,57 @@ Create a new entry and select the namespace and recipient you created in the ste
171215

172216
**Save** the new entry.
173217

174-
[DONE]
175-
[ACCORDION-END]
176218

177-
[ACCORDION-BEGIN [Step 8: ](Test IDoc interface)]
219+
### Test IDoc interface
220+
221+
222+
After the setup is complete, test your settings and verify that the IDoc monitoring is working as planned.
223+
224+
1. Send in new test IDocs, for example using the **Test Tool for IDoc Processing** (transaction `WE19`).
225+
226+
2. In the test tool, maintain basic type `FLCUSTOMER_CREATEFROMDATA01`.
227+
228+
3. Maintain the control record fields corresponding to your partner profile and the port created beforehand as follows:
178229

179-
After the setup is complete, you should test your settings and verify that the IDoc monitoring is working as planned.
230+
| Field name | Value
231+
| :---------------------------- | :-------
232+
| Receiver Port | `SAP<SID>` (`<SID>` being your system ID)
233+
| Receiver Partner Number | The partner number as specified in the partner profile
234+
| Receiver Type | `LS`
235+
| Sender Port | The port as specified before
236+
| Sender Partner Number | The partner number as specified in the partner profile
237+
| Sender Type | `LS`
238+
| Message Type | **`FLCUSTOMER_CREATEFROMDATA`**
180239

181-
Send in new test IDocs, for example using the **Test Tool for IDoc Processing** (transaction `WE19`).
240+
![Maintain control record](test-idoc-control-record.png)
182241

183-
If you're using SAP GUI, check the results of your test in the **Interface Monitor** (transaction `/n/AIF/IFMON`). You'll only be able to see the new interface if you correctly assigned your user to the recipient.
242+
4. Maintain sample data record by entering at least customer name, form, street, postcode, city, country and customer type. As customer type, choose either `B` or `P`.
184243

185-
![Interface Monitor](test-interface-monitor.png)
244+
![Maintain data record](test-idoc-data-record.png)
186245

187-
When you select the summary line for your recipient, you're forwarded to **Monitoring and Error Handling**, where you can see your selected test message(s).
246+
5. Then, select **Standard Inbound**. A dialog pops up informing you that the IDoc was passed to the application.
188247

189-
![Error Handling](test-error-handling.png)
248+
6. If you're using SAP GUI, check the results of your test in the **Interface Monitor** (transaction `/n/AIF/IFMON`). You'll only be able to see the new interface if you correctly assigned your user to the recipient.
190249

191-
Alternatively, if you're using SAP Application Interface Framework with SAP Web Dynpro, you can check the test results on the **Message Dashboard** (transaction `/n/AIFX/ERR_WEB`).
250+
![Interface Monitor](test-interface-monitor.png)
192251

193-
![Interface Monitor Web](test-interface-monitor-web.png)
252+
When you select the summary line for your recipient, you're forwarded to **Monitoring and Error Handling**, where you can see your selected test message(s).
194253

195-
Here, too, selecting the summary line for your recipient forwards you to **Monitoring and Error Handling**, where you can see your selected test message(s).
254+
![Error Handling](test-error-handling.png)
196255

197-
![Message Dashboard Error Handling](test-mon-and-error-handling.png)
256+
7. Alternatively, if you're using SAP Application Interface Framework with SAP Web Dynpro, you can check the test results on the **Message Dashboard** (transaction `/n/AIFX/ERR_WEB`).
257+
258+
![Interface Monitor Web](test-interface-monitor-web.png)
259+
260+
Here, too, selecting the summary line for your recipient forwards you to **Monitoring and Error Handling**, where you can see your selected test message(s).
261+
262+
![Message Dashboard Error Handling](test-mon-and-error-handling.png)
198263

199264
Congratulations! You've created and tested a simple IDoc interface for monitoring in SAP Application Interface Framework.
200265

201-
[DONE]
202-
[ACCORDION-END]
203266

204-
[ACCORDION-BEGIN [Step 9: ](Test yourself )]
267+
### Test yourself
268+
269+
205270

206-
[VALIDATE_1]
207-
[ACCORDION-END]
208271
---
96.8 KB
Loading
117 KB
Loading
120 KB
Loading
72.5 KB
Loading
-27.5 KB
Loading
107 KB
Loading
95.3 KB
Loading

0 commit comments

Comments
 (0)