Administrative fields

All IDoc segments have administrative fields.

The administrative fields of IDoc segments are:

  • ADM_DOCNUM, VARCHAR(16), the unique identifier of the IDoc number
  • ADM_SEGNUM, VARCHAR(6), the unique identifier of the segment number within an IDoc
  • ADM_PSGNUM, VARCHAR(6), the unique identifier of the parent segment number within an IDoc
For example, let us assume that we have an IDoc of type MATMAS05 with the following hierarchical structure:
1. E1MARAM (MATNR: 4237) 
| 
+- 2. E1MARC (MATNR: 4237, WERKS: 2000) 
| 
+- 3. E1MARC (MATNR: 4237, WERKS: 3000) 
| 
+- 4. E1MARC (MATNR: 4237, WERKS: 4000) 

This tree denotes an IDoc with four segments as indicated with 1, 2, 3, and 4. The root segment is of type E1MARAM with field MATNR set to 4237. Other fields are excluded from this example. The root segment has the child segments 2, 3, and 4, all of type E1MARC, and field MATNR set to 4237, and field WERKS set to 2000, 3000, and 4000, respectively.

The links to the IDoc Load Connector stage for these segments have data similar to:

Link 1: E1MARAM
ADM_DOCNUM, ADM_SEGNUM, ADM_PSGNUM, MATNR 
		4237,				1,						0,				4237  
Link 2: E1MARC
ADM_DOCNUM, ADM_SEGNUM, ADM_PSGNUM, MATNR, WERKS 
		4237, 			2, 					1, 				4237, 	2000 
		4237, 			3, 					1, 				4237, 3000 
		4237, 			4, 					1, 				4237, 4000  

The ADM_SEGNUM and ADM_PSGNUM administrative fields contain the values of the segment IDs specified in the hierarchy. Although the ADM_DOCNUM field can have any value, it uses the MATNR (material number, the primary key of the material business object) as it is a natural choice. The values of the specified fields can be any character string and do not need to be consecutive numbers as generated by the IDoc Extract Connector Stage.