Ansicht
Dokumentation

Unexpected field contents w/IMPORT .. /SELECT .. <br />Tip-No.: 1180 ( INFO1180 )

Unexpected field contents w/IMPORT .. /SELECT ..
Tip-No.: 1180 ( INFO1180 )

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

Short text

Unexpected field contents w/IMPORT .. /SELECT ..
Tip-No.: 1180

Symptom

When filling an internal table with one of the IMPORT variants

IMPORT ... itab ... FROM DATABASE ...
IMPORT ... itab ... FROM MEMORY ...
CALL DIALOG ... IMPORTING ... itab ...

or when importing a data base table into an internal table with

SELECT ... INTO TABLE itab
SELECT ... APPENDING TABLE itab ...

target table itab is wider than the source table, this means itab
is an expansion of the source table.

After the IMPORT or SELECT, the exhansion fields in target table itab
have unexpected contents (e.g. a default value not correct for the
type).

Cause

For IMPORT or SELECT in a target table with expansion fields,
the contents of the expansion fields after the IMPORT or SELECT are not
defined. In particular, the expansion fields are generally not set to
the initial value appropriate for the type after an IMPORT or SELECT
(can unfortunately not be implemented at this time).

(The expansion fields are currently filled as follows:

- for IMPORT, with space,
- for SELECT within the occurs area, with the old contents, outside
the occurs area, with random values.

This assignment of the expansion fields is not (|) guaranteed, however.)

Solution

After an IMPORT or SELECT in a target table with expansion fields,
do not code based on the contents of the expansion fields.






Addresses (Business Address Services)   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 1660 Date: 20240427 Time: 053855     sap01-206 ( 17 ms )