Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\xampp\htdocs\CMS\libraries\kunena\external\nbbc\nbbc.php on line 343

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\xampp\htdocs\CMS\libraries\kunena\external\nbbc\nbbc.php on line 357

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\xampp\htdocs\CMS\libraries\kunena\external\nbbc\nbbc.php on line 362

AsString vs AsVarString

  • Bruce Smith
  • Bruce Smith's Avatar Topic Author
3 years 7 months ago - 3 years 7 months 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: 3 years 7 months ago by Serge Volkov.
  • Serge Volkov
  • Serge Volkov's Avatar
3 years 7 months 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.

Contact US

  • gs-soft AG

    Delfterstrasse 10

    CH-5000 Aarau

    Switzerland

    Phone:
    +41 (0)62 832 20 40
    E-Mail:
    contact@gs-soft.com


  • Language