abap 獲取生產訂單標準工時和實際報工工時的報表
*& REPORT ZMM_PO_QUERY
*&
*& REPORTNAME :生產訂單查詢系統
*&---------------------------------------------------------------------*
*& CREATED BY : LIUXINYUAN
*& CREATED DATE : 2015-07-15
*&---------------------------------------------------------------------*
REPORT ZPP_CO_QUERY.
INCLUDE ZPP_CO_QUERY_TOP.
**選擇螢幕
SELECTION-SCREEN BEGIN OF BLOCK MAIN WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS:S_AUFNR FOR CAUFV-AUFNR.
SELECT-OPTIONS:S_WERKS FOR CAUFV-WERKS.
SELECT-OPTIONS:S_GSTRI FOR CAUFV-GSTRI.
SELECT-OPTIONS:S_GLTRI FOR CAUFV-GLTRI.
SELECTION-SCREEN
AT SELECTION-SCREEN.
* LOOP AT S_WERKS.
* AUTHORITY-CHECK OBJECT 'Z_MM_003'
* ID 'WERKS' FIELD S_WERKS-LOW.
* IF SY-SUBRC <> 0.
* MESSAGE E019(ZMM001) WITH S_WERKS-LOW.
* ENDIF.
* ENDLOOP.
AT SELECTION-SCREEN OUTPUT.
**主程式
START-OF
PERFORM FRM_SELECT_DATA.
PERFORM FRM_DISPLAY.
*&---------------------------------------------------------------------*
*& FORM FRM_SELECT_DATA
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
* --> P1 TEXT
* <-- P2 TEXT
*----------------------------------------------------------------------*
FORM FRM_SELECT_DATA .
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
TEXT = '資料讀取中.................'.
REFRESH ITAB.
CLEAR ITAB.
"機器 作業型別 1001
"工資 作業型別 1000
"其他 作業型別 1003
SELECT AUFNR
WERKS
AUART
KDAUF "銷售訂單編號
KDPOS "銷售訂單行專案
PLNBEZ
GAMNG
AUFPL
OBJNR
FTRMI
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM CAUFV
WHERE AUFNR IN S_AUFNR
AND WERKS IN S_WERKS
AND GSTRI IN S_GSTRI
AND GLTRI IN S_GLTRI.
IF ITAB[] IS NOT INITIAL.
REFRESH IT_AFVV.
CLEAR IT_AFVV.
SELECT AUFPL
APLZL
VGW01
VGW02
VGW03
INTO TABLE IT_AFVV
FROM AFVV
FOR ALL ENTRIES IN ITAB
WHERE AUFPL = ITAB-AUFPL.
REFRESH IT_AFVC.
CLEAR IT_AFVC.
SELECT AUFPL
APLZL
RUECK
ARBID
INTO TABLE IT_AFVC
FROM AFVC
FOR ALL ENTRIES IN ITAB
WHERE AUFPL = ITAB-AUFPL.
IF IT_AFVC[] IS NOT INITIAL.
REFRESH IT_AFRU.
CLEAR IT_AFRU.
SELECT RUECK
RMZHL
ISM01
ISM02
ISM03
STOKZ
INTO TABLE IT_AFRU
FROM AFRU
FOR ALL ENTRIES IN IT_AFVC
WHERE RUECK = IT_AFVC-RUECK.
REFRESH TIT_AFRU.
CLEAR TIT_AFRU.
LOOP AT IT_AFRU.
TIT_AFRU-RUECK = IT_AFRU-RUECK.
IF IT_AFRU-STOKZ = 'X'.
TIT_AFRU-ISM01 = 0 - IT_AFRU-ISM01.
TIT_AFRU-ISM02 = 0 - IT_AFRU-ISM02.
TIT_AFRU-ISM03 = 0 - IT_AFRU-ISM03.
ELSE.
TIT_AFRU-ISM01 = IT_AFRU-ISM01.
TIT_AFRU-ISM02 = IT_AFRU-ISM02.
TIT_AFRU-ISM03 = IT_AFRU-ISM03.
ENDIF.
COLLECT TIT_AFRU.
CLEAR TIT_AFRU.
ENDLOOP.
REFRESH IT_AFRU_VV.
CLEAR IT_AFRU_VV.
LOOP AT TIT_AFRU.
CLEAR IT_AFVC.
READ TABLE IT_AFVC WITH KEY RUECK = TIT_AFRU-RUECK.
IF SY-SUBRC EQ 0.
IT_AFRU_VV-AUFPL = IT_AFVC-AUFPL.
IT_AFRU_VV-APLZL = IT_AFVC-APLZL.
IT_AFRU_VV-ISM01 = TIT_AFRU-ISM01.
IT_AFRU_VV-ISM02 = TIT_AFRU-ISM02.
IT_AFRU_VV-ISM03 = TIT_AFRU-ISM03.
APPEND IT_AFRU_VV.
CLEAR IT_AFRU_VV.
ENDIF.
ENDLOOP.
ENDIF.
DATA:LV_ARBID TYPE AFVC-ARBID,
LV_ARBPL TYPE CRHD-ARBPL.
LOOP AT ITAB.
* 獲取標準工時
LOOP AT IT_AFVV WHERE AUFPL = ITAB-AUFPL.
CLEAR LV_ARBID.
CLEAR IT_AFVC.
READ TABLE IT_AFVC WITH KEY AUFPL = IT_AFVV-AUFPL APLZL = IT_AFVV-APLZL.
IF SY-SUBRC EQ 0.
LV_ARBID = IT_AFVC-ARBID.
ENDIF.
CLEAR LV_ARBPL.
SELECT SINGLE
ARBPL
INTO LV_ARBPL
FROM CRHD
WHERE OBJTY = 'A'
AND OBJID = LV_ARBID.
DATA:LV_KOSTL TYPE CRCO-KOSTL.
CLEAR LV_KOSTL.
SELECT SINGLE
KOSTL
INTO LV_KOSTL
FROM CRCO
WHERE OBJTY = 'A'
AND OBJID = LV_ARBID.
IF LV_ARBPL = 'STRZP' OR LV_ARBPL+0(2) = 'ZP'.
ITAB-ZPVGW01 = IT_AFVV-VGW01 * ITAB-GAMNG.
ITAB-ZPVGW02 = IT_AFVV-VGW02 * ITAB-GAMNG.
ITAB-ZPVGW03 = IT_AFVV-VGW03 * ITAB-GAMNG.
ITAB-ZPKOSTL = LV_KOSTL.
ELSEIF LV_ARBPL = 'STRTS' OR LV_ARBPL+0(2) = 'TS'.
ITAB-TSVGW01 = IT_AFVV-VGW01 * ITAB-GAMNG.
ITAB-TSVGW02 = IT_AFVV-VGW02 * ITAB-GAMNG.
ITAB-TSVGW03 = IT_AFVV-VGW03 * ITAB-GAMNG.
ITAB-TSKOSTL = LV_KOSTL.
ELSEIF LV_ARBPL = 'STRLH' OR LV_ARBPL+0(2) = 'LH'.
ITAB-LHVGW01 = IT_AFVV-VGW01 * ITAB-GAMNG.
ITAB-LHVGW02 = IT_AFVV-VGW02 * ITAB-GAMNG.
ITAB-LHVGW03 = IT_AFVV-VGW03 * ITAB-GAMNG.
ITAB-LHKOSTL = LV_KOSTL.
ELSEIF LV_ARBPL = 'STRYJ' OR LV_ARBPL+0(2) = 'YJ'.
ITAB-JYVGW01 = IT_AFVV-VGW01 * ITAB-GAMNG.
ITAB-JYVGW02 = IT_AFVV-VGW02 * ITAB-GAMNG.
ITAB-JYVGW03 = IT_AFVV-VGW03 * ITAB-GAMNG.
ITAB-JYKOSTL = LV_KOSTL.
ELSEIF LV_ARBPL = 'STRBZ' OR LV_ARBPL+0(2) = 'BZ'.
ITAB-BZVGW01 = IT_AFVV-VGW01 * ITAB-GAMNG.
ITAB-BZVGW02 = IT_AFVV-VGW02 * ITAB-GAMNG.
ITAB-BZVGW03 = IT_AFVV-VGW03 * ITAB-GAMNG.
ITAB-BZKOSTL = LV_KOSTL.
ENDIF.
***********以下程式碼根據工單下單的工時,查詢標準工時的成本的單價,以及計算成本
* CLEAR LV_GJAHR. CLEAR LV_MONTH.
* LV_GJAHR = ITAB-FTRMI+0(4).
* LV_MONTH = ITAB-FTRMI+4(2).
* REFRESH IT_CRCO.
* CLEAR IT_CRCO.
*
* SELECT KOKRS
* KOSTL
* LSTAR
* INTO TABLE IT_CRCO
* FROM CRCO
* WHERE OBJTY = 'A'
* AND OBJID = LV_ARBID.
* LOOP AT IT_CRCO.
* CONCATENATE 'KL' IT_CRCO-KOKRS IT_CRCO-KOSTL IT_CRCO-LSTAR INTO IT_CRCO-OBJNR.
* MODIFY IT_CRCO.
* CLEAR IT_CRCO.
* ENDLOOP.
*
*
*
* IF IT_CRCO[] IS NOT INITIAL.
* SELECT LEDNR
* OBJNR
* GJAHR
* WRTTP
* VERSN
* TARKZ
* PERBL
*
* TKG001
* TKG002
* TKG003
* TKG004
* TKG005
* TKG006
* TKG007
* TKG008
* TKG009
* TKG010
* TKG011
* TKG012
*
* TKE001
* TKE002
* TKE003
* TKE004
* TKE005
* TKE006
* TKE007
* TKE008
* TKE009
* TKE010
* TKE011
* TKE012
* INTO TABLE IT_COST
* FROM COST
* FOR ALL ENTRIES IN IT_CRCO
* WHERE LEDNR = '00'
* AND OBJNR = IT_CRCO-OBJNR
* AND GJAHR = LV_GJAHR
* AND TARKZ = '001'.
*
* CLEAR LV_TKG01.
* CLEAR LV_TKE01.
* CLEAR LV_TKG02.
* CLEAR LV_TKE02.
* CLEAR LV_TKG03.
* CLEAR LV_TKE03.
*
* LOOP AT IT_COST.
* IF IT_COST+17(4) = '1001'.
* IF LV_MONTH = '01'.
* LV_TKG01 = IT_COST-TKG001.
* LV_TKE01 = IT_COST-TKE001.
* ELSEIF LV_MONTH = '02'.
* LV_TKG01 = IT_COST-TKG002.
* LV_TKE01 = IT_COST-TKE002.
* ELSEIF LV_MONTH = '03'.
* LV_TKG01 = IT_COST-TKG003.
* LV_TKE01 = IT_COST-TKE003.
* ELSEIF LV_MONTH = '04'.
* LV_TKG01 = IT_COST-TKG004.
* LV_TKE01 = IT_COST-TKE004.
* ELSEIF LV_MONTH = '05'.
* LV_TKG01 = IT_COST-TKG005.
* LV_TKE01 = IT_COST-TKE005.
* ELSEIF LV_MONTH = '06'.
* LV_TKG01 = IT_COST-TKG006.
* LV_TKE01 = IT_COST-TKE006.
* ELSEIF LV_MONTH = '07'.
* LV_TKG01 = IT_COST-TKG007.
* LV_TKE01 = IT_COST-TKE007.
* ELSEIF LV_MONTH = '08'.
* LV_TKG01 = IT_COST-TKG008.
* LV_TKE01 = IT_COST-TKE008.
* ELSEIF LV_MONTH = '09'.
* LV_TKG01 = IT_COST-TKG009.
* LV_TKE01 = IT_COST-TKE009.
* ELSEIF LV_MONTH = '10'.
* LV_TKG01 = IT_COST-TKG010.
* LV_TKE01 = IT_COST-TKE010.
* ELSEIF LV_MONTH = '11'.
* LV_TKG01 = IT_COST-TKG011.
* LV_TKE01 = IT_COST-TKE011.
* ELSEIF LV_MONTH = '12'.
* LV_TKG01 = IT_COST-TKG012.
* LV_TKE01 = IT_COST-TKE012.
* ENDIF.
*
* ELSEIF IT_COST+17(4) = '1000'.
* IF LV_MONTH = '01'.
* LV_TKG02 = IT_COST-TKG001.
* LV_TKE02 = IT_COST-TKE001.
* ELSEIF LV_MONTH = '02'.
* LV_TKG02 = IT_COST-TKG002.
* LV_TKE02 = IT_COST-TKE002.
* ELSEIF LV_MONTH = '03'.
* LV_TKG02 = IT_COST-TKG003.
* LV_TKE02 = IT_COST-TKE003.
* ELSEIF LV_MONTH = '04'.
* LV_TKG02 = IT_COST-TKG004.
* LV_TKE02 = IT_COST-TKE004.
* ELSEIF LV_MONTH = '05'.
* LV_TKG02 = IT_COST-TKG005.
* LV_TKE02 = IT_COST-TKE005.
* ELSEIF LV_MONTH = '06'.
* LV_TKG02 = IT_COST-TKG006.
* LV_TKE02 = IT_COST-TKE006.
* ELSEIF LV_MONTH = '07'.
* LV_TKG02 = IT_COST-TKG007.
* LV_TKE02 = IT_COST-TKE007.
* ELSEIF LV_MONTH = '08'.
* LV_TKG02 = IT_COST-TKG008.
* LV_TKE02 = IT_COST-TKE008.
* ELSEIF LV_MONTH = '09'.
* LV_TKG02 = IT_COST-TKG009.
* LV_TKE02 = IT_COST-TKE009.
* ELSEIF LV_MONTH = '10'.
* LV_TKG02 = IT_COST-TKG010.
* LV_TKE02 = IT_COST-TKE010.
* ELSEIF LV_MONTH = '11'.
* LV_TKG02 = IT_COST-TKG011.
* LV_TKE02 = IT_COST-TKE011.
* ELSEIF LV_MONTH = '12'.
* LV_TKG02 = IT_COST-TKG012.
* LV_TKE02 = IT_COST-TKE012.
* ENDIF.
* ELSEIF IT_COST+17(4) = '1003'.
* IF LV_MONTH = '01'.
* LV_TKG03 = IT_COST-TKG001.
* LV_TKE03 = IT_COST-TKE001.
* ELSEIF LV_MONTH = '02'.
* LV_TKG03 = IT_COST-TKG002.
* LV_TKE03 = IT_COST-TKE002.
* ELSEIF LV_MONTH = '03'.
* LV_TKG03 = IT_COST-TKG003.
* LV_TKE03 = IT_COST-TKE003.
* ELSEIF LV_MONTH = '04'.
* LV_TKG03 = IT_COST-TKG004.
* LV_TKE03 = IT_COST-TKE004.
* ELSEIF LV_MONTH = '05'.
* LV_TKG03 = IT_COST-TKG005.
* LV_TKE03 = IT_COST-TKE005.
* ELSEIF LV_MONTH = '06'.
* LV_TKG03 = IT_COST-TKG006.
* LV_TKE03 = IT_COST-TKE006.
* ELSEIF LV_MONTH = '07'.
* LV_TKG03 = IT_COST-TKG007.
* LV_TKE03 = IT_COST-TKE007.
* ELSEIF LV_MONTH = '08'.
* LV_TKG03 = IT_COST-TKG008.
* LV_TKE03 = IT_COST-TKE008.
* ELSEIF LV_MONTH = '09'.
* LV_TKG03 = IT_COST-TKG009.
* LV_TKE03 = IT_COST-TKE009.
* ELSEIF LV_MONTH = '10'.
* LV_TKG03 = IT_COST-TKG010.
* LV_TKE03 = IT_COST-TKE010.
* ELSEIF LV_MONTH = '11'.
* LV_TKG03 = IT_COST-TKG011.
* LV_TKE03 = IT_COST-TKE011.
* ELSEIF LV_MONTH = '12'.
* LV_TKG03 = IT_COST-TKG012.
* LV_TKE03 = IT_COST-TKE012.
* ENDIF.
* ENDIF.
* ENDLOOP.
* ENDIF.
*
*
* ITAB-ZPVGW01 * LV_TKG01 / LV_TKE01
* ITAB-ZPVGW02 * LV_TKG02 / LV_TKE01
* ITAB-ZPVGW03 * LV_TKG03 / LV_TKE01
*
* ITAB-TSVGW01 * LV_TKG01 / LV_TKE01
* ITAB-TSVGW02 * LV_TKG02 / LV_TKE01
* ITAB-TSVGW03 * LV_TKG03 / LV_TKE01
*
* ITAB-LHVGW01 * LV_TKG01 / LV_TKE01
* ITAB-LHVGW02 * LV_TKG02 / LV_TKE01
* ITAB-LHVGW03 * LV_TKG03 / LV_TKE01
*
* ITAB-JYVGW01 * LV_TKG01 / LV_TKE01
* ITAB-JYVGW02 * LV_TKG02 / LV_TKE01
* ITAB-JYVGW03 * LV_TKG03 / LV_TKE01
*
* ITAB-BZVGW01 * LV_TKG01 / LV_TKE01
* ITAB-BZVGW02 * LV_TKG02 / LV_TKE01
* ITAB-BZVGW03 * LV_TKG03 / LV_TKE01
*
************以下程式碼根據工單下單的工時,查詢標準工時的成本的單價,以及計算成本
ENDLOOP.
* 獲取實際工時
LOOP AT IT_AFRU_VV WHERE AUFPL = ITAB-AUFPL.
CLEAR LV_ARBID.
CLEAR IT_AFVC.
READ TABLE IT_AFVC WITH KEY AUFPL = IT_AFRU_VV-AUFPL APLZL = IT_AFRU_VV-APLZL.
IF SY-SUBRC EQ 0.
LV_ARBID = IT_AFVC-ARBID.
ENDIF.
CLEAR LV_ARBPL.
SELECT SINGLE
ARBPL
INTO LV_ARBPL
FROM CRHD
WHERE OBJTY = 'A'
AND OBJID = LV_ARBID.
IF LV_ARBPL = 'STRZP' OR LV_ARBPL+0(2) = 'ZP'.
ITAB-BZPVGW01 = IT_AFRU_VV-ISM01.
ITAB-BZPVGW02 = IT_AFRU_VV-ISM02.
ITAB-BZPVGW03 = IT_AFRU_VV-ISM03.
ELSEIF LV_ARBPL = 'STRTS' OR LV_ARBPL+0(2) = 'TS'.
ITAB-BTSVGW01 = IT_AFRU_VV-ISM01.
ITAB-BTSVGW02 = IT_AFRU_VV-ISM02.
ITAB-BTSVGW03 = IT_AFRU_VV-ISM03.
ELSEIF LV_ARBPL = 'STRLH' OR LV_ARBPL+0(2) = 'LH'.
ITAB-BLHVGW01 = IT_AFRU_VV-ISM01.
ITAB-BLHVGW02 = IT_AFRU_VV-ISM02.
ITAB-BLHVGW03 = IT_AFRU_VV-ISM03.
ELSEIF LV_ARBPL = 'STRYJ' OR LV_ARBPL+0(2) = 'YJ'.
ITAB-BJYVGW01 = IT_AFRU_VV-ISM01.
ITAB-BJYVGW02 = IT_AFRU_VV-ISM02.
ITAB-BJYVGW03 = IT_AFRU_VV-ISM03.
ELSEIF LV_ARBPL = 'STRBZ' OR LV_ARBPL+0(2) = 'BZ'.
ITAB-BBZVGW01 = IT_AFRU_VV-ISM01.
ITAB-BBZVGW02 = IT_AFRU_VV-ISM02.
ITAB-BBZVGW03 = IT_AFRU_VV-ISM03.
ENDIF.
ENDLOOP.
MODIFY ITAB.
CLEAR ITAB.
ENDLOOP.
ENDIF.
DATA: T_STATUS LIKE BSVX-STTXT.
LOOP AT ITAB.
CALL FUNCTION 'STATUS_TEXT_EDIT'
EXPORTING
* CLIENT = SY-MANDT
* FLG_USER_STAT = ' '
OBJNR = ITAB-OBJNR " 單據號碼
* ONLY_ACTIVE = 'X'
SPRAS = 'E'
* BYPASS_BUFFER = ' '
IMPORTING
LINE = ITAB-XTZT. " 返回狀態
SELECT SINGLE
MAKTX
INTO ITAB-MAKTX
FROM MAKT
WHERE MATNR = ITAB-PLNBEZ
AND SPRAS = SY-LANGU.
SELECT SINGLE
BKLAS
INTO ITAB-BKLAS
FROM MBEW
WHERE MATNR = ITAB-PLNBEZ
AND BWKEY = ITAB-WERKS.
SELECT SINGLE
MTART
INTO ITAB-MTART
FROM MARA
WHERE MATNR = ITAB-PLNBEZ.
SELECT SINGLE
VKBUR
INTO ITAB-VKBUR
FROM VBAK
WHERE VBELN = ITAB-KDAUF.
SELECT SINGLE
WEMNG
INTO ITAB-GWEMG
FROM AFPO
WHERE AUFNR = ITAB-AUFNR.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = ITAB-AUFNR
IMPORTING
OUTPUT = ITAB-AUFNR.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = ITAB-PLNBEZ
IMPORTING
OUTPUT = ITAB-PLNBEZ.
MODIFY ITAB.
CLEAR ITAB.
ENDLOOP.
ENDFORM. " FRM_SELECT_DATA
*&---------------------------------------------------------------------*
*& FORM DISPLAY_DATA
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
* --> P1 TEXT
* <-- P2 TEXT
*----------------------------------------------------------------------*
FORM FRM_DISPLAY .
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'AUFNR'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '生產訂單編號'.
FIELDCAT-SELTEXT_M = '生產訂單編號'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'XTZT'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '系統狀態'.
FIELDCAT-SELTEXT_M = '系統狀態'.
FIELDCAT-OUTPUTLEN = 20.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'WERKS'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '工廠'.
FIELDCAT-SELTEXT_M = '工廠'.
FIELDCAT-OUTPUTLEN = 10.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'AUART'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '訂單型別'.
FIELDCAT-SELTEXT_M = '訂單型別'.
FIELDCAT-OUTPUTLEN = 8.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'KDAUF'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '銷售訂單編號'.
FIELDCAT-SELTEXT_M = '銷售訂單編號'.
FIELDCAT-OUTPUTLEN = 12.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'KDPOS'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '銷售訂單行專案'.
FIELDCAT-SELTEXT_M = '銷售訂單行專案'.
FIELDCAT-OUTPUTLEN = 12.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'VKBUR'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '辦事處'.
FIELDCAT-SELTEXT_M = '辦事處'.
FIELDCAT-OUTPUTLEN = 12.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'PLNBEZ'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '物料編號'.
FIELDCAT-SELTEXT_M = '物料編號'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'MAKTX'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '物料描述'.
FIELDCAT-SELTEXT_M = '物料描述'.
FIELDCAT-OUTPUTLEN = 35.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'GAMNG'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '訂單數量'.
FIELDCAT-SELTEXT_M = '訂單數量'.
FIELDCAT-OUTPUTLEN = 12.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'GWEMG'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '確認數量'.
FIELDCAT-SELTEXT_M = '確認數量'.
FIELDCAT-OUTPUTLEN = 12.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'BKLAS'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '評估類'.
FIELDCAT-SELTEXT_M = '評估類'.
FIELDCAT-OUTPUTLEN = 10.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'MTART'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '物料型別'.
FIELDCAT-SELTEXT_M = '物料型別'.
FIELDCAT-OUTPUTLEN = 10.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'ZPVGW01'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '裝配-折舊標準工時'.
FIELDCAT-SELTEXT_M = '裝配-折舊標準工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'ZPVGW02'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '裝配-工資標準工時'.
FIELDCAT-SELTEXT_M = '裝配-工資標準工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'ZPVGW03'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '裝配-其他標準工時'.
FIELDCAT-SELTEXT_M = '裝配-其他標準工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'BZPVGW01'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '裝配-折舊實際工時'.
FIELDCAT-SELTEXT_M = '裝配-折舊實際工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'BZPVGW02'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '裝配-工資實際工時'.
FIELDCAT-SELTEXT_M = '裝配-工資實際工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'BZPVGW03'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '裝配-其他實際工時'.
FIELDCAT-SELTEXT_M = '裝配-其他實際工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'ZPKOSTL'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '裝配-成本中心'.
FIELDCAT-SELTEXT_M = '裝配-成本中心'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'TSVGW01'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '除錯-折舊標準工時'.
FIELDCAT-SELTEXT_M = '除錯-折舊標準工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'TSVGW02'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '除錯-工資標準工時'.
FIELDCAT-SELTEXT_M = '除錯-工資標準工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'TSVGW03'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '除錯-其他標準工時'.
FIELDCAT-SELTEXT_M = '除錯-其他標準工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'BTSVGW01'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '除錯-折舊實際工時'.
FIELDCAT-SELTEXT_M = '除錯-折舊實際工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'BTSVGW02'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '除錯-工資實際工時'.
FIELDCAT-SELTEXT_M = '除錯-工資實際工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'BTSVGW03'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '除錯-其他實際工時'.
FIELDCAT-SELTEXT_M = '除錯-其他實際工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'TSKOSTL'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '除錯-成本中心'.
FIELDCAT-SELTEXT_M = '除錯-成本中心'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'LHVGW01'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '老化-折舊標準工時'.
FIELDCAT-SELTEXT_M = '老化-折舊標準工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'LHVGW02'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '老化-工資標準工時'.
FIELDCAT-SELTEXT_M = '老化-工資標準工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'LHVGW03'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '老化-其他標準工時'.
FIELDCAT-SELTEXT_M = '老化-其他標準工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'BLHVGW01'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '老化-折舊實際工時'.
FIELDCAT-SELTEXT_M = '老化-折舊實際工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'BLHVGW02'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '老化-工資實際工時'.
FIELDCAT-SELTEXT_M = '老化-工資實際工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'BLHVGW03'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '老化-其他實際工時'.
FIELDCAT-SELTEXT_M = '老化-其他實際工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'LHKOSTL'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '老化-成本中心'.
FIELDCAT-SELTEXT_M = '老化-成本中心'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'JYVGW01'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '檢驗-折舊標準工時'.
FIELDCAT-SELTEXT_M = '檢驗-折舊標準工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'JYVGW02'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '檢驗-工資標準工時'.
FIELDCAT-SELTEXT_M = '檢驗-工資標準工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'JYVGW03'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '檢驗-其他標準工時'.
FIELDCAT-SELTEXT_M = '檢驗-其他標準工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'BJYVGW01'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '檢驗-折舊實際工時'.
FIELDCAT-SELTEXT_M = '檢驗-折舊實際工時'.
FIELDCAT-OUTPUTLEN = 18.
APPEND FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-FIELDNAME = 'BJYVGW02'.
FIELDCAT-TABNAME = 'ITAB'.
FIELDCAT-SELTEXT_S = '檢驗-工資實際工時'.
FIELDCAT-SELTEXT_M = '檢驗-工資實際工時'.
FIELDCAT-OUTPUTLEN =
相關推薦
abap 獲取生產訂單標準工時和實際報工工時的報表
*&---------------------------------------------------------------------**& REPORT ZMM_PO_QUERY*&*& REPORTNAME :生產訂單查詢系
獲取生產訂單的系統狀態
生產訂單有一些狀態,如:REL、TECO、DLV、CNF等,請問這些狀態是儲存在哪個資料庫表中呢,找了很久,莫找著,特來請教。 答: 函式搞定,STATUS_TEXT_EDIT AUFK 取得 -OBJNR --> JEST-STAT 物件狀態 JEST-
SAP 物料訂單建立、下達、報工、收貨與投料(ABAP程式碼)
對主體訂單下的某一類物料通過MRP控制者的判斷,可以對此類物料進行自動建立生產訂單,自動下達,報工、收貨,最後對主體訂單投料。 1、新增加一個MRP控制者:泵送鋼管類物料的MRP控制者必須設定為168. 2、根據輸入條件讀取主體訂單(剔除CLSD、TECO、DLT)的OBO
SAP介面開發-根據生產訂單編號獲取物料資訊
根據生產訂單編號獲取物料資訊需要呼叫 BAPI_PRODORD_GET_DETAIL函式,呼叫介面用C#語言實現的原始碼如下所示: //2018年10月19號新增 /// <summary> /// 根據生產訂單獲取物料資訊
關於報工和生產訂單的一些狀態解釋
關於報工和生產訂單的一些狀態解釋 2012年06月26日 15:09:27 Ian 閱讀數:13601 工單報工也稱為工單確認,而工單確認型別又有三種:完全確認、部分確認和自動最終確認。這三個有什麼區別呢?完全確認是將工單的數量如數報完了,而部分確認只是將工單的一部分數量
SAP中ABAP程式設計有關生產訂單的透明表有哪些
生產訂單 事務碼 CO01 CO02 CO03 生產訂單 透明表 AFKO 擡頭 AFPO 行專案 AUFK 主資料 AFVC 工序 *************************************** 我在此代表ABAP程式設計的菜鳥和門外漢大聲呼籲,快NMB
SAP生產訂單和成本收集器在核算上的主要區別
生產訂單: 特點: 1、 按照批次進行核算 2、 只有完全完工,才能夠進行差異分析,分析差異來源。 目標製造費用:按照工單建立確認的作業數量*計劃作業價格的乘積得到; 實際製造費用:按照作業確認的作業數量*價格計算得到的實際作業價格的乘積; 目標物料成本:工單建立確認的
生產訂單成本的計劃、控制和結算
SAP系統成本分析功能關注訂單的成本,通過對計劃成本和實際成本的比較分析,可以發現成本控制上的問題,以便及時解決問題。 1、訂單成本計劃 在基礎資料齊全的基礎上,系統可以自動滾算生產訂單的成本。生產訂單計劃成本是在生產訂單在下達時,根據當時生產訂單的BOM元件結構和工藝路線,計算出訂單的計劃成本,該計劃成本
獲取的NSDate時間和實際相差8個小時的解決方案
最近在開發公司的專案,遇到了這個坑,特意記錄下來以防以後用到忘了。 獲取當前0點時刻,在開發過程中,遇到了獲取的時間和實際時間相差8個小時的問題,現在用的是下面的方法去解決這個問題並獲取當日的0點時刻
【PP操作手冊】建立和下達返修生產訂單
選單路徑:SAP 選單 > 後勤 > 生產 >車間現場控制>訂單>建立>CO07 – 不含物料 事務程式碼:CO07 滑鼠雙擊,進入“生產訂單建立:初始螢幕”檢視。 欄位名稱 描述
cudaMemGetInfo獲取的可用視訊記憶體和全部視訊記憶體有問題和實際有出入?CPU多執行緒呼叫GPU
我在vs上執行cuda程式,用cudaMemGetInfo獲得的總的視訊記憶體是3g,但是實際應該有4g。可用的視訊記憶體是3028M,那就是用了44M,但是用GPU-Z和nvidia-smi都顯示用了800多M,不知道為什麼是這樣?這種問題很難定量。例如一臺有 32GB 記
SAP PP 中關於計劃訂單和生產訂單的日期計算
計劃單的基本完成日期 = 上級物料需求日期 - 物料主資料MRP2檢視的收貨處理時間天數 (全部以工廠日曆的工作日計算) 計劃單的基本開始日期 = 計劃單的基本完成日期 - 物料主資料MRP2檢視的自制生產天數 (全部
java獲取mp3的時長和播放mp3文件
length trace ger snapshot import oid 時長 cnblogs return 所需包為jaudiotagger-2.2.6-SNAPSHOT.jar和jl1.0.1.jar。 import java.io.BufferedInputStre
php獲取今日開始時間戳和結束時間戳
mktime date 開始時間 begin 時間 ide nth 時間戳 oda 1、php獲取今日開始時間戳和結束時間戳 $beginToday=mktime(0,0,0,date(‘m‘),date(‘d‘),date(‘Y‘));$endToday=mktime(
Android Studio獲取開發版SHA1值和發布版SHA1值,詳細過程
pre 希望 系統 water target 詳細 andro targe pac 轉自原文 Android Studio獲取開發版SHA1值和發布版SHA1值的史上最詳細方法 前言: 今天我想把百度地圖的定位集成到項目中來,想寫個小小的案例,實現一下,但在集成
Nginx學習筆記04URL匹配規則和實際路徑
oca 定義 wid val style 例如 top font 相同 1.1.1. URL匹配規則 匹配規則配置總結: location [=|~|~*|^~] /uri/ { } 優先級 匹配方式 描述 1最高 = 精確匹配。
【翻譯自mos文章】rman 標準版和企業版的兼容性
ont 數據庫 rac targe cati als track class dup rman 標準版和企業版的兼容性 來源於: RMAN Standard and Enterprise Edition Compatibility (文檔 ID 730193.1
【Android】獲取控件的寬和高
height string -a @override parent popu tle post spa 有時候我們須要在Activity的時候獲取控件的寬和高來做一些操作,以下介紹三種獲取寬和高的方式: 1. onWindowFoc
JS獲取屏幕的寬度和高度
邊線 spa top offset nbsp log off document color <html> <script> function a(){ document.write( "屏幕分辨率為:"+screen.width
部署標準交換機和分布式交換機(三)
部署標準交換機和分布式交換機實驗目標:部署標準交換機和分布式交換機實驗要求:標準交換機的配置:分別在兩臺esxi主機中添加6塊物理網卡,橋接到vmnet1。分別在兩臺esxi主機配置標準交換機,將vSwitch0交換機添加一個物理網卡,實現負載均衡和容錯。分別在兩臺esxi主機中,將vSwitch0交換機添加