0
我想覆蓋ALV網格中的某個函數。但我不能設法用我的回調用戶命令。這只是針對非標準功能。任何想法?我應該使用我的事件退出嗎?我試着用它的東西,但不能這樣做既:P覆蓋ALV中的函數ABAP
FORM event_exits.
CLEAR wa_eventexit.
wa_eventexit-ucomm = '&OUP'.
wa_eventexit-before = 'X'.
APPEND wa_eventexit TO it_eventexit.
CLEAR wa_eventexit.
wa_eventexit-ucomm = '&ODN'.
wa_eventexit-before = 'X'.
APPEND wa_eventexit TO it_eventexit.
ENDFORM. "event_exits
FORM user_command Using r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&OUP'.
IF ck_del = 'X'.
SORT gt_salord BY audat vbeln lfimg ASCENDING.
ELSE.
SORT gt_salord BY audat vbeln kwmeng ASCENDING.
ENDIF.
WHEN '&ODN'.
IF ck_del = 'X'.
SORT gt_salord BY audat vbeln lfimg DESCENDING.
ELSE.
SORT gt_salord BY audat vbeln kwmeng DESCENDING.
ENDIF.
WHEN 'D01'.
BREAK-POINT.
ENDCASE.
CLEAR sy-ucomm.
ENDFORM. "user_command
的D01功能只是爲了測試,所以我可以看到它進入user_command當我訪問它。但是當我訪問功能& OUP它不會進入CASE(我測試它與調試)
它只是訓練課程,我還是一個初級程序員並通過廣闊的sap世界學習我的方式^^ – kookies 2012-04-12 06:19:33