2014 Mar 18 5:21 AM
Hello gurus,
I have a column in ALV display editable, by using fieldcat-edit = 'X'. But when i hit enter after entering values , the value is not storing in Internal Table, I need to do some calculations with that value and again display with the resulted one in another column with same this column. But the value entered is not stored in internal Table. Help me please.
2014 Mar 18 5:41 AM
Hi..you could look at the demo programs:
BCALV_EDIT_02
BCALV_EDIT_03
2014 Mar 18 5:44 AM
2014 Mar 18 5:51 AM
check this demo program: alV_grid_edit - SAP Developer Challenge - SCN Wiki
also check below thread:
2014 Mar 18 5:55 AM
2014 Mar 18 5:55 AM
hi ,
Refer this link : ALV Program using REUSE_ALV* Function Modules - Code Gallery - SCN Wiki
Regards,
Sivaganesh
2014 Mar 18 10:45 AM
Thanks to everyone , this is the code which i used.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR' "This FM will get the reference of the changed data in ref_grid
IMPORTING
e_grid = ref_grid.
*BREAK-POINT.
CALL METHOD ref_grid->check_changed_data.
After this internal table is filling up.
2014 Mar 18 11:58 AM
Hi,
Store the old internal table entries into LT_DUMMY table before calling the above FM.
after calling the method grid->check_changed_data. it gives the changed values of the ALV grid.
now you have the before and after update of ALV grid entries and perform your required logic and update the ALV grid with new values.
2014 Mar 18 11:21 AM
Hi friend,
If you want to get the changes of your ALV in your internal table, you should use this method:
CHECK_CHANGED_DATA
This method pass the changes in your ALV to your internal table(which is used by the ALV).
Best regards
2014 Mar 18 11:37 AM
Hai,
for save.
*&---------------------------------------------------------------------*
*& Form user_command
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->R_UCOMM text
* -->RS_SELFIELD text
*----------------------------------------------------------------------*
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&DATA_SAVE'.
REFRESH it_exti.
CLEAR it_exti.
LOOP AT it_ext.
it_exti-mino = it_ext-mino .
it_exti-matnr = it_ext-matnr .
it_exti-ebelp = it_ext-ebelp .
it_exti-werks = it_ext-werks .
UPDATE zexti FROM it_exti.
CLEAR: it_ext,it_exti.
ENDLOOP.
WHEN OTHERS.
ENDCASE.
MESSAGE 'Data Saved' TYPE 'S'.
it_ext is the alv display table.
2014 Mar 18 11:40 AM
Hi friend,
This code isn't right, because you aren't going to have the changes in your internal table. Furthermore, the requirement is to update the internal table not the database table.....
2021 Nov 25 5:59 PM
any solution for this ..pls help on this...im also facing the same issue . need to update the internal table after calculation not ztable...plz do needful
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |