SAP OO OBS ASSIGN TYPE 1

Get Example source ABAP code based on a different SAP table
  


ABAP Code Snippet
ARTICLE

No obsolete castings with ASSIGN
In ABAP Objects you are not allowed to use the additions TYPE and DECIMALS for assigning data objects to field symbols using ASSIGN.

Error message in ABAP Objects if the following syntax is used:

ASSIGN f TO <(><<)>fs> TYPE ... [DECIMALS ...].
Correct syntax:

ASSIGN f TO <(><<)>fs> CASTING TYPE|LIKE ...
Reason:

The TYPE and DECIMALS additions have been replaced by the addition CASTING [TYPE|LIKE].
Unlike the TYPE addition, CASTING supports any data type.