2014 May 26 9:49 AM
HI Experts,
I want to display some text based on the user inputs,Question here is i want to display it meaningful way.
For ex, if i gave length as 50, output is displayed with last word splitted and coming to new line, like "PAV" in one line
and "AN" in another line. actual word is PAVAN. so in such case the whole word will print on the next line instead of splitting.
1)split the text based on user input(length)
2)split it meaningfully.
Anyone suggest how to proceed for this.
HI Experts,
I want to display some text based on the user inputs,Question here is i want to display it meaningful way.
For ex, if i gave length as 50, output is displayed with last word splitted and coming to new line, like "PAV" in one line
and "AN" in another line. actual word is PAVAN. so in such case the whole word will print on the next line instead of splitting.
1)split the text based on user input(length)
2)split it meaningfully.
Anyone suggest how to proceed for this.
2014 May 26 9:58 AM
2014 May 26 10:06 AM
Hi Pavan,
Check below code. It will work.
DATA V_TEXT TYPE STRING.
PARAMETERS V_LENGTH TYPE I.
V_TEXT = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
START-OF-SELECTION.
DATA IT_STR TYPE STANDARD TABLE OF STRING.
CALL FUNCTION 'SOTR_SERV_STRING_TO_TABLE'
EXPORTING
TEXT = V_TEXT
LINE_LENGTH = V_LENGTH
LANGU = SY-LANGU
TABLES
TEXT_TAB = IT_STR.
You will get line wise splitted sting in IT_STR as a row.
Thanks & Regards,
JP
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |