ALV Coulmn Headers
Hi All,
I need help in changing the font and background color for Column Headers in ALV . i.e the
Thank you in Advance.
Roopa
Hi Vinay,
EMPHASIZE is not giving the required output. Since iam using the FM method to display the grid. I am not able to use the SMALLTITLE field. Even the smalltitle property says this.
SMALLTITLE - If this field is set, the title size in the
grid control is set to the font size of the
column header.SPACE, 'X'.
Am i missing something here.
Could you pls help me on this.
Thanks
Roopa
Similar Messages
-
Hello:)
I'm developing an app in WD for ABAP.
I would like to hide/make the column headers invisible, without deleting.
So I found a function in a class: <b>CL_SALV_COLUMNS_LIST</b>
<b><i>set_headers_visible</i></b>.
The thing is, I have no idea how to use it with my
<b>iwci_salv_wd_table</b> of the alv table.
Can anyone help me with that??
best regards
simon:)Hello:)
I'm developing an app in WD for ABAP.
I would like to hide/make the column headers invisible, without deleting.
So I found a function in a class: <b>CL_SALV_COLUMNS_LIST</b>
<b><i>set_headers_visible</i></b>.
The thing is, I have no idea how to use it with my
<b>iwci_salv_wd_table</b> of the alv table.
Can anyone help me with that??
best regards
simon:) -
Hello,
I have the necessity to develo an ALV with two Headers:
EG.
| Plant 1100 | Plant 1600 |
| Date | Value | Qty | Date | Value | Qty |
I can't use Hierarchical because it doesn't do this kind of rappresentation; It works only like this:
| Plant 1100 |
| Date | Value | Qty |
| Plant 1600 |
| Date | Value | Qty |
Instead I need to display double headers in a single row..
Any suggestion?
Thanks in advanced
MarcoHi
U should create an internal table for output having all fields twice
DATA BEGIN OF T_OUTPUT OCCURS 0,
DATE_1,
VALUE_1,
QTY_1,
DATE_2
VALUE_2,
QTY_2,
END OF T_OUTPUT.
In the first block of flied u can insert the data for the first plant, in the second one u can insert the data of the second plant.
The second header line (the field label) will be managed by ALV, the first line has to be write in TOP-OF-PAGE event:
.FORM TOP_OF_PAGE.
WRITE: SY-VLINE, PLANT1,......
ENDFORM.
Max -
ALV - coulmn names differ from Grid display to Excel download
Hi,
When I display report in ALV grid, the layout looks fine. But the column headings and field output length differs from Grid to Excel sheet data.
suppose if some column heading is like ABCDEF and content is of 2 characters. Then it grid i am getting like ABCDEF. But in Excel I am getting it like ABC. ( which is seltext_S).
My question is why the layout is not being copied to Excel as it is like in GRID display??
Thanks in advance.
PraneetHI,
Just Try this,
Eg: suppose this is the field VBELN
Declare in the internal table like
vbeln(10) type c,
instead of vbeln LIKE vbak-vbeln,
Hope it'll work -
Adding icon to ALV Coulmn in powerlists (POWL)
Hi Experts,
I have one requirement in POWL. For one Column in ALV i need to add ICON.
Can any body help in this problem.
Regards,
SriThx Chandra for promt reply,
I know your given field name. But i am not getting 100% clarity.
Let me explain what i have return in my progrm.
In FieldCatalog method:
*Comments
wa_fieldcat-colid = 'COMMENT'.
wa_fieldcat-colpos = '13'.
wa_fieldcat-col_visible = abap_true.
wa_fieldcat-enabled = abap_true.
wa_fieldcat-icon_src_ref = 'COMMENT'.
wa_fieldcat-header = 'Approver Comments'.
wa_fieldcat-allow_filter = abap_true.
wa_fieldcat-allow_sort = abap_true.
INSERT wa_fieldcat INTO TABLE it_fieldcat[].
can clarify in this one.
Advance thx for helping. -
In ALV- Coulmns are jumbling in print preview and word doc.(irregular)
Hi Gurus,
In ALV, i am getting the output with proper column allignment. But when i click on print preview in the output, columns are jumbling (irregular pattern- not in proper allignment) and also i am pulling the output data in spool throgh PDF format, there also columns are coming irregular( jumbling).
I want to get the output data into word forma with proper column allignment.
Please suggest me to solve this issue.
Thanks,
Chiru.Check whether in the field catalog COL_POS is filled properly,
a® -
How to achieve alv output headers in middle
Hi I have a requirement about displaying headings using alv . I am using reuse_alv_commentary_write FM but i can able to display headings it start from the first colomn . But I require some text should display in the middle and some should start from begin of the line and some text end of the line.
Ex: in Header data required as
ABCD Company
from the losangles to in
date
user
time
plant openbal
above is my header format and below i am displaying values
field1 field2 field3 field4 so on.
My requirement is how i kept text in the middle and end .Hey,
Check this URL [http://sapprograms.blogspot.com/2008/11/header-to-alv-report.html]
Raul Natu -
Getting column headers dynamically from input parameters in alv.
Hi all,
I am new to abap, can any one help me in getting column header dynamically through parameters in alv ?
Eg:-
i Have parametars for days field ,
user inputs days as 10 20 30 40.
Now I want to display in alv column headers as:-
1st column- 'FROM 0 TO 10'
2nd column- 'FROM 10 TO 20 '
3rd column- 'FROM 20 TO 30'
4th column- 'FROM 30 TO 40'
5th column- 'FROM 40 TO 50'
6th column- 'FROM 50 TO 60'
thanks in advance........Check this code snippet:
Step 1: Create a dynamic table based on the input in the selection screen.
TYPE-POOLS: abap.
DATA:
lr_structdescr TYPE REF TO cl_abap_structdescr,
lr_tabledescr TYPE REF TO cl_abap_tabledescr,
lr_datadescr TYPE REF TO cl_abap_datadescr,
lt_components TYPE abap_component_tab,
ls_component TYPE abap_componentdescr,
lr_wa TYPE REF TO data,
lr_tab TYPE REF TO data.
DATA: lv_index TYPE sy-index.
DATA: lv_index_num(5) TYPE n.
DATA: lv_index_char(5) TYPE c,
lv_iter TYPE i,
lv_low TYPE numc2 VALUE 0,
lv_high TYPE numc2 VALUE 10.
DATA: lr_alv TYPE REF TO cl_salv_table.
FIELD-SYMBOLS: <fs_field> TYPE ANY.
FIELD-SYMBOLS: <fs_wa> TYPE ANY.
FIELD-SYMBOLS: <fs_tab> TYPE table.
PARAMETERS p_numcol(2) TYPE n DEFAULT 50.
START-OF-SELECTION.
lv_iter = p_numcol DIV 10.
DO lv_iter TIMES.
IF sy-index > 1.
lv_low = lv_low + 10.
lv_high = lv_high + 10.
ENDIF.
lv_index_num = sy-index.
lv_index_char = lv_index_num.
CONCATENATE 'FROM' lv_low 'TO' lv_high INTO ls_component-name
SEPARATED BY '_'.
ls_component-type =
cl_abap_elemdescr=>get_p( p_length = 10 p_decimals = 2 ).
INSERT ls_component INTO TABLE lt_components.
ENDDO.
* get structure descriptor -> lr_STRUCTDESCR
lr_structdescr
= cl_abap_structdescr=>create( p_components = lt_components
p_strict = space ).
* create work area of structure lr_STRUCTDESCR -> lr_WA
CREATE DATA lr_wa TYPE HANDLE lr_structdescr.
ASSIGN lr_wa->* TO <fs_wa>.
lr_datadescr = lr_structdescr.
lr_tabledescr
= cl_abap_tabledescr=>create( lr_datadescr ).
* Create dynamic internal table
CREATE DATA lr_tab TYPE HANDLE lr_tabledescr.
ASSIGN lr_tab->* TO <fs_tab>.
* Populate the internal table
DO 10 TIMES.
DO.
lv_index = sy-index.
ASSIGN COMPONENT lv_index OF STRUCTURE <fs_wa> TO <fs_field>.
IF sy-subrc <> 0.
EXIT.
ENDIF.
<fs_field> = sy-index.
ENDDO.
APPEND <fs_wa> TO <fs_tab>.
ENDDO. -
Need to display COlumn headers dynamically in ALG Grid
Hello,
I need to display column headers dynamically in alv grid Display with its corresponding value.
Column headers should be picked from a field in Final Internal table and its corresponding field will also need to pick from the same table.
T_final... Suppose Field STCTS - (To pick coulmn headers)
CCNGN - (To pick appropriate value for that column)
Can anybody explain me how i can pass these values to ALV Grid using
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = Y_I_FCAT
IMPORTING
EP_TABLE = DY_TABLE.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Any suggestions will be appreciated....
Regards,
KittuHi,
Go thru this link, and the code of Mr.Dev Parbutteea
Re: Probelm with Using Field Symbol in FM
thanks
Mahesh -
Problem while exporting ALV column header to excel sheet.
Hi,
I am able to export an ALV grid details to an excel sheet. But the ALV column headers when exported to excel sheet are getting truncated.
For eg: if my column header in ALV grid is displayed as 'Material' then the column header in excel sheet is 'Mater' only. Remaining portion is getting truncated.
How can I view the entire column header text?
Kindly assist.
Thanks.I have the same problem with you, when user export to excel. I fixed it by using
w_layo-colwidth_optimize = 'X'. <<<<<<<<<<<<This
perform generate_fcat_reftab
using 'PRUEFLOS' 'T_INPUT' '' '' 'Inspection Lot' 0.
form generate_fcat_reftab using p_fieldname
p_tabname
p_ref_tabname
p_ref_fieldname
p_output_text
p_output_lenght.
clear w_fcat.
w_fcat-fieldname = p_fieldname.
w_fcat-tabname = p_tabname.
w_fcat-ref_fieldname = p_ref_fieldname.
w_fcat-ref_tabname = p_ref_tabname.
w_fcat-seltext_s = p_output_text.
w_fcat-seltext_m = p_output_text.
w_fcat-seltext_l = p_output_text.
w_fcat-outputlen = p_output_lenght.
w_fcat-ddictxt = 'L'. <<<<<<<<<<<<<<<<<<This
append w_fcat to t_fcat.
endform. -
Buttons in fields of Grid ALV, but without a hotspot
Hi all,
I'm looking for an elegant way to add a button inside grid ALV. I've found in internet solution like setting hotspot for column and adding icon, but it's not good for me. Problem is that my column with buttons sometimes should have them and sometimes shouldn't. So it turnes out that even if row doesn't have button icon, cursor is still changed since this is hotspot field. It's not a big problem but it just doesn't feel right. Maybe it is possible to set hotspot to selective field (like with cell background color) or add a real button. Any ideas?
Best regards
Marcin CholewczukIt is possible to have a button inside ALV grid cells - in any cell you need, without any hotspots.
If you want to use REUSE_* function module you have to use LVC version, ie. REUSE_ALV_GRID_DISPLAY_LVC - not REUSE_ALV_GRID_DISPLAY. There's no restriction of course if you use ALV grid control directly (on your own screen with custom container, "create object", etc.).
First, the structure of the table to be displayed by ALV grid (data table) must have a field of type LVC_T_STYL - apart from other fields that you want to display. This is a table that informs ALV what style should be applied to each cell of the given row. For each grid cell that you want to appear as a button you should append a record to the LVC_T_STYL table - in corresponding data table row - and fill in this recod:
- FIELDNAME - name of the affected ALV coulmn
- STYLE = cl_gui_alv_grid=>mc_style_button
(if you use REUSE_* module put statement "CLASS CL_GUI_ALV_GRID DEFINITION LOAD." at the beginning of your report -this enables you using the constant cl_gui_alv_grid=>mc_style_button)
Then you need to put the name of your LVC_T_STYL table (name of field in your data table structure with has type LVC_T_STYL) into field STYLEFNAME of the ALV layout structure (structure of type LVC_S_LAYO - parameter IS_LAYOUT for set_table_for_first_display or: IS_LAYOUT_LVC for REUSE_ALV_GRID_DISPLAY_LVC).
That's all to display a cell as a pushbutton. Now you need to capture the event of pressing it. To do this you need to handle event button_click of ALV control (see ALV grid documentation). It's not a problem when you use ALV control directly but when you use REUSE_* module there seems to be no parameter that makes it for you so in that case you need to capture the event button_click in the same way as if you used ALV control directly.
The only problem is: when you use REUSE_* module you have actually no direct access to the ALV object - you have no reference to the instance of the ALV object being used (needed to register an event handler). So to get the reference you can call fm GET_GLOBALS_FROM_SLVC_FULLSCR, the reference is returned in parameter E_GRID. Then you can register the event handler for event button_click in usual way ("set handler...").
You can put the code that obtains the reference to ALV object, creates event handler object and registers the event handler for example in the callback form that you use for setting the pf-status - the form which name you pass to REUSE_ALV_GRID_DISPLAY_LVC with parameter I_CALLBACK_PF_STATUS_SET - but make sure to execute that code only once.
regards
pozdrawiam -
Popluate Column Heading Dynamically in UI
HI Experts,
I have a requirement where i need to get column descriptions dynamically at item level in UI depending on the process type.
I have an order with two items, when i display the order from search result i go to order detail where i can see the items also.
There is a column called net value as column heading, this populates the net price for each item.
I need to show base price instead of NET PRICE which i am able to do that and column heading name is DNP.
But DNP column heading along with base price is required only for a particular process types , for remaining process types the NET VALUE column heading followed by net price should remain same.Hi,
User can Maintain the Column Heading's, by the way you mentioned....
Else you can use TOP-OF-PAGE event to build Dynamic Coulmn Headers. -
Query Column Header when executing directly to spreadsheet
Hello,
I've created an ABAP query and added the fields of currency and unit of measure next to the price and quantity.
When I excute the query directly to a spreadsheet, the headers of the currency and unit of measure columns have the same description as the price and quantity headers. The headers come incorrectly only when executing to spreadsheet. When I execute to ALV, the headers come out correctly.
For example
Quantity Quantity Amount Amount
1.000 EA 250.09 USD
Has anyone encountered this problem before?
CarlaThis was fixed in the 4.1 or 1215 build. Please update by downloading or check for updates.
-thanks
kris -
Business Document Object image (OAER) in Smartform
Hi folks,
This topic has been raised before, but no definitive answer has been provided. We have a Company Logo that has been loaded into the Business Documents repository via txn OAER for ALV Report headers. We wish to use the same image in our custom smartforms. Using the standard graphics image object in the smartform doesn't find the BDR image.
Without reloading the image via SE78, is it possible to display the BDR Image in a Smartform, and if so, could you please indicate how?
Regards,
Stevecheck out this weblog.
/people/rammanohar.tiwari/blog/2006/03/25/generic-object-services-gos--in-background--part-ii
this for loading gos documents in background (not downloading) but should give you a pointer on how to go about it.
Regards
Raja -
Dropdown by key does not allow to change values
Hi experts,
I have drop down by key and input field in ALV coulmn as cell variants.
The input field is editable but i cannot change the values of drop down. The list of drop down is filled.
Could you plz suggest me some solution.
Regards,
Arti.WHEN 'FIELD'.
CLEAR lr_col_header.
lr_col_header = ls_column-r_column->create_header( ).
lv_field_header = zcl_zxa_str=>get_otr( 'Z45/FIELD_HEADER' ).
lr_col_header->set_text( lv_field_header ).
lr_col_header->set_tooltip( lv_field_header ).
CREATE OBJECT lr_drdn_by_key
EXPORTING
selected_key_fieldname = ls_column-id.
lr_drdn_by_key->set_selected_key_fieldname( 'DRP_DWN_VALUES' ).
lr_drdn_by_key->set_key_visible( abap_true ).
wd_this->add_cell_variant( io_column = ls_column-r_column
io_cell_editor = lr_drdn_by_key
iv_variant_column_name = 'CELL_VARIANT'
iv_variant_key_value = 'DROPDOWN_BY_KEY' ).
CREATE OBJECT lr_input_field
EXPORTING
value_fieldname = ls_column-id.
wd_this->add_cell_variant( io_column = ls_column-r_column
io_cell_editor = lr_input_field
iv_variant_column_name = 'CELL_VARIANT'
iv_variant_key_value = 'INPUT_FIELD' ).
Maybe you are looking for
-
I recently downloaded an album (a gift) from Amazon, one option of which is to download directly to my iTunes library (which is what I did). I also purchased a song from the iTunes store shortly after this. In both cases, the music shows up on my i
-
10.7.2 Breaks Screen Sharing Login
After updating to Lion 10.7.2 I receive a blank grey screen with no user login infomation when I access my MacBook Pro using TightVNC. 10.7.1 and prior releases worked correctly with user pictures painted onto the grey screen to allow login account s
-
ALE configuration for Outbound Idoc - Help me
Hi Experts, I am newbee in SAP and XI. I was trying to send MATMAS Idoc from R3 and i was running into some issues. So i would appreciate if someone can help me. I am using following link as reference. /people/swaroopa.vishwanath/blog/2007/01/22/ale-
-
Problem in printing Address Type 3
Hi Experts, This post is in context of Address type 3 (Contact Person). Please see the below mentioned code which has been coded in the script : /: IF &VBDKA-ZZADRND& EQ &SPACE& /: IF &VBDKA-ADRNP_2& EQ &SPACE& /: ADDRE
-
Myself and another coworker just got great new mac pros. Our G4's were getting really slow. This is happening to both of us. When we are running more than one CS2 program they start quitting. Didn't happen on G4. If I am in photoshop, and Illustrator