In ALV maintain one column as color Green
Hi ,
In ALV maintain one column as color Green
Thanks,
Asha
There are options in ALV grid to color whole row or cell, you want column (bad luck) so you will have to color cells.
1-Add a field of type LVC_T_SCOL to the internal table.
2-Fill the internal table with your application data.
3-Loop once again at the table, add one record into the LVC_T_SCOL field, with the fieldname of the column and the color you want, update every record.
4-In the layout of the grid, give the extra field name to subfield CTAB_FNAME.
- Réf: Coloring Cells in ALV Grid Control (BC-SRV-ALV)
- Sample: Program to color columns , rows and cells of an alv grid(oops)
Regards,
Raymond
Similar Messages
-
Excel Download of ALV with one column containing leading zeros
Hello Experts,
I have the requirement in which the first column is of type company code (T001-BUKRS). So if the company code is '0061', then on the ALV display its displayed as '0061', but when it is downloaded to Excel sheet, it shows '61' in place of '0061'.
Is there any way we can display in the downloaded Excel as 0061?
Any pointers could help.
Regards,
Mansi.Hi Mansi,
I think its because of excel property.You can format cell of excel to category 'special'.
regards
vivek -
Download from ALV are all in one column including the header
Hello All,
We are having problems with the download of excel from ALV grid. what happens is that instead of the data dispalying in different columns, it is all in one column, including the header. what could be the problem? this only occurs in the production system but in the development and quality it is ok.
Thanks for your help.Hi,
We also used the option download to local file and it works fine. Only the button download to excel is not working as expected. -
Change color of one column in chart
Hi
is there a way to change the color of just one column in a column chart? I want to highlight one column but I can't seem to select just that column.
ThanksWelcome to Apple Discussions
Click on the table to select it then click on the letter column heading to select the desired column. Now go to the object inspector & select Color Fill from the drop-down menu if it's not already chosen then click on the color box to bring up the color chooser. Select the color you want to fill the column. -
Hello everyone,
I am developing an application (ALV OO) to select more than 1 column by row ( one ). This is an a holiday application so the idea is:
-One column will be the day, and the row will be the user.
So I am trying to select more than one day by user (that would be the row).
I am using the method set_table_for_first_display but when it shows the alv, doesn't let me to select more than one column with a click of the mouse.
Does anybody know if I can do this (select more than one column, by row) in somehow?
Please let me know if you need more clarification about this.
Thanks in advance
DiegoHi Diego,
it's all in the documentation.
set different selection modes through the value of the field u201CSEL_MODEu201D in the layout structure.
SPACE
same as 'B'
see 'B'
Default setting
'A'
Column and row selection
Multiple columns
Multiple rows
The user selects the rows through pushbuttons at the left border of the grid control.
'B'
Simple selection, list box
Multiple columns
Multiple rows
'C'
Multiple selection, list box
Multiple columns
Multiple rows
'D'
Cell selection
Multiple columns
Multiple rows
Any cells
The user selects the rows through pushbuttons at the left border of the grid control
Beyond setting this option, you can set u201CNO_ROWMARKu201D option to hide the mark column which is normally visible when the selection mode allows multiple row selection.
One point to notice here is that if you set your ALV Grid as to be editable, it may override your selection mode regardless of your layout settings.
This is from SDN Community Contribution "An Easy Reference for ALV Grid Control" By: Serdar ŞİMŞEKLER
Sorry, no link,. it's on my disk.
Regards,
Clemens -
Merge records of one column in ALV?
Hi friends,
i am creating alv grid report(with out oops). i am calculating value for one field that value is common for all the records . so i want to display that as common value instead of displaying number of lines .
is there any possibility to merge records of one column. using it_sort i tried . but it is not coming. since it is a currency field and i need to do display in the subtotal field.
please let me know if u have the solution.
regards,
kani.
Edited by: Julius Bussche on Sep 8, 2008 7:31 AMkani,
refwer sample code.
DATA: gt_sort TYPE slis_t_sortinfo_alv,
gs_sort TYPE slis_sortinfo_alv.
CLEAR gs_sort.
gs_sort-fieldname = 'LDDAT'.
gs_sort-spos = 1.
gs_sort-up = 'X'.
gs_sort-subtot = 'X'.
APPEND gs_sort TO gt_sort.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_user_command = 'PROCESS_USER_COMMANDS'
is_layout = w_layout
it_fieldcat = i_fieldcat[]
it_sort = gt_sort[]
i_default = 'X'
i_save = 'A'
it_events = v_events
is_print = w_print
TABLES
t_outtab = i_final1 -
Two header line in one column of alv grid.
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
and then Contractors underwhich there would be 5 to 10 departments. Right now my report has
the depts of contractors and consultants in one line but the headings above that I am not
able to generate.
Will anybody please be able to provide a sample code if this is possible.
like,,,
Heading 1 | Heading 2 | Heading3 | line 1
hed4 | hed5 | hed6 | | hed7 | hed8 | line 2Unfortunately the current ALV framework doesn't support multiple line headers in ALV. There are some nasty hacks available. But none of them are full-proof.
BTW there are many posts related to similar requirements.
BR,
Suhas -
Reused alv grid - Sum one column of ALV Grid
I'd like that one column of my alv grid to be sum...
How can i do that abap'ly speaking...
regardshi,
DATA: lr_field type ref to cl_salv_wd_field.
*For total calculations...
if wd_comp_controller->gref_model_efforts is not initial.
CALL METHOD wd_comp_controller->gref_model_efforts->if_salv_wd_std_functions~set_aggregation_allowed
EXPORTING
value = abap_true.
lr_field = wd_comp_controller->gref_model_efforts->if_salv_wd_field_settings~get_field( 'BILLABLE_VALUE' ). "The column name for which total needs to be done.
lr_field->if_salv_wd_aggr~create_aggr_rule( aggregation_type =
if_salv_wd_c_aggregation=>aggrtype_total ).
endif.
Refer this :
Alv subtotal and total
Thanx. -
How to get one column of ALV table as dropdown by key.
Hi experts,
How can I get one column of ALV table as dropdown and editable. If user wants to change that column value he can just select from that dropdown and click on update button. Can I provide tool tip to that column as " Select from drop down to change the status "?
Please Help.
Thanks,
PratibhaYou just need to change the cell editor of that column in ALV.
So first get access to the alv model object (adjusting the code below for your ALV Component Usage name - mine was ALV_ADV):
DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_alv_adv( ).
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_adv( ).
DATA l_table TYPE REF TO cl_salv_wd_config_table.
l_table = l_salv_wd_table->get_model( ).
Then access the column object you want to change:
DATA l_column TYPE REF TO cl_salv_wd_column.
l_column = l_table->if_salv_wd_column_settings~get_column( 'REGION' ).
Then create the cell editor for DDLB and set it as the new cell editor for this column:
DATA ddlb TYPE REF TO cl_salv_wd_uie_dropdown_by_key.
create object ddlb
exporting
selected_key_fieldname = 'REGION'.
ddlb->set_tooltip( `Select from drop down to change the status` ).
l_column->set_cell_editor( ddlb ). -
Display concatenad fields under one column in alv.
How can I concatenate three or four fields(Taken from different tables) and can display under one column in ALV report?
I want to display:
final_column = production orderStatusmaterial type+maintenance status (concatenation of four fields).
production order: caufvd-aufnr
status: tj02t-txt04
material type: mara-mtart
maintenance status:mara-pstat
I want to display only final_column in my alv output screen.
Kindly guide.
Thanks and regards.
Thanks and regards.
Message was edited by:
cinthia nazneenPlease go through the below code and do the same for appearing the four fields of different table into One Field catalog at Display by Concatenating .
DATA :v_tmp type string .
Loop at itab1.
Read table itab2 key field1 = itab1-field1 .
Read table itab3 key field1 = itab1-field1 .
Read table itab4 key field1 = itab1-field1 .
Concatenate itab1-field1 itab2-field1 itab3-field1 itab4-field1 into v_tmp.
fieldcatalog-fieldname = 'V_TMP'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endloop.
Reward points if it is usefull .....
Girish -
Icon and text together in one column in alv list
Hello Everyone,
I want to display icon and text together in one column in ALV list.
I am using reuse_alv_grid_display function module.
Currently, i am able to see icon only in the column but i want to see both icon and text in one column in ALV.
Please let me know if this scenario is possible in ALV and how.
Thanks in advance.
Regards, TarunHi,
Check this code....
REPORT ZTEST_ALV_CHECK MESSAGE-ID ZZ .
TYPE-POOLS: SLIS,icon.
DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
L_LAYOUT TYPE SLIS_LAYOUT_ALV/
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
ICON(1),
END OF ITAB.
SELECT VBELN
POSNR
FROM VBAP
UP TO 20 ROWS
INTO TABLE ITAB.
loop at itab.
if sy-tabix = 1 or sy-tabix = 2.
itab-icon = '1'.
elseif sy-tabix = 10 or sy-tabix = 20.
itab-icon = '2'.
else.
itab-icon = '3'.
endif.
modify itab index sy-tabix.
endloop.
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-SELTEXT_L = 'VBELN'.
X_FIELDCAT-HOTSPOT = 'X'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 1.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-SELTEXT_L = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 2.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_LAYOUT-lights_fieldname = 'ICON'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = L_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
TABLES
T_OUTTAB = ITAB
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.
Regards
vijay -
Adding color to one column of a table
I am trying to make the first column light blue where it says
Eagle Forum Alerts. Here is the site:
http://www.indianaeagleforum.org/index.html
I assume the code is bgcolor=#Cddceb; Where do I put it so that
only this column is light blue? Either the whole table is blue or
the whole table is white. I just want one column blue. Thanks for
your help.
Diana HunterOn Sat, 09 Aug 2008 00:32:14 +0200, Michael Fesser
<[email protected]>
wrote:
>
>Not good.
Yes I know Micha - I've only done it very, very occasionally
sorry :-)
>If you want the text in an entire column to be centered,
you
>should apply classes to these cells instead of making
them table
>headings. Currently that's the only "right" way.
Yes Micha - I sort of knew that - it's just that I have
tables that
contain long schedules of data and just find it tedious
putting that
into about 30 to 150 rows :-)
and Dw can't do it in design view - can it ?
> There's no guarantee
>either that a table heading will always appear centered
by default!
>It's just a recommendation, you shouldn't rely on it.
I haven't found any problems in the main browsers -
IE6&7, FF, Safari
& Opera - not sure about some of the *nix browsers that
aren't based
on FF, WebKit ( as does Safari ).
>For such purposes I always have these classes in my
default CSS:
>.ac {text-align: center}
>.al {text-align: left}
>.ar {text-align: right}
good idea - I'll borrow that - thanks :-)
>If I want an entire table column to be centered, I simply
add a
>class="ac" to each cell there. Since most of my data
tables are created
>by PHP scripts, I can do this quite conveniently and
automatically.
sadly I've not done that with php yet - most of the tables
are
historical data - I'm given in spreadsheet or Word table
form.
>
>Another possible solution (at least in some cases) would
be to play with
>the more advanced CSS selectors like adjacent sibling and
first child.
>For example to address the second cell in each row you
could use
>
>td:first-child+td {...}
>
>Works well in modern browsers, but will fail in IE 6 and
below, though.
Thanks for the reminder - i did read about these in Meyer's
Definitive
Guide, but that was about a year ago -
>
>Personally I can live with that, since IE 6 usage is
constantly
>dropping. For me IE 6 is becoming the next NN 4 - I just
make sure that
>the site's content is available and usable, but I don't
really care too
>much about any graphical glitches or missing CSS effects
anymore.
I'm rapidly coming to the same conclusion. Just checked my
logs and
IE6 is between 13 and 25%.
thanks again for your guidance.
~Malcolm~*...
~* -
ALV - format the columns header
Hi all,
ALV list, created with FM REUSE_ALV_GRID_DISPLA, has the yellow background of columns header line and it's fine. When I view ALV in Microsoft Excel format, by pressing the corresponding icon, in the Excel file the color background of the first row (containing the header of the columns) is dark gray. The contents of the header cells are difficult to read because the background is too dark.
My questions are:
1. Can change the color of the column header of the ALV, to have the lightest color in Excel format?
2. Can be written in bold text in columns header of the ALV, to have the text in bold in Excel format?
3. Can write the header columns of the ALV (created with FM, non object oriented) in multiple rows, rather than one line?
Thanks in advance
SerenaYou can change color and text format in excel, when you change excel template.
You can export it in layout change, tab view and select excel and then choose sap_mm.xls (with macros).
rewrite macro for customer exit and import it back to system, then you can make it default. -
ALV GRID Display Column Width problem when filtering
Hello All,
When i displaying ALV Grid Display ,i selected one column and set filter for that.
the problem is column width at display is 12 charecters but in filter it is allowing only 10 charecters to enter which is wrong. i am unable to set filter.please give solution.
Thanks
Sandeep.Ghello i am calling perform, ineed to set OUTPUTLEN according to field length how can i do that.
FORM fill_fieldcat USING p_field TYPE slis_fieldcat_alv-fieldname
p_text TYPE slis_fieldcat_alv-seltext_l
p_flag TYPE c.
wa_fieldcat-fieldname = p_field.
wa_fieldcat-seltext_l = p_text.
wa_fieldcat-no_out = p_flag.
wa_fieldcat-outputlen = 20.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat. -
Exporting ALV to excel(including row colors)
Hai All,
I have an ALV which contains column color.I wnt to export to excel including the colors .Is it possible???
If yes, kindly let me know how to do that.
Thanks & Regards,
Kiran Ihi
try these links
http://help.sap.com/saphelp_erp2005/helpdata/en/e3/41a138c4397a42e10000009b38f842/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/7d/fe9f638af411d3805e00c04f99fbf0/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/6f/31dfd4ac4ed84189a25d8e01f14af3/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/9f/53065cb77a364aa025a12a0af37c6e/frameset.htm
regards
Arun
Message was edited by: arun a v
Maybe you are looking for
-
MacBook Pro freezes every few seconds
Hi All, My two year old MacBook Pro started freezing randomly one day. It happens with any application that I have open (Safari, Word, Finder), I get the beach ball every few seconds for any operation I try doing. When the cursor comes back I have se
-
How can we get ADFSecurity work when used in OC4J, OID and OAM?
I am getting error in http server log "mod_oc4j: Response status=499 and reason=Oracle SSO, but failed to get mod_osso global context." But I am not using Oracle SSO and my client doesn't want to use it either, I am using OAM SSO(CoreIDSSO) in my con
-
Hi I have an hp printer desk jet 2540 series
I have a hp printer wireless 2540 series and I want to no how I can print from my iPad while on the Internet, as it seems I can only front if my iPad is not connected to the Internet?
-
Protect a portion of the text in a PDF from scrapers
Hi, I'm hoping someone can help me. I have access to Adobe CC - I have been learning InDesign and Acrobat and Photoshop. Does anyone know if there is a way to protect only a portion of a PDF - just a selection of text - from scrapers? I want to pos
-
Good Buy? -New MAC user-
Hello MAC world. Ok, so here is the lowdown. I recently decided to buy my first Mac computer, so where better to look for an affordable Mac (for a 17 year old) than on Ebay. Im on this forum to ask some Mac veterans if I made a good purchase. BTW it