IDoc Field Generation (-GEN)

Specify automatic field generation using the IDoc Field Generation
(-GEN) adapter command. Use this adapter command to control the way IDoc fields are generated. The adapter automatically generates certain fields for an ALE client call. These fields will not be mapped because the adapter overrides them (except as noted in the options table). Separate fields in the list with a comma and omit the field list to change the behavior of all fields.
-GEN [0|!] [field1[,field2...]
Option Option Description
  Specify IDoc fields to generate if blank.
  Specify to suppress IDoc generation.
Specify the following IDoc fields as desired:
as specified by -C
sequentially assigned for each IDoc
`SAP' + remote system id
copied from RCVPOR (possibly also generated) if not mapped by the user
`CUSTOMERLS' if not mapped by the user
copied from SNDPOR (possibly also generated) if not mapped by the user
system date
system time
sequentially assigned for each segment
copied from the SEGNUM assigned to the first IDoc in the preceding HLEVEL.
copied from the most recently assigned HLEVEL if not mapped by the user

All fields except RCVPOR and RCVPRN will be recorded in the backup file if a backup file is used. RCVPOR and RCVPRN are determined after an RFC connection is established. The control records are updated at that time.

PSGNUM generation requires that HLEVEL be specified. PSGNUM is generated by applying control-break logic to the HLEVEL field. The HLEVEL need only be entered for the first segment at each level, subsequent segments at that level can be left blank (for PSGNUM generation purposes, it is assumed to be the same). The SEGNUM for the first segment at an HLEVEL is used as the PSGNUM for segments at the next higher HLEVEL. PSGNUM for HLEVEL 01 is 000000.

The following are examples of using the IDoc field generation adapter command.

Automatic generation of all IDoc fields listed in the IDoc Field Generation (-GEN) topic.

This is the default. User does not have to specify this adapter command.

Adapter automatically generates all IDoc fields regardless of the value of the fields in the input.

-GEN0 fld1, fld2
Adapter generates IDoc fields for input field1, if it is blank and input field2, if it is blank.
-GEN! fld1, fld5
Adapter suppresses automatic generation of those IDoc fields listed next to -GEN!