Skip to Content
Technical Articles
Author's profile photo Gaurav Loknath Gera

Text Types Usage

With the 1811 release you will see a warning message in SAP Cloud Applications Studio like the one below.

 

This warning is shown when you use the ‘Text’ data type for field definition. It’s an unlimited text data type and allows you to save as much text as you want. Because of the unlimited nature of the data type, certain users save binary content like PDF files or XML or images in this field. The data type is not designed to save such content and because of this it affects the database performance.

In such cases where you want to save PDF files, images etc. its recommended to AttachmentFolder (refer section 7.2.2.12 in the SDK Help Documentation for more on AttachmentFolder). Further, if you wish to store unlimited text then its recommended to use to use the TextCollection DO (refer section 7.2.2.12 in the SDK Help Documentation for more on TextCollection).

We also support text data types with limited character length. It highly recommended that when you define the text fields you one of the following data types.

Field Definition in Custom Objects

 

 

 

Field Definition in Extension Objects

 

Field Definition in Custom Nodes of an Extension Object

Assigned tags

      6 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo May Thitsa Oo
      May Thitsa Oo

      Hello Gaurav,

      Thank you very much for the valuable information.

      I've tried on "LongText" on extension BO and it seems unlimited.
      But when I use that in absl logic, it showing the warning message ["Please ensure the value doesn't exceed 120 characters, otherwise it will be cut off at runtime."]. But although I insert over 300 characters in logic (get the value from TextCollection and put to this), seems no problem on screen and showing all chars.
      So it is OK to assume that "LongText" can be used as unlimited in XBO?

      Regards,
      May

      Author's profile photo Christian Warken
      Christian Warken

      Hello Gaurav,

      Thank you very much for the valuable information.

       

      I’ve currently tried what May Thitsa Oo mentioned and I is not (anymore?) possible to insert more than 120 characters for LongText.

      Apparently there is also a problem with field definition of extension objects. It is not possible to adjust the field size, ReadOnly and/or DisplayType. So the fields look unpleasant (huge).

      I’ve created an incident 499641/2019

      Regards,

      Chris

      Author's profile photo Christian Warken
      Christian Warken

      SAP answered the following to my incident:

      • DisplayType is not adaptable anymore for extended text fields --> they suggested to use embedded component as a workaround
      • ReadOnly can not be adjusted anymore by setting the "is display only" hook --> you need to adaptvia extensibility explorer

      Regards

      Author's profile photo Lucho Montalti
      Lucho Montalti

      How can I copy the value of an internal note that is an unlimited field and then be able to show it in the sales order summary?

      Regards

      Author's profile photo Peter Krieger
      Peter Krieger

      Hello Guarav,

      if I try to add a field with the types ShortText, MediumText or LongText I get the following error:

      Definition of data type 'ShortText' not found; Add an import statement for the missing namespace or use a fully qualified name.

       

      I am not able to find these datatypes in the Repository Explorer and also not in the SDK Help Documentation.

       

      Could you give me a hint how to use these datatypes?

      Kind regards
      Peter

       

       

       

      Author's profile photo Peter Krieger
      Peter Krieger

      Hello Guarav,

      it was my fault because these datatypes are not available in my extenstion node... as you mentioned it above.

      The text datatypes starting with LANG... are not visible in the resultlist when pressing STRG+Space.

      space

      space

      space

      Kind regards

       

      Peter