Ansicht
Dokumentation

ABENDESCRIBE_FIELD_ABEXA - DESCRIBE FIELD ABEXA

ABENDESCRIBE_FIELD_ABEXA - DESCRIBE FIELD ABEXA

RFUMSV00 - Advance Return for Tax on Sales/Purchases   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

Determining Elementary Data Types

This example demonstrates how the attributes of elementary data types can be determined at runtime.

Source Code

Execute

Description

This example implements a type check that only allows assignments if the source and target fields have the same type.

Using the two input fields type1 and type2, the names of elementary data types are entered. Next, an attempt is made to create anonymous data objects of the types specified dynamically using the CREATE DATA statement. If this does not work, an error message is displayed.

The statement DESCRIBE FIELD determines the type of the data objects created dynamically. Only if both data objects have the same type dereferenced is dref2->* assigned to dereferenced dref1->*

The example does not work if complex data types such as SCARR and SPFLI are entered in the input fields. In this case DESCRIBE FIELD, determines the same types ("u"), which can cause runtime errors if the structures are not convertible to each other.

The RTTS methods can be used to check complex data types and object types at runtime.






SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 1398 Date: 20240328 Time: 163454     sap01-206 ( 22 ms )