‎2006 Sep 14 11:43 AM
hi,
This is ram . i made a editing field in the ALV Grid control . for this i made fieldcat-edit for that purticular field in the fieldcatalog . in layout i added p_st_layout-EDIT = 'X'.
p_st_layout-EDIT_MODE = 'X'.
i am able see the changes in the internal table but all fields in the field catalog turn to edit mode. so please help me out in this ..
‎2006 Sep 14 11:47 AM
Instead of using EDIT_MODE use the "EDIT" option in the field catalog for the individual fields.This way you can control the editing at the field level
‎2006 Sep 14 11:49 AM
For example :
Asset capitalization date
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'AKTIV'.
ls_fieldcat-ref_table = 'ANLA'.
ls_fieldcat-edit = 'X'.
ls_fieldcat-checktable = '!'
APPEND ls_fieldcat TO gt_fieldcat.
‎2006 Sep 14 11:58 AM
HI,
just use the edit for that field in fieldcatalog.
don't use edit = 'X' for layout it will make the whole grid editiable.
<b>Just use this during field catalog build for specific field
fieldcat-edit = 'X'.
don't use this.
p_st_layout-EDIT = 'X'</b>
Regards,
‎2006 Sep 14 12:03 PM
ya fine .how to captue the edited field data in the internal table ...
‎2006 Sep 14 12:07 PM
The method CHECK_CHANGED_DATA checks all new cells syntactically, raises event DATA_CHANGED and looks then for any entriesin the error protocol. If any exist the parameter e_valid is initial ('X' in the other case).
CALL METHOD gv_grid->check_changed_data
IMPORTING
e_valid = ls_valid.
This will update your internal table with the changed data
‎2006 Sep 14 12:08 PM
hi in the usercommand , use this
*Function module to display the ALV report
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = W_REPID
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'
I_CALLBACK_USER_COMMAND = <b>'USER_COMMAND'</b>
FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM
P_SELFLD TYPE SLIS_SELFIELD.
CASE P_UCOMM.
WHEN 'SAVE'.
Data ref1 type ref to cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = ref1.
call method ref1->check_changed_data
*write ur code here
ENDCASE.
ENDFORM.
‎2006 Sep 14 12:09 PM
HI,
HI, try the following method in PAI module it will update the internal table with changed data from grid.
MODULE PAI INPUT.
DATA: l_valid TYPE c.
<b>CALL METHOD grid1->check_changed_data
IMPORTING e_valid = l_valid.</b>
ENDMODULE.
If your earliar problem was solved then please assign the points and close this thread.
and open a new thread for new problems.
Regards,
‎2006 Sep 14 1:10 PM
DATA: l_valid TYPE c.
CALL METHOD grid1->check_changed_data IMPORTING e_valid = l_valid.
after using this i am getting dump . will i need to pass any value for L_valid
‎2006 Sep 14 1:13 PM
add this code
DATA: l_valid TYPE c.
<b>Data grid1 type ref to cl_gui_alv_grid.</b>
CALL METHOD grid1->check_changed_data IMPORTING e_valid = l_valid.<b>have u tried my previous post , it will work fine</b>
‎2006 Sep 14 12:06 PM
‎2006 Sep 14 12:10 PM
hi priya,
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'LIFNR'.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-edit = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
after editing how to capture the edited field value in the internal table