I have the NEXT struct ADD_PO_003/DATAAREA/ADD_PO/POLINE
ADD_PO_003 is a struct.
DATAAREA is a list of records
ADD_PO is a struct.
POLINE is a list of record
POLINE have a field POLINENUM, this have a consecutive number. by example: 1,2,3,4 … by
POLINE
RECORD_01
POLINENUM = 1
FIELD_X
RECORD_02
POLINENUM = 2
FIELD_X
RECORD_03
POLINENUM = 3
FIELD_X
Don’t mess with $iteration. You can use is it as a map source but don’t use it as a target–you’ll mess up the loop control. Thus, you can do $iteration –> POLINENUM but don’t do POLINENUM –> $iteration.
The key to know if loops are configured properly is that map steps inside the loop should show the list you’re looping over as a record, not a record list. Hope this helps. If not, post more of your mapping code for review.
[LOOP] /reg_OEX/ADD_PO_003/DATAAREA
1.1 do anything you need with ADD_PO
1.2 [LOOP /rereg_OEX/ADD_PO_003/DATAAREA/ADD_PO/POLINE
1.2.1 [MAP] /rereg_OEX/ADD_PO_003/DATAAREA/ADD_PO/POLINE = $iteration
You don’t have to keep a counter yourself. You can use $iterator. From your first post, it looked like you were trying to assign something to $iterator. Don’t do that, but you can assign $iterator to a field in your structure just fine.