Information

Please visit our international page to see all the numbers matching your region.

What on Earth is an SAP IDoc?

What on Earth is an SAP IDoc?

言語

English

ページ

213

エディション

1

レベル

ビギナー

国際標準図書番号

9783960123408

ISBNプリント

9783960123996

電子書籍

またはすべてのコンテンツにアクセスする

定額料金

$19 月あたり

  • シングルライセンス
  • 1000以上の電子ブックとビデオチュートリアル
  • インスタント・アクセス
  • 12ヶ月($228年間)
  • 自動更新

詳細

This book provides you with the essential knowledge you need to work with SAP IDoc interfaces successfully. Walk through the IDoc anatomy and different kinds of segments. Dive into inbound and outbound IDoc interfaces and learn how to create a port and logical system. Walk step by step through how to configure IDoc interfaces for various business scenarios including sending an invoice to an EDI partner, receiving a sales order from an EDI partner, and receiving material master data from an external system. Learn how to use output and change pointer techniques. Examine how to monitor and troubleshoot post-IDoc interface implementation activities and get a handle on archiving best practices. Navigate IDoc interface enhancement options including adding segments and user exits. By using detailed examples, tips, and screenshots, the author brings readers up to speed on the fundamentals of SAP IDocs.


  • Fundamentals of inbound and outbound IDoc interfaces and configuration
  • Learn how to implement interfaces with ALE and EDI
  • Troubleshoot common post-implementation challenges
  • Quick reference guide to common IDoc transaction codes and reports

読書例

2.1 Port definition—WE21

A communication port in an SAP system is quite similar to an actual sea port. Except instead of ships dropping off or picking up their cargo, it is information flowing in and out of an SAP system. And just like ships from many countries that arrive at the same sea port, one IDoc port can be used for multiple outbound and inbound interfaces.

Ports are maintained in transaction WE21. On the left-hand side (Figure 2.1) we can see a list of the port types.

IDoc

Figure 2.1: Port types

There is, of course, SAP documentation on the port definition but, in my opinion, it has too much information no one cares for yet lacks a clear and simple explanation of what all those port types are for. Although if SAP Help was perfect, then no one would need this book, so it is probably a good thing... Anyway, here is my “simplified” explanation of the available port types.

  • Transactional RFC—This port type is used when two systems, or clients of the same SAP system, exchange data directly by establishing a remote connection and calling a special remote-enabled function (I briefly mentioned RFC in Chapter 1). The remote connection needs to be defined beforehand in transaction SM59. Note that the connection does not have to be between two SAP systems, it could be between an SAP system and a third-party application.
  • File—This port creates a plain text file in the specified directory. The file will have the segment names at the beginning of each line followed by a stream of data (usually unreadable). This port type seems to be rarely used these days as more preference is given to RFC and XML types.
  • CPI-C—This port is used for R/2 systems, which is an old version of SAP ERP.
  • ABAP-PI—This port triggers a custom ABAP function. ABAP-PI is short for “ABAP Programming Interface” and has nothing to do with the SAP Process Integration solution (which has already been renamed twice and is now called SAP PRO). In the outbound interfaces, function module OWN_FUNCTION may be used as a template for the custom function. In the inbound interfaces, the custom function must call function module IDOC_INBOUND_ASYNCHRONOUS to create the IDoc.
  • XML file—This port creates an XML file in the specified directory. In the XML file, you will see the IDoc segments as nodes. This port type is used as an example in this book because it is easy to deal with and works well for illustration purposes.
  • XML HTTP—This port is sort of an XML / RFC hybrid. No file is created, but data is transmitted in XML format using an HTTP connection.

What about web services?

SAP does not provide a web service port for IDocs. One might argue that if a web service can be used, then why bother with IDocs at all? There is a great blog titled “IDoc as Web Service” on SCN by Amaresh Pani that describes a possible solution (without SAP PI/PO/PRO) and also mentions a valid business scenario in the comments.

For the File and XML port types, there are two choices for the directory where the file will be created: logical and physical. What is the difference and when or why use one or the other?

Physical directory

If we choose physical directory name then we need to enter the actual directory pathname on the application server. SAP application server directories can be viewed in transaction AL11. Note that some shared network directories can also be added there.

It is a good idea to check with the system administrator which directory should be used in the port definition.

Most of the examples in this book use a physical directory for simplicity, but in real life it is better to use a logical directory.

Logical directory

If we choose the logical directory option, then we need to use a logical file path. Logical file paths (i.e., directory and file names) are maintained in the transaction FILE. In a nutshell, these paths allow the use of a neutral identifier instead of specific physical location.

Why would anyone need that? In some cases, it is convenient because we can maintain path definition once and then use the logical path name in many ports (or other places—logical paths are used all over SAP). So if the actual (i.e. “physical”) directory changes then it is only necessary to make a change in only one place—logical path.

But, most importantly, logical names can be dynamic. For example, ‘/usr/DEV/temp’ is a static name, but ‘/usr//temp’ is dynamic. In the last case, is a variable that will be filled in with the system ID, so we can conveniently use the same logical path in DEV, QAS, and PRD systems and not worry about changing it.

Logical directories take some additional effort to set up, but they can be a life saver if the path names must be changed due to a server replacement, hosting provider switch, or any other technical reason.

Also, logical directories allow for some cool customization using a function module, see Section 6.4.

Beware of case sensitivity

Note that in some operating systems (OS), such as UNIX and Linux, file names are case sensitive. To find which OS is used in your SAP system, go to the menu System • Status from any screen and check the Operating System field.

Support-Team