Multiple Lines in Header of ALV
Hi Friends,
In Program SALV_DEMO_HIERSEQ_FORM_EVENTS. We have Header as TOP_OF_LIST. Can we have multiple lines as the header?
We are using cl_salv_hierseq_table.
Thanks in advance for all the suggestions.
Regards,
Lijo Joseph
Message was edited by:
Lijo Vazhappilly
Hi,
No its not possible to have multiple headers in ALV. This has been discussed many times in the forum. You can do a search and find out the details. But its basically not possible to have multiple headers.
Cheers
VJ
Similar Messages
-
How splitter container is useful to show multiple lines of heading in ALV
Hi,
I have a requirement to develop an ALV grid with below layout:
Past
Future
| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
I read forum blogs and found that splitter container can be used to develop such layout. Can anybody pleae let me know how to do so? As per my understanding first container will have headings ( Past & Future) and second container will hold headings (F1, F2...) as well as data. Since each container has a grid and for each grid we have to pass a fieldcatlog and an internal table how can we display only headings in First conatiner.
Rgds
SidHi sudhanshu,
solution may exist in theory (only).
I do not know a working solution yet. When ALV was first introduced some 12 or more years ago, the column width was specified as a number of characters ignoring that a proportional font will not match this.
With introduction of the grid, the scaling is free and can be done in the GUI on a (display) pixel base. I tried a lot with dynamic scaling of containers and had to learn that there is still a big optimizing potential for the SAP infrastructure.
Right now it seems as the architects try to get everything working as well on (old-style) SAP GUI, also WEB GUI, also java-based web services. The downside is that looking at it from the distance it is nice, going into the details, most (or much) is missing, undocumented or not working properly.
For the time being you may replace detailed functionality by an impressive background picture
Regards,
Clemens -
Multiple Lines in a Single ALV Grid Cell
Is there any way to Display Multiple Lines in a Single ALV Grid Cell.
This can be accomplished by Sorting the First 3 fields and Make it Looks like below displayed format.
But My problem is while downloading also it should be Displayed in the same format.
All inputs are highly appreciated.there was a post similar to this some days back... search it..
any ways...
what u can do is...
arrange ur final internal table so that it will look like same line...
like...lets say ur internal table is :
A1 B1 C1 D1 123
A1 B1 C2 D2 123
A1 B2 C1 D1 123
A1 B2 C2 D2 123
and u can rearrange ur table to be like
A1 B1 C1 D1 123
C2 D2 123
A1 B2 C1 D1 123
C2 D2 123
what i mean to say is dont pass the fields if they are same in the previous line... try it out..
and then pass it two ur ALV.
it will look like they are in one line
Edited by: soumya prakash mishra on Jun 17, 2009 1:31 PM -
Download to excel with multiple lines in header
Hi experts,
Is there any Funtion module available to download an internal table contents into Local directory of PC with multiple lines in header.
i.e. let us say i hv internal table of 5 entries with 3 columns...
i need to download this 5 entries into an excel file with some texts above the table contents...
For eg : in the below format...
Sample line 1
sample line 2
sample line 3
colheader1 colheader2 colheader3
item1
item2
item3
item4
item5
Please help.
Edited by: Lakshmiraj on Jul 15, 2010 3:26 AMThere is another option of using OLE automation Please check the link below
http://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-OLEAutomationusing+MS-Excel
OR
chek for the example program in Tcode DWDM ( OLE example )
OR
Use FM KCD_EXCEL_OLE_TO_INT_CONVERT ( Fm Uses the same OLE automation)
Hope it helps
Anup -
Two line column heading in ALV Report
Hi Experts,
My requirement is that I have to create an ALV report with columns having two lines of headings. Like a main heading called Consultants under which 5 to 10 columns of departments(Dept Num, Num of Ppl , Manager etc. ) and then Contractors(Name, Address Etc ) underwhich there would be 5 to 10 departments. Right now my report has the depts of...
How can i do that . If u would suggest by CL_SALV_TABLE then it would be great.
Thanks a lot !
Saui don't think you can do it using cl_gui_alv_grid or cl_salv_table.
-
Hi friends,
I wan to knw tht is it possible to have a multiple line coloumn name in ALV grid..
i wan to print report some thing like this:
INVENTORY----
OPENING INV
INCOMING
OUTGOING
|00000000999 |000000999 |0000000999 |
iF u knw how to do this in grid, please help me out.
good points wll be rewarded for helpful answer.
ThanksHi
Refer this thread
Split column names in alv display
Regards
Raj -
Multiple Lines Header and Records in ALV List
Dear All,
I am faced with a wierd user requirement to print multiple line header in ALV. Currently we have a classical report where we are displaying a huge text for example 400 characters in a single cell of a column of the report.
Now we will have to convert this to ALV report where I need to show that data in a single cell. I am wondering how is it possible in ALV list/grid. Please let me know if you guys have any clue.
Regards,
BikramjitHi,
Did you find a solution for this?, I am also having a similar requirement.
If you have any work around please share.
Thanks. -
I am using CL_SALV_TABLE (List_Display = X) to create a ALV report. I am willing to change it to function module REUSE_ALV_LIST_DISPLAY if it serves my requirement.
The header for the report needs to be multiple lines (8 lines). How can I accomplish this?
I looked into the possibility of using TOP_OF_PAGE event but I will have to hard code the vertical positions of the headers and since it is ALV and you can remove columns at will, I dont think this solution will work. Also if the columns are optimized or output length changed by the user, the positioning of the headers will be ruined.
Currently the header can only be of one line, how can we make the header to display a table of contents.
H1-L1 H2-L1 H3-L1
H1-L2 H2-L2 H3-L2
H1-L3 H2-L3 H3-L3
H1-L4 H2-L4 H3-L4
H1-L5 H2-L5 H3-L5
H1-L6 H2-L6 H3-L6
H1-L7 H2-L7 H3-L7
H1-L8 H2-L8 H3-L8
Thank you.Please guide me hw to put internal table field at report header in ALV.
this is my field catalog.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 1.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-fieldname = 'VBELN'.
wa_fieldcat-seltext_m = 'SalesOrderNo'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Also i wnt to total 4 field at header level and other is detail level.
Please guide me hw to do.
thnks
Bhavesh -
Need multiple lines in single column of header using alv oops
Hi
I am using alv oops in a report.
I need multiple lines in single column of header.
In header of my report i am using 9 columns.
In the second column i need to split the line
Notification description/activity/work/activity long text/
as
Notification description/
activity/
work/
activity long text/
Please guide me to achieve this functionality.It is not possible to break the column description in the ALV disply.
Actually, if you have a longer description in one of the seltext_* field of the fiels catalog, it will automatically display it as a tooltip, if you put the mouse over the heading. In ALV OO, you can explicitly set the tooltip text.
Also you can get more help on the field pressing F1: If you use DDIC fields, it it automatic, otherwise you can do it as you like. -
How to select multiple lines in ALV report
hi gurus,
I am working on an interactive ALV report where i have to select multiple lines from the basic list into an internal table, based on check box clicks. Using RS_SELFIELD i can select only 1 row. The coding has been done based on Call Function. Can u please suggest some way.
Regards,
Satyajithi,
try like this
TABLES: ekko.
TYPE-POOLS: slis. "ALV Declarations
TYPES: BEGIN OF t_ekko,
sel, "stores which row user has selected
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
fieldcatalog1 TYPE slis_t_fieldcat_alv WITH HEADER LINE,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid.
DATA : BEGIN OF det_tab OCCURS 0,
ebeln LIKE ekpo-ebeln,
END OF det_tab.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM display_alv_report.
*& Form BUILD_FIELDCATALOG
* Build Fieldcatalog for ALV Report
FORM build_fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-outputlen = 15.
fieldcatalog-do_sum = 'X'. "Display column total
fieldcatalog-datatype = 'CURR'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
* Build layout for ALV grid report
FORM build_layout.
gd_layout-box_fieldname = 'SEL'.
"set field name to store row selection
gd_layout-edit = 'X'. "makes whole ALV table editable
gd_layout-zebra = 'X'.
ENDFORM. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
* Display report using ALV grid
FORM display_alv_report.
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'SET_STAT'
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
TABLES
t_outtab = it_ekko
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
* Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
UP TO 10 ROWS
FROM ekpo
INTO CORRESPONDING FIELDS OF TABLE it_ekko.
ENDFORM. " DATA_RETRIEVAL
* FORM USER_COMMAND *
* --> R_UCOMM *
* --> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
* Check function code
CASE r_ucomm.
WHEN '&IC1'.
IF rs_selfield-fieldname = 'EBELN'.
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
WHEN 'DET'. "button add by me
CLEAR det_tab.
REFRESH det_tab.
LOOP AT it_ekko INTO wa_ekko WHERE sel = 'X'.
MOVE-CORRESPONDING wa_ekko TO det_tab.
APPEND det_tab.
ENDLOOP.
PERFORM build_cat.
PERFORM dis_data.
ENDCASE.
ENDFORM. "user_command
*& Form set_stat
* text
* -->RT_EXTAB text
FORM set_stat USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZSTAT' EXCLUDING rt_extab.
ENDFORM. "set_stat
*& Form build_cat
* text
FORM build_cat.
CLEAR fieldcatalog1.
REFRESH fieldcatalog1.
fieldcatalog1-fieldname = 'EBELN'.
fieldcatalog1-tabname = 'DET_TAB'.
fieldcatalog1-seltext_m = 'Order No.'.
fieldcatalog1-outputlen = 10.
APPEND fieldcatalog1 TO fieldcatalog1.
CLEAR fieldcatalog1.
ENDFORM. "build_cat
*& Form dis_data
* text
FORM dis_data.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'ZTEST_DS'
it_fieldcat = fieldcatalog1[]
i_save = 'X'
TABLES
t_outtab = det_tab.
ENDFORM. "dis_data
here i have copied standard gui status of ALV into my z status ZSTAT and add one button DET......
here u can select morethan one line using control(ctrl)
reward if usefull... -
Hello ,
I have a requirement to display Multiple heading in ALV Grid, I am using the Class 'cl_gui_alv_grid'. please let me know if you have Any suggestions.
Ex:
| Divison |
Sub D:1
Sub D: 2
Sub D: 3
Like wise i have few more divisions to display and Under we need to display the Sub Division also .
Thanks in Advance.. Waiting for your suggestions.
With Best Regards
NagsHi,
I had attempted to do it in the object oriented way, but found no ready solution, so I settled for the below solution.
Please use the function REUSE_ALV_COMMENTARY_WRITE.
This allows you to print multiple lines in the header.
I had a requirement of showing 5 lines in the header.
So i went on like:
DATA: it_list_commentary TYPE slis_t_listheader,
wa_list_commentary TYPE slis_listheader.
wa_list_commentary-typ = 'H'.
wa_list_commentary-info = <text>.
APPEND wa_list_commentary TO it_list_commentary.
wa_list_commentary-typ = 'S'.
wa_list_commentary-info = <text>.
APPEND wa_list_commentary TO it_list_commentary.
I fed he internal table with all 5 lines like above.
Finally I called the function.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_list_commentary.
Regards,
Prosenjit.
Edited by: prosenjit chaudhuri on Jan 28, 2009 6:14 AM -
Select multiple lines in a sorted subsumarized ALV
Select multiple lines in a sorted sub summarized ALV
Hi all,
I had to make a Z version of ME28 transaction in order to do a PO mass release.
The customer asked for a similar looking transaction.
The ALV displays PO sorted and summarized by Purchase Document.
I had a selection column to the ALV so the user can select multiple PO.
Te problem is that I don’t know how to see wich PO’s are selected due the selection field of my output data does not get marked when I click on the Purchase Document
As you an see in the ALV I created you can select at "header level" by clicking on the Purchasing Order row.
But this does not affect my output table so I dont have an X on the select field.
It does when I click on a item level.
How can I read this marked lines?
Thanks in advance.I need to release it.
It works fine when I select an item row, cause it updates the i_output-sel = X, So I just loop it and do the mass release,
Problem is when I try to do a seletion like in the image I've upload.
I need to know wich line of my i_output table correspond to which subtotal Purchasing Order selectedrow. -
ALV Hierarichal display with multiple line headings
Hi,
I have designed an ALV report with Hierarichal display with multiple line headings...
When i change the layout of this report,the headings which we enter manually will not take effect.The column we can hide in the report using the layout management.But the heading remains the same since it was written manually in top of page.
Is there any possiblity to work out the Manual headings based on the layout fields.Hi,
Do you use REUSE_ALV_HIERSEQ_LIST_DISPLAY? Why do you write heading manually? You can use IT_FIELDCAT parameter for defining a field catalog. -
Multiple lines for field description in ALV
Hi ,
Is there any way to display the field description in multiple lines in ALV grid .
Regards,
PradiptaHi pradipta,
1. No its not possible.
2. At the most, we can set the WIDTH of the
column, to ACCOMODATE the field description.
3. We cannot do WRAP as u require.
regards,
amit m. -
How to display multiple lines of texts in a single rows in ALV
Hi,
I have a unique requirement in which i have to display multiple lines if texts for a single rows in ALV Grid. Right now in my output it is coming in single line which is not visible fully because that text is more than 255 character. So i want to display the test by splitting into multiple lines and show it on output. Please suggest some solution for this if this is possible in ALV.
Thanks,
RaghavHi Raghavendra,
Its not possible to display multiple line in one row of an alv, but i think you can acheive it by splitting the whole text into multiple sub-text.
For example, if your requirement is as below:
Field #1 Field #2
1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(200 characters)
2 yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy(220 character)
then you can break Field#2 value into say 50 character and then populate the internal table with repetative entries of Field#1 and the finally sort it by Field#1 value... as a result of which you output will be somewhat as below:
Field#1 Field#2
1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2 yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
yyyyyyyyyyyyyyyyyyyy
Hope it will help you in meeting your requirement.
Regards,
Shradha
Maybe you are looking for
-
When I started up my computer and clicked Mozilla Firefox a box popped up asking me if I wanted to use Safe Browser or default browser d14 and some more letters and numbers. I have never been asked this and thought maybe there was a problem so I deci
-
My early 2010 MBP has started shwoing the following error when I insert a CD: "The disk you inserted was not readable by this computer." DVDs play with no problem at all and also, if I chose the ignore the ignore option to the CD error above, I can u
-
i reinstalled windows 8 on my laptop an hp 255. the product key provided with the disc worked for installation. when l try activating windows it is giving me error code 0x8007007b, filename directory name or volume label syntax is incorrect. i also t
-
Incoming unread mails are displayed as read messages;
running mail 2.05 on X10.4.4, in the pqst few days noticed that incoming mail was marked as read mail... and the same happens when i log on webmail on another computer..... thought someone was acccessing my mailbox, so changed the password, but it di
-
Several best practice articles refer to using page aliases rather than page numbers for navigation. Obviously, using mnemonic names rather than arbitrary page numbers makes creating branches easier since the names are easier to remember. The articles