REPORT ZFIALV008 MESSAGE-ID ZSD LINE-SIZE 255 LINE-COUNT 65(3) NO STANDARD PAGE HEADING. INCLUDE: , ZALV001. TABLES:TKA01,COSP,RKSB1,CSKS,COSS,ONRKL,SSCRFIELDS,ZFI08. * 宣告欲使用之變數名稱 DATA: BEGIN OF I_CSKS OCCURS 0, "成本中心 KOKRS LIKE CSKS-KOKRS, "成本控制範圍 KOSTL LIKE CSKS-KOSTL, "成本中心 END OF I_CSKS. DATA: BEGIN OF I_CSKT OCCURS 0, "成本中心 KOKRS LIKE CSKT-KOKRS, "成本控制範圍 KOSTL LIKE CSKT-KOSTL, "成本中心 DATBI LIKE CSKT-DATBI, "有效期限 KTEXT LIKE CSKT-KTEXT, "成本中心名稱 END OF I_CSKT. DATA: BEGIN OF I_OBJNR OCCURS 0, "成本中心物件碼 OBJNR LIKE ONRKS-OBJNR, "物件碼 KOKRS LIKE ONRKS-KOKRS, "成本控制範圍 KOSTL LIKE ONRKS-KOSTL, "成本中心 END OF I_OBJNR. DATA: BEGIN OF O_OBJNR OCCURS 0, "成本中心/作業類型物件碼 OBJNR LIKE ONRKL-OBJNR, "物件碼 KOKRS LIKE ONRKL-KOKRS, "成本控制範圍 KOSTL LIKE ONRKL-KOSTL, "成本中心 LSTAR LIKE ONRKL-LSTAR, "作業類型 END OF O_OBJNR. DATA: BEGIN OF I_SETLEAF OCCURS 0, "成本中心群組成本中心 SETCLASS LIKE SETLEAF-SETCLASS, "類別 SUBCLASS LIKE SETLEAF-SUBCLASS, "成本控制範圍 SETNAME LIKE SETLEAF-SETNAME, "成本中心群組 VALFROM LIKE SETLEAF-VALFROM, "成本中心 VALTO LIKE SETLEAF-VALFROM, "成本中心 END OF I_SETLEAF. DATA: BEGIN OF I_SETLEAF1 OCCURS 1000, "成本要素群組1&成本要素1 SETCLASS LIKE SETLEAF-SETCLASS, "類別 SUBCLASS LIKE SETLEAF-SUBCLASS, "成本控制範圍 SETNAME LIKE SETLEAF-SETNAME, "成本要素群組 VALFROM LIKE SETLEAF-VALFROM, "成本要素 VALTO LIKE SETLEAF-VALFROM, "成本要素 END OF I_SETLEAF1. DATA: BEGIN OF I_COSL OCCURS 0, "過帳面積值 GJAHR LIKE COSL-GJAHR, "年度 OBJNR LIKE COSL-OBJNR, "物件號碼 MEINH LIKE COSL-MEINH, "作業單位 LST001 LIKE COSL-LST001, "1月作業數量 LST002 LIKE COSL-LST002, "2月作業數量 LST003 LIKE COSL-LST003, "3月作業數量 LST004 LIKE COSL-LST004, "4月作業數量 LST005 LIKE COSL-LST005, "5月作業數量 LST006 LIKE COSL-LST006, "6月作業數量 LST007 LIKE COSL-LST007, "7月作業數量 LST008 LIKE COSL-LST008, "8月作業數量 LST009 LIKE COSL-LST009, "9月作業數量 LST010 LIKE COSL-LST010, "10月作業數量 LST011 LIKE COSL-LST011, "11月作業數量 LST012 LIKE COSL-LST012, "12月作業數量 END OF I_COSL. DATA: BEGIN OF I_COSS1 OCCURS 0, "COSS值(固定人工) OBKEY(35) TYPE C, OBJNR LIKE COSS-OBJNR, "物件號碼 GJAHR LIKE COSS-GJAHR, "年度 KSTAR LIKE COSS-KSTAR, "成本要素 TWAER LIKE COSS-TWAER, "幣別 PAROB LIKE COSS-PAROB, "合作夥伴物件 BEKNZ LIKE COSS-BEKNZ, "借方/貸方指示碼 WKG001 LIKE COSS-WKG001, "1月以成本控制範圍幣別計的總值 WKG002 LIKE COSS-WKG002, "2月以成本控制範圍幣別計的總值 WKG003 LIKE COSS-WKG003, "3月以成本控制範圍幣別計的總值 WKG004 LIKE COSS-WKG004, "4月以成本控制範圍幣別計的總值 WKG005 LIKE COSS-WKG005, "5月以成本控制範圍幣別計的總值 WKG006 LIKE COSS-WKG006, "6月以成本控制範圍幣別計的總值 WKG007 LIKE COSS-WKG007, "7月以成本控制範圍幣別計的總值 WKG008 LIKE COSS-WKG008, "8月以成本控制範圍幣別計的總值 WKG009 LIKE COSS-WKG009, "9月以成本控制範圍幣別計的總值 WKG010 LIKE COSS-WKG010, "10月以成本控制範圍幣別計的總值 WKG011 LIKE COSS-WKG011, "11月以成本控制範圍幣別計的總值 WKG012 LIKE COSS-WKG012, "12月以成本控制範圍幣別計的總值 END OF I_COSS1. DATA: BEGIN OF I_COSP1 OCCURS 0, "COSP值(固定人工) OBKEY(35) TYPE C, OBJNR LIKE COSP-OBJNR, "物件號碼 GJAHR LIKE COSP-GJAHR, "年度 KSTAR LIKE COSP-KSTAR, "成本要素 TWAER LIKE COSP-TWAER, "幣別 BEKNZ LIKE COSP-BEKNZ, "借方/貸方指示碼 WKG001 LIKE COSP-WKG001, "1月以成本控制範圍幣別計的總值 WKG002 LIKE COSP-WKG002, "2月以成本控制範圍幣別計的總值 WKG003 LIKE COSP-WKG003, "3月以成本控制範圍幣別計的總值 WKG004 LIKE COSP-WKG004, "4月以成本控制範圍幣別計的總值 WKG005 LIKE COSP-WKG005, "5月以成本控制範圍幣別計的總值 WKG006 LIKE COSP-WKG006, "6月以成本控制範圍幣別計的總值 WKG007 LIKE COSP-WKG007, "7月以成本控制範圍幣別計的總值 WKG008 LIKE COSP-WKG008, "8月以成本控制範圍幣別計的總值 WKG009 LIKE COSP-WKG009, "9月以成本控制範圍幣別計的總值 WKG010 LIKE COSP-WKG010, "10月以成本控制範圍幣別計的總值 WKG011 LIKE COSP-WKG011, "11月以成本控制範圍幣別計的總值 WKG012 LIKE COSP-WKG012, "12月以成本控制範圍幣別計的總值 END OF I_COSP1. DATA: BEGIN OF V_COSL OCCURS 0, "過帳面積值 OBJNR LIKE COSL-OBJNR, "物件號碼 AMT1 TYPE P DECIMALS 3, "過帳面積 MEINH LIKE COSL-MEINH, "作業單位 LST001 LIKE COSL-LST001, "1月作業數量 LST002 LIKE COSL-LST002, "2月作業數量 LST003 LIKE COSL-LST003, "3月作業數量 LST004 LIKE COSL-LST004, "4月作業數量 LST005 LIKE COSL-LST005, "5月作業數量 LST006 LIKE COSL-LST006, "6月作業數量 LST007 LIKE COSL-LST007, "7月作業數量 LST008 LIKE COSL-LST008, "8月作業數量 LST009 LIKE COSL-LST009, "9月作業數量 LST010 LIKE COSL-LST010, "10月作業數量 LST011 LIKE COSL-LST011, "11月作業數量 LST012 LIKE COSL-LST012, "12月作業數量 END OF V_COSL. DATA: BEGIN OF V_COSS1 OCCURS 0, "COSS值(固定人工) OBJNR LIKE COSL-OBJNR, "物件號碼 AMT1 TYPE P DECIMALS 2, "固定人工 KSTAR LIKE CSKU-KSTAR, "成本要素 KTEXT LIKE CSKU-KTEXT, "成本要素名稱 WKG001 LIKE COSS-WKG001, "1月以成本控制範圍幣別計的總值 WKG002 LIKE COSS-WKG002, "2月以成本控制範圍幣別計的總值 WKG003 LIKE COSS-WKG003, "3月以成本控制範圍幣別計的總值 WKG004 LIKE COSS-WKG004, "4月以成本控制範圍幣別計的總值 WKG005 LIKE COSS-WKG005, "5月以成本控制範圍幣別計的總值 WKG006 LIKE COSS-WKG006, "6月以成本控制範圍幣別計的總值 WKG007 LIKE COSS-WKG007, "7月以成本控制範圍幣別計的總值 WKG008 LIKE COSS-WKG008, "8月以成本控制範圍幣別計的總值 WKG009 LIKE COSS-WKG009, "9月以成本控制範圍幣別計的總值 WKG010 LIKE COSS-WKG010, "10月以成本控制範圍幣別計的總值 WKG011 LIKE COSS-WKG011, "11月以成本控制範圍幣別計的總值 WKG012 LIKE COSS-WKG012, "12月以成本控制範圍幣別計的總值 END OF V_COSS1. DATA: BEGIN OF V_COSP1 OCCURS 0, "COSP值(固定人工) OBJNR LIKE COSL-OBJNR, "物件號碼 AMT1 TYPE P DECIMALS 2, "固定人工 KSTAR LIKE CSKU-KSTAR, "成本要素 KTEXT LIKE CSKU-KTEXT, "成本要素名稱 WKG001 LIKE COSP-WKG001, "1月以成本控制範圍幣別計的總值 WKG002 LIKE COSP-WKG002, "2月以成本控制範圍幣別計的總值 WKG003 LIKE COSP-WKG003, "3月以成本控制範圍幣別計的總值 WKG004 LIKE COSP-WKG004, "4月以成本控制範圍幣別計的總值 WKG005 LIKE COSP-WKG005, "5月以成本控制範圍幣別計的總值 WKG006 LIKE COSP-WKG006, "6月以成本控制範圍幣別計的總值 WKG007 LIKE COSP-WKG007, "7月以成本控制範圍幣別計的總值 WKG008 LIKE COSP-WKG008, "8月以成本控制範圍幣別計的總值 WKG009 LIKE COSP-WKG009, "9月以成本控制範圍幣別計的總值 WKG010 LIKE COSP-WKG010, "10月以成本控制範圍幣別計的總值 WKG011 LIKE COSP-WKG011, "11月以成本控制範圍幣別計的總值 WKG012 LIKE COSP-WKG012, "12月以成本控制範圍幣別計的總值 END OF V_COSP1. DATA: BEGIN OF DATA OCCURS 0, "產能費用分析 OBJNR LIKE COSL-OBJNR, "物件號碼 KOSTL LIKE CSKS-KOSTL, "成本中心 KTEXT LIKE CSKT-KTEXT, "成本中心名? KSTAR LIKE CSKU-KSTAR, "成本要素 KTEXT1 LIKE CSKU-KTEXT, "成本要素名稱 SETNAME LIKE SETLEAF-SETNAME, "成本要素組 DESCRIPT LIKE SETHEADERT-DESCRIPT, "成本要素組描述 AMT1 TYPE P, "LIKE COSS-WKG001, "固定人工 WKG001 TYPE P, "LIKE COSS-WKG001, "1月以成本控制範圍幣別計的總值 WKG002 TYPE P, "LIKE COSS-WKG002, "2月以成本控制範圍幣別計的總值 WKG003 TYPE P, "LIKE COSS-WKG003, "3月以成本控制範圍幣別計的總值 WKG004 TYPE P, "LIKE COSS-WKG004, "4月以成本控制範圍幣別計的總值 WKG005 TYPE P, "LIKE COSS-WKG005, "5月以成本控制範圍幣別計的總值 WKG006 TYPE P, "LIKE COSS-WKG006, "6月以成本控制範圍幣別計的總值 WKG007 TYPE P, "LIKE COSS-WKG007, "7月以成本控制範圍幣別計的總值 WKG008 TYPE P, "LIKE COSS-WKG008, "8月以成本控制範圍幣別計的總值 WKG009 TYPE P, "LIKE COSS-WKG009, "9月以成本控制範圍幣別計的總值 WKG010 TYPE P, "LIKE COSS-WKG010, "10月以成本控制範圍幣別計的總值 WKG011 TYPE P, "LIKE COSS-WKG011, "11月以成本控制範圍幣別計的總值 WKG012 TYPE P, "LIKE COSS-WKG012, "12月以成本控制範圍幣別計的總值 END OF DATA. DATA: BEGIN OF ITAB OCCURS 0, MANDT LIKE SY-MANDT, KOKRS LIKE TKA01-KOKRS, "成本控制範圍 GJAHR LIKE COSP-GJAHR, "會計年度 KOSTL LIKE CSKS-KOSTL, "成本中心 SETNAME LIKE SETLEAF-SETNAME, "成本要素組 KSTAR LIKE CSKU-KSTAR, "成本要素 WKG001 LIKE COSS-WKG001, "1月以成本控制範圍幣別計的總值 WKG002 LIKE COSS-WKG002, "2月以成本控制範圍幣別計的總值 WKG003 LIKE COSS-WKG003, "3月以成本控制範圍幣別計的總值 WKG004 LIKE COSS-WKG004, "4月以成本控制範圍幣別計的總值 WKG005 LIKE COSS-WKG005, "5月以成本控制範圍幣別計的總值 WKG006 LIKE COSS-WKG006, "6月以成本控制範圍幣別計的總值 WKG007 LIKE COSS-WKG007, "7月以成本控制範圍幣別計的總值 WKG008 LIKE COSS-WKG008, "8月以成本控制範圍幣別計的總值 WKG009 LIKE COSS-WKG009, "9月以成本控制範圍幣別計的總值 WKG010 LIKE COSS-WKG010, "10月以成本控制範圍幣別計的總值 WKG011 LIKE COSS-WKG011, "11月以成本控制範圍幣別計的總值 WKG012 LIKE COSS-WKG012, "12月以成本控制範圍幣別計的總值 END OF ITAB. DATA: BEGIN OF ITAB_OUT OCCURS 0, KOSTL LIKE CSKS-KOSTL, "成本中心 KTEXT LIKE CSKT-KTEXT, "成本中心名稱 ** 一月 AKG001 TYPE P DECIMALS 2, "過帳面積 AKG002 TYPE P DECIMALS 2, "正常產能 AKG003 TYPE P DECIMALS 4, "產能利用率 AKG004 TYPE P, "LIKE COSS-WKG001, "實際成本固定-人工 AKG005 TYPE P, "LIKE COSS-WKG002, "實際成本固定-製造費用 AKG006 LIKE COSS-WKG003, "正常產能單位成本(SF)-固定-人工 AKG007 LIKE COSS-WKG004, "正常產能單位成本(SF)-固定-製費 AKG008 TYPE P, "LIKE COSS-WKG005, "正常產能成本固定-人工 AKG009 TYPE P, "LIKE COSS-WKG006, "正常產能成本固定-製費 AKG010 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-人工 AKG011 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-製費 AKG012 TYPE P, "LIKE COSS-WKG001, "閒置產能成本合計 ** 二月 BKG001 TYPE P DECIMALS 2, "過帳面積 BKG002 TYPE P DECIMALS 2, "正常產能 BKG003 TYPE P DECIMALS 4, "產能利用率 BKG004 TYPE P, "LIKE COSS-WKG001, "實際成本固定-人工 BKG005 TYPE P, "LIKE COSS-WKG002, "實際成本固定-製造費用 BKG006 LIKE COSS-WKG003, "正常產能單位成本(SF)-固定-人工 BKG007 LIKE COSS-WKG004, "正常產能單位成本(SF)-固定-製費 BKG008 TYPE P, "LIKE COSS-WKG005, "正常產能成本固定-人工 BKG009 TYPE P, "LIKE COSS-WKG006, "正常產能成本固定-製費 BKG010 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-人工 BKG011 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-製費 BKG012 TYPE P, "LIKE COSS-WKG001, "閒置產能成本合計 ** 三月 CKG001 TYPE P DECIMALS 2, "過帳面積 CKG002 TYPE P DECIMALS 2, "正常產能 CKG003 TYPE P DECIMALS 4, "產能利用率 CKG004 TYPE P, "LIKE COSS-WKG001, "實際成本固定-人工 CKG005 TYPE P, "LIKE COSS-WKG002, "實際成本固定-製造費用 CKG006 LIKE COSS-WKG003, "正常產能單位成本(SF)-固定-人工 CKG007 LIKE COSS-WKG004, "正常產能單位成本(SF)-固定-製費 CKG008 TYPE P, "LIKE COSS-WKG005, "正常產能成本固定-人工 CKG009 TYPE P, "LIKE COSS-WKG006, "正常產能成本固定-製費 CKG010 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-人工 CKG011 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-製費 CKG012 TYPE P, "LIKE COSS-WKG001, "閒置產能成本合計 ** 四月 DKG001 TYPE P DECIMALS 2, "過帳面積 DKG002 TYPE P DECIMALS 2, "正常產能 DKG003 TYPE P DECIMALS 4, "產能利用率 DKG004 TYPE P, "LIKE COSS-WKG001, "實際成本固定-人工 DKG005 TYPE P, "LIKE COSS-WKG002, "實際成本固定-製造費用 DKG006 LIKE COSS-WKG003, "正常產能單位成本(SF)-固定-人工 DKG007 LIKE COSS-WKG004, "正常產能單位成本(SF)-固定-製費 DKG008 TYPE P, "LIKE COSS-WKG005, "正常產能成本固定-人工 DKG009 TYPE P, "LIKE COSS-WKG006, "正常產能成本固定-製費 DKG010 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-人工 DKG011 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-製費 DKG012 TYPE P, "LIKE COSS-WKG001, "閒置產能成本合計 ** 五月 EKG001 TYPE P DECIMALS 2, "過帳面積 EKG002 TYPE P DECIMALS 2, "正常產能 EKG003 TYPE P DECIMALS 4, "產能利用率 EKG004 TYPE P, "LIKE COSS-WKG001, "實際成本固定-人工 EKG005 TYPE P, "LIKE COSS-WKG002, "實際成本固定-製造費用 EKG006 LIKE COSS-WKG003, "正常產能單位成本(SF)-固定-人工 EKG007 LIKE COSS-WKG004, "正常產能單位成本(SF)-固定-製費 EKG008 TYPE P, "LIKE COSS-WKG005, "正常產能成本固定-人工 EKG009 TYPE P, "LIKE COSS-WKG006, "正常產能成本固定-製費 EKG010 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-人工 EKG011 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-製費 EKG012 TYPE P, "LIKE COSS-WKG001, "閒置產能成本合計 ** 六月 FKG001 TYPE P DECIMALS 2, "過帳面積 FKG002 TYPE P DECIMALS 2, "正常產能 FKG003 TYPE P DECIMALS 4, "產能利用率 FKG004 TYPE P, "LIKE COSS-WKG001, "實際成本固定-人工 FKG005 TYPE P, "LIKE COSS-WKG002, "實際成本固定-製造費用 FKG006 LIKE COSS-WKG003, "正常產能單位成本(SF)-固定-人工 FKG007 LIKE COSS-WKG004, "正常產能單位成本(SF)-固定-製費 FKG008 TYPE P, "LIKE COSS-WKG005, "正常產能成本固定-人工 FKG009 TYPE P, "LIKE COSS-WKG006, "正常產能成本固定-製費 FKG010 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-人工 FKG011 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-製費 FKG012 TYPE P, "LIKE COSS-WKG001, "閒置產能成本合計 ** 七月 GKG001 TYPE P DECIMALS 2, "過帳面積 GKG002 TYPE P DECIMALS 2, "正常產能 GKG003 TYPE P DECIMALS 4, "產能利用率 GKG004 TYPE P, "LIKE COSS-WKG001, "實際成本固定-人工 GKG005 TYPE P, "LIKE COSS-WKG002, "實際成本固定-製造費用 GKG006 LIKE COSS-WKG003, "正常產能單位成本(SF)-固定-人工 GKG007 LIKE COSS-WKG004, "正常產能單位成本(SF)-固定-製費 GKG008 TYPE P, "LIKE COSS-WKG005, "正常產能成本固定-人工 GKG009 TYPE P, "LIKE COSS-WKG006, "正常產能成本固定-製費 GKG010 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-人工 GKG011 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-製費 GKG012 TYPE P, "LIKE COSS-WKG001, "閒置產能成本合計 ** 八月 HKG001 TYPE P DECIMALS 2, "過帳面積 HKG002 TYPE P DECIMALS 2, "正常產能 HKG003 TYPE P DECIMALS 4, "產能利用率 HKG004 TYPE P, "LIKE COSS-WKG001, "實際成本固定-人工 HKG005 TYPE P, "LIKE COSS-WKG002, "實際成本固定-製造費用 HKG006 LIKE COSS-WKG003, "正常產能單位成本(SF)-固定-人工 HKG007 LIKE COSS-WKG004, "正常產能單位成本(SF)-固定-製費 HKG008 TYPE P, "LIKE COSS-WKG005, "正常產能成本固定-人工 HKG009 TYPE P, "LIKE COSS-WKG006, "正常產能成本固定-製費 HKG010 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-人工 HKG011 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-製費 HKG012 TYPE P, "LIKE COSS-WKG001, "閒置產能成本合計 ** 九月 IKG001 TYPE P DECIMALS 2, "過帳面積 IKG002 TYPE P DECIMALS 2, "正常產能 IKG003 TYPE P DECIMALS 4, "產能利用率 IKG004 TYPE P, "LIKE COSS-WKG001, "實際成本固定-人工 IKG005 TYPE P, "LIKE COSS-WKG002, "實際成本固定-製造費用 IKG006 LIKE COSS-WKG003, "正常產能單位成本(SF)-固定-人工 IKG007 LIKE COSS-WKG004, "正常產能單位成本(SF)-固定-製費 IKG008 TYPE P, "LIKE COSS-WKG005, "正常產能成本固定-人工 IKG009 TYPE P, "LIKE COSS-WKG006, "正常產能成本固定-製費 IKG010 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-人工 IKG011 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-製費 IKG012 TYPE P, "LIKE COSS-WKG001, "閒置產能成本合計 ** 十月 JKG001 TYPE P DECIMALS 2, "過帳面積 JKG002 TYPE P DECIMALS 2, "正常產能 JKG003 TYPE P DECIMALS 4, "產能利用率 JKG004 TYPE P, "LIKE COSS-WKG001, "實際成本固定-人工 JKG005 TYPE P, "LIKE COSS-WKG002, "實際成本固定-製造費用 JKG006 LIKE COSS-WKG003, "正常產能單位成本(SF)-固定-人工 JKG007 LIKE COSS-WKG004, "正常產能單位成本(SF)-固定-製費 JKG008 TYPE P, "LIKE COSS-WKG005, "正常產能成本固定-人工 JKG009 TYPE P, "LIKE COSS-WKG006, "正常產能成本固定-製費 JKG010 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-人工 JKG011 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-製費 JKG012 TYPE P, "LIKE COSS-WKG001, "閒置產能成本合計 ** 十一月 KKG001 TYPE P DECIMALS 2, "過帳面積 KKG002 TYPE P DECIMALS 2, "正常產能 KKG003 TYPE P DECIMALS 4, "產能利用率 KKG004 TYPE P, "LIKE COSS-WKG001, "實際成本固定-人工 KKG005 TYPE P, "LIKE COSS-WKG002, "實際成本固定-製造費用 KKG006 LIKE COSS-WKG003, "正常產能單位成本(SF)-固定-人工 KKG007 LIKE COSS-WKG004, "正常產能單位成本(SF)-固定-製費 KKG008 TYPE P, "LIKE COSS-WKG005, "正常產能成本固定-人工 KKG009 TYPE P, "LIKE COSS-WKG006, "正常產能成本固定-製費 KKG010 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-人工 KKG011 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-製費 KKG012 TYPE P, "LIKE COSS-WKG001, "閒置產能成本合計 ** 十二月 LKG001 TYPE P DECIMALS 2, "過帳面積 LKG002 TYPE P DECIMALS 2, "正常產能 LKG003 TYPE P DECIMALS 4, "產能利用率 LKG004 TYPE P, "LIKE COSS-WKG001, "實際成本固定-人工 LKG005 TYPE P, "LIKE COSS-WKG002, "實際成本固定-製造費用 LKG006 LIKE COSS-WKG003, "正常產能單位成本(SF)-固定-人工 LKG007 LIKE COSS-WKG004, "正常產能單位成本(SF)-固定-製費 LKG008 TYPE P, "LIKE COSS-WKG005, "正常產能成本固定-人工 LKG009 TYPE P, "LIKE COSS-WKG006, "正常產能成本固定-製費 LKG010 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-人工 LKG011 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-製費 LKG012 TYPE P, "LIKE COSS-WKG001, "閒置產能成本合計 END OF ITAB_OUT. DATA: MONTH_01 TYPE C, MONTH_02 TYPE C, MONTH_03 TYPE C, MONTH_04 TYPE C, MONTH_05 TYPE C, MONTH_06 TYPE C, MONTH_07 TYPE C, MONTH_08 TYPE C, MONTH_09 TYPE C, MONTH_10 TYPE C, MONTH_11 TYPE C, MONTH_12 TYPE C. DATA: BEGIN OF T_TAB OCCURS 0, KOSTL LIKE CSKS-KOSTL, WKG001 LIKE COSS-WKG001, WKG002 LIKE COSS-WKG002, WKG003 LIKE COSS-WKG003, END OF T_TAB. DATA: BEGIN OF I_TAB OCCURS 0, MANDT LIKE ZFI08-MANDT, KOKRS LIKE ZFI08-KOKRS, GJAHR LIKE ZFI08-GJAHR, PERBL LIKE ZFI08-PERBL, KOSTL LIKE ZFI08-KOSTL, WKG001 LIKE ZFI08-WKG001, WKG002 LIKE ZFI08-WKG002, WKG003 LIKE ZFI08-WKG003, END OF I_TAB. DATA: BEGIN OF OUTPUT OCCURS 0, KOSTL LIKE CSKS-KOSTL, "成本中心 KTEXT LIKE CSKT-KTEXT, "成本中心名稱 AMT1 TYPE P DECIMALS 2, "過帳面積 AMT2 TYPE P DECIMALS 2, "正常產能 PER1 TYPE P DECIMALS 4, "產能利用率 WKG001 TYPE P, "LIKE COSS-WKG001, "實際成本固定-人工 WKG002 TYPE P, "LIKE COSS-WKG002, "實際成本固定-製造費用 WKG003 LIKE COSS-WKG003, "正常產能單位成本(SF)-固定-人工 WKG004 LIKE COSS-WKG004, "正常產能單位成本(SF)-固定-製費 WKG005 TYPE P, "LIKE COSS-WKG005, "正常產能成本固定-人工 WKG006 TYPE P, "LIKE COSS-WKG006, "正常產能成本固定-製費 CAMT1 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-人工 CAMT2 TYPE P, "LIKE COSS-WKG001, "閒置產能成本固定-製費 CAMT3 TYPE P, "LIKE COSS-WKG001, "閒置產能成本合計 END OF OUTPUT. * 成本要素群組 DATA: BEGIN OF O_SETLEAF OCCURS 0, KSTAR LIKE SETLEAF-VALFROM, "成本要素 SETNAME LIKE SETLEAF-SETNAME, "成本要素組 DESCRIPT LIKE SETHEADERT-DESCRIPT, "成本要素組描述 END OF O_SETLEAF. *************ALV TYPE-POOLS SLIS. DATA:L_EVENTS TYPE SLIS_T_EVENT, GS_LAYOUT TYPE SLIS_LAYOUT_ALV, FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE, EVENTCAT TYPE SLIS_T_EVENT WITH HEADER LINE. DATA:L_VARIANT TYPE TABLE OF DISVARIANT WITH HEADER LINE, PRG LIKE SY-REPID. ************** DATA: I_CSKU LIKE CSKU OCCURS 0 WITH HEADER LINE , "成本要素 I_SETHEADERT LIKE SETHEADERT OCCURS 0 WITH HEADER LINE. "成本要素群組說明 DATA: I_AMT1 LIKE BAPICURR-BAPICURR, "TWD金額轉換 I_AMT4(15) TYPE C , "固定人工輸出字段名 I_PERBL LIKE COSP-PERBL, C_PERBL LIKE COSP-PERBL, L_RATE TYPE P DECIMALS 3, " 貨幣參數 TXT(10) TYPE C . RANGES : I_KOSTL FOR ONRKL-KOSTL . "成本中心 CONSTANTS FIX_HUMAN LIKE RKSB1-KAGRU VALUE 'A-MAFI10_F'. "固定-人工 CONSTANTS FIX_PRODUCE LIKE RKSB1-KAGRU VALUE 'A-MAFI20_F'. "固定-製造費用 DATA: L_DYNAME LIKE D020S-PROG, L_DYNUMB LIKE D020S-DNUM. DATA: L_DYNPFIELDS LIKE DYNPREAD OCCURS 0 WITH HEADER LINE. DATA: BUTTON1 TYPE C, BUTTON2 TYPE C, BUTTON3 TYPE C, BUTTON4 TYPE C, BUTTON5 TYPE C, BUTTON6 TYPE C. *----------------------------------------------------------------------* * SELECTION SCREEN / OPTION / PARAMETER *----------------------------------------------------------------------* *條件資料 SELECTION-SCREEN BEGIN OF BLOCK BLOCK1 WITH FRAME TITLE TEXT-100. "篩選條件 PARAMETERS : P_KOKRS LIKE TKA01-KOKRS OBLIGATORY DEFAULT 'xxxx'. "成本控制範圍 SELECT-OPTIONS: S_GJAHR FOR COSP-GJAHR OBLIGATORY NO INTERVALS NO-EXTENSION DEFAULT SY-DATUM(4)."會計年度 SELECT-OPTIONS: S_PERBL FOR COSP-PERBL NO-EXTENSION MODIF ID P1. "期間 PARAMETERS: P_PERBL LIKE COSP-PERBL MODIF ID P2. "期間. PARAMETERS: P_FILE LIKE RLGRAP-FILENAME MODIF ID P2. SELECT-OPTIONS: S_VERSN FOR COSP-VERSN DEFAULT '000' NO INTERVALS NO-EXTENSION MODIF ID P1. "計劃版本 SELECTION-SCREEN END OF BLOCK BLOCK1. SELECTION-SCREEN BEGIN OF BLOCK BLOCK2 WITH FRAME TITLE TEXT-101. "選擇群組 SELECT-OPTIONS: S_KSGRU FOR RKSB1-KSGRU NO INTERVALS MODIF ID S1. "成本中心群組 PARAMETERS: %1KOSET LIKE RGSBS-SETNR MODIF ID IN5. SELECT-OPTIONS: S_KOSTL FOR CSKS-KOSTL MODIF ID S1. "或值 SELECT-OPTIONS: S_KAGRU FOR RKSB1-KAGRU MODIF ID S2 . "成本要素群組 PARAMETERS: %1KSTAR LIKE RGSBS-SETNR MODIF ID IN5. SELECT-OPTIONS: S_KSTAR FOR COSS-KSTAR MODIF ID S2. "或值 SELECT-OPTIONS: S_LSTAR FOR ONRKL-LSTAR NO-EXTENSION MODIF ID S2 . " 計劃版本 SELECTION-SCREEN END OF BLOCK BLOCK2 . SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-300. SELECTION-SCREEN BEGIN OF LINE. PARAMETERS P_ON1 RADIOBUTTON GROUP G1 MODIF ID M1. "成本中心群組 SELECTION-SCREEN PUSHBUTTON 3(17) TEXT-310 USER-COMMAND CMD1 MODIF ID M1. SELECTION-SCREEN END OF LINE . SELECTION-SCREEN BEGIN OF LINE. PARAMETERS P_ON4 RADIOBUTTON GROUP G1 MODIF ID M4. "正常產能&單位成本 SELECTION-SCREEN PUSHBUTTON 3(17) TEXT-320 USER-COMMAND CMD4 MODIF ID M4. SELECTION-SCREEN END OF LINE . SELECTION-SCREEN BEGIN OF LINE. PARAMETERS P_ON6 RADIOBUTTON GROUP G1 MODIF ID M6. "閒置產能成本 SELECTION-SCREEN PUSHBUTTON 3(17) TEXT-330 USER-COMMAND CMD6 MODIF ID M6. SELECTION-SCREEN END OF LINE . SELECTION-SCREEN BEGIN OF LINE. PARAMETERS P_ON2 RADIOBUTTON GROUP G1 MODIF ID M2. "成本中心群組 SELECTION-SCREEN PUSHBUTTON 3(17) TEXT-310 USER-COMMAND CMD2 MODIF ID M2. SELECTION-SCREEN END OF LINE . SELECTION-SCREEN BEGIN OF LINE. PARAMETERS P_ON24 RADIOBUTTON GROUP G2 MODIF ID M2. SELECTION-SCREEN COMMENT 3(12) TEXT-314 FOR FIELD P_ON24 . "Update Table PARAMETERS P_ON21 RADIOBUTTON GROUP G2 MODIF ID M2. SELECTION-SCREEN COMMENT 18(12) TEXT-311 FOR FIELD P_ON21 . "Update Table PARAMETERS P_ON22 RADIOBUTTON GROUP G2 MODIF ID M2. SELECTION-SCREEN COMMENT 33(12) TEXT-312 FOR FIELD P_ON22 . PARAMETERS P_ON23 RADIOBUTTON GROUP G2 MODIF ID M2. SELECTION-SCREEN COMMENT 58(12) TEXT-313 FOR FIELD P_ON23 . SELECTION-SCREEN END OF LINE . SELECTION-SCREEN BEGIN OF LINE. PARAMETERS P_ON3 RADIOBUTTON GROUP G1 MODIF ID M3. "正常產能&單位成本 SELECTION-SCREEN PUSHBUTTON 3(17) TEXT-320 USER-COMMAND CMD3 MODIF ID M3. SELECTION-SCREEN END OF LINE . SELECTION-SCREEN BEGIN OF LINE. PARAMETERS P_ON31 RADIOBUTTON GROUP G3 MODIF ID M3. SELECTION-SCREEN COMMENT 3(12) TEXT-311 FOR FIELD P_ON31 . "Update Table PARAMETERS P_ON32 RADIOBUTTON GROUP G3 MODIF ID M3. SELECTION-SCREEN COMMENT 17(12) TEXT-312 FOR FIELD P_ON32 . PARAMETERS P_ON33 RADIOBUTTON GROUP G3 MODIF ID M3. SELECTION-SCREEN COMMENT 31(12) TEXT-313 FOR FIELD P_ON33 . SELECTION-SCREEN END OF LINE . SELECTION-SCREEN BEGIN OF LINE. PARAMETERS P_ON5 RADIOBUTTON GROUP G1 MODIF ID M5. "閒置產能成本 SELECTION-SCREEN PUSHBUTTON 3(17) TEXT-330 USER-COMMAND CMD5 MODIF ID M5. SELECTION-SCREEN END OF LINE . SELECTION-SCREEN BEGIN OF LINE. PARAMETERS P_ON51 RADIOBUTTON GROUP G5 MODIF ID M5. "period SELECTION-SCREEN COMMENT 5(34) TEXT-331 FOR FIELD P_ON51 MODIF ID M5. SELECTION-SCREEN END OF LINE . SELECTION-SCREEN BEGIN OF LINE. PARAMETERS P_ON52 RADIOBUTTON GROUP G5 MODIF ID M5. "period SELECTION-SCREEN COMMENT 5(32) TEXT-332 FOR FIELD P_ON52 MODIF ID M5. SELECTION-SCREEN END OF LINE . SELECTION-SCREEN END OF BLOCK B1 . AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE. PERFORM QUERY_FILENAME USING P_FILE. AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_KSGRU-LOW. L_DYNAME = 'ZFIALV008'. L_DYNUMB = '1000'. CLEAR L_DYNPFIELDS. MOVE 'S_KSGRU-LOW' TO L_DYNPFIELDS-FIELDNAME. APPEND L_DYNPFIELDS. CALL FUNCTION 'DYNP_VALUES_READ' EXPORTING DYNAME = L_DYNAME DYNUMB = L_DYNUMB TABLES DYNPFIELDS = L_DYNPFIELDS. READ TABLE L_DYNPFIELDS WITH KEY FIELDNAME = 'S_KSGRU-LOW'. CHECK L_DYNPFIELDS-FIELDINP = 'X'. CALL FUNCTION 'K_GROUP_SELECT' EXPORTING CLASS = '0101' FIELD_NAME = 'KOSTL' TABLE = 'CCSS' IMPORTING SETID = %1KOSET SET_NAME = S_KSGRU-LOW EXCEPTIONS NO_SET_PICKED = 02. AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_KAGRU-LOW. L_DYNAME = 'ZFIALV008'. L_DYNUMB = '1000'. CLEAR L_DYNPFIELDS. MOVE 'S_KAGRU-LOW' TO L_DYNPFIELDS-FIELDNAME. APPEND L_DYNPFIELDS. CALL FUNCTION 'DYNP_VALUES_READ' EXPORTING DYNAME = L_DYNAME DYNUMB = L_DYNUMB TABLES DYNPFIELDS = L_DYNPFIELDS. READ TABLE L_DYNPFIELDS WITH KEY FIELDNAME = 'S_KAGRU-LOW'. CHECK L_DYNPFIELDS-FIELDINP = 'X'. CALL FUNCTION 'K_GROUP_SELECT' EXPORTING CLASS = '0102' FIELD_NAME = 'KSTAR' TABLE = 'CCSS' IMPORTING SETID = %1KSTAR SET_NAME = S_KAGRU-LOW EXCEPTIONS NO_SET_PICKED = 02. AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_KAGRU-HIGH. L_DYNAME = 'ZFIALV008'. L_DYNUMB = '1000'. CLEAR L_DYNPFIELDS. MOVE 'S_KAGRU-HIGH' TO L_DYNPFIELDS-FIELDNAME. APPEND L_DYNPFIELDS. CALL FUNCTION 'DYNP_VALUES_READ' EXPORTING DYNAME = L_DYNAME DYNUMB = L_DYNUMB TABLES DYNPFIELDS = L_DYNPFIELDS. READ TABLE L_DYNPFIELDS WITH KEY FIELDNAME = 'S_KAGRU-HIGH'. CHECK L_DYNPFIELDS-FIELDINP = 'X'. CALL FUNCTION 'K_GROUP_SELECT' EXPORTING CLASS = '0102' FIELD_NAME = 'KSTAR' TABLE = 'CCSS' IMPORTING SETID = %1KSTAR SET_NAME = S_KAGRU-HIGH EXCEPTIONS NO_SET_PICKED = 02. INITIALIZATION . CLEAR: BUTTON2,BUTTON3,BUTTON5. MOVE 'X' TO BUTTON1. MOVE 'X' TO BUTTON4. MOVE 'X' TO BUTTON6. AT SELECTION-SCREEN. CASE SSCRFIELDS-UCOMM. WHEN 'CMD1'. MOVE 'X' TO BUTTON2. CLEAR: BUTTON1, BUTTON3,BUTTON4,BUTTON5,BUTTON6. MOVE 'X' TO P_ON2. CLEAR: P_ON1,P_ON3,P_ON4,P_ON5,P_ON6. WHEN 'CMD4'. MOVE 'X' TO BUTTON3. CLEAR: BUTTON1, BUTTON2,BUTTON4,BUTTON5,BUTTON6. MOVE 'X' TO P_ON3. CLEAR: P_ON1,P_ON2,P_ON4,P_ON5,P_ON6. WHEN 'CMD6'. MOVE 'X' TO BUTTON5. CLEAR: BUTTON1, BUTTON2,BUTTON3,BUTTON4,BUTTON6. MOVE 'X' TO P_ON5. CLEAR: P_ON1,P_ON2,P_ON3,P_ON4,P_ON6. WHEN 'CMD2'. MOVE 'X' TO BUTTON2. WHEN 'CMD3'. MOVE 'X' TO BUTTON3. WHEN 'CMD5'. MOVE 'X' TO BUTTON5. ENDCASE. IF P_KOKRS EQ 'XXXX' AND SY-UNAME(3) EQ 'XXX' . MESSAGE I000(ZA) WITH '!'. STOP. ENDIF. AT SELECTION-SCREEN OUTPUT. *BUTTON 1 4 6 LOOP AT SCREEN. IF SCREEN-GROUP1 EQ 'IN5'. SCREEN-ACTIVE = '0'. ENDIF. IF SCREEN-GROUP1 EQ 'P1'. IF BUTTON3 EQ 'X' . SCREEN-ACTIVE = '0'. ELSE. SCREEN-ACTIVE = '1'. ENDIF. ENDIF. IF SCREEN-GROUP1 EQ 'P2'. IF BUTTON3 EQ 'X' . SCREEN-ACTIVE = '1'. ELSE. SCREEN-ACTIVE = '0'. ENDIF. ENDIF. IF SCREEN-GROUP1 EQ 'S1'. IF BUTTON3 EQ 'X' . SCREEN-ACTIVE = '0'. ELSE. SCREEN-ACTIVE = '1'. ENDIF. ENDIF. IF SCREEN-GROUP1 EQ 'S2'. IF BUTTON3 EQ 'X' OR BUTTON5 EQ 'X'. SCREEN-ACTIVE = '0'. ELSE. SCREEN-ACTIVE = '1'. ENDIF. ENDIF. IF SCREEN-GROUP1 EQ 'M1'. IF BUTTON1 EQ 'X' OR BUTTON3 EQ 'X' OR BUTTON4 EQ 'X' OR BUTTON5 EQ 'X' OR BUTTON6 EQ 'X'. SCREEN-ACTIVE = '1'. ELSE. SCREEN-ACTIVE = '0'. ENDIF. ENDIF. IF SCREEN-GROUP1 EQ 'M2'. IF BUTTON2 EQ 'X' . SCREEN-ACTIVE = '1'. ELSE. SCREEN-ACTIVE = '0'. ENDIF. ENDIF. IF SCREEN-GROUP1 EQ 'M3'. IF BUTTON3 EQ 'X' . SCREEN-ACTIVE = '1'. ELSE. SCREEN-ACTIVE = '0'. ENDIF. ENDIF. IF SCREEN-GROUP1 EQ 'M4'. IF BUTTON1 EQ 'X' OR BUTTON2 EQ 'X' OR BUTTON4 EQ 'X' OR BUTTON5 EQ 'X' OR BUTTON6 EQ 'X'. SCREEN-ACTIVE = '1'. ELSE. SCREEN-ACTIVE = '0'. ENDIF. ENDIF. IF SCREEN-GROUP1 EQ 'M5'. IF BUTTON5 EQ 'X' . SCREEN-ACTIVE = '1'. ELSE. SCREEN-ACTIVE = '0'. ENDIF. ENDIF. IF SCREEN-GROUP1 EQ 'M6'. IF BUTTON1 EQ 'X' OR BUTTON2 EQ 'X' OR BUTTON3 EQ 'X' OR BUTTON4 EQ 'X' OR BUTTON6 EQ 'X'. SCREEN-ACTIVE = '1'. ELSE. SCREEN-ACTIVE = '0'. ENDIF. ENDIF. MODIFY SCREEN. ENDLOOP.
Code
最新推荐文章于 2024-07-06 11:35:40 发布