2007 Jun 26 9:31 AM
Hi,
I need to enter multiple lines (of Equipment long text) in an ALV cell, in order to display single fields (Classification Characteristic values) and long text in the cells of a single ALV row.
The result would look something like this (looks better in Courier font):
----------+--
+
Val1 | Val2 | Text line 1 |
Text line 2 |
----------+--
+
Val3 | Val4 | Text line 3 |
Text line 4 | ||
Text line 5 |
----------+--
+
etc
The same effect is achieved in an Excel cell by typing <Alt-Enter> at the end of each line.
I was thinking of using a String variable for the long text, with line-feed characters to split the lines. Is there an equivalent in ABAP to the Excel/ASCII line-feed character, or is there another way?
Thanks,
Chris.
Hi,
I need to enter multiple lines (of Equipment long text) in an ALV cell, in order to display single fields (Classification Characteristic values) and long text in the cells of a single ALV row.
The result would look something like this (looks better in Courier font):
----------+--
+
Val1 | Val2 | Text line 1 |
Text line 2 |
----------+--
+
Val3 | Val4 | Text line 3 |
Text line 4 | ||
Text line 5 |
----------+--
+
etc
The same effect is achieved in an Excel cell by typing <Alt-Enter> at the end of each line.
I was thinking of using a String variable for the long text, with line-feed characters to split the lines. Is there an equivalent in ABAP to the Excel/ASCII line-feed character, or is there another way?
Thanks,
Chris.
2007 Jun 26 10:08 AM
hai
i think u can use the command of concatanate
ex:-
data : w_fricharge type c,
w_fric type c,
w_freight(70).
concatenate 'Freight ' w_fricharge w_fric into
w_freight
separated by space.
then u can write the code...
....
....
...
fieldcatalog-fieldname = 'VBELN'.
fieldcatalog-key = 'X'.
fieldcatalog-seltext_m = ' w_freight '.
fieldcatalog-col_pos = 1.
fieldcatalog-outputlen = 5.
fieldcatalog-edit = ''.
i think it wil be help full to u
regard
nawa
2007 Jun 26 10:45 AM
Thanks Nawa, I'm not sure how that helps though. What I want to do is include any number of lines (as you would find in long text) into a single ALV cell, to appear as separate lines. With Equipment the line length is 72 characters, so I need to handle records with zero to any number of lines, each of which has a length between zero and 72 characters.
I guess I could read the contents of the long text into an internal table, loop through the table and concatenate all the lines into a string variable, but that does not preserve the line breaks, which are important. I need to include some kind of line break character at the end of each line.
2007 Jun 26 10:48 AM
Hi Chris
You can not have multiple lines in same cell.
This functionality is not provided in ALV.
Regards
Navneet
2007 Jun 26 10:50 AM
Hi Chris,
use REUSE_ALV_HIERSEQ_LIST_DISPLAY
regards Dieter
Message was edited by:
Dieter Gröhn
2007 Jun 26 11:00 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |