Reuse alv grid filter & sellect all handle
Hi all,
In REUSE_ALV_GRID_DISPLY FM after output
i have a collum check boxes. Now i used select all option then it select all records & check boxes in internaltable.
but i have when i filter some records then i apply select all in alv it not select perticular records when i filterd i
it select all records in internal table.
how to handle this one.
my requirement is.
when i filter records in alv FM then i am apply select all option, it select only those front displya records only selcted.
not all records in internal table.
Thank u,
Vijay.G
hello,
write code at user command for select all button - pass 'X to all check box filed
AND
refresh the alv list / gird through...function moudle
Thanks
Similar Messages
-
Filter option is not working in Reuse alv grid
Hi all,
Filter option is not working in alv grid properly.
if i choose one particular field for filter option .it is working .but another field it is not working though it contains different values.please give the answer.whether i have to pass filter option throuogh reuse_alv _grid or not.thanks in advance
rajHi raja,
1. The search/filter is
CASE SENSITIVE
2. U can give *
to search for pattern.
(IN THAT CASE, it is NOT Case Sensitive)
regards,
amit m. -
Remove toolbar from Reused alv grid
How can i remove the toolbar and all the functions from the re-used alv grid ?
regardsHi,
I hope this is what you are looking for:
**make sure you create a component and get the model first
contol ALV table
data: lr_alv_usage TYPE REF TO if_wd_component_usage,
lr_if_controller TYPE REF TO iwci_salv_wd_table,
lr_config TYPE REF TO cl_salv_wd_config_table,
lr_filter TYPE REF TO if_salv_wd_std_functions.
lr_filter ?= lo_value.
set read only mode to false (and display edit toolbar)
data: lr_table_settings type ref to if_salv_wd_table_settings.
lr_table_settings ?= lo_value.
lr_table_settings->set_read_only( abap_false ).
disable insert, delete and append from the ALV toolbar
lo_value->if_salv_wd_std_functions~set_edit_append_row_allowed( abap_false ).
lo_value->if_salv_wd_std_functions~set_edit_insert_row_allowed( abap_false ).
lo_value->if_salv_wd_std_functions~set_edit_delete_row_allowed( abap_false ).
lo_value->if_salv_wd_std_functions~SET_EDIT_CHECK_AVAILABLE( abap_false ).
" Specify the setting for using ALV filter
lr_filter->set_filter_complex_allowed( value = abap_true ).
DATA: lr_table_settings TYPE REF TO if_salv_wd_table_settings.
lr_table_settings ?= lo_value.
lr_table_settings->set_enabled( abap_true ).
lr_table_settings->set_row_selectable( abap_true ).
lr_table_settings->set_design( cl_wd_table=>e_design-alternating ).
lr_table_settings->set_top_of_list_visible( abap_false ).
lr_filter->set_sort_headerclick_allowed( abap_true ).
lr_filter->aset_filter_filterline_allowed( abap_true ).
lr_filter->set_sort_complex_allowed( abap_true ).
lr_filter->set_view_list_allowed( abap_false ).
lr_filter->set_pdf_allowed( abap_true ).
Regards,
Abdul -
Web Dynpro ALV grid filter on date
Hi,
I want to set a "view" on my web dynpro alv grid that uses the current date. Is there a way to specify the current date in the filter values? Thanks,
SamirThanks Thomas. I will certainly look into using POWL in the future.
A related question - Its possible to use a filter by entering something like " .01. " but it doesnt seem to allow me to save that value as its not a date. Is there any way around this? Thanks -
Hi,
i tried to send a filter options to alv grid with 'it_filter' but it didn't work.
can somebody help me pls?
Thanks,
my code is
data:
gt_filter TYPE LVC_T_FILT ,
gs_filter TYPE LVC_s_FILT .
gs_filter-fieldname = 'VBELN' .
gs_filter-sign = 'E' .
gs_filter-option = 'BT' .
gs_filter-low = '0000000001' .
gs_filter-high = '0000000003' .
APPEND gs_filter TO gt_filter .
call method gr_alvgrid->set_table_for_first_display
exporting
is_variant = variante
i_save = 'X'
i_default = 'X'
is_layout = gs_layout
* it_toolbar_excluding = lt_excl_func
changing
it_outtab = table
it_fieldcatalog = fcat
IT_FILTER = gt_filter[]from your code i can see one thing the layout variant(default one) may be overriding the filter settings. do you have any Default variant ..? try to comment that i_default = 'X'
call method gr_alvgrid->set_table_for_first_display
exporting
" is_variant = variante "remove these three
" i_save = 'X'
" i_default = 'X'
is_layout = gs_layout
* it_toolbar_excluding = lt_excl_func
changing
it_outtab = table
it_fieldcatalog = fcat
IT_FILTER = gt_filter[] -
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. -
ALV Grid Filter it_filter
Hi Experts.
Filter is not working. Giving DUMP "Unable to interpret '*' as number".
I am trying not to show 0.00 values in ALV for field 'OPEN_BAL'.
My code
ls_filter-fieldname = 'OPEN_BAL'. " *Is a Currency Field of TYPE umxxs*
ls_filter-tabname = 'GT_AR_FINAL_TABLE'.
ls_filter-sign0 = 'I'.
ls_filter-optio = 'NE'.
ls_filter-valuf_int = '0'.
APPEND ls_filter TO lt_filter.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = ls_struct_layout
it_fieldcat = gt_fieldcat[]
i_save = 'A'
it_events = gt_events
it_filter = lt_filter[]
TABLES
t_outtab = gt_ar_final_table
EXCEPTIONS
program_error = 1
OTHERS = 2.
Not sure why. When i debug the DUMP i can see I and NE in the selopt table but then low value has * init.....Not sure why.
Any Ideas.
Regards,
Sharat Chandra.Hello Marcin Pciak,
ls_filter-valuf = '0.00'.
ls_filter-valuf_int = '0'. " *No luck here Still giving me DUMP*
What select options name do u want?
GT_AR_FINAL_TABLE has two charactor field and 6currency field.
i need that if first currency field is 0.00 then don't show that row at all.
Regards
Sharat, -
Hi all,
I have a problem when filtering data in alv (I use REUSE_ALV_GRID_DISPLAY FM). The problem is that data is truncated in the matchcode of the filter.
I've seen several threads talking about this, but was not able to find the right solution for me... a lot of notes, and I think I shouldn't have to install all of them.. should I?
I followed this thread
ALV filter problem
but do not know the note installed by the asker in the end...
Could anybody help me?
Best RegardsHi,
Please apply OSS note 898852.
Regards,
Bharadwaj -
Alv grid filter problem with oops display
HI experts ,
i am using o_alv->set_table_for_first_display
for displaying the data in the grid ,
i have a problem in filter for fields, when i am selecting any field for filtering , then size of that field becomes less then the orignal size , even search help on that field is shoun only 4 characters of dat fields.
ex: Bulding (field in alv) is a 9 character field but in filter when we select f4 help then it shows only first four characters, plz tell me the solution.Hi Rahul
Try using output length in field catalogue for those fields. It may solve ur problem.
Venkat -
Hi,
I am doing an ALV report using REUSE_ALV_GRID_DISPLAY . This is my requirement
If user press F4 in field in WERKS then i need to get values from table T001W and also from my custom table YT001W and display, so user can select from the f4 list.
How to do this.
Your help is appreciated
Sa_RDATA : alvgrid TYPE REF TO cl_gui_alv_grid,
custom_container TYPE REF TO cl_gui_custom_container,
fieldcatalog TYPE lvc_t_fcat.
table to contain fields that require f4...............................
DATA : lt_f4 TYPE lvc_t_f4 WITH HEADER LINE.
ok_code declaration...................................................
DATA : ok_code TYPE sy-ucomm.
Tables declaration....................................................
TABLES : zaemp.
Types declaration.....................................................
TYPES : BEGIN OF ty_emp,
code LIKE zaemp-code,
designation LIKE zaemp-designation,
END OF ty_emp.
Internal table declaration............................................
DATA : i_emp TYPE TABLE OF ty_emp.
Workarea declaration..................................................
DATA : wa_emp TYPE ty_emp.
Selection screen parameters...........................................
SELECT-OPTIONS : s_code FOR zaemp-code.
CLASS lcl_event_handler DEFINITION
CLASS lcl_event_handler DEFINITION.
PUBLIC SECTION.
METHODS :
handle_on_f1 FOR EVENT onf1 OF cl_gui_alv_grid
IMPORTING e_fieldname es_row_no er_event_data,
handle_on_f4 for event onf4 of cl_gui_alv_grid
importing e_fieldname es_row_no er_event_data
ENDCLASS.
CLASS lcl_event_handler IMPLEMENTATION
CLASS lcl_event_handler IMPLEMENTATION.
METHOD handle_on_f1.
custom f1 help for code field.......................................
IF e_fieldname = 'code'.
CALL SCREEN 3001.
ENDIF.
to prevent processing of standard f1 help............................
er_event_data->m_event_handled = 'X'.
ENDMETHOD.
Method handle_on_f4.
standard f4 help will be invoked......................................
endmethod.
ENDCLASS.
start of selection....................................................
START-OF-SELECTION.
SELECT code designation FROM zaemp
INTO CORRESPONDING FIELDS OF TABLE i_emp
WHERE code IN s_code.
CALL SCREEN 3000.
*& Module STATUS_3000 OUTPUT
text
MODULE status_3000 OUTPUT.
SET PF-STATUS 'ZTOOL'.
SET TITLEBAR 'ZTITLE'.
IF alvgrid IS INITIAL.
CREATE OBJECT custom_container
EXPORTING
container_name = 'ZCONTAINER'.
CREATE OBJECT alvgrid
EXPORTING
i_parent = custom_container.
PERFORM prepare_f4.
CALL METHOD alvgrid->register_f4_for_fields
EXPORTING
it_f4 = lt_f4[]
creating instance for event handler..................................
DATA : event_handler TYPE REF TO lcl_event_handler.
CREATE OBJECT event_handler.
SET HANDLER event_handler->handle_on_f1 FOR alvgrid.
SET HANDLER event_handler->handle_on_f4 FOR alvgrid.
preparing field catalog..............................................
PERFORM prepare_fieldcatalog CHANGING fieldcatalog.
CALL METHOD alvgrid->set_table_for_first_display
EXPORTING
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
IS_LAYOUT =
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
it_outtab = i_emp
it_fieldcatalog = fieldcatalog
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDMODULE. " STATUS_3000 OUTPUT
preparing field catalog...............................................
FORM prepare_fieldcatalog CHANGING i_fieldcatalog TYPE lvc_t_fcat.
DATA : ls_fcat TYPE lvc_s_fcat.
ls_fcat-fieldname = 'code'.
ls_fcat-ref_table = 'zaemp'.
ls_fcat-coltext = 'EMPLOYEE ID'.
APPEND ls_fcat TO i_fieldcatalog.
CLEAR ls_fcat.
ls_fcat-fieldname = 'designation'.
ls_fcat-ref_table = 'zaemp'.
ls_fcat-coltext = 'EMPLOYEE NAME'.
APPEND ls_fcat TO i_fieldcatalog.
ENDFORM.
*& Module USER_COMMAND_3000 INPUT
text
MODULE user_command_3000 INPUT.
CASE ok_code.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_3000 INPUT
*& Module USER_COMMAND_3001 INPUT
text
MODULE user_command_3001 INPUT.
CASE ok_code.
WHEN 'SAVE'.
LEAVE TO SCREEN 0.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_3001 INPUT
*& Module STATUS_3001 OUTPUT
text
MODULE status_3001 OUTPUT.
SET PF-STATUS 'GUI'.
SET TITLEBAR 'TITLE'.
ENDMODULE. " STATUS_3001 OUTPUT
preparing fields to be registered for f4 help.........................
FORM prepare_f4.
lt_f4-fieldname = 'designation'.
lt_f4-register = 'X'.
lt_f4-getbefore = 'X'.
lt_f4-chngeafter = 'X'.
APPEND lt_f4.
ENDFORM.
Hi
For creating the F4 Help see the sample code and do accordingly
See the following ex:
TYPES: BEGIN OF TY_MBLNR,
MBLNR LIKE MKPF-MBLNR,
END OF TY_MBLNR.
DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.
data: it_ret like ddshretval occurs 0 with header line.
At selection-screen on value-request for s_mat-low.
Select MBLNR from mkpf into table it_mblnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'MBLNR'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_MBLNR
FIELD_TAB =
RETURN_TAB = IT_RET
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF SY-SUBRC = 0.
read table it_ret index 1.
move it_ret-fieldval to S_mat-low.
ENDIF.
Go through the test program.
REPORT Ztest_HELP .
TABLES : MARA.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_MATNR(10) TYPE C.
SELECTION-SCREEN END OF BLOCK B1.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR TYPE MATNR,
END OF ITAB.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
SELECT MATNR
FROM MARA
INTO TABLE ITAB
UP TO 10 ROWS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MATERIAL NUMBER'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_MATNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
F4 help -- on editable alv field.
The specified item was not found.
Message was edited by:
Karthikeyan Pandurangan -
XML download of REUSE ALV Grid's Output
Hi,
I have a ALV Report from which I can download the report into a XML file.
I need the XML download to happen automatically along with the report display.
Please suggest how I can do this.
Thanks,
Suryakiran D.HI,
try these function modules.
LIST_DOWNLOAD
LIST_DOWNLOAD_HTML
Regards,
HRA -
Hi SDN,
I have a ALV grid with columns U1 and U2. I want to filter the records only when U1 = X <b>AND</b> U2 = X . But I need all other combinations of U1 and U2.
Is it possible to make <b>AND</b> operator work in ALV grid filter? If so please let me know. If this functionality is not available directly how to achieve it.
Points will be asigned
thanksHi,
ls_filter-fieldname = 'U1'.
ls_filter-low = 'X'.
ls_filter-high = space.
ls_filter-option = 'EQ'.
ls_filter-sign = 'I'.
append ls_filter to lt_filter.
ls_filter-fieldname = 'U2'.
ls_filter-low = 'X'.
ls_filter-high = space.
ls_filter-option = 'EQ'.
ls_filter-sign = 'I'.
append ls_filter to lt_filter.
call method grid2->set_table_for_first_display
exporting
i_default = gc_enable_set_default
i_save = gc_var_maint_user_specific
is_variant = gs_variant_item
is_print = gs_print
is_layout = gs_layout_item
it_toolbar_excluding = gt_toolbar_excluding
changing
it_fieldcatalog = gt_fieldcat_lvc_item[]
it_outtab = gt_outtab_item[]
it_filter = lt_filter[].
a® -
Web Dynpro ALV grid navigation problems when entry is selected
Hi,
We have implemented support packs 19 and 20 and following this, we are having the following side effect :
When you click on an entry within an alv grid, it does not navigate to the next screen. It worked fine before the service packs, please advise if you have any suggestions as to how we can get it to work again!? Thanks in advance.
When I click, the debug does not event go to the ON_LEAD_SELECT event.
Edited by: James Wilson on Dec 10, 2009 3:52 PMHi Samir,
I think possibly you have other code which is relying on a lead selection being set in the context that you have provided to the ALV grid?
And it is that code that is falling over?
In this case I think you need to handle in that other code the possibility that the user/ALV grid will unselect all entries in the table.
Or am I misunderstanding your issue? Please do let us know,
Thanks,
Chris -
Displaying the field symbol result in ALV GRID
hi.
I have a requirement to display the field symbol in ALV GRID. I am getting a error 'FIELD SYMBOL NOT YET BEEN ASSIGNED' when i am calling the 'REUSE ALV GRID DISPLAY'. Can any one help me out..I have a requirement that i have to display all the GL indicators as a field.
For that i have created a dynamic internal table so that based upon the GL indicators available in the database table i can create a dynamic internal table with GL indicators as the fieldnames.
Now i want to populate the corresponding amount with respect to the GL indicators in the dynamic internal table.
For ex.
I have a database table as follows:
Vendor Id GL indicators Amount
1000 A 2000
1000 S 3000
I have to created a field symbol as follows
Vendor Id A S
1000 2000 3000.
Now my requirement is that i want this values to be displayed in ALV GRID.
At the point of calling REUSE ALV GRID DISPLAY i am getting the error field symbol is not yet been assigned.. -
Call Reuse ALV Twice - Is it possible?
Hi,
I have a requirement wherein I need to develop two alv display with header. The 2nd alv display will be issued once the user clicks a custom button from the 1st alv display. However, I the display in the 2nd alv is from the 1st alv display. I have checked the field catalog and internal table in the 2nd reuse alv grid. But I cant seem to figure what is wrong, do I need to use some function module to refresh the output? Any input is welcome.
Thanks & Regards,
MawiHi,
Step 1>First create a PF-STATUS<for the custom button that you have to click>
Step 2>Call that PF-STATUS from your first REUSE_ALV_GRID_DISPLAY in the following way:-
set the parameter like this way
i_callback_pf_status_set = 'PF_STATUS_SET'
Now create a subroutine for that
FORM pf_status_set USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZSTANDARD' OF PROGRAM 'ZSAR_ASSGN1_GRIDALV'.
ENDFORM. "pf_status_set
Step 3>Set another parameter
i_callback_user_command = 'USER_COMMAND'
Now for that also create a subroutine like this:-
FORM user_command USING I_r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
<here you put all the subroutine necessary to create the second ALV>
EndForm.
Hope in this way you get your solution.
Regards.
Sarbajit.
Maybe you are looking for
-
Problem with SATA hard discs and MSI motherboards (could it be the SATA cable)
I have two systems with a Seagate Barracuda 7200.10 ST3250620AS 250GB Serial ATA (3.0Gb/s) hard disk. One system has a P965 Neo and the other has a PN6 SLI motherboard. I am having issues in that the OS seems to install properly but after a few days
-
I have looked at the previous answers for deleting a custom template previously posted, but when I go to the Library, etc. when I get to iWork09 the only options after that are content (which contains only "fills") and Frameworks (which contains lots
-
Importing NEF files from a Nikon D600
SO, I upgraded to LR 4.4 for its D600 support but still get "the files are not recognized by the raw format support in Lightroom" message. What gives?
-
Skype won't sign in, leaves infinite loading scree...
About an hour or so ago, I had logged off skype and went to go do something. After coming back and attempting to sign in, I can no longer sign in and I just get a spinning circle that won't do anything saying "signing in". I have checked my Firewall
-
Wie bekomme ich eine Lesebestätigung / Empfangsbestätigung in Mac Book Mail
Ich suche eine Lesebestätigung oder Empfangsbestätigung in Mail. Finde aber nichts. Auch in den Foren sagt man nur es gibt wohl nichts. Gibt es nun etwas mit der neuen Software??