How to group the column headers using WDA ALV ?
Hello All.
How can I group the column headers as shown in the picture(chart), using WDA ALV.
Thanks for any help !
A
B
A1
A2
A3
A4
B1
B2
B3
B4
B11
B12
B13
B21
B22
B23
B31
B32
B33
B41
B42
B43
消息编辑者为:Cloud Li
Hi ,
This functionality was not exposed/supported in WDP ALV,however the same can be achieved in normal table(table UI element)
The reason this isn't exposed directly in the ALV is because it is used internally when you do a grouped sort. The ALV automatically buids group headers to explain the grouped sort/sum.
Depending upon your requirements if you must have the group header and aren't using much else in the ALV, you might be better off using the plain old table. Below is a link to how to do group headers in the table UI element.
Table
Hope this helps you.
Thanks
KH
Similar Messages
-
How to know the column name using the index name for a particular table
Hi All,
I have small query regarding, I have index name and table name so by using this how can I know the column name associated with that index of that particular table specific to Oracle9i.
Thanks
Sudheerselect *
from user_ind_columns -- or all_ind_columns
where table_name = UPPER('&table_name')
and index_name = UPPER('&index_name');
Regards
Arun
Gurgaon -
How to change the column text of an ALV in WD?
Hiya,
I have an ALV and it displays this in the column headings:
I'd like to change 'Name 1' to 'Name' and 'Boolean' to 'Selection', but I can't seem to figure out how to do this in the maze of all the classes and methods...
Could someone give me a few pointers please.
Thanks in advance!Hi ,
We can change the column heading through if_salv_wd_column_settings interface. Please check the following code for changing the same.
data: l_ref_cmp_usage type ref to if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_alv( ).
if l_ref_cmp_usage->has_active_component( ) is initial.
l_ref_cmp_usage->create_component( ).
endif.
data l_salv_wd_table type ref to iwci_salv_wd_table.
l_salv_wd_table = wd_this->wd_cpifc_alv( ).
data l_table type ref to cl_salv_wd_config_table.
l_table = l_salv_wd_table->get_model( ).
data l_column type ref to cl_salv_wd_column.
l_column = l_table->if_salv_wd_column_settings~get_column( 'Name_1' ).
data l_header type ref to cl_salv_wd_column_header.
l_header = l_column->get_header( ).
l_header->set_prop_ddic_binding_field(
property = if_salv_wd_c_ddic_binding=>bind_prop_text
value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
l_header->set_text( `Name` ).
l_column = l_table->if_salv_wd_column_settings~get_column( 'Boolean' ).
data l_header type ref to cl_salv_wd_column_header.
l_header = l_column->get_header( ).
l_header->set_prop_ddic_binding_field(
property = if_salv_wd_c_ddic_binding=>bind_prop_text
value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
l_header->set_text( `Selection` ).
Regards,
Harsha -
How to increase the column size of Alv tbale
Hi All,
I created an Alv table to display the content of my database table. In one of the column the entire data from my database are not displayed the last few characters are missing. The data type for that column in the database is char. Can any one help me how to increase the column size in my Alv table or any suggestions to resolve this issue.Hi Vadiv,
Try with this..
DATA: LR_IF_CONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE,
LR_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE,
LR_CMDL TYPE REF TO CL_SALV_WD_CONFIG_TABLE,
LR_TABLE_SETTING TYPE REF TO IF_SALV_WD_TABLE_SETTINGS.
LR_CMP_USAGE = WD_THIS->WD_CPUSE_ALV( ).
IF LR_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
LR_CMP_USAGE->CREATE_COMPONENT( ).
ENDIF.
" get reference to the ALV model
LR_IF_CONTROLLER = WD_THIS->WD_CPIFC_ALV( ).
LR_CMDL = LR_IF_CONTROLLER->GET_MODEL( ).
LR_TABLE_SETTING ?= LR_CMDL.
" Set column width
DATA LR_COL TYPE REF TO CL_SALV_WD_COLUMN.
LR_COL = LR_CMDL->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'PERNR' ).
LR_COL->SET_WIDTH( '70' ) .
LR_COL = LR_CMDL->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'ENAME' ).
LR_COL->SET_WIDTH( '100' ) .
LR_TABLE_SETTING->SET_FIXED_TABLE_LAYOUT( ABAP_TRUE ).
You can refer to webdynpro component SALV_WD_TEST_TABLE_PROPS. Go to the view TABLE and look inside the method SET_COLUMN_SETTINGS. I hope this will help you.
Cheers,
Kris. -
How can I customize the Column Headers of the TABLE control/indicator in LabVIEW ?
I need to customize the TABLE control/indicator in the LabVIEW as the same shape of the table in the LabWindows CVI or the DBgrid of the Borland Delphi. Where can I modify the color and shape of the Column Headers and the Row Headers.
Thanks,
CleberSalutations,
You asked this question about 3 months ago, and no one answered it.. How rude of them, well....
You can customize any control/indicator by right mouse clicking on it, going to advanced, then customize. If you want to color it, you can always right mouse click with the shift key down, and pull up the painting tool stuff. Or use the tab key if you want to scroll through tools. I believe it's the tab key. Alright, i bet you've long since figured it out, but i couldn't resist.
Sincerely,
ElSmitho -
How to find the columns and tables used in a stored procedure?
Hi,
Can someone suggest how to find the columns and tables used within a stored procedure?
Thanks
VBKFor example:
SQL> create or replace
2 procedure p1
3 is
4 cnt number;
5 begin
6 select count(*) into cnt from emp;
7 end;
8 /
Procedure created.
SQL> select referenced_owner,
2 referenced_name
3 from dba_dependencies
4 where owner = 'SCOTT'
5 and name = 'P1'
6 and referenced_type = 'TABLE'
7 /
REFERENCED_OWNER REFERENCED_NAME
SCOTT EMP
SQL> SY. -
Freeze the column headers for htmlb:tableView using CSS
Hi
I am using a <htmlb:tableView > in BSP to display data.
i want to freeze the column headers so that they dont scroll when table data is scrolled.
Is it possible ?
Regards
RajendraHi Rajendra,
Have a look at the links below:
[Freeze tableview header-I|https://forums.sdn.sap.com/click.jspa?searchID=24813847&messageID=3088768]
[Freeze tableview header-II|Freeze table header in HTMLB Tableview]
[Freeze Columns of tableview|https://forums.sdn.sap.com/click.jspa?searchID=24813847&messageID=3517748]
Search the forum and you will find information on this.
Regards,
Anubhav -
How to show the VALUE as the Column Header using SQL query?
Hi
I have a requirement to show the picked value as the column header using SQL query.
Example:
======
SELECT EMPNO FROM EMP
WHERE EMPNO=7934;
Result Should be:
7934
7934I have a requirement to show the picked value as the column header using SQL query.In sql*plus you can do
SQL> set verify on
SQL> def e = 7934
old: SELECT empno "&&e" FROM emp WHERE empno = &&e
new: SELECT empno "7934" FROM emp WHERE empno = 7934
SQL> SELECT empno "7934" FROM emp WHERE empno = 7934
7934
7934
1 row selected. -
How to ignore the column header in GUI_UPLOAD
Hi,
I am trying to use GUI_UPLOAD to upload data from text file into a table. However there is no parameter to ignore the column headers in this function. how can i set to ignore the column headers in this function?Check the function module documentation and also refer to the parameter: HEADER_LENGTH
Length of Header for Binary Data
Description
Specifies the length of the header information. You must only set this parameter if the file type is 'BIN'. The default value '00' means that there is no header in the file.
Default
'00' -
Try to display something like this:<br><br>
HA HB <br>
A1 B1<br>
A2 B2<br>
<br>
So I use:
<div class="Show2Rows"><br>
<table><br>
<tr><br>
<th>HA</th><br>
<th>HB</th><br>
</tr><br>
<tr><br>
<td><input ... value="A1" ></td><br>
<td><input ... value="B1" ></td><br>
</tr><br>
<br>
</table><br>
</div><br>
<br>
The rule is: allow it to display ONLY two rows in the window. When more rows are added, a vertical scroll bar will be enabled. --And, yes, it works just as expected.
The problem is that when more rows are added, when I scroll the bar downward, of course the rows will move up. When this happens, the Column Headers (HA and HB) will disappear. Obviously I need to fix the Column Headers.
So question is: How can I fix the headers while still be able to scroll the data rows up and down?
ThanksDear Vam,
you can easily do that with css, search the source code of the executed web template for the td tag which is around your coloumn header, remember the style sheet class name it is ´displayed as class= in the td tag.
Now you can add this code the beginning of your web template:
</style>
This will only work in Web.
Regards
Marcus -
Flex4: Printing my grids with mx:PrintDataGrid doesn't print the column headers
It's a simple mx:DataGrid with just 3 mx:DataGridColumns.
I use a s:VGroup as the print view. It contains an s:HGroup with two labels for the page header and then an mx:PrintDataGrid.
The grid data prints fine but the column headers are left blank. Just have the background gradient there, but no text.
Anyone any suggestions what goes wrong?
Thanks,
Ingokind of. My source grid is a plain vanilla mxml definition.
But when it comes to printing I create a new instance of my printview
which contains a PrintDataGrid and then do (besides other things):
printView.printDataGrid.dataProvider =
sourceDataGrid.dataProvider;
printView.printDataGrid.columns = sourceDataGrid.columns;
in order to get the same column properties in the print datagrid as in the
source datagrid.
Is that what you mean with "using the same set of colums which could cause
problems"?
If so, how to overcome this? -
Reg:How to delete the column in table control also from database table.
Hi Experts,
Once again thank u all for giving the responses.
one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
With Regards,
Saroja.P.Hi,
If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
"This portion of code inside the LOOP...ENDLOOP.
IF sy-ucomm eq 'F_DELETE'.
gt_itab2-check = mark. " Store the MARK field status into your internal table's correspoding field 'check'
MODIFY gt_itab INDEX tabcontrol-current_line.
ENDIF.
iF sy-ucomm eq 'DELETE1'.
DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
ENDIF.
Now you can modify your database table using the MODIFY statement.
MODIFY ZDB FROM TABLE gt_itab. -
Return all the column values using the F4IF_INT_TABLE_VALUE_REQUEST
Hi,
How to return all the column values using the F4IF_INT_TABLE_VALUE_REQUEST?
For example : if the row has 3 columns then after selecting the particular row, the RETURN_TAB internal table should contain all the three column values.
Regards,
RaghuHi,
Try the following...
DATA : it_fields like help_value occurs 1 with header line.
data: begin of w_vbap,
vbeln like vbap-vbeln,
posnr like vbap-posnr,
werks like vbap-werks,
end of w_vbap.
data: i_vbap like w_vbap occurs 0 with header line,
w_fields type help_value,
i_dfies type table of dfies,
i_return_tab type table of ddshretval with header line,
i_field type dfies.
select vbeln posnr werks
from vbap into table i_vbap up to 5 rows.
if sy-subrc = 0.
sort i_vbap by vbeln.
endif.
clear it_fields[] , it_fields.
it_fields-tabname = c_vbap.
it_fields-fieldname = 'VBELN'.
it_fields-selectflag = c_on.
append it_fields.
it_fields-tabname = c_vbap.
it_fields-fieldname = 'POSNR'.
it_fields-selectflag = space.
append it_fields.
it_fields-tabname = c_vbap.
it_fields-fieldname = 'WERKS'.
it_fields-selectflag = space.
append it_fields.
loop at it_fields into w_fields.
i_field-tabname = w_fields-tabname.
i_field-fieldname = w_fields-fieldname.
i_field-keyflag = w_fields-selectflag.
append i_field to i_dfies.
endloop.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'VBELN'
window_title = 'Select'
tables
value_tab = i_vbap
field_tab = i_dfies
return_tab = i_return_tab
exceptions
parameter_error = 1
no_values_found = 2
others = 3
read table i_return_tab into w_return_tab index 1.
if sy-subrc = 0.
endif.
Regards,
Srini. -
How to extract the column width in ALv report if its executed in background
I am executing an ALV report in background , in front end i am getting data properly, in back end for some columns some of the digits are missing.For example if PO no is of 10 digits it will display only 8 becos column size is like that , how to extract coulmns in back ground.
I have executed in background and checked the spool and for some of the columns width is not sufficient to display comeplete data so please suggest how to extract the columns sizes if executed inj background for an ALVHi Deepthi,
you can try with the above mentioned suggestions ,if its worked its fine ,
If not use Docking container instead of custom container, For ALV in back ground jobs, its suggest to use docking container instead of custom container , below you can find the declaration for docking container and code to use docking and custom container in your program for fore and back ground.
or you can use docking container alone for both operations.
Data : G_DOCK1 TYPE REF TO CL_GUI_DOCKING_CONTAINER,
IF CCON IS INITIAL. (ccon is container name )
*Check whether the program is run in batch or foreground
IF CL_GUI_ALV_GRID=>OFFLINE( ) IS INITIAL.
*Run in foreground
CREATE OBJECT CCON
EXPORTING
CONTAINER_NAME = 'CON1'.
CREATE OBJECT GRID1
EXPORTING
I_PARENT = parent_1.
ELSE.
*Run in background
CREATE OBJECT GRID1
EXPORTING
I_PARENT = G_DOCK1.
ENDIF.
ENDIF.
B&R,
Saravana.S -
Hi,
I am using OCCI to interact with DB through code, which means I am writing a vc++ file to interact with Data Base and execute the Stored Procedure which I am calling from the C++ Code. And also displaying the output of the Stored Procedures to the Front End. I am succeeded in this, but now I should be able to display the Column names of the output to Front End. Can any one help me on this.
Example:
Sno | Sname
------- |-------------
1 ABC
2 DEF
I am getting (1,ABC) and (2,DEF) as the output of the Stored Procedure but I need the Column names also to display. How to get them.
Thanks in Advance..:)Look at Re: exporting csv via pl/sql - select statement?
It has an example how to extract the column name from a cursor. You have to check, whether you can use DBMS_SQL.DESCRIBE_COLUMNS
Your procedure might need another out parameter, that returns the column names , e.g. as comma separated list or as varray.
Maybe you are looking for
-
Blue screen of death, can't boot recovery or from external disk.
Hello Guys. I have a very wiered problem with my 15 Macbook Pro early 2011 (thunderbolt), latest version of mountain lion (10.8.4?). The computer does boot but won't show up the login screen. I've tried to boot in recovery mode, but as soon as recov
-
Why do I have to pay for a app on my iPhone when I have it already on my Ipad
Why do I have to pay for a app on my iPhone when I have it already on my Ipad
-
Julieanne Kost shows the best ways to take advantage of Adobe Lightroom's Custom Sort Order feature in this Lightroom 2 tutorial. http://adobe.ly/y3dj94
-
Urgent--error in populating data in segments of Idoc-DELVRY03
Hi experts, I am populating data in segments of DELVRY03 where I am using process code DELV with Message Type SHPORD. For this I am using EXIT_SAPLV56K_002. As I have to populate many segments I am giving case statement. But IDOC_DATA-SEGNAM is empty
-
Display about 20% darker, Dim. Happened after last update.
My imac display is dim, kinda dark. Happened after last update and I have googled like crazy to find a solution, no luck so far. This is what i have done so far. - I have tried several settings in the Energy Saver part of settings. - Brightness is se