Understanding IDocs

An IDoc (Intermediate Document) is a transactional message, in the form of a text file, sent from an SAP-connected program to other programs.

Most of an IDoc message consists of fields of data grouped into segments. The segments themselves have a hierarchical relation to each other.

Example

A physician's prescription of a drug for a hospital patient needs to get to the hospital's pharmacy. This could be done by means of an IDoc sent from a bedside program to a program in the pharmacy. Suppose the IDoc has a hierarchy of four levels of segments:

Patient Name: Johnson

Diagnosis: croup

Diagnosis: tibia fracture

Visit Type: admission

Drug: codeine

Drug: amidol

Visit Type: followup

Drug: naprosin

Level 1: Contains data that remains constant for years at a time, such as patient name and address.

Level 2: Contains data that remains constant through a given illness, but changes from illness-to-illness; such as primary physician and diagnosis. There can be more than one second level segment for a given patient.

Level 3: Contains data that remains constant through a particular visit to the hospital, but changes from visit-to-visit; such as visit type (admission or followup) and attending physician. A patient may have more than one hospital visit during an illness.

Level 4: Contains data that tends to change from prescription-to-prescription; such as prescribing physician, medicine, and dosage. More than one medicine may be ordered for a given patient on a given visit.

Related Topics