5

[SAP ByD]Count the length of "String" field in extension BO

 1 year ago
source link: https://answers.sap.com/questions/13699076/sap-bydcount-the-length-of-string-field-in-extensi.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Search Questions and Answers
yesterday

[SAP ByD]Count the length of "String" field in extension BO

28 Views

Hello Community,

I would like to know the field length of "String" datatype.

Eg: ShortText is 40, MediumText is 80.

But we cannot see the length info of "String" datatype in Repository explorer.

Based on that, we would like to count the total field length (which we are adding in solution) of each XBO node,

so we can assure it is not exceeding 15k limitation.

Thank you.

Regards,

2 Answers
Sort by:

The theoretical maximum length of the String datatype is pretty much infinite (probably 2gb).

But the SAP Cloud Applications Studio documentation specifically states:

Variables of unrestricted length, for example, variables of the LANGUAGEINDEPENDENT_Text data type,
are truncated at a length of 255 characters as soon as they are saved to the database.
For texts that are longer than 255 characters, use the TextCollection dependent object.
2 comments

Well, it's definitely not unlimited.

Hi May,

In case you want to define string like elements on your XBO within the Studio, I can suggest you to stick with either MediumText, MediumName or MediumDescription and these also have the "Long" and Short" versions. You can check each size of these on the Repository Explorer.

Best regards,

Thiago

1 comment
7 minutes ago

Hi Thiago,

If I am not wrong, we can only use LongText (120), MediumText (80), ShortText (40) in extension BO.

The 255 length fields (eg: LONG_Description) cannot use in the XBO, it is only available in custom BO. We tried, but it get error.

Ref : Text Types Usage

Thats why we used String datatype in XBO for some requirements where user want over 200 chars to input.

Can you advice how should I count the max length of String datatype in XBO?

Regards,

Know someone who can answer? Share a link to this

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that your answer complies with our Rules of Engagement.

You must be Logged in to submit an answer.

Please provide a distinct answer and use the comment option for clarifying purposes.
10 characters required.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK