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
0
  Specify IDoc fields to generate if blank.
!
  Specify to suppress IDoc generation.
 
[fld1[,fld2...]
Specify the following IDoc fields as desired:
 
MANDT
as specified by -C
 
DOCNUM
sequentially assigned for each IDoc
 
DIRECT
`2'
 
RCVPOR
`SAP' + remote system id
 
RCVPRT
`LS'
 
RCVPRN
copied from RCVPOR (possibly also generated) if not mapped by the user
 
SNDPOR
`CUSTOMERLS' if not mapped by the user
 
SNDPRT
`LS'
 
SNDPRN
copied from SNDPOR (possibly also generated) if not mapped by the user
 
CREDAT
system date
 
CRETIM
system time
 
SEGNUM
sequentially assigned for each segment
 
PSGNUM
copied from the SEGNUM assigned to the first IDoc in the preceding HLEVEL.
 
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.

Example
Description
-GEN
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!