Regarding ALV ToolBar
Hi ,
In ALV Report using OOPS i had used SET_TABLE_FOR_FIRST_DISPLAY Method .I had header part and list area.When I am using that method stanard PF-status(like sort,filter..) are coming default in the list area only.So my report is displayed like header part, list area(with buttons like sort,filter etc..).But i need those buttons in Application toolbar?
Regards,
Reddy
Edited by: pydi reddy on Dec 4, 2009 3:17 PM
Hi pawan,
That is not a method.Its a function Module.
Regards,
Reddy.
Similar Messages
-
hi,
I would like to know that how can I hide default application tool bar of ALV. Actually I need to hide filter and settings options of that tool bar.
thanks
kumar saurabhWelcom here in SCN!
Please make sure you have read the [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement].
This question is really a basic one. I believe you can find the answer yourself, but as you are new here I will give you some hints:
- for OO ALV you can just use parameter it_toolbar_exlcuding and append there any function code of toolbar option. You can find them all in cl_gui_alv_grid class's attributes, starting with mc_... i.e.
data: lt_exclude type ui_functions,
ls_exclude type ui_func.
ls_exclude = cl_gui_alv_grid=>mc_fc_filter. "turn off the filter option
append ls_exclude to lt_exclude.
call method t_grid->set_table_for_first_display
it_toolbar_excluding = lt_exclude "now just pass all the function which have to be hiden
- for classic ALV you use the following
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_pf_status_set = 'PF_STATUS_SET' "give cutom subroutine name
FORM pf_status_set USING it_extab TYPE slis_t_extab.
data : wa_extab type slis_extab.
wa_extab-fcode = '&LFO'. "give function code to excude specific option
append wa_extab to it_extab.
"now set the status excluding the toolbar option
SET PF-STATUS 'STANDARD' excluding it_extab .
ENDFORM.
Regards
Marcin -
Regarding caption/label on ALV toolbar
Hi All,
I wanted to provide some text on ALV toolbar. I'm on latest Netweaver version.
I can find the CL_SALV_WD_FE_A_CAPTION abstract class but not CL_SALV_WD_FE_CAPTION(something like thing) where
I can see it for button,Inout field etc.....
Is there any way to provide some label or text on ALV toolbar.... i have searched but could find none.
Regards,
Lekha.
Regards,
Lekha.Lekha - If you want to write something in the header, let's say a random caption you can do as follow:
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
DATA l_value TYPE REF TO cl_salv_wd_config_table.
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
l_value = lo_interfacecontroller->get_model( ).
lr_header = l_value->if_salv_wd_table_settings~create_header( ).
lr_header->set_text( 'Table for Lekha' ).
and if you want to add a field in the toolbar....
DATA lr_custom_functions TYPE REF TO if_salv_wd_function_settings.
DATA lr_functions TYPE REF TO if_salv_wd_std_functions.
DATA lv_text TYPE string.
DATA lr_button TYPE REF TO cl_salv_wd_fe_button.
DATA lr_function TYPE REF TO cl_salv_wd_function.
lr_custom_functions ?= l_value.
lr_function = lr_custom_functions->create_function_right( 'EDIT' ).
lr_function->set_position( '1' ).
CREATE OBJECT lr_button.
lv_text = ' Edit '.
lr_button->set_text( lv_text ).
lv_text = 'Edit form'.
lr_button->set_tooltip( lv_text ).
lr_function->set_editor( lr_button ).
Regards!
Jason P-V -
Hi,
When using FM 'REUSE_ALV_GRID_DISPLAY'
Exporting Parameters : I_CALLBACK_PF_STATUS_SET
in SET PF Status Creating additional Buttons.
In ALV Report output addition additional buttons are coming
but Standard ALV Toolbar are missing like Sort Assending ,Descending,Total,Subtotal,
Layouts.
Please give any Suggestions for Standard toolbar as well as additional buttons to display
by using FM 'REUSE_ALV_GRID_DISPLAY'.
Thanks,
ManishHi,
Check this subroutine in example program :
BCALV_TEST_FULLSCREEN_CALLS
form f01_event_pf_status_set using rt_extab type slis_t_extab.
set pf-status 'STANDARD_FULLSCREEN' excluding rt_extab.
endform. " f01_event_pf_status_set
regards,
Advait -
Hi all,
I have developed an ALV Grid with a button SAVE.
The list that is displayed in ALV will be saved to ZTABLE when user clicks the SAVE button.
My requirement is after that , I need to add a DISPLAY to the same ALV GRID TOOLBAR.
How can I do it? do I have to CALL METHOD g_grid->set_table_for_first_display again?
Thanks
MHHello
The sample report for dealing with ALV toolbar buttons is BCALV_GRID_05.
I assume that as long as your ALV grid is editable the user should see the SAVE button. As soon as the user has saved the data the grid changes to Display-only (non-editable) and the DISPLAY button should appear.
If so then you can use method go_grid->IS_READY_FOR_INPUT( ) within the event handler method handle_toolbar.
The sample report explaining this method is BCALV_EDIT_01.
Regards
Uwe
PS: There is no need to call go_grid->set_table_for_first_display again, simply use go_grid->refresh_table_display. -
Add a button choice on alv toolbar in wda
Hello Experts,
I want add a button choice on alv toolbar. I already insert the choice button indeed I see the button correctly.
Now I want insert the list of action with the following code:
<<
>>
With this code my web-interface retuns this message: "500 SAO INTERNAL SERVER ERROR. ERROR ACCESS via null object reference not possible. (termination rabax_state)". The dump is in "cl_wdr_utilities=>construct_mime_url".
Do you have any ideas? Do you have any examples?
Thanks in advance.
Best Regards,
MarinoHello,
the problem isn't "the line set_image_source". The problem was the order, the correct order is:
<<
CREATE OBJECT lr_button_choice.
lr_button_choice->set_image_source( 'ICON_CHANGE' ). "#EC *
lr_button_choice->set_text( value = 'Modifica' ).
lr_button_choice->set_tooltip( value = 'Modifica Attributi').
CREATE OBJECT lr_menu_action_item
EXPORTING
id = 'MOD_NOTE'." TYPE REF TO cl_salv_wd_menu_action_item.
lr_menu_action_item->set_text( 'Note').
lr_button_choice->add_choice( EXPORTING value = lr_menu_action_item ).
CREATE OBJECT lr_menu_action_item
EXPORTING
id = 'MOD_CONTO'." TYPE REF TO cl_salv_wd_menu_action_item.
lr_menu_action_item->set_text( 'Conto').
lr_button_choice->add_choice( EXPORTING value = lr_menu_action_item ).
lr_function = wd_this->salv_incassi->if_salv_wd_function_settings~create_function( id = 'MOD')."creating the function for alv button
lr_function->set_editor( lr_button_choice ).
>>
Thanks very much.
Best Regards,
Marino -
Make self defined function on ALV toolbar invisible
Hello Experts,
I have defined a self defined function dropdown on standard ALV toolbar on the Lead select event and defined the function too.
But I want at some condition the dropdown should disappear. How can I set the drop down on the ALV toolbar to invisible.
Please suggest.
Thanks and Best Regards,
SahilWhile defining the drop down, just bind the visible property to a context node attribute of type WDUI_VISIBILITY and set it based on your requirement.
Manas Dua -
Hi SDNers,
I would like to capture the ucomm when user clicks on print button which is on ALV grid toolbar(used classes to display alv).
I can able to capture user defined button on alv tool bar, along with user defined, standard button are there. I need to read user command text when user clicked on print button on the alv toolbar.
Kindly let me know which class and wher i need to use the same to read the print button.
Thanks in advance,
Regards,
Sridharhii
Thanks for the reply yes i already seen that which does'nt match my requirement.Can you tell me anyother class.
regards,
Sri. -
Adding a Pushbutton on ALV toolbar
Hi ,
I wanna add a pushbutton to my ALV report toolbar, I have tried by screen painter(se51) but its not working. That is when you open the screen painter its showing the push button, but when you run the screen as transaction its not showing that button.
Any help is greatly appreciated.
Regards
Moderator Message: Please search before posting your question. Thread locked.
Edited by: Suhas Saha on Oct 18, 2011 3:40 PMHi Harsh,
To add button in the ALV toolbar, follow the below steps :
1. Open Functional group SALV in se80 and copy the GUI status 'STANDARD' in customer namespace ( for e.g. ZSTANDARD' to your ALV report program.
2. Once you copy the GUI status, open your ALV report program in se80 and modify it's GUI status 'ZSTANDARD' according to your requirement.
3. Code accordingly in your ALV report program.
Here is the below code for your reference.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
i_callback_pf_status_set = alv_status_set
i_callback_user_command = *alv_user_comm*
i_grid_title = grid_title
i_save = g_save
is_variant = gs_variant
is_layout = alv_layout
it_fieldcat = alv_fieldcat[]
it_events = gt_events[]
it_sort = alv_sort[]
IMPORTING
e_exit_caused_by_caller = g_exit_caused_by_caller
es_exit_caused_by_user = gs_exit_caused_by_user
TABLES
t_outtab = it_final[].
PERFORM *alv_user_comm* USING r_ucomm
rs_selfield.
FORM *alv_user_comm* USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
r_ucomm = sy-ucomm.
CASE r_ucomm.
ENDCASE.
ENDFORM.
Let us know if you still having some issues.
Cheers
VJ -
Create Input Field within ALV Toolbar
Hi,
I've created an ALV table using the CL_SALV_TABLE class. I'm now trying to include an input field within the ALV toolbar. I would also require this field to do an F4 to obtain its values. Can anyone help me?
Thanks and regards,
Adeline.Hi Adeline,
as Rich explained: Not inside ALV toolbar. If you do not use full screen display but have a screen container for this, you may define a subscreen area on top of ALV container. Use CALL SUBSCREEN <area> INCLUDING <prog> <dynp> syntax to process the subscreen. Define PROCESS ON VALUE-REQUEST for F4. In PAI (PROCESS AFTER INPUT) you can modify the table displayed in the grid and do a new display.
Regards,
Clemens -
ALV-Toolbar : Control the &LOCAL& Buttons
Hi, all
I have the following problem with ALV-Toolbar.
If I use editable ALV-Grid Control, I get in the toolbar new buttons such as DELETE_ROW or UNDO. This buttons dont trigger any events of the class CL_GUI_ALV_GRID.
If I look at Function Code of such buttons in the Table mt_toolbar they are quiet similar. All of them have &LOCAL& .
How could I control this buttons with my program .
Many thanks for your help
Vladimir GolovtchinerHello Anand,
Thank you for your answers.
I thought that these buttons are belonged to Front-End.
I hope that ALV-Grid is an OCX. Or not? If it is an OCX-Object, is it possible to communicate with it?
I have no any idea now, how to solve that, but I could explain to you why I need to handle these buttons.
I use an editable Grid of CL_GUI_ALV_GRID. For the last two columns I use Drag and Drop to move data from the pre-last column to the last column. It work properly until the following situation:
For example I have two rows in a Grid. I place the cursor to the last row and press the button COPY_ROW two times ( I have 4 rows in a Grid now). Immediately after that I try to do Drag&Drop at the last row (4th) from the Grid. As I drop the cursor on the last cell of the last row I get always the result in the last cell of the 2nd row ( the last row before I insert two rows).
It doesnt matter how many rows I had or how many rows I inserted to the Grid. It happens also in the middle of the Grid not only at the end.
After the first Drag&Drop it begins to work properly.
I debugged the handler of Drag&Drop and I saw that the Drag&Drop object has in the structure E_ROW each time the number of the last row before insertion. I forced the update of backend in the handle of on Drag event with CHECK_CHANGED_DATA before I create the Drag&Drop object and passed the Drag&Drop handle to the internal table. It didnt work.
That is why I thought that I should do this update after each insertion or deletion with these buttons.
In other words I dont want to change the functionality of these buttons I want to add something before.
Best regards
Vladimir Golovtchiner -
Checkbox problem in ALV toolbar
Hello all,
I hv added a checkbox in my alv toolbar using classes.
i.e. MOVE 'NO_DEFECTS' TO ls_toolbar-function.
MOVE 'No Defects' TO ls_toolbar-quickinfo.
MOVE 'No Defects' TO ls_toolbar-text.
MOVE 5 TO ls_toolbar-butn_type.
MOVE ' ' TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
Alv is displaying in one subscreen.
My problem is my checkbox is displaying as a button instead of a check box and also i want to know how can i check whether my checkbox is active or not.
I want to disable some buttons in the alv toolbar based on this checkbox.
Thanks in advance.
regards,
LokeshHi,
To disable the buttons in the toolbar, In the ALV events exclude the fcodes of the buttons you want to disable and pass it to the
to the program like the below statement
set pf-status 'STDPOPBX_FULLSCREEN' excluding lt_extab
of program 'SAPLKKBL'.
To use the check box pass the ls_toolbar-ICON as ICON_WD_CHECK_BOX.
Regards,
Kranthi -
ADD_CHOICE to standard BUTTON_CHOICE in ALV Toolbar
Hello Experts,
I want to add additional choice to a standard Button_Choice in the ALV Toolbar.
I was able to get reference of the standard function (of type cl_salv_wd_function_std). However, to solve my purpose I would need the reference of the UI Element Button_Choice (perhaps of type CL_SALV_WD_FE_A_BUTTON_CHOICE) so that I can ADD_CHOICE.
Thanks and best regards,
AbirHi Abir,
For button choice help please refer this..
About cl_salv_wd_fe_button_choice........
Re: Help on Button Choice of alv tool bar
Cheers..
Kris.
Edited by: kissnas on Feb 23, 2011 2:03 PM -
How to code in the standard refresh button in ALV toolbar
Hi Experts,
My ALV includes some standard toolbar buttons like refresh, select all, sort, and etc. How can I put logic into the refresh button such that when user click on the refresh button, I want to run some logic on my own?
THanks in advance.Hi again,
1. Further to my previous reply
2. This code will make it clear.
3. just copy paste
a. Before that, copy the SALV Standard Toolbar to ABCD as suggested before.
<b>Important & Relevant code has been marked in bold.</b>
4.
report abc.
type-pools : slis.
Data
data : itab like t001 occurs 0 with header line.
DATA : fc type SLIS_T_FIELDCAT_ALV.
Logic
select * from t001 into table itab.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = sy-repid
I_INTERNAL_TABNAME = 'ITAB'
I_INCLNAME = SY-REPID
CHANGING
CT_FIELDCAT = fc
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
Display
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
<b> I_CALLBACK_PF_STATUS_SET = 'MYSTATUS '</b>
<b> I_CALLBACK_USER_COMMAND = 'MYFORM'</b> IT_FIELDCAT = FC
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
<b>
IMPORTANT
This sets the PF Status on ALV Screen
And not Selection screen
FORM MYSTATUS USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ABCD'.
ENDFORM. "MYSTATUS
IMPORTANT
When Fcode is pressed on ALV Toolbar
FORM MYFORM USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
IF R_UCOMM = 'ZREFRESH'.
*----CODE
ENDIF.
ENDFORM. "MYFORM</b>
regards,
amit m. -
Adding an EXIT button in ALV toolbar
Hi,
i want to add an exit button in my ALV toolbar wherein it should exit the browser or the URL which displays the output. Plzz help me on this.
Thanks.Hi,
the following code may help you:
DATA:
l_ref_cmp_usage TYPE REF TO if_wd_component_usage,
l_interface TYPE REF TO iwci_salv_wd_table,
lr_table TYPE REF TO cl_salv_wd_config_table.
create alv component
l_ref_cmp_usage = wd_this->wd_cpuse_<name_of_alv_comp>( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
get config models
l_interface = wd_this->wd_cpifc_alv_activities_prdstd( ).
lr_table = l_interface->get_model( ).
create the toolbar button
DATA:
lr_functions TYPE REF TO if_salv_wd_function_settings,
lr_function TYPE REF TO cl_salv_wd_function,
lr_fe_button TYPE REF TO cl_salv_wd_fe_button.
lr_functions ?= lr_table.
lr_function = lr_functions->create_function( 'MYBUTTON' ).
CREATE OBJECT lr_fe_button.
lr_fe_button->set_text( 'MyButton' ).
lr_function->set_editor( lr_fe_button ).
After that add an event handler for the ON_FUNCTION event of the alv. In this method you can do whatever you want.
Kind Regards,
Anika
Maybe you are looking for
-
Copying KDE setting from one computer to another
I would like to copy my application and KDE settings to another computer (both running Arch with the same software and hardware). I am not sure what to do with ~/.config, ~/.local, and ~/.kde4 since they have subdirectories with names that match my t
-
Dear experts, I am quite a newbie when it comes to understanding the Mac filing system, as I originally came from the PC world. There's lots of things I dont understand in the iMac file viewer and how to organise and backup my photos is an importan
-
hi everyone. there is change in the tax procedure. see some vendor will give the discounts after basic+ excise duty. than discount than vat/ cst will come. how this should be configured in tax procedure. i have changed in the pricing procedure. it is
-
Is Custom print package "rotate to fit" still not implemented?
On Dec 2, Al-R started a discussion thead for LR3 beta about a problem he was having with rotating an image to fit a frame he created using the Custom Print Package. He couldn't get the image to rotate to fit. I get the sense that the "rotate to fit"
-
Using CMAppUtil file size is smaller when converted
I'm new to using technet forums so if my question is in the wrong place I apologize. I've just started using SCCM for Mac deployments and have a question regarding the file size after conversions using CMAppUtil. I've used CMAppUtil on a couple of .