2010 Sep 13 11:14 AM
hi to all can anybody please give some hints that how can i place the BDC code for the save button to pass the values from the editable grid to the standard table here i am sending my code .please advice me.
Moderator Message: Please post only relevant portions of your code. There is a 2,500 character per post limit.
here the second grid is editable.and i have to make changes in the second grid and save it to the standard tables. please advice me resma
Edited by: kishan P on Sep 13, 2010 3:59 PM
hi to all can anybody please give some hints that how can i place the BDC code for the save button to pass the values from the editable grid to the standard table here i am sending my code .please advice me.
Moderator Message: Please post only relevant portions of your code. There is a 2,500 character per post limit.
here the second grid is editable.and i have to make changes in the second grid and save it to the standard tables. please advice me resma
Edited by: kishan P on Sep 13, 2010 3:59 PM
2010 Sep 13 11:17 AM
Hi,
Can you put only the relevant piece of code in a readable format. Code is should be within braces.
Sujay
2010 Sep 13 11:18 AM
Hi,
I have done that many times. Create a button in the toolbar,say 'SAVE'. Write the code in the subroutine user command.For example :
*&---------------------------------------------------------------------*
*& Form USER_COMMAND
*&---------------------------------------------------------------------*
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
DATA : REF_GRID TYPE REF TO CL_GUI_ALV_GRID.
DATA: L_VALID TYPE C.
*Code to reflect the changes done in the internal table
IF REF_GRID IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = REF_GRID.
ENDIF.
IF NOT REF_GRID IS INITIAL.
CALL METHOD REF_GRID->CHECK_CHANGED_DATA
IMPORTING
E_VALID = L_VALID.
ENDIF.
CASE SY-UCOMM.
WHEN 'SAVE'.
PERFORM BDC."Write all you BDC code in this subroutine
ENDCASE.
ENDFORM.
Hope this will help.
Thanks & Regards,
Rock.