SAP Career Guide - A beginner’s manual on SAP careers for students and professionals

Habe selber 14 Jahre Erfahrung in verschiedenen Modulen. Das Buch ist sensationell beschrieben. Super Beispiel, hervorragende Integrationsaspekte, eines der besten Sachbücher, welche ich je gelesen habe.

D. Filler

What on Earth is an SAP IDoc?

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



  • Preface
  • 1 Meet the IDocs
  • 2 Common IDoc interface elements
  • Physical directory
  • Logical directory
  • 3 Outbound interfaces
  • Transactional data interfaces using Message Control (aka “output”)
  • Master data interfaces using the Shared Master Data tool (aka “change pointers”)
  • Others
  • Output type configuration—Billing
  • Define partner profile for customer
  • It’s a boy
  • err
  • an IDoc!
  • Display IDoc and file
  • Output type configuration—Purchasing
  • Define partner profile for logical system
  • Change tracking—additional configuration
  • Distribution model for a purchase order
  • Purchase order creation
  • Purchase order change
  • Change pointer activation
  • Update partner profile
  • Distribution model for customer master data
  • Create a customer master record
  • Process change pointers
  • Wash
  • rinse
  • repeat
  • Sending all records at once
  • 4 Inbound interfaces
  • Partner profile (inbound EDI)
  • What is a process code and why do we care?
  • Maintain an EDI customer/vendor cross-reference
  • Maintain external/internal customer cross-reference
  • Customer-material info record—VD51
  • Test an inbound IDoc
  • Trouble in paradise
  • Display sales order
  • Partner profile for material master interface
  • Distribution model for material master interface
  • Create the test file
  • Create new material using an XML file
  • Update an existing material using an XML file
  • View application log
  • Test inbound processing with plain text file
  • Remote function call (RFC)
  • File
  • XML using the HTTP protocol
  • Web service
  • 5 Proper care and feeding of the IDoc interfaces
  • Workflow tasks
  • Standard SAP transactions
  • Background jobs
  • Relationship button
  • IDoc List
  • Output processing log
  • I am unable to add output manually
  • I can add output manually
  • but now I want it to be created automatically
  • My output is “yellow”
  • My output is “red”
  • I maintained a condition record but the output is not proposed
  • My output is “green”
  • but I do not see an IDoc
  • Create a selection screen variant
  • Create background job
  • 6 When SAP Standard is not enough
  • Create a new segment
  • Segment release
  • Create IDoc type extension
  • Assign an extension to message and IDoc types
  • Assign an extension in a partner profile
  • Debugging—outbound
  • Appendix A:   How and where to search for additional information
  • Appendix B:   The sticky note version of the book
  • Common elements of the IDoc interfaces
  • Change pointers
  • General IDoc transactions
  • Other transactions
  • Reports
  • A   The Author
  • B   Disclaimer

Weitere Informationen


Jelena Perfiljeva






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.


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.

Alle Inhalte. Mehr Informationen. Jetzt entdecken. - Ihre Lernplattform für SAP-Software

  • Zugriff auf alle Lerninhalte1
  • Regelmäßige Neuerscheinungen
  • Intelligenter Suchalgorithmus
  • Innovatives Leseerlebnis
  • Maßgeschneidere Lernpfade
  • Zertifikate & QA-Tests2

Sie haben bereits ein Konto?

1 Sie erhalten Zugriff auf alle Lerninhalte. Online-Trainings, Zertifikate sind NICHT Teil der Flatrate.

2 Weitere Informationen auf Anfrage.