2009 Jul 20 6:21 AM
Hi Gurus,
In 'read table' for reading a record by key access they have used 'comparing' , 'transporting' , 'assigning'.
Can you please explain me what exactly the above will happen with an clear example.
Thanks,
Prabu S.
2009 Jul 20 7:59 AM
these things are explained in the documentation
for the read you need none of them, use the INTO wa for 95% of all cases.
Hi Gurus,
In 'read table' for reading a record by key access they have used 'comparing' , 'transporting' , 'assigning'.
Can you please explain me what exactly the above will happen with an clear example.
Thanks,
Prabu S.
2009 Jul 20 6:23 AM
Hi Prabu,
Welcome to SDN.
Read the Sap Help or serch the SCN before posting the any question.
2009 Jul 20 7:59 AM
these things are explained in the documentation
for the read you need none of them, use the INTO wa for 95% of all cases.
2009 Jul 22 7:44 AM
mostly you wont need these
but still: from documentation:
READ TABLE - transport_options
Syntax
... [COMPARING { {comp1 comp2 ...}|{ALL FIELDS}|{NO FIELDS} }]
[TRANSPORTING { {comp1 comp2 ...}|{ALL FIELDS} }] ... .
Effect:
The addition COMPARING compares the specified components comp1 comp2 ... (or the subareas or attributes thereof) in a found
line before they are transported with the corresponding components of the work area. If ALL FIELDS is specified, all components
are compared. If no NO FIELDS is specified, no components are compared. If the content of the compared components is
identical, sy-subrc is set to 0. Otherwise it is set to 2. The found line is assigned to the work area independently of the result of
the comparison.
If the addition TRANSPORTING is specified, only the specified components comp1 comp2 ... (and their subareas) in the found line
are assigned to the corresponding components of the work area (or their subareas). If ALL FIELDS is specified, all the
components are assigned.
COMPARING must be specified before TRANSPORTING. The components comp1 comp2 ... are specified according to the rules in
the section Specifying Components. This is subject to the restriction that after TRANSPORTING, attributes of classes cannot be
addressed using the object component selector, and after COMPARING, this is only possible as of release 6.10.
2009 Sep 10 5:27 AM