Hiding option in ALV
Hi ,
Is there any option to hide columns in ALV?
Hi,
You need to create a filed catalog for this.
there is one field in the field catalog structure NO_OUT you need to set this to 'X'.
The structure for filed catalog is
LVC_S_FCAT.
you need to this.
DATA: fcat type lvc_s_fcat,
fcat_tab type lvc_t_fcat.
fact-FIELDNAME = 'column name'.
fact-no_out = 'X'.
append fcat to fcat_tab.
and pass thisfcat_tab to the ALV's SET_TABLE_FOR_FIRST_DISPLAY method.
Regards,
Sesh
Message was edited by: Seshatalpasai Madala
Similar Messages
-
Hi,
Im not getting Menu options in ALV report output. Not even default menu options SYSTEM, HELP Its dispalying as <b>????????????????????????????????</b>. Can someone help me regarding this?
Regards,
amalHi Amal,
Check the screen number if you are using a seperate screen and Menu painter.
Thanks and Regards,
Sampath -
How to assign search help using ovs for select options for ALV in web dynpr
how to assign search help using ovs for select options for ALV in web dynpro
Hi,
refer http://wiki.sdn.sap.com/wiki/display/WDABAP/InputhelpofObjectValueSelectioninWDABAP
http://www.****************/Tutorials/WebDynproABAP/OVS/page1.htm
and http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproAbap-OVSsearch+help
Thanks,
Chandra -
Web Dynpro ABAP - Select Option and ALV Component Usage
Hi,
I'm new in ABAP Web Dynpro and i was trying to follow the SDN tutorial
Web Dynpro ABAP - Select Option and ALV Component Usage
In this video, we create a new Web Dynpro ABAP component that uses both Select Options and ALV. Developers can learn the basic mechanisms for working with both of these reusable components.
Following the link: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637
I implemented and generated the web dynpro with success but when i execute a test i get a dump on select-option definition.
Note
The following error text was processed in the system ECD : Exception condition "TYPE_NOT_FOUND" raised.
The error occurred on the application server ITAWSECCS01D_ECD_00 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
I went in debug and the piece of code dumping is:
lt_range_table =
wd_this->m_handler->create_range_table( i_typename = 'S_PROJ' ).
Is there someone who can help me?
Thanks in advance,
Stefano.Hi,
I'm new in ABAP Web Dynpro and i was trying to follow the SDN tutorial
Web Dynpro ABAP - Select Option and ALV Component Usage
In this video, we create a new Web Dynpro ABAP component that uses both Select Options and ALV. Developers can learn the basic mechanisms for working with both of these reusable components.
Following the link: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637
I implemented and generated the web dynpro with success but when i execute a test i get
an error as
Note
The following error text was processed in the system EI6 : Exception condition "TYPE_NOT_FOUND" raised.
The error occurred on the application server EC6IDES_EI6_01 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
I have created a table zmy_table and trying to make USERID field as a select-options.I've written the code as shown below .
data: itab type standard table of zmy_table,
wa type zmy_table.
data:
node_employee type ref to if_wd_context_node,
elem_employee type ref to if_wd_context_element,
stru_employee type wd_this->element_employee ,
item_userid like stru_employee-userid.
navigate from <CONTEXT> to <EMPLOYEE> via lead selection
node_employee = wd_context->get_child_node( name = wd_this->wdctx_employee ).
@TODO handle not set lead selection
if ( node_employee is initial ).
endif.
get element via lead selection
elem_employee = node_employee->get_element( ).
@TODO handle not set lead selection
if ( elem_employee is initial ).
endif.
alternative access via index
Elem_Employee = Node_Employee->get_Element( Index = 1 ).
@TODO handle non existant child
if ( Elem_Employee is initial ).
endif.
get single attribute
elem_employee->get_attribute(
exporting
name = `USERID`
importing
value = item_userid ).
select *
from zmy_table
into table itab
where userid = item_userid.
node_employee = wd_context->get_child_node( 'EMPLOYEE' ).
node_employee->bind_elements( itab ).
Is there someone who can help me and can tell am i doing wrong?
Thanks in advance,
Dheeraj -
Hi all,
I need to hide values of one particular field in ALV Grid.But I need only subtotal of the hidden values.
Is there any option in ALV Grid.
For Example.
it_final-menge
100
125
175
200
400
400 is the subtotal value.Values 100,125,175,200 needs to be hidden for some specific purpose.
I need
it_final-menge
blank
blank
blank
blank
400
blank indicates space.
Please Suggest some ideas.
Regards,
BathriHi,
Using SAP R/3 field catalog or layout this is not possible. However you can do this manually, by taking a varaible for subtotal and calculating it manually instead of the sub_tot field in the catalog.
You can hide an entire column, but all rows except the subtotal is not possible.
Regards,
Mansi. -
Export option in ALV report downloades first two columns blank
Hi ,
Before posting this query I searched the solution in SDN but I did't find the solution.
My problem is After displaying report in ALV format ,if I press Export --> Local file --->spreadsheet ; file will downloaded to excel sheet but first two columns(only heading no data ) will be blank and next two columns with proper data.
I checked field catalog defination it seems to be ok, any other mistake ?
Please suggest.
NarayanHi
It's the option you have in the path System->List->Save->Local file
I means it's the standard option to export an abap list into a local file, so you should try this path too and check if the resul it's the same
I think you should choose Export --->spreadsheet: here before saving the file an excel document will be open
Max -
SAVE Layout Option in ALV list Report
Hi Experts,
Is it possible to SAVE the layout option for Block ALV list Reports?
Thanks in Advance,
Sivak.Hi,
It is not possible to save layout in BLock ALV display but possible to change layout. There is no parameter to save. It is not possible to store the layout as it has several structure.
Thanks & Regards
Rocky -
Event getting trigger after hiding columns in alv report
Hi All,
I having requirement like after hiding columns,i have to control some of the hard coded data in report output. Is there any event to know what all are the columns are selected to hide?You can use FM REUSE_ALV_LIST_LAYOUT_INFO_GET to read the fieldcat again.
Look at the parameter it_event_exit on the ALV FM to now user has press on some of the Layout buttons.
In the fieldcatalog, look for
- no_out = 'X'. " column is not displayed but can be choosen when changing the layout
-tech = 'X'.
" column is neither displayed nor availabe in the layout -
Hiding Fields in ALV-Grid Display
Hi Experts,
Can anybody help me on the below logic?
I have 16 different transactions in GLPCT Table. Based on given Period(1 to 16 in Select Options), these transactions(HSL01, HSL02...HSL16) should get display. Other than entered Period, Fields should be Hidden inthe output.
Currently, I am populating all the Sixteen Fields.
I am finding difficulty in doing this.
Thanks
PraveenHello,
Based on the periods selected, you need to mark the redundant fields as "technical". Based on the ALV display technique this is what you've to do:
1. REUSE* FMs & GUI ALV Grid Class :
it_fieldcat-tech = 'X'.
2. SALV Class:
CL_SALV_COLUMN->SET_TECHNICAL(IF_SALV_C_BOOL_SAP=>TRUE).
Check the forums for further details.
BR,
Suhas -
Hi Everyone,
I need a radiobutton on each line item on the alv output to select that specific line item. When you go into VL06D and display items there is a select option available beside the delivery number.I am trying to achieve something like this.I am not sure how to do this. Can anyone help me in this.
Thanks
Kumar.@Avinash
if f_cat-seltext_m = 'Select'.
f_cat-col_pos = 1.
f_cat-seltext_l = 'EDIT'.
f_cat-Checkbox = 'X'.
f_cat-EDIT = 'X'.
endif.
I am already passing f_cat-checkbox = 'X'.
Thanks
Kumar. -
Hiding columns in ALV Grid output
Hi all,
Please find below my piece of code. I want to hide couple of columns in the grid output. Could you please tell me how to achieve it.
DATA: gr_alv TYPE REF TO cl_salv_table,
lr_display TYPE REF TO cl_salv_display_settings,
lr_columns TYPE REF TO cl_salv_columns_table,
lr_column TYPE REF TO cl_salv_column_table,
lr_functions TYPE REF TO cl_salv_functions_list,
lr_sorts TYPE REF TO cl_salv_sorts,
lr_print TYPE REF TO cl_salv_print,
lr_column_f TYPE REF TO cl_salv_columns,
gr_error TYPE REF TO cx_salv_not_found ,
lr_event TYPE REF TO cl_salv_events_table,
lr_handler TYPE REF TO znew_gc_event_handler,
lr_layout TYPE REF TO cl_salv_layout.
DATA: key TYPE salv_s_layout_key,
gr_msg TYPE string.
TRY.
* Create ALV instance - use CALL METHOD since this is a static method
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = gr_alv
CHANGING
t_table = lt_to_header.
lr_display = gr_alv->get_display_settings( ).
lr_display->set_list_header( text-ttl ).
* Get functions object and then set all the functions to be allowed
lr_functions = gr_alv->get_functions( ).
lr_functions->set_all( ).
DATA: lv_field TYPE lvc_fname.
* Get column settings object and then optimize the column widths to the
* data
lr_columns = gr_alv->get_columns( ).
lr_columns->set_optimize( ).
*--- set column header for custom field Todays Date
TRY.
lr_column ?= lr_columns->get_column( 'ZZDATE' ).
lr_column->set_output_length('12').
lr_column->set_long_text( 'Todays Date' ).
CATCH cx_salv_not_found INTO gr_error.
gr_msg = gr_error->get_text( ).
MESSAGE gr_msg TYPE 'I'.
ENDTRY.
*--- set column header for custom field Age of Open
TRY.
lr_column ?= lr_columns->get_column( 'ZZ_AGE_OF_OPEN' ).
lr_column->set_output_length('12').
lr_column->set_long_text( 'Age of Open' ).
CATCH cx_salv_not_found INTO gr_error.
gr_msg = gr_error->get_text( ).
MESSAGE gr_msg TYPE 'I'.
ENDTRY.
*--- set column header for custom field Age when Confirmed
TRY.
lr_column ?= lr_columns->get_column( 'ZZ_AGE_CONFIRMED' ).
lr_column->set_output_length('18').
lr_column->set_long_text( 'Age when Confirmed' ).
CATCH cx_salv_not_found INTO gr_error.
gr_msg = gr_error->get_text( ).
MESSAGE gr_msg TYPE 'I'.
ENDTRY.
lr_event = gr_alv->get_event( ).
CREATE OBJECT lr_handler.
SET HANDLER: lr_handler->on_double_click FOR lr_event.
*... Set Sort
lr_sorts = gr_alv->get_sorts( ).
* " Optimize the column widths for printing.
lr_print = gr_alv->get_print( ).
lr_print->set_print_parameters_enabled( value = 'X' ).
lr_print->set_column_optimization( value = 'X' ).
*--- This code is to get the layout,save the layout and display the
* layout
lr_layout = gr_alv->get_layout( ).
key-report = sy-repid.
lr_layout->set_key( key ).
lr_layout->set_save_restriction( cl_salv_layout=>restrict_none )
DATA: init_layout TYPE slis_vari.
init_layout = p_layout.
lr_layout->set_initial_layout( init_layout ).
*--- display report
gr_alv->display( ).
CATCH cx_salv_msg.
WRITE: 'Error displaying grid! - cx_salv_msg'.
CATCH cx_salv_not_found.
WRITE: 'Error displaying grid! - cx_salv_not_found'.
CATCH cx_salv_data_error.
WRITE: 'Error displaying grid! - cx_salv_data_error'.
CATCH cx_salv_existing.
WRITE: 'Error displaying grid! - cx_salv_existing'.
ENDTRY.
Thanks,
SalilHI
THIS IS THE LOGIC
SELECTION-SCREEN BEGIN OF BLOCK charly
WITH FRAME TITLE text-100.
PARAMETERS: rb_dis RADIOBUTTON GROUP rb DEFAULT 'X'
USER-COMMAND ucomm ,
rb_hid RADIOBUTTON GROUP rb .
P_DEL TYPE VBAK-VKGRP .
SELECTION-SCREEN END OF BLOCK charly.
*SELECTION sCREEN FOR PO TABLE
SELECTION-SCREEN BEGIN OF BLOCK b2
WITH FRAME TITLE v_text.
SELECT-OPTIONS : s_xblnr FOR zmshub-xblnr MODIF ID gr2,
s_bstkd FOR zmshub-bstkd MODIF ID gr2,
s_posex FOR zmshub-posex_e MODIF ID gr2,
s_kdmat FOR zmshub-kdmat MODIF ID gr2.
PARAMETERS : p_upload LIKE ibipparms-path LENGTH 90 MODIF ID gr3 ,
p_down LIKE ibipparms-path DEFAULT 'C:\output_log.txt'
MODIF ID gr3.
SELECTION-SCREEN END OF BLOCK b2.
*SELECTION sCREEN FOR DOWNLOADING
SELECTION-SCREEN BEGIN OF BLOCK b4
WITH FRAME TITLE text-105.
PARAMETERS :
rb_n_d_f RADIOBUTTON GROUP rb1 DEFAULT 'X' ,
rb_ftp RADIOBUTTON GROUP rb1 ,
p_f_n TYPE c LENGTH 25 DEFAULT 'FILE NAME .TXT',
rb_ws_d RADIOBUTTON GROUP rb1 ,
p_dw_f_n TYPE c LENGTH 25 DEFAULT 'C:
TEMP\FILE.TXT',
rb_op_ds RADIOBUTTON GROUP rb1 ,
p_log_p LIKE filename-pathintern DEFAULT 'ZHKWEB01',
p_pa_fn LIKE rlgrap-filename MODIF ID gr1
DEFAULT '//SOME-DIR/FILE.TXT',
rb_ob_dw RADIOBUTTON GROUP rb1,
p_file LIKE filename-pathintern "logical path
DEFAULT 'ZHKWEB01', "name
p_fname LIKE rlgrap-filename MODIF ID gr1 "path &
*filename
DEFAULT text-t02, "/some-dir/file.txt
p_f_name TYPE c LENGTH 25 DEFAULT
SOME-SERVERNAME\SOME-DIR\SOME-FILE.TXT'.
SELECTION-SCREEN END OF BLOCK b4.
AT SELECTION-SCREEN OUTPUT.
IF NOT rb_dis IS INITIAL.
LOOP AT SCREEN.
IF screen-group1 = 'GR3'.
screen-invisible = 1.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-group1 = 'GR2'.
screen-invisible = 0.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF. -
Problem with file download option in ALV via ITS. Please help!
Hi Experts,
I have a ALV report which I have web enabled using ITS service. In the ALV there is a delivered functionality for file download. It works fine when the report is run in the SE80. But when I run the ITS service for the report and choose file download option it displays a page saying "this page has been diaplayed due to technical reasons" with title "File properties". In addition it looks for Java runtime in the browser. After all this it opens a popup window for selecting path and file name.
This is not user friendly and many customers have rasied their concerns on it.
My question is that,
Q1: What is the need of this "File properties page"? Why ITS calls this while ABAP editor does not?
Q2: Is there any way we can suppress this so that it directly opens a popup window for selecting path and file name?
Please help me.
Thanks
GopalHello Klaus,
i have also the problem with these intermediate screens!
We have in between installed patch 22 for ITS 6.20 and SP18 at SAP Netweaver 2004!
But they are still not processed invisible for the users.
Are there any additional parameters, which controls this behaviour(~webgui_updown_make_visible is not used!)?
How can i check, if i have really a.ex. the actual ws.jar-file or other related files of the patch?
We are using the standalone ITS with an own (modified) IAC with an own CI-design for the webpages. The intermediate screens are displayed with the "normal" SAPGUI-design because of the parameter ~generatedynpro. Without this it does not work, because the template SAPLSIT_0100 is missing!
Or do you have an example for such a intermediate template with the applet for an upload of a file?
Thanks in advance
Felix -
Hiding Options in Context Menu for Specific Roles
Hi SDN,
We have navigation iview assigned to some of the users. There appears context menu and the items in it. We need to remove some of the options like copy, move for the specific users.
How to achieve this specific requirement of hiding few of the items in context menu of KM Folders and files for specific users or roles?
Thanks in advance
Regards,
Ganesh NHello!
In Portal KM, set Permissions on folders for this users (Group of users) - Read.
Other way - you can edit Ui Commands of Layoutset - which is used in iView,then create copy of iView (not delta link) and delete commands you don't want to show, then assigne iView to your specific role
Best regards, Ivan
Edited by: Ivan Kalahryu on Dec 16, 2008 10:05 AM -
Hi all,
I have create a select-options with 5 fields and alv and a button(get list) in webdynpro, i have to retrieve the values into alv from table through select-options by clicking on button.
and i have written a function module for select options. so based on input, the values are fetched from table in function module.
i am getting confused with the coding part, so can anybody tel me the coding part for alv by calling function module nd how to pass the values to function module(i,e select-option fields.)
( written code for select-options in wddoinit)
Thanks all in advanceHi VANI,
I hope you have declared the component usage for select option properly.
Now do as follows:-
1. Add 2 attributes in the tab 'Attribute' to implement select option for a particular field.
Like i want to implement select option in PO_NO ( EKPO-EBELN) & ITEM_NO( EKPO-EBELP).
Declare usage in properties in particular view:-
Declare attributes :- M_HANDLER_Report - Type ref to - IF_WD_SELECT_OPTIONS
M_WD_SELECT_OPTIONS_Report - Type ref to - IWCI_WDR_SELECT_OPTIONS
In WDDOINIT :-
create instantiate component usage from code wizard.
then set normal properties for display:-
WD_THIS->M_WD_SELECT_OPTIONS_REPORT = WD_THIS->WD_CPIFC_SELECT_OPTION_REPORT( ).
init the select screen
WD_THIS->M_HANDLER_REPORT = WD_THIS->M_WD_SELECT_OPTIONS_REPORT->INIT_SELECTION_SCREEN( ).
WD_THIS->M_HANDLER_REPORT->SET_GLOBAL_OPTIONS(
I_DISPLAY_BTN_CANCEL = ABAP_FALSE
I_DISPLAY_BTN_CHECK = ABAP_FALSE
I_DISPLAY_BTN_RESET = ABAP_FALSE
I_DISPLAY_BTN_EXECUTE = ABAP_FALSE ).
To assign a field in select option code like below:-
create a range table that consists of this new data element
LT_RANGE_TABLE = WD_THIS->M_HANDLER_REPORT->CREATE_RANGE_TABLE( I_TYPENAME = 'EBELN' ). " enter the data element of the field
add a . field to the selection
WD_THIS->M_HANDLER_REPORT->ADD_SELECTION_FIELD( I_ID = 'EBELN' "field name
IT_RESULT = LT_RANGE_TABLE I_READ_ONLY = READ_ONLY ).
to add more field proceed as above again with different field.
create a range table that consists of this new data element
LT_RANGE_TABLE = WD_THIS->M_HANDLER_REPORT->CREATE_RANGE_TABLE( I_TYPENAME = 'EBELP' ). " enter the data element of the field
add a . field to the selection
WD_THIS->M_HANDLER_REPORT->ADD_SELECTION_FIELD( I_ID = 'EBELP' "field name
IT_RESULT = LT_RANGE_TABLE I_READ_ONLY = READ_ONLY ).
Now in particular action by which you want to get values bind to your alv table:-
Declare variable and field symbol to hold values from selection
DATA: RT_PO_NO TYPE REF TO DATA.
DATA: RT_ITEM_NO TYPE REF TO DATA.
FIELD-SYMBOLS: <FS_PO_NO> TYPE TABLE,
<FS_ITEM_NO> TYPE TABLE,
Retrieve the data from the select option
RT_PO_NO = WD_THIS->M_HANDLER_REPORT->GET_RANGE_TABLE_OF_SEL_FIELD(
I_ID = 'EBELN' ).
Assign it to a field symbol
ASSIGN RT_PO_NO->* TO <FS_PO_NO>.
Retrieve the data from the select option
RT_ITEM_NO = WD_THIS->M_HANDLER_REPORT->GET_RANGE_TABLE_OF_SEL_FIELD(
I_ID = 'EBELP' ).
Now use select statement to get data from table
Select < field name > FROM < table name > INTO CORRESPONDING FIELDS OF TABLE < internal table to hold data > WHERE
PO_NO IN <FS_PO_NO> AND
ITEM_NO IN <FS_ITEM_NO> .
Regards,
Monishankar C -
Multiple Filtering options within ALV Output.
Hi All,
Being a Functional Guy,I would like to clarify few questions in ALV functionality. In one of our requirement we need to create a ALV report.
Step1 : Enter values in selection criteria.
Step2: Execute ALV report.
Step3: Within Output I should be able to filters for a particular column. For example: We have a column as Country.In the Column can I select or enter India,US,UK and output should only contain only US,UK,India.
Step4: Within output We have columns Country and State , can we enter values like Texas in State, US in country in the filter will the output will have only values with Texas & US.
Can you guys advice if Step 3 & step 4 is possible in ALV.
Thanks,
KitchaHi,
Yes, you can hae the filtering options for all the columns of the ALV..if you can see there is a stadnard filter functionality available
for ALV that comes by default..
When you show the output in alv these default filter is already avaibale..first try to test it out..
Just go through the ALV documetns..filter is already there..for your output you will get the result..
Regards,
Lekha.
Edited by: Lekha on Dec 10, 2009 10:28 AM
Maybe you are looking for
-
Reports developed in SSRS 2008 r2 cannot be uploaded to SSRS 2008
Reports developed in SSRS 2008 r2 cannot be uploaded to SSRS 2008 ERROR ON REPORT MANAGER: The report definition is not valid. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2010/01/re
-
Using Black ink instead of Photo Black ink
I have an HP Photosmart Premium 309a and would like to know what settings I need to change so that when printing a text document it uses the black ink instead of the photo black ink. OR What settings do I need to change so that my 309a uses black ink
-
Condition record not found for service net price
Hi Experts, I have seen other posts related to this topic but didnt solve my issue. Issue is: in one system when trying to create PO for requisition, it says please enter a price for service item since "condition record not found" (because package nu
-
My bookmark drop down menu disappeared next to the home button on firefox 4. When I right click customize, the bookmark drop down appears on menu bar, but when clicking done, it's gone again. I went into customize and removed it then put it back. Whe
-
Hi, Here are the steps to reproduce the problem with the examplesWebApp application bundled with wlserver6.0(sp2): Product: Weblogic server 6.0 (sp2) Browser: IE 5.0 1. Add index.jsp as the