08-12-2009 8:18 AM
i wrote a program for editing the ALV report and updating database table . everything is working fine , database tables are also getting updated . here i am using function REUSE_ALV_LIST_DISPLAY. but instead of " REUSE_ALV_LIST_DISPLAY" if i use
REUSE_ALV_GRID_DISPLAY.the database tables are not getting updated .
cant we use REUSE_ALV_GRID_DISPLAY for updating ?
here i am using FMs not OO Methods. i went to debugging mode the data that i changed is not coming to internal table when i use REUSE_ALV_GRID_DISPLAY but if i use REUSE_ALV_LIST_DISPLAY its coming
08-12-2009 8:21 AM
Hi,
The code of Table Update you are going to write in the Exit Subroutine( for User command) in both Grid & List display and hence it should be same in both the cases.
Can you please share the code the you have written in this Subroutine?
08-12-2009 8:21 AM
Hi,
The code of Table Update you are going to write in the Exit Subroutine( for User command) in both Grid & List display and hence it should be same in both the cases.
Can you please share the code the you have written in this Subroutine?
08-12-2009 8:24 AM
put a break point where you have written your code for table update. now run the code and see if the debugger is triggering or not. if triggering check whats happening there.
post your code that your be easier for us to check your problem.
08-12-2009 8:31 AM
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM
SELFLD TYPE SLIS_SELFIELD.
CASE UCOMM.
WHEN '&UPT'.
REFRESH IT_EDIT.
-
>>>>> LOOP__ AT ITAB_VBAK INTO WA_VBAK WHERE CHK = 'X'.
IF WA_VBAK-CHK = 'X'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_VBAK-VBELN
IMPORTING
OUTPUT = TEMP_VBELN.
WA_EDIT-VBELN = TEMP_VBELN.
WA_EDIT-NETWR = WA_VBAK-NETWR.
APPEND WA_EDIT TO IT_EDIT.
ENDIF.
IF IT_EDIT IS INITIAL.
MESSAGE E398(00) WITH 'NO ROW SELECTED....'.
ENDIF.
IF NOT IT_EDIT IS INITIAL.
PERFORM UPDATE.
ENDIF.
ENDLOOP.
ENDCASE.
ENDFORM. "USER_COMMAND
this is the subroutine i am passing to to the FM . the arrow mark is shown there (breakpoint is put ),,in debugging mode the changes i made is not coming to internal table ITAB_VBAK if i use 'GRID' but if i use 'LIST' internal table ITAB_VBAK is getting updated.
08-12-2009 8:44 AM
HI,
U hvae to write the below code
Declaration of local Variables
DATA : lv_ref1 TYPE REF TO cl_gui_alv_grid.
CASE UCOMM.
WHEN '&UPT'.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = lv_ref1.
CALL METHOD lv_ref1->check_changed_data.
-
>>>>> LOOP__ AT ITAB_VBAK INTO WA_VBAK WHERE CHK = 'X'.
IF WA_VBAK-CHK = 'X'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_VBAK-VBELN
IMPORTING
OUTPUT = TEMP_VBELN.
WA_EDIT-VBELN = TEMP_VBELN.
WA_EDIT-NETWR = WA_VBAK-NETWR.
APPEND WA_EDIT TO IT_EDIT.
ENDIF.
IF IT_EDIT IS INITIAL.
MESSAGE E398(00) WITH 'NO ROW SELECTED....'.
ENDIF.
IF NOT IT_EDIT IS INITIAL.
PERFORM UPDATE.
ENDIF.
ENDLOOP.
ENDCASE.
Regards,
Nagaraj
08-12-2009 8:45 AM
chk means checkbox ,, if you have selected the check box and pressed update button .it gets updated .
08-12-2009 8:53 AM
thank you very much NAGARAJ . you are genius really . i mean it . thank you very much
08-12-2009 8:30 AM
Hi,
Debug the code at Update/Insert... statement, whether it is working or not, other wise tye COMMIT WORK after updating the DB table.
Thanks,
Ravi
08-12-2009 8:47 AM