Fill technical information to the column of an ALV
Hi,
I've developed a report that using an OOP ALV.
In the output of report, I chose a column and press F1 the window performance assistant will show up.
Then I click 'technical information' button the window will show up. How to add the information to this window (screen data, GUI data...)
Thank you very much if you would help.
Best Regards
Thang
Hi Venkat,
Thanks for recommending the solution,
However I do not use field catalog in this case, I develop ALV in new way with OOP.
I used cl_salv_table, cl_salv_functions, cl_salv_display_settings, cl_salv_columns_table, cl_salv_column_table.
Do you know the solution like using field catalog.
Regards,
Thang
Edited by: thang tran on Mar 1, 2010 7:30 AM
Similar Messages
-
Is it possible to adjust the size of the columnes when send alv by mail ?
is it possible to adjust the size of the columns when send alv by mail ?
i send alv ( list ) by mail , work fine but all the columns are small and in the
same size , can i adjust it in the mail ?
how to do it in regular alv i know it .
LS_FCAT-OUTPUTLEN = 29 .is it possible to adjust the size of the columns when send alv by mail ?
i send alv ( list ) by mail , work fine but all the columns are small and in the
same size , can i adjust it in the mail ?
how to do it in regular alv i know it .
LS_FCAT-OUTPUTLEN = 29 . -
All the columns of an alv grid report are not downloading in excel in 1 lin
Hi All,
I have some 60 columns in my alv grid report and user can download the report using list->export->localfile->spreadsheet.
What the issue is that all the columns are not downloading in one line, instead they split in two rows.
Please help.
Regards,
Neha Patelhi,
just use this procedure it will solve your problem:
Firstly export the data to memory using the FM LIST_FROM_MEMORY.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = t_listobject
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc 0.
MESSAGE e000(su) WITH text-001.
ENDIF.
then i converted it into ASCII using LIST_TO_ASCI,
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
listasci = t_xlstab
listobject = t_listobject
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
IF sy-subrc NE 0.
MESSAGE e003(yuksdbfzs).
ENDIF.
This gives the data in ASCII format separated by '|' and the header has '-', dashes. If you use this internal table directly without any proccesing in SO_NEW_DOCUMENT_ATT_SEND_API1, then you will not get a good excel sheet attachment. To overcome this limitation, i used cl_abap_char_utilities=>newline and cl_abap_char_utilities=>horizontal_tab to add horizontal and vertical tabs to the internal table, replacing all occurences of '|' with
cl_abap_char_utilities=>horizontal_tab.
Set the doc_type as 'XLS', create the body and header using the packing_list and pass the data to be downloaded to SO_NEW_DOCUMENT_ATT_SEND_API1 as contents_bin.
This will create an excel attachment.
Sample code for formatting the data for the attachment in excel format.
u2022 Format the data for excel file download
LOOP AT t_xlstab INTO wa_xlstab .
DESCRIBE TABLE t_xlstab LINES lw_cnt.
CLEAR lw_sytabix.
lw_sytabix = sy-tabix.
u2022 If not new line then replace '|' by tabs
IF NOT wa_xlstab EQ cl_abap_char_utilities=>newline.
REPLACE ALL OCCURRENCES OF '|' IN wa_xlstab
WITH cl_abap_char_utilities=>horizontal_tab.
MODIFY t_xlstab FROM wa_xlstab .
CLEAR wa_xlstab.
wa_xlstab = cl_abap_char_utilities=>newline.
IF lw_cnt NE 0 .
lw_sytabix = lw_sytabix + 1.
u2022 Insert new line for the excel data
INSERT wa_xlstab INTO t_xlstab INDEX lw_sytabix.
lw_cnt = lw_cnt - 1.
ENDIF.
CLEAR wa_xlstab.
ENDIF.
ENDLOOP.
Sample code for creating attachment and sending mail:
FORM send_mail .
u2022 Define the attachment format
lw_doc_type = 'XLS'.
u2022 Create the document which is to be sent
lwa_doc_chng-obj_name = 'List'.
lwa_doc_chng-obj_descr = w_subject. "Subject
lwa_doc_chng-obj_langu = sy-langu.
u2022 Fill the document data and get size of message
LOOP AT t_message.
lt_objtxt = t_message-line.
APPEND lt_objtxt.
ENDLOOP.
DESCRIBE TABLE lt_objtxt LINES lw_tab_lines.
IF lw_tab_lines GT 0.
READ TABLE lt_objtxt INDEX lw_tab_lines.
lwa_doc_chng-doc_size = ( lw_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
lwa_doc_chng-obj_langu = sy-langu.
lwa_doc_chng-sensitivty = 'F'.
ELSE.
lwa_doc_chng-doc_size = 0.
ENDIF.
u2022 Fill Packing List For the body of e-mail
lt_packing_list-head_start = 1.
lt_packing_list-head_num = 0.
lt_packing_list-body_start = 1.
lt_packing_list-body_num = lw_tab_lines.
lt_packing_list-doc_type = 'RAW'.
APPEND lt_packing_list.
u2022 Create the attachment (the list itself)
DESCRIBE TABLE t_xlstab LINES lw_tab_lines.
u2022 Fill the fields of the packing_list for creating the attachment:
lt_packing_list-transf_bin = 'X'.
lt_packing_list-head_start = 1.
lt_packing_list-head_num = 0.
lt_packing_list-body_start = 1.
lt_packing_list-body_num = lw_tab_lines.
lt_packing_list-doc_type = lw_doc_type.
lt_packing_list-obj_name = 'Attach'.
lt_packing_list-obj_descr = w_docdesc.
lt_packing_list-doc_size = lw_tab_lines * 255.
APPEND lt_packing_list.
u2022 Fill the mail recipient list
lt_reclist-rec_type = 'U'.
LOOP AT t_recipient_list.
lt_reclist-receiver = t_recipient_list-address.
APPEND lt_reclist.
ENDLOOP.
u2022 Finally send E-Mail
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = lwa_doc_chng
put_in_outbox = 'X'
commit_work = 'X'
IMPORTING
sent_to_all = lw_sent_to_all
TABLES
packing_list = lt_packing_list
object_header = lt_objhead
contents_bin = t_xlstab
contents_txt = lt_objtxt
receivers = lt_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Hope it will help you
Regards
Rahul sharma -
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 -
Problem with the order of the columns of a ALV
I have a problem with a ALV, variants we keep this ALV does not record the order of the columns
Thank youI suppose you want to change the sequence of columns of a ALV. If you can change it by clicking 'settings' of right-top corner of ALV. After done you can save the new settings into a new. If you find some abnormal behaviour, please check the settings by WDA component "wd_analyze_config_user".
FYI.
[http://help.sap.com/saphelp_nw70/helpdata/en/32/f26f73d81e11d1a26f0000e8a5a614/frameset.htm] -
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 to fix the width of the column when using alv table
Hi ,
I am displaying the contents in a table. Of course using alv component i displayed the content. Now the problem is the column width is not fixed with value of the table entries( based on the domain length level). As length of field increases or decreses as the length of the content increases or decreases. I wanted to fix the column width whatever be the length of the contents.
Can any one help in this regard ?
Thanks Pons.Hi,
Please find the code related to your problem.
METHOD configure_alv .
data declaration for column settings
DATA : lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_col_header TYPE REF TO cl_salv_wd_column_header,
lt_columns TYPE salv_wd_t_column_ref,
ls_column TYPE salv_wd_s_column_ref.
data declaration for table settings
DATA : lr_salv_wd_table_ctr TYPE REF TO iwci_salv_wd_table,
lr_table_settings_ctr TYPE REF TO if_salv_wd_table_settings,
lr_header_ctr TYPE REF TO cl_salv_wd_header.
Variables for drop-down and inpufield reference
DATA : lr_drdn_by_key TYPE REF TO cl_salv_wd_uie_dropdown_by_key,
lr_input_field TYPE REF TO cl_salv_wd_uie_input_field,
l_header TYPE string.
get ALV Component <CONTRACT_DETAILS>
lr_salv_wd_table_ctr = wd_this->wd_cpifc_payment_detail( ).
wd_this->alv_config_table = lr_salv_wd_table_ctr->get_model( ).
set visible row count
lr_table_settings_ctr ?= wd_this->alv_config_table.
lr_table_settings_ctr->set_visible_row_count( '5' ).
lr_table_settings_ctr->set_read_only( abap_false ).
lr_table_settings_ctr->set_grid_mode( ).
lr_table_settings_ctr->set_width(
EXPORTING
value = '980PX' ).
wd_this->alv_config_table->if_salv_wd_table_settings~set_data_check( if_salv_wd_c_table_settings=>data_check_on_cell_event ).
wd_this->alv_config_table->if_salv_wd_std_functions~set_pdf_allowed( abap_false ).
wd_this->alv_config_table->if_salv_wd_std_functions~set_view_list_allowed( abap_false ).
wd_this->alv_config_table->if_salv_wd_std_functions~set_edit_insert_row_allowed( abap_false ).
wd_this->alv_config_table->if_salv_wd_std_functions~set_edit_delete_row_allowed( abap_true ).
wd_this->alv_config_table->if_salv_wd_std_functions~set_export_allowed( abap_false ).
wd_this->alv_config_table->if_salv_wd_std_functions~set_edit_check_available( abap_false ).
CLEAR: l_header.
l_header = wd_assist->if_wd_component_assistance~get_text( '030' ).
lr_header_ctr = lr_table_settings_ctr->get_header( ).
lr_header_ctr->set_text( l_header ).
set text header for Columns.
CLEAR: l_header,lt_columns.
lr_column_settings ?= wd_this->alv_config_table.
lt_columns = lr_column_settings->get_columns( ).
LOOP AT lt_columns INTO ls_column.
CASE ls_column-id.
WHEN 'PAYMENT_METHOD'.
get header details
lr_col_header = ls_column-r_column->get_header( ).
disable DDIC field label
CALL METHOD lr_col_header->set_prop_ddic_binding_field
EXPORTING
property = if_salv_wd_c_ddic_binding=>bind_prop_text
value = if_salv_wd_c_ddic_binding=>ddic_bind_none.
set user defined column header
l_header = wd_assist->if_wd_component_assistance~get_text( key = '020' ).
lr_col_header->set_text( l_header ).
CREATE OBJECT lr_drdn_by_key
EXPORTING
selected_key_fieldname = ls_column-id.
ls_column-r_column->set_cell_editor( lr_drdn_by_key ).
ls_column-r_column->se_width( '100PX' ).
lr_drdn_by_key->set_key_visible(
EXPORTING
value = abap_true ).
WHEN OTHERS.
ENDCASE.
CLEAR: l_header,ls_column.
ENDLOOP.
ENDMETHOD.
Regards
Manoj Kumar -
How to find all the columns in an ALV Layout?
Hi all
Here's what I need to do. When I run a program (with ALV output in online mode) in the background mode, I need to save the data to a file. And this file is supposed to contain only those columns in a specified ALV Layout.
Any suggestion how to achieve this?
Thank you so much!!!hi,
u are appending to a field catlog.
eg:
int_fieldcatalog-fieldname = 'CHECT'.
int_fieldcatalog-seltext_m = 'Check No'.
int_fieldcatalog-col_pos = 0.
int_fieldcatalog-outputlen = 13.
int_fieldcatalog-emphasize = 'X'.
int_fieldcatalog-key = 'X'.
APPEND int_fieldcatalog TO int_fieldcatalog.
CLEAR int_fieldcatalog.
so chk this int_fieldcatalog internal table.
it will containthe field in the field in the ALV display.
rgds
anver -
How to validate the columns in dynamic alv grid
Hi Friends,
I want to validatethe value of all the columens (min 1 and max 40) which i create dynamically in alv grid.
value must be between 0 and 1 only.
Please help ,, need urgently.method handle_data_changed.
data: ls_good type lvc_s_modi,
li_diff type i,
value type p DECIMALS 3,
old_value type p DECIMALS 3,
lw_outtab1 type gt_tab.
clear value.
loop at er_data_changed->mt_good_cells into ls_good.
value = ls_good-value.
old_value = ls_good-value.
if value lt 0 or value gt 1.
MESSAGE 'Value is out of range' TYPE 'I'.
Read table gt_outtab1 into lw_outtab1 index ls_good-row_id .
perform show_alv.
clear ls_good.
ENDIF.
ENDCASE.
ENDLOOP.
I again created the table.. actually data is not changed in the internal table but still it shows the changed value in the alv grid. even in build the table again and call the refersh alv grid method.. -
Fetch the column title and evaluate with another value.
Hi all,
I am new to SAP SDK and am trying to populate the Forecast matrix with quantities for items defined in Sales Order and for the delivery date mentioned in SO.
I want to fill in the quantities for the respective item code in the date column of Forecast.
For ex: Sales Order has an item M which has a delivery date of say 15/12/2010 and quantity as 100 then when i want to fill this in Forecast how do i fill 100 Qty in the column with title date as 15/12/2010?
As the column id are all variables in Forecast screen how best can i search for a particular date in the number of columns via code.
Sample code if provided will be useful..
Thanks in advance
Regards
Rohan S KambleThe following link might help you in achieving this
Re: Make the column title with value month_year based on the fiscal year/period -
New Blog: Detailed Information on the Fiscal Year Change (RAJAWE00)
I've published a new blog that includes detailed steps and other technical information on the Fiscal Year Change program in fixed assets.
[Detailed Information on Changing the Fiscal Year in FI-AA|Detailed Information on Changing the Fiscal Year in FI-AA]
A full list of FI-AA related blogs has been kept in the [Wiki|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/erpfi/asset+accounting].Dear Mark,
Where do you define this previous fiscal year??
No, we are not expected to run depreciation in 2007. The first depreciation run will happen in Jan-08
Additional information, when I am trying to close period via AJAB, the error says "The fiscal year 2007 is already closed for company code 1417. It is not necessary to perform a year-end closing". Surprisingly, it still showing 2007 as a current year.
Please help
Edited by: AMIT HINGER on Jan 4, 2008 2:21 PM -
Hi Max,
If you remember in one of my last post I asked for changing the column headings in ALV display for example from 'Material' to 'Material used'.
I am using
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = repid
IT_FIELDCAT = field_body
I_SAVE = g_save
IS_VARIANT = g_variant
IT_EVENTS = events
TABLES
T_OUTTAB = itab.
And you suggested me the following way....
loop at field_body into field_wa.
case field_wa-fieldname.
when 'Material'.
field_wa-seltext_l = 'Material used'.
field_wa-seltext_m = 'Material used'.
field_wa-seltext_s = 'Material used'.
endcase.
modify field_body from field_wa.
endloop.
It is working well. In ALV display the column heading is changed to what I wanted. But the question is when I export the displayed ALV to Excel using ALV functionality, Export->Spreadsheet... I see that <b>I dont get the Column Heading into Excel as it was in the ALV display.</b>
I get in the Excel as 'Material u' or 'Mat. Used'. But when I add this line in the code.....
when 'Material'.
field_wa-seltext_l = 'Material used'.
field_wa-seltext_m = 'Material used'.
field_wa-seltext_s = 'Material used'.
<b> field_wa-outputlen = 20.</b>
Then I see that I get the complete heading in the Excel. But this way the columns with outputlen 20 are taking much space in ALV display.
Is there any fix for this. May be not mentioning the outputlen but still get the column headings into Excel as it was in ALV display.
Anyone with ideas please respond. Waiting for replies. ThanksHi
The labels have a fixed size:
seltext_l is long text: 20 char
seltext_m is medium text: 15 char
seltext_s is short text: 10 char
The text 'Material used' is long 13 char so you should write:
field_wa-seltext_l = 'Material used'.
field_wa-seltext_m = 'Material used'.
field_wa-seltext_s = 'Mat. used'.
You can try to set the field colwidth_optimize of parameter IT_LAYOUT.
This field should optimize the width of the colunm
So
data layout type SLIS_LAYOUT_ALV.
layout-colwidth_optimize = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = repid
IT_LAYOUT = layout
IT_FIELDCAT = field_body
I_SAVE = g_save
IS_VARIANT = g_variant
IT_EVENTS = events
TABLES
T_OUTTAB = itab.
and you can decide which label has to be used:
field_wa-seltext_l = 'Material used'.
field_wa-seltext_m = 'Material used'.
field_wa-seltext_s = 'Mat. used'.
If you want to set the short text
field_wa-ddictxt = 'S'.
...medium
field_wa-ddictxt = 'M'.
...long
field_wa-ddictxt = 'L'.
Max -
How can I fill in The Release Date Column in my Library? Not the Year mind you that much I figured out. When I buy music from iTunes Store the release date column is filled in but when I rip a cd into my library it isn't. Any Help?
Hi Geir,
It's likely one of these two bugs;
CSCti42583 - BAT.xlt needs to be supported on 32-bit Office 2010
Description
Symptom:
BAT.xlt does not work in Microsoft excel 2010
Conditions:
Microsoft excel 2010
Workaround:
None
Details
First Found in: (2)
8.6,8.5(1)
Status:
Open
Last Modified:
May 07,2012
Product:
Cisco Unified Communications Manager (CallManager)
Platform:
Dependent
Severity:
6 - enhancement
or
Related Bugs
CSCtq23985 : Bat.xlt file doesnt work with Localized MS Excel 2010
Symptom:
When trying to fill in data in the BAT.xlt file you are getting an error message
"Please enter numeric values in text boxes"
While the data entered is perfectly fine.
Conditions:
First seen on French Windows Version with French MS Excel 2010
Workaround:
Use Bulk Administration -> Export/Import approach instead of the BAT.xlt file.
Cheers!
Rob
"Spend your life waiting,
for a moment that just don't come,
Well, don't waste your time waiting"
-Springsteen -
I just finished creating a Apple ID yesterday and I filled out some of the credit card information and then I pressed something so I didn't finish and today I went to finish filling it out but were it says choose your country it won't let me continue what do I do
You should really read the manual.
"How do you restore from backup? "
Restore. When given the choice, choose to use backup.
"And how can I check to see if the pics and videos are on my computer somewhere first??"
They would only be where you put them. What program did you use to import them? Pics/vids taken with ipod are not part of the sync process at all. You should be importing them just as you would with any digital camera.
If you did not import them, then they are not on your computer. -
I have a Numbers spreadsheet filled with data. I want to swop the columns
I have a Numbers spreadsheet filled with data. I want to swop the columns to be rows & rows to be the columns, i.e make the columns the rows & make the rows the columns. Is there any way to do this? Thanks
Here is a link to a previous discussion:
https://discussions.apple.com/message/25571095#25571095
SGIII provides and applescript
Maybe you are looking for
-
IPad Video app - bypass info screen
I make presentations to existing and potential distributors in order to make sales in the $100K - $200K range. This makes a smooth, uninterrupted presentation very important. When I want to play a QT movie for a presentation, instead of playing the
-
Hi guys, I am new to dialog programming , I have the following requirement in table control. I have to be displayed 4 fields in Table control 1. Mara-MATNR (Match code) 2.Mara-BISMT 3. Mara-MATKL 4. Makt-MAKTX Based on Material numb
-
Can i download the images used in the adobe PSH 13 manual that accompanied the CD's
Can I download the images contained in the PSE 13 electronic manual
-
Scanner Preview is perfect but actual scan is static. MX922 on a MAC
Up until the past couple days my scanner has worked perfectly, it's less than a year old. Now, in Canon IJ Scan Utility the preview comes up perfect, but when I try to save it, the saved file is a black and white static field, like old TVs without r
-
Is Adobe's Basic Tutorial Broken?
I've installed Flex Builder 2, Data Services with Integrated JRun, and gone through the sample applications which all work beautifully (suggesting that everything installed correctly). However, when I try to do the tutorials on creating FDS applicati