cancel
Showing results for 
Search instead for 
Did you mean: 

Size of characters in the textedit vary depending on the language

Former Member
0 Kudos

Hello All,

We are facing problem with textedit in webdynpro abap.

The issue is the size of characters in the textedit vary depending on the language.

For example:Consider a textedit with cols size of 74

If an english textline of 72 characters is entered in the textedit it is displayed in one row of it.

If a japanese text line of 72 characters is entered in the same textedit it is displayed in two rows of it.

Is there any property in UI by which we can enter data in one common character size for any language in the textedit?

Any pointer to it please reply.

Regards,

Uvendu Bala

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Try with wrapping property of the TEXTEDIT.

Thanks,

Shailaja Ainala.

Former Member
0 Kudos

Hello Shailaja,

Thank you for your response.

We have used a soft wrapping for textedit.The text's are wrapped correctly , the problem here is the text's of different languages are taking different character size.Thereby causing the issue below.

A textline of say 72 characters in English is taking in one row of textedit but a text line of 72 characters in japanese is taking two rows in text edit.

I am not able to insert new line characters while data saving and retrival because of the uncommon format of size of characters.This is causing sentence to break in uneven manner for different languages.

Is there any method or FM which converts character size in the text's of different languages into common character size .Similar to the property of a textarea in the modulepool program?

Regards,

Uvendu Bala

Former Member
0 Kudos

Hi,

Use the value 'Hard' for the wrapping property.

Carriage return is inserted for each wrapping.

Regards,

Ragunathan.R

former_member199125
Active Contributor
0 Kudos

Try to increase the width of the text edit, so that it will be one line.

Regards

Srinivas

Former Member
0 Kudos

Hello Sanasrinivas,

Thankyou for your reply.

If increase the length of the textedit say from 72 to 172.

No.of English charcters entered in the firstrow would be 172.But no.of Japanese \ Chinese character's that could be displayed in the first row would be less than 172, varrying based on the size of the size of characters based on the language.

I am looking for a way by which we could maintain same character size for text's being entered in different languages.By doing so I can maintain proper formatting of data while entering or dispalyed(after retriving from backend) even if the language used is different.

Regards,

Uvendu Bala

former_member199125
Active Contributor
0 Kudos

We can't maintain same size for a word in different language. Check ur self with any word.

Even if you convert a word to xstring format, it will be vary with word size in language.

By doing so I can maintain proper formatting of data while entering or dispalyed(after retriving from backend) even if the language used is different.

I dont understand the issue with increasing text edit width size. just elaborate on this...

Regards

Srinivas

Former Member
0 Kudos

Hello Sanasrinivas,

What we are doing here is we are passing data entered in the textedit to a string table in backend.For example the width of the text edit is 72 and the length of a row in string table is also char72.Therefore each row entered in the text edit is stored as a row in the table.

Now the problem here is when we enter japanese text approximately 40 japanese characters can be entered in the first row, but while saving it stores 72 characters in one row in the string table.While data retrival a new line character is inserted after 72 char is read from a row in the back end stringtable.

This while displaying in the textedit it displays like a paragraph, because only 40 japanese chars are displayed in one row remaining 32 are displayed in second row and new line is inserted after it.

All though the user has entered continuous text in the textedit while saving, they see paragraph while data retrival.

This case work fine with English, in order to make it work for other language also.I was thinking if we can get same character size for alll langauges in the textedit similar to the one which we have in edit_control of module pool.

Regards,

Uvendu Bala

former_member199125
Active Contributor
0 Kudos

if the issue is critical, for time being, consider the below as work around.

Read the data from table and store into string variable. say var

then split the string var at new_line and store into var1 var2,var3( assume max we have 3 new lines )

again... concatenate and pass it to text edit.

syntax : SPLIT var at cl_abap_char_utlities=>new_line into var1 var2 var3.

maintext type string.

concatenate var1 var2 var3 into maintext.

Regards

Srinivas

Former Member
0 Kudos

Hello All,

Any more ,probable solution to this.

Thanks Regards,

Uvendu Bala

0 Kudos

Hi Uvendu - I would like to know how you did the following. Could you please elaborate on the steps and copy/paste the code if possible.?

"What we are doing here is we are passing data entered in the textedit to a string table in backend.For example the width of the text edit is 72 and the length of a row in string table is also char72.Therefore each row entered in the text edit is stored as a row in the table."

Thanks in Advance.

Vidya.