sapdev logo background
sapdev logo sapdev logo
Comments

SAP OO OBS CHARACTER 1 documentation, setup help and example usage



Return to SAP documentation index


INCLUDE
ARTICLE

Use Only Character-Type Fields When Processing Strings

When processing characters strings and, as of release 7.0, outside of classes, you can only use character-type fields (data types c , d , n , string , t and, in non-
Unicode programs , x and xstring also).

  • In ABAP Objects, the following syntax causes an error message:


  • DATA int TYPE i.
    SHIFT int BY 3 PLACES.
  • Correct syntax:


  • DATA int(4) TYPE c.
    SHIFT int BY 3 PLACES.
  • Reason:


  • The statements for character string processing treat their operands as character-like irrespective of their actual type, which may lead to undefined results in connection with fields that are not character-like.
    Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




    OO_OBS_CASE_1
    OO_OBS_CHECK_1




    comments powered by Disqus