2005 Nov 14 11:28 PM
i have an alv grid with purchase order information. When a user double clicks on the order it takes them to ME22 and they make the changes and return to the alv grid. the problem is i need to keep track of rows clicked by checking a check box in the 1st column which is initailly blank . how can i do this. appreciate any help as this is an urgent one.
thanks in advance.
2005 Nov 14 11:55 PM
thanks for your immediate replies max.
is there a refresh in this fm or do i need to use some othe fm.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = 'ZSAMPLEALV'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = alv_layout
IT_FIELDCAT = ALV_FIELDCAT
IT_EVENTS = LT_ALV_EVENT_TAB
I_SAVE = 'U'
TABLES
T_OUTTAB = itab
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH
thanks for your immediate replies max.
is there a refresh in this fm or do i need to use some othe fm.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = 'ZSAMPLEALV'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = alv_layout
IT_FIELDCAT = ALV_FIELDCAT
IT_EVENTS = LT_ALV_EVENT_TAB
I_SAVE = 'U'
TABLES
T_OUTTAB = itab
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH
2005 Nov 14 11:32 PM
Hi
You should have a check field in your internal table and update it after calling ME22.
Max
2005 Nov 14 11:40 PM
i am trying to do the same. but how do i refresh the alv grid to update the check box.
thanks
2005 Nov 14 11:48 PM
Hi
there's a field called REFRESH if you're using fm:
rs_selfield-refresh = 'X'
or the method REFRESH if you're using OO ABAP:
CALL METHOD MY_GRID->REFRESH_TABLE_DISPLAY
Max
Message was edited by: max bianchi
2005 Nov 14 11:42 PM
There is a system field called sy-lisel. It keeps track of the contents of the selected line in the list processing. When the check box is checked you can update the internal table with 'X' ( you should have field for flag in the internal table )
2005 Nov 14 11:55 PM
thanks for your immediate replies max.
is there a refresh in this fm or do i need to use some othe fm.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = 'ZSAMPLEALV'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = alv_layout
IT_FIELDCAT = ALV_FIELDCAT
IT_EVENTS = LT_ALV_EVENT_TAB
I_SAVE = 'U'
TABLES
T_OUTTAB = itab
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH
2005 Nov 15 12:00 AM
FORM USER_COMMAND
USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
IF R_UCOMM = 'ME22'.
READ TABLE ITAB INDEX rs_selfield-TABINDEX.
...........
CALL TRANSACTION 'ME22'.
IF SY-SUBRC = 0.
ITAB-CHECK = 'X'.
MODIFY ITAB INDEX RS_SELFIELD-TABINDEX.
RS_SELFIELD-REFRESH = 'X'.
ENDIF.
ENDFORM.
Max
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |