AsString vs AsVarString

  • Bruce Smith
  • Bruce Smith's Avatar Topic Author
8 years 1 month ago - 8 years 1 month ago #15 by Bruce Smith
AsString vs AsVarString was created by Bruce Smith
What is the difference between ValueAdapter.AsString and ValueAdapter.AsVarString ?
I assume the property "AsString" should be used to access a value of the ABAP type "CHAR" while "AsVarString" used for values of ABAP type "STRING".
Is that correct?
Last edit: 8 years 1 month ago by Serge Volkov.

Please Anmelden to join the conversation.

  • Serge Volkov
  • Serge Volkov's Avatar
8 years 1 month ago #16 by Serge Volkov
Replied by Serge Volkov on topic AsString vs AsVarString
Yes, you are right.
You use "AsString" for RFC "CHAR" type value and "AsVarString" for RFC "STRING" value.

Also please note that when using "AsString", you should explicitly set the property ValueAdapter.CharacterSize as the RFC type "CHAR" has a fixed length: e.g. CHAR15.
And the explcit definition of "CharacterSize" is not required for RFC "STRING" values.

Please Anmelden to join the conversation.

Kontakt

  • gs-soft AG

    Delfterstrasse 10

    5000 Aarau

    Schweiz

    Telefon:
    +41 62 832 20 40
    E-Mail:
    Diese E-Mail-Adresse ist vor Spambots geschützt! Zur Anzeige muss JavaScript eingeschaltet sein!


  • Language