‎2009 Feb 28 5:06 AM
hi to all experts ,
im working with an editable alv first the time im going to the programme im able to see the changes in the output internal but when im changing the fields content im not able to see the changes what could be the problem
FORM user_command USING r_ucomm TYPE sy-ucomm
rs_selfield TYPE slis_selfield .
CASE r_ucomm .
WHEN 'EXEC' .
REFRESH it_smart.
CLEAR p_ref1.
IF p_ref1 IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = p_ref1.
ENDIF.
IF p_ref1 IS NOT INITIAL.
CALL METHOD p_ref1->check_changed_data.
ENDIF.
LOOP AT it_output INTO wa_output WHERE cbox EQ 'X'.
READ TABLE it_mard INTO wa_mard WITH KEY matnr = wa_output-matnr.
IF sy-subrc EQ 0.
wa_smart-lgpbe = wa_mard-lgpbe.
ENDIF.
wa_smart-matnr = wa_output-matnr.
wa_smart-maktx = wa_output-maktx.
wa_smart-meins = wa_output-meins.
wa_smart-bldat = wa_output-bldat.
* wa_smart-no_cop = wa_output-menge1.
APPEND wa_smart TO it_smart.
CLEAR: wa_smart,wa_output.
ENDLOOP.
‎2009 Mar 03 11:06 AM
Hi,
The code provided by you is reflecting the modified data from alv to internal table.
But it will no show the modified data coz you need to include a code line after changing data in internal table, refer:-
FORM user_command USING r_ucomm TYPE sy-ucomm
rs_selfield TYPE slis_selfield .
CASE r_ucomm .
WHEN 'EXEC' .
REFRESH it_smart.
CLEAR p_ref1.
IF p_ref1 IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = p_ref1.
ENDIF.
IF p_ref1 IS NOT INITIAL.
CALL METHOD p_ref1->check_changed_data.
ENDIF.
LOOP AT it_output INTO wa_output WHERE cbox EQ 'X'.
READ TABLE it_mard INTO wa_mard WITH KEY matnr = wa_output-matnr.
IF sy-subrc EQ 0.
wa_smart-lgpbe = wa_mard-lgpbe.
ENDIF.
wa_smart-matnr = wa_output-matnr.
wa_smart-maktx = wa_output-maktx.
wa_smart-meins = wa_output-meins.
wa_smart-bldat = wa_output-bldat.
* wa_smart-no_cop = wa_output-menge1.
APPEND wa_smart TO it_smart.
CLEAR: wa_smart,wa_output.
ENDLOOP.
"refresh the ALV Grid output from internal table
rs_selfield-refresh = 'X' "<----add this line
"this will refresh the display from the modified internal table
ENDCASE.
ENDFORM.
Hope this helps you.
Regards,
Tarun
‎2009 Feb 28 6:08 AM
I hope u set the flag for filed_catalogue_editing_intended_field1-EDIT !
thanq
‎2009 Feb 28 6:23 AM
Hi,
Before looping at the output table, you need to get the selected rows using the method 'GET_SELECTED_ROWS'.
Then you need to loop at this rows and read the output table with the index.
Regards,
Shailaja
‎2009 Mar 03 11:06 AM
Hi,
The code provided by you is reflecting the modified data from alv to internal table.
But it will no show the modified data coz you need to include a code line after changing data in internal table, refer:-
FORM user_command USING r_ucomm TYPE sy-ucomm
rs_selfield TYPE slis_selfield .
CASE r_ucomm .
WHEN 'EXEC' .
REFRESH it_smart.
CLEAR p_ref1.
IF p_ref1 IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = p_ref1.
ENDIF.
IF p_ref1 IS NOT INITIAL.
CALL METHOD p_ref1->check_changed_data.
ENDIF.
LOOP AT it_output INTO wa_output WHERE cbox EQ 'X'.
READ TABLE it_mard INTO wa_mard WITH KEY matnr = wa_output-matnr.
IF sy-subrc EQ 0.
wa_smart-lgpbe = wa_mard-lgpbe.
ENDIF.
wa_smart-matnr = wa_output-matnr.
wa_smart-maktx = wa_output-maktx.
wa_smart-meins = wa_output-meins.
wa_smart-bldat = wa_output-bldat.
* wa_smart-no_cop = wa_output-menge1.
APPEND wa_smart TO it_smart.
CLEAR: wa_smart,wa_output.
ENDLOOP.
"refresh the ALV Grid output from internal table
rs_selfield-refresh = 'X' "<----add this line
"this will refresh the display from the modified internal table
ENDCASE.
ENDFORM.
Hope this helps you.
Regards,
Tarun