2009 May 15 10:50 AM
Hello,
I created an ALV and I want to use the buttons on the application of tools.
I mean that when I add a row to the list, I choose "Insert Row" in the application, and an empty row is inserted.
When I enter the values for each field, I can verfy the values inserted then save them in a table.
The same goes for a "Delete Row" button, when I delete a row, I can check before I remove it from the table.
Does anybody know a solution for this? Thanks for help!
Regards
Hello,
I created an ALV and I want to use the buttons on the application of tools.
I mean that when I add a row to the list, I choose "Insert Row" in the application, and an empty row is inserted.
When I enter the values for each field, I can verfy the values inserted then save them in a table.
The same goes for a "Delete Row" button, when I delete a row, I can check before I remove it from the table.
Does anybody know a solution for this? Thanks for help!
Regards
2009 May 15 10:51 AM
what u want to check before the deletion..can you be a bit more clear on the issue..
2009 May 15 10:53 AM
Hi,
Please go thru the links provided below for editing a alv row based on contirion.
[conditionaly editing alv row|conditionaly editing alv row]
[Conditionaly editing a alv row using cell variant]
Hopes this will helps you.
Edited by: Dande on May 15, 2009 11:54 AM
Edited by: Dande on May 15, 2009 11:54 AM
2009 May 15 10:55 AM
2009 May 15 11:02 AM
hi, here is the code tto save ,edit or modify value in alv which will hit ur dbtab.
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 = 'PF_STAUS'
i_callback_user_command = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
is_layout = gs_sel
it_fieldcat = tt_fieldcat[]
FORM user_command USING r_ucomm type sy-ucomm
rs_selfield TYPE slis_selfield .
DATA:
lv_erfmg TYPE erfmg,
lv_erfmg2 TYPE erfmg.
" Inserted By Muhammed Safel on 8-7-2009
DATA: REF1 TYPE REF TO CL_GUI_ALV_GRID.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
ET_EXCLUDING =
E_REPID =
E_CALLBACK_PROGRAM =
E_CALLBACK_ROUTINE =
E_GRID = REF1
ET_FIELDCAT_LVC =
ER_TRACE =
E_FLG_NO_HTML =
ES_LAYOUT_KKBLO =
ES_SEL_HIDE =
.
CALL METHOD REF1->CHECK_CHANGED_DATA.
endform. " this will update the alv..
Edited by: Safel007 on May 15, 2009 3:33 PM
2009 May 15 11:14 AM
Hi,
use method check_changed_data. of class cl_gui_alv_grid, after insertion or deletion of row is done
the user presses a pushbutton( say SAVE). in 'save ' functionality u can chk for the changed data.
u need to insert or delete the row from the internal table i.e. displayed onto the grid. and then redisplay
the table data using 'refresh_table_display' method of class cl_gui_alv_grid.
module user_command_<scrno> input.
case sy-ucomm.
when 'BACK'.
set screen '0'.
when 'EXIT'.
leave program.
when 'SAVE'.
call method r_grid->check_changed_data.
call method r_grid->refresh_table_display.
Regards,
Mdi.Deeba
2009 May 15 11:24 AM
Hi,
u can set in ur report
SET PF-STATUS 'TEST'
use following statement
module user_command_<scrno> input.
case sy-ucomm.
when 'BACK'.
set screen '0'.
when 'EXIT'.
leave program.
when 'SAVE'.
Regards....
Edited by: jinku on May 15, 2009 12:27 PM
2009 May 18 8:06 AM
Standard program BCALV_EDIT_01 In this program available insrt row button delete etc.
2009 May 18 10:39 AM
Hi,
Thank you, all of you, for your replies.
For prgrams BCALV_EDIT_0 * , the standard buttons in ALV are used. For some of these programs, the lines are editable, and when adding a new row, it added in edit mode.
While, in my program, I have lines in display mode and when I add a new row, it was dimmed.
Mll Mat
2009 May 18 10:52 AM
2009 May 18 12:25 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |