FUNCTION ZMM_FG004_GET_EKORG.
*"----------------------------------------------------------------------
*"*"本地接口:
*" IMPORTING
*" VALUE(IV_WERKS) LIKE T001W-WERKS
*" EXPORTING
*" VALUE(EV_EKORG) LIKE EKKO-EKORG
*"----------------------------------------------------------------------
DATA:LV_BUKRS TYPE EKKO-BUKRS.
CLEAR EV_EKORG.
CHECK IV_WERKS IS NOT INITIAL.
SELECT SINGLE T001K~BUKRS INTO LV_BUKRS
FROM T001W
JOIN T001K ON T001K~BWKEY EQ T001W~BWKEY
WHERE T001W~WERKS EQ IV_WERKS.
IF SY-SUBRC EQ 0.
SELECT SINGLE EKORG INTO EV_EKORG
FROM T024E
WHERE BUKRS EQ LV_BUKRS.
ENDIF.
ENDFUNCTION.
阅读(1673) | 评论(0) | 转发(0) |