‎2006 Aug 11 1:21 PM
Hey all,
Can anyone solve this problem for me?
I have a basic list,in it i hav mara-matnr,mara-ekgrp(this in input enabled) and mara-werks in the list.I have a checkbox against each and every line.When I select a check box and change the value in EKGRP the corresponding value must get be modified in the corresponding database table.
Please help.
Thanks Sharmila.
‎2006 Aug 11 1:41 PM
‎2006 Aug 11 1:23 PM
In the at user-command event, you should use the bapi:
BAPI_MATERIAL_SAVEDATA
Regards,
ravi
‎2006 Aug 11 1:23 PM
hi,
u have to handle in user comamnd of ALV.
hi,
u have to handle in user comamnd of ALV.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
I_CALLBACK_PROGRAM = V_REPID
I_CALLBACK_PF_STATUS_SET = 'FRM_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'FRM_USR_COMMAND'
* I_STRUCTURE_NAME =
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FLDCAT[]
TABLES
T_OUTTAB = IT_FINAL_SCMPO
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
FORM FRM_USR_COMMAND USING R_UCOMM LIKE SY-UCOMM
R_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN 'CREATEPO'.
LOOP AT IT_FINAL_table WHERE CHECKbox = 'X' .
upadate database table.
endloop.
ENDCASE.
ENDFORM.Regards
Ashok P
Regards
Ashok P
Message was edited by: Ashok Parupalli
‎2006 Aug 11 1:25 PM
‎2006 Aug 11 1:29 PM
Wat I an doing is as follows,
I describe the internal table,get the no.of records.then do index times.
if checkbox = 'x'.
get the position of the Ekgrp.
then modify the d/b table.
endif.
enddo.
But its not working.
‎2006 Aug 11 1:41 PM
‎2006 Aug 11 1:44 PM
Hi Sharmila,
do as folows:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = W_REPID
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
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
modify ztable from table itab.
endcase.
ENDFORM.
<b>BUt do NOT update the standard sap tables directly. Use BAPI/BDC for the same.</b>
Regards,
Ravi
‎2006 Aug 11 2:01 PM