Save button in ALV
Hi all!!
I've an ALV and i want to call a perform when it clicks on Save button, but I have a problem.
If I set this:
gt_layout-edit = 'X'.
It can modify the info, and it can't be possible...
But if i dont set it with 'X', the save button is disable...
How can i do this??
I think i should to modify a status with my own button...
Using the Fieldcatalog edit option you can do that.
x_fieldcat-edit = 'X'.
This too will activate the Save button.
Similar Messages
-
The data is displayed in alv grid. and pf-statuses are also set. But the save button is disabled. and in Pf-status sub_routine of ALV , set PF-status excluding t_t*** (dont remember exact name) was used.
Could any one tell me how to make it so that the save button is enabled.
thanks n regardsTriven,
The SAVE Function Code in the ALV GUI Status is by default not assigned. What you'll need to do is copy the GUI Status STANDARD from the Function Group SALV.
Then modify it by adding an Function Code to what you want to intercept.
In your program, you can then call using this PF STATUS like this
* Call ABAP/4 List Viewer
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = repid
i_callback_pf_status_set = 'STAT_0100' "<== Custom PF Status FORM to Call
is_layout = gs_layout
is_print = gt_print
it_sort = gt_sort[]
it_events = gt_events[]
it_fieldcat = gt_fieldcat[]
i_save = 'A'
TABLES
t_outtab = it_display.
ENDFORM. " detail_layout_build
* FORM STAT_0100 *
FORM stat_0100 USING gt_exclude. "<== Custom PF Status FORM
SET PF-STATUS 'STAT_0100' EXCLUDING gt_exclude. "<== you can use your existing Exclude module
ENDFORM. "end custom PF Status
Edited by: Paul Chapman on Apr 25, 2008 7:26 PM -
ALV grid display enable save button
Hi gurus all,
I want to make save button in alv display turns onn, cause now it's gray and i cannot click on it. and i'm using function reuse_alv_grid_display.
i'm included half of my code,
DATA: li_events TYPE slis_t_event,
lwa_events LIKE LINE OF li_events.
REFRESH li_events.
CLEAR lwa_events.
Get event
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 4
IMPORTING
et_events = li_events.
Set event END_OF_LIST
READ TABLE li_events WITH KEY name = 'END_OF_LIST'
INTO lwa_events.
IF sy-subrc = 0.
lwa_events-form = 'END_OF_LIST'.
MODIFY li_events FROM lwa_events TRANSPORTING form
WHERE name = 'END_OF_LIST'.
ENDIF.
data : ls_variant like disvariant,
gs_layout type slis_layout_alv.
ls_variant-report = sy-repid.
Display ALV
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_top_of_page = 'TOP_OF_PAGE'
it_fieldcat = i_fieldcat
is_layout = gs_layout
it_sort = i_sortcat
it_events = li_events
i_save = c_x
is_variant = ls_variant
TABLES
t_outtab = i_final
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid
TYPE sy-msgty
NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.Hi memeo,
1. Simple
2.<b> i_save = 'A'</b>
3. While calling the fm
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
make sure u pass the parameter also. (with value 'A')
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
<b> i_save = 'A'</b>
regards,
amit m. -
Create standard sap "SAVE" button along with ALV grid buttons
I need to create a standard SAP "Save" button in my ALV GRID display in the application tool bard
I copied the PF-Status 'standard' from a SAP program and assinged it here.
When i try to add the SAP save buttion by using this standard pf-status , its not getting displayed in the application tool bar.
But in STandard TOOl bar (in menu painter ) , when i assign save its displayed in the screen .
I need this to be displayed in the application tool ba
Please suggest me how to do this.
Thanks in advance.Hello,
Application of ALV means the place where the buttons(standard for ALV) like sort,add,delete,copy etc are dipslayed.IF u need need to add a save button on the same toolbar/same place u need to copy the standard GUI status of standard ALV program .For that go to SE80 , give the program name as SAPLSLVC_FULLSCREEN
In the GUI status u'll find the status named as STANDARD_FULLSCREEN ....Right click on it and give the "TO Program " as your program.Now once u activate ur program u'll find the same status there.
add ur save button in the status by edidting it. Now u need to write the FORM ENDFORM for user command and assign the form name in caps to the USER_COMMAND parameter in the func module REUSE_ALV_GRID_DISPLAY.
Hope this help.
Regards,
Neeraj -
How can we make the save button active in standard toolbar in outout of alv
Hi experts ,
I am using factory method to print alv with oops .
Cancel , Exit and Back button are active by default in Standard tool bar in output of Report , But Save button is not active , How can i make that save button active .
Also Pls tell me how i can make editable to the cell in output ,
My Code is like this :
cl_salv_table=>factory( IMPORTING r_salv_table = gr_table CHANGING t_table = ispfli ).
gr_functions = gr_table->get_functions( ).
gr_functions->set_all( abap_true ).
gr_display = gr_table->get_display_settings( ).
gr_display->set_striped_pattern( cl_salv_display_settings=>true ).
gr_display->set_list_header( 'This is the heading' ).
gr_columns = gr_table->get_columns( ).
gr_column ?= gr_columns->get_column( 'CITYTO' ).
gr_column->set_long_text( 'This is long text' ).
gr_column->set_medium_text( 'This is med text' ).
gr_column->set_short_text( 'This is sh' ).
gr_column ?= gr_columns->get_column( 'CITYFROM' ).
color-col = '6'.
color-int = '1'.
color-inv = '0'.
gr_column->set_color( color ).
gr_sorts = gr_table->get_sorts( ).
*gr_sorts->add_sort( 'CITYTO' ).
gr_sorts->add_sort( columnname = 'CITYTO' subtotal = abap_true ).
gr_agg = gr_table->get_aggregations( ).
gr_agg->add_aggregation( 'DISTANCE' ).
gr_filter = gr_table->get_filters( ).
gr_filter->add_filter( columnname = 'CARRID' low = 'DL' ).
gr_layout = gr_table->get_layout( ).
gr_layout->set_key( key ).
key-report = sy-repid.
gr_layout->set_save_restriction( cl_salv_layout=>restrict_none ).
gr_table->display( ).
Rgds,
PremrajHi,
1)you need to give the function code to that save in the Function Keys of that screen from the GUI Status.
2) while filling the field catalog of that field you need to put the
wa_fieldcat_edit-edit = c_x.
i.e use the edit and append to that field catalog internal table.
for more infomation you can refer to below links:
problem with alv edit and save
*Edit* and *Save* for the selected records in ALV
solves your problem
Thanks!! -
Error in clicking save to local file button in alv grid?
Hi
I am getting error , While clicking on some buttons like save as local file button in alv grid display
How to rectify it
Thanks in advanceIn your REUSE_ALV_GRID_DISPLAY
EXPORTING
I_SAVE = 'U'
put this field....and then check it will definitely work... -
Error in clicking save to local file button in alv grid? urgent
>>>>> if lr_tabledescr->applies_to_data( <coltab_any> ) eq 'X'.
exactly i am getting error here
how to rectify this error
Error in clicking save to local file button and mail receipt button in alv grid?In your REUSE_ALV_GRID_DISPLAY
EXPORTING
I_SAVE = 'U'
put this field....and then check it will definitely work... -
Control User Specific button in ALV report
Hi,
Can anybody please suggest me how to control "USER SPECIFIC" button in ALV report layout using authorization object. I mean if you can tell me which authorization object is responsible to control the "USER SPECIFIC" button.additional info to what Lakshmi already said:-
normally the restrictions for saving layouts/display variants are done at 2 levels:
1) The developer of an ALV list first predetermines the authorization in the 'i_save' parameter within the code.
I_SAVE = ' ' -
layouts cannot be saved
I_SAVE = 'A' -
user-specific and cross-user layouts can be saved
I_SAVE = 'X' --- cross-user layouts can be saved
I_SAVE = 'U' --- user-specific layouts can be saved
2) The second level comes to us restriciting the S_ALV_LAYO which gives access to users to save global layouts if I_SAVE for that particular transaction is A or X.
for example, a report has I_SAVE= 'A', which means
it will allow to save User-specific layouts without any restrictions.
and if user has S_ALV_LAYO then he can save both User-Specific and Global Layouts(variants).
it would be better to keep this object separate. -
How to enable the Save button in ALV_GRID_DISPLAY function module
Dear experts,
I Created a ALV report by using ALV_GRID_DISPLAY functional module ,i need to enable the SAVE button ,my reqirement is to trigger some event in save button, then if i created own PF status existing icon are hidden, mention in below screen shot.
suggest me
Thanks
sivashankar kHi sivashankar,
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE = ' '
i_callback_program = sy-repid
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'MENU'.
ENDFORM.
""Handle use action
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN 'SAVE'.
ENDCASE.
ENDFORM.
PF STATUS : MENU (copied STANDARD(gui status) from SAPLKKBL, do changes as per requirement)
Regards
Sreekanth -
Problem with 'Print' button in ALV
Hi All,
I have developed a OOPs based ALV report. When ever we create an ALV we also have to create Menu bar I did that providing fuctionality for 'BACK' and 'CANCEL' buttons in main toolbar. But user wants funtionality for 'SAVE' and 'PRINT'.
How do I do this ? Is there any stadard code which I can paste in PAI and use it. Classic ALVs handle this by default and OOPs doesn't do this it handles only a table level. But in my report I have a header information also. If user uses the standard 'PRINT' button at table level, only table contents are printed not the header information.
Please let me know how to handle 'PRINT' & 'SAVE' button in OOPs ALV.
Thanks in advance.Cancelled
-
Hi Senior ABAP folks,
how to bring sigma button in the ALV list .
Except that button i have all button default in the ALV grid.
And please let me know howto enable the save button .
Regards,
Jagadish .Hi Guru ,
Thanks for your kind help .Its working fine ...
Regards .
Jaga -
Hello
I would like to track the code of add row button in alv grid. When user cliks add row in avl toolbar what is the code? Is there some PAI module calls in that moment ? I found something about slis_selfield and something like mc_fc_loc_insert_row. I have tried write a code:
data button type ui_func.
button = gr_alvgrid -> mc_fc_loc_insert_row.
After that, in PAI module of screen where alv is, I have tried to read that button. But no results.
Frankly speaking I don't know how to use that all. Can anybody tell me how.
I will be gratefully.Hi Sri,
I think there is no standard way for this.
Maybe with java script.
Actually the users do not need to save data before they get the additional lines, A refresh is enough.
So maybe you should just define a button calling the refresh command and just name the button different.
regards
Cornelia -
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. -
Change and Save records on ALV List
Hi,
i made alv list with fieldcatalog-edit to change records on alv list. But i want to save it to my dictionary table after changed. I think i should use dialog program to do that. The problem is how i can use dialog program.(i dont have an idea which user-command perform fields on alv list) I have used dialog programs before but i am new on this so i am not sure how i can do that. I will be pleased if you can help me.
Regards.Hello Masuke,
You have to code that in the AT- USER COMMAND event.
Follow the below sample code.
If the record is changed then track its index no.
and populate it in an internal table for future
action
IF sy-subrc = 0 AND <dyn_wa> <> <l_wa>.
<dyn_wa> = <l_wa>.
i_index = rs_selfield-tabindex.
APPEND i_index.
ENDIF.
ENDIF. ENDIF.* When save button is pressed
WHEN 'SAVE'.* Sort the index table
SORT i_index.* Delete all duplicate records
DELETE ADJACENT DUPLICATES FROM i_index. LOOP AT i_index.* Find out the changes in the internal table
and populate these changes in another internal table
READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX i_index.
IF sy-subrc = 0.
APPEND <dyn_wa> TO <dyn_tab_temp>.
ENDIF. ENDLOOP.* Lock the table
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
mode_rstable = 'E'
tabname = p_table
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3. IF sy-subrc = 0.* Modify the database table with these changes
MODIFY (p_table) FROM TABLE <dyn_tab_temp>. REFRESH <dyn_tab_temp>.* Unlock the table
CALL FUNCTION 'DEQUEUE_E_TABLE'
EXPORTING
mode_rstable = 'E'
tabname = p_table. ENDIF.
ENDCASE. rs_selfield-refresh = 'X'.
Hope it helps you.
Best Regards
Santosh -
Information button in ALV report
Information button in ALV report is not working. any suggestion
I have copied standard tool bar from standard program.During debugging, I have found that function code is defferent. Then I changed function code according to that.
Maybe you are looking for
-
Touchscree​n not working in win 8 and after upgrade to 8.1
I am facing touchscreen problem with my hp-b150us laptop for the last few months. It worked fine for 6 months after purchasing the laptop. Later upgraded to 8.1. It worked for couple of times. but once I shutdown and restart my laptop again the touch
-
I'm trying to watch a movie on my itunes. My ipod isn't plugged in or anything, just itunes. But when it plays, the picture keeps freezing. The audio continues, but the scene just freezes and after a few seconds it catches up with the audio and it do
-
Aperture fails to import 10,000 pics - hangs, instead, and takes 200% CPU
Help! I am an IT professional and a professional photographer. But I have now spent a MONTH!! trying in vain to import my photo library into Aperture on my iMac. I try to import 10,000 images (the import mode that leaves originals where they are) fro
-
AXIS2 - Microsoft CRM set conditions - XmlValueDisconnectedException
Hi, I have no luck setting condition when connecting to the microsoft crm's web service. I can't set query condition correctly when retrieving data from CRM. The problem is the following code: String s = "<accountnumber>12345678</accountnumber>"; Str
-
10g database fails to start after 3rd reboot
Hi, I've reloaded my test server several times and loaded 10g with the default "orcl" database. Works just fine, reboot a couple times and it still works. Around the 3rd reboot the database instance fails to start. I even have to reload the OS to cle