Fixed sequence of columns in ALV
Hi,
I am using FM 'REUSE_ALV_GRID_DISPLAY' to display ALV output.
There are 20 fields in report output. User wants that after display of ALV report, the sequence of first 2 columns should never be changed. However sequenece of other columns can be changed.
I know that using ABAP OO we can handle this through drag and drop events. Here I can not use ABAP OO.
Please suggest some ideas.
Thanks,
Vinod.
Hi Manohar,
No this is not the one I was asking.
This makes the columns fixed when you scroll right.
But what I want is, output has been displayed and by changing layout or using drag and drop functionality of columns, the sequence of the columns can be changed. So I want to fix the sequence of first two columns.
e.g. if there are 20 columns, then after output display column 4 can be taken to column 10.
So in this case column 1 and 2 should not be dragged to anywhere.
Thanks,
Vinod.
Similar Messages
-
hi,
Please let me know how to fix a first column when the output is display in ALV, So if we scroll towards right side the first column should be fixed there itself when we reach last field in the output.
Regards
Vinay.Hi,
How to hide a column in an ALV
*---- This is the code to hide column in ALV
LOOP AT IT_FIELDCAT INTO X_FIELDCAT.
IF X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-NO_OUT = 'X'.
MODIFY IT_FIELDCAT FROM X_FIELDCAT.
ENDIF.
ENDLOOP.
Regards,
Vijay -
Disable re-order columns in ALV Grid
Hi,
I want to disable the option of move/re-order of columns in ALV grid.
Ex: My grid is displaying 5 fields in the order F1, F2, F3, F4 & F5. I can move the columns by dragging then on their header so I can change the fields order to F2, F3, F1, F4 & F5. I want to disable this option of re-arranging the columns in the ALV grid.
Its not related FIX_COLUMN in field catalog.
Thanks & Regards,
Adithya M.Hi Hima,
FIX_COLUMN is is used to fix the respective columns from moving when horizontal scroll bar is moved.
I want to disable re-arranging of columns, i.e, after displaying the grid the user should not be able to re-arrange/drag the column from one position to other.
Thanks & Regards,
Adithya M -
How can i suppress columns in ALV ?? Will reward points.
Hello Gurus, how can i suppress column in ALV when i`m using the transparent table:
CALL METHOD grid->set_table_for_first_display
EXPORTING
i_structure_name = 'ZIANEXE'
is_layout = wa_layout
is_variant = wa_variant
i_save = 'U'
IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
CHANGING
it_outtab = itab[]
it_fieldcatalog = fieldcat.
Please help.in the fieldcatalog you are providing there is a field NO_OUT use this.
Loop over internal table and check fieldname. If fieldname = column you want to hide, NO_OUT = 'X'.
Edited by: Micky Oestreich on May 8, 2008 12:06 PM -
How to Change the position of Column in ALV report
Hi Follks,
Is is possible to change the position of column in ALV report?.If yes then how?
Basically my requirement is, that user want afacility where , he should be able to change the position
of column aftre he runs the report.
Eg: After running the report , user felt that column 5 should be at position 2 , in that case he should
be able to drag column 5 at position 2 and vice versa.
Please help me, how to solve this issue.
Note : I am using NW 7.0 SP 9
Regards
PG
Edited by: PG on Apr 13, 2009 11:10 AMHI PG,
do below whie filling the filed catlog
wa_fieldcat-fieldname = 'Field1".
wa_fieldcat-COL_POS = '1',
append wa_fieldcat to it_fieldcat.
wa_fieldcat-fieldname = 'Field2".
wa_fieldcat-COL_POS = '2',
wa_fieldcat-fieldname = 'Field3".
wa_fieldcat-COL_POS = '3',
Thanks! -
How to display subtotals in separate column in alv report?
hi,
I am displayed the subtotals for QUantity field BDMNG in Reuse_alv_grid_display in the same column.
but I want to display subtotal in separate column.
How to display subtotals in separate column in alv report?
thanks®ards.
samba.kHi
As far as i know you can't do this,the option you have is to create one more column (subtotal) and populate it by manual calculation at every subtotal (not alv subtotal but yours) .
Best Regards
Yossi -
Mulitple Line column headers for a column in ALV using Web Dynpro for ABAP
Hi WD4A Gurus,
I have requirement to display the header name in multiple lines for a single column using ALV. How to achieve this, do I need to do some custom code? Please help me with sample code.
Example:
existing column name :
Name | Date (mm/dd/yyyy) | Amount
required column name:
Name | Date | Amount
(mm/dd/yyyy)
Thanks
KetanDisplaying header in multiple lines is not possible in alv
Regards
Tamil -
Hi all,
I want to hide some columns in ALV which are empty on display when calling
cl_gui_alv_grid->set_table_for_first_display
That is to say the internaltable will contain empty columns.
I know that using the "no_out" attribute of field catalog we can hide columns.
But the question is how to find these columns which are empty - should I have to loop through the itab to find it out OR
Can we set it in ALV LAYOUT or field catalog attributes so that it wont display empty columns.
any help is appreciated....
Thanks
P
Edited by: pazzuzu on Mar 12, 2010 5:14 PMHi,
If i understood your question correctly,
The you can try this
TYPE-POOLS:slis,abap.
TYPES:BEGIN OF ty,
f1 TYPE c,
f2 TYPE c,
f3 TYPE c,
f4 TYPE c,
END OF ty.
DATA:it TYPE TABLE OF ty,
wa TYPE ty,
wa_field TYPE slis_fieldcat_alv,
i_fieldcat TYPE TABLE OF slis_fieldcat_alv,
i_details TYPE abap_compdescr_tab,
wa_comp TYPE abap_compdescr,
ref_descr TYPE REF TO cl_abap_structdescr,
lv_field TYPE abap_compname.
FIELD-SYMBOLS:<fs>,
<fs1>.
ref_descr ?= cl_abap_typedescr=>describe_by_data( wa ).
i_details[] = ref_descr->components[].
wa-f1 = 'A'.
wa-f3 = 'C'.
APPEND wa TO it.
wa-f1 = 'X'.
wa-f3 = 'Y'.
APPEND wa TO it.
if it[] is not initial.
LOOP AT i_details INTO wa_comp.
ASSIGN wa_comp-name TO <fs>.
SORT it BY (<fs>) DESCENDING.
CONCATENATE 'WA' '-' <fs> INTO lv_field .
ASSIGN (lv_field) TO <fs1>.
READ TABLE it INTO wa INDEX 1 transporting (<fs>).
IF sy-subrc = 0 AND <fs1> IS NOT INITIAL.
wa_field-fieldname = wa_comp-name.
wa_field-seltext_m = wa_comp-name.
APPEND wa_field TO i_fieldcat.
ENDIF.
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = i_fieldcat[]
TABLES
t_outtab = it[].
endif. -
Dynamically assign value to a column in ALV LIST Display
Hi all,
How can I dynamically assign value to a column in ALV LIST Display without using classes and methods?
Thanks,
RidhimaHi Vikranth,
I am displaying one ALV list say with columns A and B.
I have value in A but not in B. Now at runtime user selects one row, clicks on push button in application toolbar, then i have to display value in column B in the already displayed list.
I searched and came to know it can be done with oops concept. but i am not using classes and methods.
so how can i do this?
Thanks,
Ridhima. -
Hi,
in sapgui java 7.10 (on mac osx 10.5.1) I cannot select multiple columns in ALV reports.
I can do it only in some transactions (like SE16). But on all our custom reports (REUSE_ALV_GRID_DISPLAY) in does not work.
Any hint?
Many thanks,
LorenzoHi Lorenzo,
did you double check if selecting multiple columns works with SAP GUI for Windows in the same report?
If yes, I suggest to file a bug report so we can do a remote logon to run your custom report.
If not it might be because of REUSE_ALV_GRID_DISPLAY itself or your parameters calling REUSE_ALV_GRID_DISPLAY.
Best regards
Rolf-Martin -
JTable fixed Row and Column in the same window
Hi
Could anyone tip me how to make fixed row and column in the same table(s).
I know how to make column fixed and row, tried to combine them but it didnt look pretty.
Can anyone give me a tip?
Thanks! :)Got it to work!
heres the kod.. nothing beautiful, didnt clean it up.
* NewClass.java
* Created on den 29 november 2007, 12:51
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
package tablevectortest;
* @author Sockan
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.event.*;
public class FixedRowCol extends JFrame {
Object[][] data;
Object[] column;
JTable fixedTable,table,fixedColTable,fixedTopmodelTable;
private int FIXED_NUM = 16;
public FixedRowCol() {
super( "Fixed Row Example" );
data = new Object[][]{
{ "","A","A","A","",""},
{ "a","b","","","",""},
{ "a","","c","","",""},
{ "","","","d","",""},
{ "","","","","e",""},
{ "","","","","","f"},
{ "","b","","","",""},
{ "","","c","","",""},
{ "","","","d","",""},
{ "","","","","e",""},
{ "","b","","","",""},
{ "","","c","","",""},
{ "","","","d","",""},
{ "","","","","e",""},
{ "","","","","","f"},
{ "I","","W","G","A",""}};
column = new Object[]{"A","B","C","D","E","F"};
AbstractTableModel fixedColModel = new AbstractTableModel() {
public int getColumnCount() {
return 1;
public int getRowCount() {
return data.length;
public String getColumnName(int col) {
return (String) column[col];
public Object getValueAt(int row, int col) {
return data[row][col];
public boolean CellEditable(int row, int col) {
return true;
AbstractTableModel model = new AbstractTableModel() {
public int getColumnCount() { return column.length-2; }
public int getRowCount() { return data.length - FIXED_NUM; }
public String getColumnName(int col) {
return (String)column[col+1];
public Object getValueAt(int row, int col) {
return data[row][col+1];
public void setValueAt(Object obj, int row, int col) {
data[row][col+1] = obj;
public boolean CellEditable(int row, int col) {
return true;
AbstractTableModel fixedTopModel = new AbstractTableModel() {
public int getColumnCount() { return 1; }
public int getRowCount() { return data.length - FIXED_NUM; }
public String getColumnName(int col) {
return (String)column[col];
public Object getValueAt(int row, int col) {
return data[row][col];
public void setValueAt(Object obj, int row, int col) {
data[row][col] = obj;
public boolean CellEditable(int row, int col) {
return true;
AbstractTableModel fixedModel = new AbstractTableModel() {
public int getColumnCount() { return column.length-2; }
public int getRowCount() { return FIXED_NUM; }
public Object getValueAt(int row, int col) {
return data[row + (data.length - FIXED_NUM)][col+1];
table = new JTable( model );
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
fixedTable = new JTable( fixedModel );
fixedTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
fixedTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
fixedColTable= new JTable(fixedColModel);
fixedColTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
fixedColTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
fixedTopmodelTable = new JTable(fixedTopModel);
fixedTopmodelTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
fixedTopmodelTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
JScrollPane scroll = new JScrollPane( table );
scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
JScrollPane fixedScroll = new JScrollPane( fixedTable ) {
public void setColumnHeaderView(Component view) {}
fixedScroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
fixedScroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
JScrollBar bar = scroll.getVerticalScrollBar();
JScrollBar dummyBar = new JScrollBar() {
public void paint(Graphics g) {}
dummyBar.setPreferredSize(bar.getPreferredSize());
scroll.setVerticalScrollBar(dummyBar);
final JScrollBar bar1 = scroll.getHorizontalScrollBar();
JScrollBar bar2 = fixedScroll.getHorizontalScrollBar();
bar2.addAdjustmentListener(new AdjustmentListener() {
public void adjustmentValueChanged(AdjustmentEvent e) {
bar1.setValue(e.getValue());
JViewport viewport = new JViewport();
viewport.setView(fixedColTable);
viewport.setPreferredSize(fixedColTable.getPreferredSize());
fixedScroll.setRowHeaderView(viewport);
fixedScroll.setCorner(JScrollPane.UPPER_LEFT_CORNER, fixedColTable
.getTableHeader());
JViewport viewport2 = new JViewport();
viewport2.setView(fixedTopmodelTable);
viewport2.setPreferredSize(fixedTopmodelTable.getPreferredSize());
scroll.setRowHeaderView(viewport2);
scroll.setCorner(JScrollPane.UPPER_LEFT_CORNER, fixedTopmodelTable
.getTableHeader());
scroll.setPreferredSize(new Dimension(600, 19));
fixedScroll.setPreferredSize(new Dimension(600, 100));
getContentPane().add( scroll, BorderLayout.NORTH);
getContentPane().add(fixedScroll, BorderLayout.CENTER);
public static void main(String[] args) {
FixedRowCol frame = new FixedRowCol();
frame.addWindowListener( new WindowAdapter() {
public void windowClosing( WindowEvent e ) {
System.exit(0);
frame.pack();
frame.setVisible(true);
} -
Maximum number of character we can print in a column uing ALV grid display
Hi frnds,
My requirment is to print 500 charcter data in a column using ALV grid display.
Could any body tell me is it possible and the maximum character it can i print in a column using ALV grid dispaly.
Regards,
SandipanHi Sandipan,
refer notes 857823, 910300 and 959775. All these say there is a limitation of 128 characters.
857823 - ALV grid: Strings with a maximum of 128 characters
Symptom
Entries in cells of the type CHAR or string are truncated after 128
characters in the SAP GUI.
also refer,
ALV Grid Control (cl_gui_alv_grid), function module (Full-screen) Grid
(Reuse_alv_grid_display, SAPLSLVC_FULLSCREEN), SAPGUI, back end, front end
Cause and Prerequisites
The data table that is sent to the front end only allows character values
with the length 128.
Solution
This is the standard system behavior and cannot be changed. -
Hide a Column in ALV Grid Output
Hi,
I want to hide a column in ALV Grid Output through program.
I am using lwa_fieldcat-NO_OUT = 'X'. to hide the column in output but it is not working, column in not hided in the output.
Kindly suggest.It should work..
see the code :
d_fieldcat_wa-fieldname = 'MATNR'.
d_fieldcat_wa-seltext_l = 'material number'.
d_fieldcat_wa-no_out = 'X'. * hide particular field
append d_fieldcat_wa to d_fieldcat.
clear d_fieldcat_wa.
if not please paste your code here.
Thanks
Seshu -
How to fix Width of column in classic report.
Dear Friends
i am using Apex 3.2.
i have created Clasic Report and i have summary column in my report that column have description of issue so i want to fix width of that column nn Classic report .
i have try some code in html expression
<span>style="width: 480px; display: block; white-space: normal; font-size: 11px;">#ACTIVITY_SUMMARY#</span>
{code
after apply abovemention code that display me in my summary like this and not manage width of column.
style="width: 480px; display: block; white-space: normal; font-size: 11px;">Dear Cherryl, Greetings !! Thank you very much for the new query and we are pleased to confirm the availability of one single cabin in all the three categories of cabin on M.V. Mahabaahu. We would like to inform you that both the departures 15th Oct 2013 & 29th Oct 2013 (Golden triangle with Cruise) are operational and attached are the prices for your kind consideration. As a special promotion for the 15th Oct 2013 departure only, we are offering USD 100 per person reduction on the Golden triangle portion combined with the cruise. Kindly review and advise us to block the accommodation accordingly. Regards...pankaj
How to fix Width of column in classic report.
ThanksHi,
I'm working an example in APEX 4.2 so YMMV (your milage may vary!).
For Classic Reports, where the Column Attributes "Display As" is set to Display as Text (escape special characters ...:
1) I find that Column width and Element Width setting have no effect to make the column smaller or larger.
2) Here is one way that works:
- In the Region's Region Definition, under Attributes give the Static ID a name (no spaces), say, class-report.
- In the columns you want to affect, place "<div>#ENAME#</div>" in the columns Column Formatting "HTML Expression". Where "ENAME" here is the actual column name.
I'm using the EMP table as an example.
- Finally, in the page's HTML Header put, for example
<style>
#classic-report td.data[headers="ENAME"] div {
width: 200px;
color: blue;
#classic-report td.data[headers="JOB"] div {
width: 50px;
white-space: nowrap;
word-wrap: break-word;
</style>This makes the ENAME column wider and the JOB column smaller and wraps it.
Much more could be said. If you tweak you will find you can also affect spacing above, below and right/left of the data.
#classic-report .report-standard th.header {
border-left: #9fa0a0 1px solid;
padding: 2px 3px 4px 5px; /* top right bottom left margins */
font-size: 11px;
font-weight: bold;
vertical-align: bottom;
#classic-report .report-standard td.data {
border-left: #9fa0a0 1px solid;
padding: 3px 4px 5px 6px;
font-size: 9px;
}Does this help?
Howard -
How to remove a column from alv table
Hi All
How to remove a specific column from alv table.?
Thanks & Regards
SUNFor delete u can follow the above post..
Fo making invisible :
data m_col type ref to cl_salv_wd_column.
m_col = alv_mode->IF_SALV_WD_COLUMN_SETTINGS->GET_COLUMN (' col1' ).
m_col->SET_VISIBILITY( '01' ).
Maybe you are looking for
-
How to Process SSAS measure groups individually through BIDS
hi guys: I know how to process measure groups individually via SSMS but I just can not find it at BIDS? Can anyone point that to me? thanks Hui --Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 20
-
Upgrade Solution Manager 4 to 7.1
Hi all, Is it possible to have a direct upgrade from a solution manager 4 to 7.1? Or do i need to do other installation or upgrade before it is comparable for 7.1? Pls advise. Thanks Regard Gary
-
Mail delivery and received sounds have stopped
Recently the "whoosh" sound that accompanies mail being sent simply stopped working. A couple of days later the incoming mail alert stopped as well. In all other respects, my Mac mini seems to be working just fine. I'm running the most current OS ver
-
Administrative limit reached with -1 for all settings
Hello I have the system set to -1 for max number of items and timeout and it is still saying limit exceeded, and it appears that it is returning all the items in the directory server. No dynamic groups are working now. Any help would be appreicated.
-
HELP!!! I bought two new phones from Verizon stores for Christmas presents and can't activate either one. When I try to go on-line I get a message that the activations can't be processed. When I try to call, I get a message that they have Activati