What is a ‘repeat field’?
A repeat field is an infotype field which exists more than once. The names of these fields all have the same master and are extended with a sequential number.
ExampleThe fields ‘date type’ and ‘date’ from infotype 0041 are repeat fields. The repeat field sequence contains 12 fields. For ‘date type’, these fields are DAR01, DAR02, to DAR12 and for ‘date’, the fields are DAT01, DAT02 to DAT12. Together ‘date type’ and ‘date’ form a repeat field group.
For repeat fields in the query a special handling is provided, you can activate this with an entry in table T770P. If the necessary entry exists, this has the following effects:
- In the InfoSet only the first occurrence of the repeat field is displayed, it represents the complete repeat field sequence.
- If the (representative) repeat field is used in the query, the system implicitly evaluates the entire data of the whole repeat field sequence.
However, if in table T770P there is no entry, the field is treated like a normal infotype field:
- All fields of the repeat field sequence are equal in the InfoSet. All these fields must be assigned to the corresponding field group individually.
- In the query all occurrences of the repeat field can be used as separate fields. An individual evaluation is carried out like for normal infotype fields.
Activation by entry in table T770PWith the example of the fields ‘date type’ and ‘date’ from infotype 0041 we explain how a correct entry in table T770P should look:
Infotype First repeat field Next repeat field No. repeat fields Initial flag ————————————————————— 0041 DAR01 DAR02 12 0041 DAT01 DAT02 12
- You must enter all fields of a repeat field structure (here ‘date type’ and ‘date’). It is not allowed that you only enter a subset of the fields.
- For all fields of a structure, the correct number must be specified (here 12). It is not allowed to enter different values for repeat field sequences of the same infotype.
- If the ‘Initial flag’ is set to ‘X’, the values of all fields of the repeat field sequence are output, even if they are not filled (initial) (here it would be value 12). If the flag is not set, the system only displays the existing values.
Caution:Up to and including Release 4.5B you can only enter the infotype and the first repeat field (without numeric extension) in table T770P. The system then tries to determine the number of the fields itself. Here, the following restrictions is valid: You can only activate the special handling for the repeat fields with a name which consists of a three-digit master and a two-digit numeric extension. In table T770P you only enter the master. Up to Release 4.5B, the entries for the fields ‘date type’ and ‘date’ may for example look as follows:
Infotype Field name ——————— 0041 DAR 0041 DAT
Error message during generation of an InfoSet:When you generate an InfoSet for a field XYZ, if the system displays the error message XYZ changed to repeat field (T770P) (must no longer be used in the InfoSet) this has the following reason:
- Field XYZ is part of a repeat field sequence (and not the first field of this sequence).
- For this repeat field sequence with an entry in table T770P the special handling is activated.
- When the InfoSet was created, the entry did not yet exist in table T770P. Field XYZ was handled as normal field then (not as repeat field) and was assigned to a field group.
- Since the special handling is activated, only the first field of the repeat field sequence must be used, but not field XYZ.
You must decide whether the special handling for the affected repeat field should still be active or whether you want to deactivate it. If you do not require special handling, you must delete the corresponding entries in table T770P. If special handling should still be active, you must correct the InfoSet. You must delete all fields of the repeat field sequence from the InfoSet – except the first field. You can do this in two ways:
- Delete the assignment of the fields for the field group manually.
- In the change mode use function ‘InfoSet -> Further functions –> Update additional HR fields’. (Only available as of Release 4.6.) Note that with this the system not only compares the repeat fields but it also updates all additional fields delivered by SAP. As a result, in your InfoSet there may be a great number of new fields.
If you cannot delete a repeat field from the field group the reason for this is that the field is already used in queries. Then, you either need to change the affected queries (delete the field from the query) or deactivate the special handling for the repeat field sequence (delete the entries from table T770P).
- If the fields are maintained in T770P the query only shows the first field and if there are more than one entries creates automatically additional lines in the output.
PERNR XXX01 XXX02 XXX03
0001 AA BB CC
Would have the output: 0001 AA 0001 BB 0001 CC
- When using Ad-hoc query to fetch data from an infotype with repeat fields, some of the value text is not being displayed.
- When using Ad-hoc query to fetch data from an infotype with repeat fields, some of the value text is incorrect.
The fields on for example IT0033 you’re referring to are repeat fields. There is special handling for these kind of fields in the query tool.
There is an entry in table T770P in your system for IT0033: 0033 AUS01 AUS02 20 X
So,in the InfoSet only the first occurrence of the repeat field is displayed, it represents the complete repeat field sequence.
If you remove this entry, you’ll see the following behavior: All fields of the repeat field sequence are equal in the InfoSet. All these fields must be assigned to the corresponding field group individually. In the query all occurrences of the repeat field can be used as separate fields. An individual evaluation is carried out like for normal infotype fields.
Hence, if you would like to see all the entries from IT0033 you should delete this entry from the T770P and assign to your output list in your infoset and query.
Please also regenerate the query, after changing the table.
Relevant infotypes:IT0006, IT0008,IT0012, IT0013, IT0014, IT0025, IT0027, IT0033, IT0028, IT0041, IT0064, IT0082, IT0098, IT0146, IT0278, IT0279, IT0491, IT0700, IT0998
Leave A Comment?
You must be logged in to post a comment.