ABAP ZCL_EXCEL 实际用的案例 对账单

ABAP ZCL_EXCEL 实际用的案例

FORM GETITEMSANDOUTPUT USING PGS_HEAD TYPE GSHEAD.DATA:FILENAME TYPE STRING.DATA:LKUNNR  TYPE KNA1-KUNNR.DATA:PROW TYPE I.DATA:LSDATE TYPE STRING.DATA:SUMXSJE   TYPE DMBTR,ZYMYE     TYPE DMBTR, "月末余额SUMBYXSYE TYPE DMBTR, "截止本月末销售金额SUMBYBYYE TYPE DMBTR, "截止本月末备用余额SUMBYHKHJ TYPE DMBTR, "截止本月末回款余额SUMF      TYPE DMBTR,SUMJ      TYPE DMBTR,SUMK      TYPE DMBTR. "截止本月末回款余额DATA:LSXSJE TYPE DMBTR.DATA:LSOTXT TYPE STRING.DATA: NAME  LIKE THEAD-TDNAME,TLINE TYPE TABLE OF TLINE WITH HEADER LINE.DATA: LS_LINES(10),"行数LS_TABIX(10),"循环标号LS_PECNT     TYPE P LENGTH 6 DECIMALS 2, "百分比LS_PECET(6),"百分数LS_TEXT(40)."消息LKUNNR  = PGS_HEAD-KUNNR .SHIFT LKUNNR LEFT DELETING LEADING '0'.FILENAME = LKUNNR && PGS_HEAD-NAME1 && '.xlsx'.IF POUTPATH IS INITIAL.POUTPATH = LV_WORKDIR.ENDIF.CL_GUI_FRONTEND_SERVICES=>GET_FILE_SEPARATOR( CHANGING FILE_SEPARATOR = LV_FILE_SEPARATOR ).CONCATENATE POUTPATH LV_FILE_SEPARATOR FILENAME INTO LV_FULL_PATH.CREATE OBJECT LO_EXCEL." Get active sheetLO_WORKSHEET = LO_EXCEL->GET_ACTIVE_WORKSHEET( ).LO_WORKSHEET->SET_TITLE( 'sheet1' ).CREATE OBJECT LO_BORDER_DARK.LO_BORDER_DARK->BORDER_COLOR-RGB = ZCL_EXCEL_STYLE_COLOR=>C_BLACK.LO_BORDER_DARK->BORDER_STYLE = ZCL_EXCEL_STYLE_BORDER=>C_BORDER_THIN.
*  抬头剧中LO_STYLE_BOLD_BORDER = LO_EXCEL->ADD_NEW_STYLE( ).LO_STYLE_BOLD_BORDER->FONT->BOLD = ABAP_TRUE.LO_STYLE_BOLD_BORDER->FONT->ITALIC = ABAP_FALSE.LO_STYLE_BOLD_BORDER->FONT->COLOR-RGB = ZCL_EXCEL_STYLE_COLOR=>C_BLACK.LO_STYLE_BOLD_BORDER->ALIGNMENT->HORIZONTAL = ZCL_EXCEL_STYLE_ALIGNMENT=>C_HORIZONTAL_CENTER.LO_STYLE_BOLD_BORDER->BORDERS->ALLBORDERS = LO_BORDER_DARK.LV_STYLE_BOLD_BORDER_GUID = LO_STYLE_BOLD_BORDER->GET_GUID( ).
* 末尾左右边框的LO_STYLE_BOLD_BORDER_LR = LO_EXCEL->ADD_NEW_STYLE( ).LO_STYLE_BOLD_BORDER_LR->FONT->BOLD = ABAP_TRUE.LO_STYLE_BOLD_BORDER_LR->FONT->ITALIC = ABAP_FALSE.LO_STYLE_BOLD_BORDER_LR->FONT->COLOR-RGB = ZCL_EXCEL_STYLE_COLOR=>C_BLACK.LO_STYLE_BOLD_BORDER_LR->ALIGNMENT->HORIZONTAL = ZCL_EXCEL_STYLE_ALIGNMENT=>C_HORIZONTAL_LEFT.LO_STYLE_BOLD_BORDER_LR->BORDERS->LEFT = LO_BORDER_DARK.LO_STYLE_BOLD_BORDER_LR->BORDERS->RIGHT = LO_BORDER_DARK.LV_STYLE_BOLD_BORDER_GUID_LR = LO_STYLE_BOLD_BORDER_LR->GET_GUID( ).
*字体分布LO_STYLE_BOLD_BORDER_LEFT = LO_EXCEL->ADD_NEW_STYLE( ).LO_STYLE_BOLD_BORDER_LEFT->FONT->BOLD = ABAP_FALSE.LO_STYLE_BOLD_BORDER_LEFT->FONT->ITALIC = ABAP_FALSE.LO_STYLE_BOLD_BORDER_LEFT->FONT->COLOR-RGB = ZCL_EXCEL_STYLE_COLOR=>C_BLACK.LO_STYLE_BOLD_BORDER_LEFT->ALIGNMENT->HORIZONTAL = ZCL_EXCEL_STYLE_ALIGNMENT=>C_HORIZONTAL_JUSTIFY.LO_STYLE_BOLD_BORDER_LEFT->BORDERS->ALLBORDERS = LO_BORDER_DARK.LV_STYLE_BOLD_BORDER_GUID_LT = LO_STYLE_BOLD_BORDER_LEFT->GET_GUID( ).
*字体靠左LO_STYLE_BOLD_BORDER_LEE = LO_EXCEL->ADD_NEW_STYLE( ).LO_STYLE_BOLD_BORDER_LEE->FONT->BOLD = ABAP_FALSE.LO_STYLE_BOLD_BORDER_LEE->FONT->ITALIC = ABAP_FALSE.LO_STYLE_BOLD_BORDER_LEE->FONT->COLOR-RGB = ZCL_EXCEL_STYLE_COLOR=>C_BLACK.LO_STYLE_BOLD_BORDER_LEE->ALIGNMENT->HORIZONTAL = ZCL_EXCEL_STYLE_ALIGNMENT=>C_HORIZONTAL_LEFT.LO_STYLE_BOLD_BORDER_LEE->BORDERS->ALLBORDERS = LO_BORDER_DARK.LV_STYLE_BOLD_BORDER_GUID_LE = LO_STYLE_BOLD_BORDER_LEE->GET_GUID( ).
*字体靠右LO_STYLE_BOLD_BORDER_RIGHT = LO_EXCEL->ADD_NEW_STYLE( ).LO_STYLE_BOLD_BORDER_RIGHT->FONT->BOLD = ABAP_FALSE.LO_STYLE_BOLD_BORDER_RIGHT->FONT->ITALIC = ABAP_FALSE.LO_STYLE_BOLD_BORDER_RIGHT->FONT->COLOR-RGB = ZCL_EXCEL_STYLE_COLOR=>C_BLACK.LO_STYLE_BOLD_BORDER_RIGHT->ALIGNMENT->HORIZONTAL = ZCL_EXCEL_STYLE_ALIGNMENT=>C_HORIZONTAL_RIGHT.LO_STYLE_BOLD_BORDER_RIGHT->BORDERS->ALLBORDERS = LO_BORDER_DARK.LV_STYLE_BOLD_BORDER_GUID_RT = LO_STYLE_BOLD_BORDER_RIGHT->GET_GUID( ).LO_STYLE_BOLD_BORDER_CURR = LO_EXCEL->ADD_NEW_STYLE( ).LO_STYLE_BOLD_BORDER_CURR->FONT->BOLD = ABAP_FALSE.LO_STYLE_BOLD_BORDER_CURR->FONT->ITALIC = ABAP_FALSE.LO_STYLE_BOLD_BORDER_CURR->FONT->COLOR-RGB = ZCL_EXCEL_STYLE_COLOR=>C_BLACK.LO_STYLE_BOLD_BORDER_CURR->ALIGNMENT->HORIZONTAL = ZCL_EXCEL_STYLE_ALIGNMENT=>C_HORIZONTAL_RIGHT.LO_STYLE_BOLD_BORDER_CURR->NUMBER_FORMAT->FORMAT_CODE = ZCL_EXCEL_STYLE_NUMBER_FORMAT=>C_FORMAT_XLSX39.LO_STYLE_BOLD_BORDER_CURR->BORDERS->ALLBORDERS = LO_BORDER_DARK.LV_STYLE_BOLD_BORDER_GUID_CURR = LO_STYLE_BOLD_BORDER_CURR->GET_GUID( ).LO_STY_CURR_R = LO_EXCEL->ADD_NEW_STYLE( ).LO_STY_CURR_R->FONT->BOLD = ABAP_FALSE.LO_STY_CURR_R->FONT->ITALIC = ABAP_FALSE.LO_STY_CURR_R->FONT->COLOR-RGB = ZCL_EXCEL_STYLE_COLOR=>C_RED.LO_STY_CURR_R->ALIGNMENT->HORIZONTAL = ZCL_EXCEL_STYLE_ALIGNMENT=>C_HORIZONTAL_RIGHT.LO_STY_CURR_R->NUMBER_FORMAT->FORMAT_CODE = ZCL_EXCEL_STYLE_NUMBER_FORMAT=>C_FORMAT_XLSX39.LO_STY_CURR_R->BORDERS->ALLBORDERS = LO_BORDER_DARK.LV_STY_GUID_CURR_R = LO_STY_CURR_R->GET_GUID( ).LO_STY_MENGE = LO_EXCEL->ADD_NEW_STYLE( ).LO_STY_MENGE->FONT->ITALIC = ABAP_FALSE.LO_STY_MENGE->FONT->COLOR-RGB = ZCL_EXCEL_STYLE_COLOR=>C_BLACK.LO_STY_MENGE->ALIGNMENT->HORIZONTAL = ZCL_EXCEL_STYLE_ALIGNMENT=>C_HORIZONTAL_CENTER.LO_STY_MENGE->BORDERS->ALLBORDERS = LO_BORDER_DARK.LV_STY_GUID_MENGE = LO_STY_MENGE->GET_GUID( ).LO_STY_MENGE_R = LO_EXCEL->ADD_NEW_STYLE( ).LO_STY_MENGE_R->FONT->ITALIC = ABAP_FALSE.LO_STY_MENGE_R->FONT->COLOR-RGB = ZCL_EXCEL_STYLE_COLOR=>C_RED.LO_STY_MENGE_R->ALIGNMENT->HORIZONTAL = ZCL_EXCEL_STYLE_ALIGNMENT=>C_HORIZONTAL_CENTER.LO_STY_MENGE_R->BORDERS->ALLBORDERS = LO_BORDER_DARK.LV_STY_GUID_MENGE_R = LO_STY_MENGE_R->GET_GUID( ).LO_STYLE_BOLD_BORDER_NT = LO_EXCEL->ADD_NEW_STYLE( ).LO_STYLE_BOLD_BORDER_NT->FONT->BOLD = ABAP_TRUE.LO_STYLE_BOLD_BORDER_NT->FONT->ITALIC = ABAP_FALSE.LO_STYLE_BOLD_BORDER_NT->FONT->COLOR-RGB = ZCL_EXCEL_STYLE_COLOR=>C_BLACK.LO_STYLE_BOLD_BORDER_NT->ALIGNMENT->HORIZONTAL = ZCL_EXCEL_STYLE_ALIGNMENT=>C_HORIZONTAL_LEFT.LO_STYLE_BOLD_BORDER_NT->BORDERS->LEFT = LO_BORDER_DARK.LO_STYLE_BOLD_BORDER_NT->BORDERS->RIGHT = LO_BORDER_DARK.LO_STYLE_BOLD_BORDER_NT->BORDERS->DOWN = LO_BORDER_DARK.LV_STYLE_BOLD_BORDER_GUID_NT = LO_STYLE_BOLD_BORDER_NT->GET_GUID( )."$. Region 列宽设置LO_WORKSHEET->SET_COLUMN_WIDTH( IP_COLUMN = 'A' IP_WIDTH_FIX = '12').LO_WORKSHEET->SET_COLUMN_WIDTH( IP_COLUMN = 'B' IP_WIDTH_FIX = '20').LO_WORKSHEET->SET_COLUMN_WIDTH( IP_COLUMN = 'C' IP_WIDTH_FIX = '50').LO_WORKSHEET->SET_COLUMN_WIDTH( IP_COLUMN = 'D' IP_WIDTH_FIX = '8').LO_WORKSHEET->SET_COLUMN_WIDTH( IP_COLUMN = 'E' IP_WIDTH_FIX = '12').LO_WORKSHEET->SET_COLUMN_WIDTH( IP_COLUMN = 'F' IP_WIDTH_FIX = '12').LO_WORKSHEET->SET_COLUMN_WIDTH( IP_COLUMN = 'G' IP_WIDTH_FIX = '16').LO_WORKSHEET->SET_COLUMN_WIDTH( IP_COLUMN = 'H' IP_WIDTH_FIX = '12').LO_WORKSHEET->SET_COLUMN_WIDTH( IP_COLUMN = 'I' IP_WIDTH_FIX = '50').LO_WORKSHEET->SET_COLUMN_WIDTH( IP_COLUMN = 'J' IP_WIDTH_FIX = '12').LO_WORKSHEET->SET_COLUMN_WIDTH( IP_COLUMN = 'K' IP_WIDTH_FIX = '12')."$. Endregion 列宽设置"$. Region 第一行LO_WORKSHEET->SET_MERGE( IP_ROW = 1 IP_COLUMN_START = 'A' IP_COLUMN_END = 'K' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = 1 IP_COLUMN = 'A' IP_VALUE = '杰克对账单' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID )."$. Endregion 第一行"$. Region 第二行LO_WORKSHEET->SET_CELL( IP_ROW = 2 IP_COLUMN = 'A' IP_VALUE = '客户号' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = 2 IP_COLUMN = 'B' IP_VALUE = LKUNNR IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = 2 IP_COLUMN = 'C' IP_VALUE = '客户名称' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_MERGE( IP_ROW = 2 IP_COLUMN_START = 'D' IP_COLUMN_END = 'K' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = 2 IP_COLUMN = 'D' IP_VALUE = PGS_HEAD-NAME1 IP_STYLE = LV_STYLE_BOLD_BORDER_GUID )."$. Endregion 第二行"$. Region 第三行LO_WORKSHEET->SET_MERGE( IP_ROW = 3 IP_COLUMN_START = 'A' IP_COLUMN_END = 'K' ).LO_WORKSHEET->SET_CELL( IP_ROW = 3 IP_COLUMN = 'A' IP_VALUE = PGS_HEAD-TITLE IP_STYLE = LV_STYLE_BOLD_BORDER_GUID )."$. Endregion 第三行"$. Region 第四行LO_WORKSHEET->SET_CELL( IP_ROW = 4 IP_COLUMN = 'A' IP_VALUE = '日期' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = 4 IP_COLUMN = 'B' IP_VALUE = '物料代码' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = 4 IP_COLUMN = 'C' IP_VALUE = '型号' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = 4 IP_COLUMN = 'D' IP_VALUE = '数量' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = 4 IP_COLUMN = 'E' IP_VALUE = '单价' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = 4 IP_COLUMN = 'F' IP_VALUE = '销售金额' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = 4 IP_COLUMN = 'G' IP_VALUE = '款项类型' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = 4 IP_COLUMN = 'H' IP_VALUE = '交货单' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = 4 IP_COLUMN = 'I' IP_VALUE = '备注文本' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = 4 IP_COLUMN = 'J' IP_VALUE = '收款金额' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = 4 IP_COLUMN = 'K' IP_VALUE = '上期余额' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID )."$. Endregion 第四行PROW = 4.CLEAR ZYMYE."$. Region 第五 六行  上期金额PROW = PROW + 1.CLEAR SUMBYHKHJ.LO_WORKSHEET->SET_AREA( IP_ROW = PROW  IP_COLUMN_START = 'A' IP_COLUMN_END = 'F' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'G' IP_VALUE = '上期销售余额' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).SUMXSJE = GTHEAD-ZXSQC + GTHEAD-ZXSQCY.LO_WORKSHEET->SET_AREA( IP_ROW = PROW  IP_COLUMN_START = 'H' IP_COLUMN_END = 'J' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).IF SUMXSJE >= 0.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'K' IP_VALUE = SUMXSJE IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STYLE_BOLD_BORDER_GUID_CURR  ).ELSE.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'K' IP_VALUE = SUMXSJE IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STY_GUID_CURR_R  ).ENDIF.SUMK = SUMK + SUMXSJE.PROW = PROW + 1.LO_WORKSHEET->SET_AREA( IP_ROW = PROW  IP_COLUMN_START = 'A' IP_COLUMN_END = 'F' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'G' IP_VALUE = '上期备用余额' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).LO_WORKSHEET->SET_AREA( IP_ROW = PROW  IP_COLUMN_START = 'H' IP_COLUMN_END = 'J' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).SUMXSJE = GTHEAD-ZLJQC + GTHEAD-ZXSQCY.IF SUMXSJE >= 0.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'K' IP_VALUE = SUMXSJE IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STYLE_BOLD_BORDER_GUID_CURR  ).ELSE.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'K' IP_VALUE = SUMXSJE IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STY_GUID_CURR_R  ).ENDIF.SUMK = SUMK + SUMXSJE.PROW = PROW + 1.LO_WORKSHEET->SET_AREA( IP_ROW = PROW  IP_COLUMN_START = 'A' IP_COLUMN_END = 'F' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'G' IP_VALUE = '上期回款余额' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).LO_WORKSHEET->SET_AREA( IP_ROW = PROW  IP_COLUMN_START = 'H' IP_COLUMN_END = 'J' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).
*  LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'K' IP_VALUE = GTHEAD-ZSUMHK IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_RT IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_DECFLOAT16 ).IF GTHEAD-ZSUMHK >= 0.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'K' IP_VALUE = GTHEAD-ZSUMHK IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STYLE_BOLD_BORDER_GUID_CURR  ).ELSE.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'K' IP_VALUE = GTHEAD-ZSUMHK IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STY_GUID_CURR_R  ).ENDIF.SUMK = SUMK + GTHEAD-ZSUMHK.SUMBYHKHJ = GTHEAD-ZSUMHK."$. Endregion 第五 六行  上期金额"$. Region 回款部分CLEAR SUMBYHKHJ.LOOP AT GTSK INTO DATA(GSSK) WHERE KUNNR = GTHEAD-KUNNR.IF GSSK-ZSKDT IN S_BUDAT.PROW = PROW + 1.GTITEM-INCLUDE-DATSTR = GSSK-ZSKDT+0(4) && '.' && GSSK-ZSKDT+4(2) && '.' && GSSK-ZSKDT+6(2).LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'A' IP_VALUE = GTITEM-INCLUDE-DATSTR IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).LO_WORKSHEET->SET_AREA( IP_ROW = PROW  IP_COLUMN_START = 'B' IP_COLUMN_END = 'F' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'G' IP_VALUE = '回款' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).LO_WORKSHEET->SET_AREA( IP_ROW = PROW  IP_COLUMN_START = 'H' IP_COLUMN_END = 'I' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).IF GSSK-DMBTR >= 0.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'J' IP_VALUE = GSSK-DMBTR IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STYLE_BOLD_BORDER_GUID_CURR  ).ELSE.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'J' IP_VALUE = GSSK-DMBTR IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STY_GUID_CURR_R  ).ENDIF.SUMJ = SUMJ  + GSSK-DMBTR.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'K' IP_VALUE = '' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).SUMBYHKHJ = SUMBYHKHJ + GSSK-DMBTR.ENDIF.ENDLOOP."$. Endregion 回款部分*    "$. Region 本月发生额SELECT LIKP~WADAT_IST,LIPS~MATNR,MAKT~MAKTX, LIPS~LFIMG,LIPS~VBELN,LIPS~VGBEL,VBAP~POSNR,LIPS~LGORT,VBAK~AUART,VBAK~KNUMV,PRCD_ELEMENTS~KBETRFROM LIPSJOIN LIKP ON LIPS~VBELN = LIKP~VBELNJOIN VBAP ON LIPS~VGBEL = VBAP~VBELN AND VBAP~POSNR = LIPS~VGPOSJOIN VBAK ON VBAK~VBELN = VBAP~VBELNJOIN MAKT ON LIPS~MATNR = MAKT~MATNR AND MAKT~SPRAS = @SY-LANGULEFT JOIN PRCD_ELEMENTS ON PRCD_ELEMENTS~KNUMV = VBAK~KNUMV AND  PRCD_ELEMENTS~KPOSN = VBAP~POSNRAND PRCD_ELEMENTS~KSCHL = 'ZPR3'WHERE LIKP~KUNNR = @GTHEAD-KUNNR AND LIKP~WADAT_IST IN @S_BUDAT AND LIPS~LGORT IN @S_LGORT ANDLIPS~WERKS IN @S_WERKS AND LIPS~WERKS IN (  SELECT WERKS  FROM T001WJOIN T001K ON T001K~BWKEY = T001W~BWKEYWHERE BUKRS IN @S_BUKRS )INTO TABLE @DATA(ZDNINFO).CLEAR SUMXSJE.DESCRIBE TABLE ZDNINFO LINES LS_LINES."获取内表行数SORT ZDNINFO BY LGORT WADAT_IST."排序LOOP AT ZDNINFO INTO DATA(SDNINFO).PROW = PROW + 1.LS_TABIX = SY-TABIX."当前处理的行号LS_PECNT = LS_TABIX / LS_LINES * 100."已处理百分比LS_PECET = LS_PECNT.CONCATENATE  '客户' LKUNNR '回款部分正在处理,已完成' LS_PECET '%,共' LS_TABIX '条/' LS_LINES '条' INTO LL_TEXT.CONDENSE LL_TEXT."整理格式,去掉多余空格,格式更整齐CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' "调用进度条函数,传入百分比和消息EXPORTINGPERCENTAGE = LL_PECNTTEXT       = LL_TEXT.LSDATE = SDNINFO-WADAT_IST+0(4) && '.' && SDNINFO-WADAT_IST+4(2) && '.' && SDNINFO-WADAT_IST+6(2).LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'A' IP_VALUE = LSDATE IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).SHIFT SDNINFO-MATNR LEFT DELETING LEADING '0'.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'B' IP_VALUE = SDNINFO-MATNR IP_STYLE =  LV_STYLE_BOLD_BORDER_GUID_LT ).LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'C' IP_VALUE = SDNINFO-MAKTX IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).IF SDNINFO-AUART = 'ZRJ'."退货用负数SDNINFO-LFIMG  = -1 * SDNINFO-LFIMG.ENDIF.IF SDNINFO-LFIMG >= 0.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'D' IP_VALUE = SDNINFO-LFIMG IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STY_GUID_MENGE  ).ELSE.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'D' IP_VALUE = SDNINFO-LFIMG IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STY_GUID_MENGE_R  ).ENDIF.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'E' IP_VALUE = SDNINFO-KBETR IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STYLE_BOLD_BORDER_GUID_CURR  ).LSXSJE = SDNINFO-KBETR * SDNINFO-LFIMG.SUMXSJE = SUMXSJE + LSXSJE.IF LSXSJE >= 0.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'F' IP_VALUE = LSXSJE IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STYLE_BOLD_BORDER_GUID_CURR  ).ELSE.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'F' IP_VALUE = LSXSJE IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STY_GUID_CURR_R  ).ENDIF.SUMF = SUMF + LSXSJE.CASE SDNINFO-LGORT.WHEN '4101'.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'G' IP_VALUE = '销售' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).SUMBYXSYE = SUMBYXSYE + LSXSJE.WHEN '4103'.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'G' IP_VALUE = '返修' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).SUMBYXSYE = SUMBYXSYE + LSXSJE.WHEN '4202'.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'G' IP_VALUE = '电控部备用' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).SUMBYBYYE = SUMBYBYYE + LSXSJE.WHEN '4206'.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'G' IP_VALUE = '零件部备用' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).SUMBYBYYE = SUMBYBYYE + LSXSJE.ENDCASE.SHIFT SDNINFO-VBELN LEFT DELETING LEADING '0'.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'H' IP_VALUE = SDNINFO-VBELN IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).NAME = SDNINFO-VGBEL.CALL FUNCTION 'READ_TEXT'EXPORTINGID                      = '0001'LANGUAGE                = '1'NAME                    = NAMEOBJECT                  = 'VBBK'TABLESLINES                   = TLINEEXCEPTIONSID                      = 1LANGUAGE                = 2NAME                    = 3NOT_FOUND               = 4OBJECT                  = 5REFERENCE_CHECK         = 6WRONG_ACCESS_TO_ARCHIVE = 7OTHERS                  = 8.CLEAR LSOTXT.LOOP AT TLINE.CONCATENATE LSOTXT TLINE-TDLINE INTO LSOTXT.ENDLOOP.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'I' IP_VALUE = LSOTXT IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).LO_WORKSHEET->SET_AREA( IP_ROW = PROW  IP_COLUMN_START = 'J' IP_COLUMN_END = 'K' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).ENDLOOP."$. Endregion 本月发生额DATA:PREPROW  TYPE I .DATA:LV_CELL_VALUE TYPE STRING.PREPROW = PROW.
*    汇总行PROW = PROW + 1.LSOTXT = 'SUM(F4:F' && PREPROW && ')'.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'A' IP_VALUE = '汇总' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID  ).LO_WORKSHEET->SET_AREA( IP_ROW = PROW  IP_COLUMN_START = 'B' IP_COLUMN_END = 'E' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).IF SUMF >= 0.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'F' IP_FORMULA  = LSOTXT IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LO_STYLE_BOLD_BORDER_CURR  ).ELSE.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'F' IP_FORMULA  = LSOTXT IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE = LV_STY_GUID_CURR_R  ).ENDIF.LSOTXT = 'SUM(J4:J' && PREPROW && ')'.LO_WORKSHEET->SET_AREA( IP_ROW = PROW  IP_COLUMN_START = 'G' IP_COLUMN_END = 'I' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).IF SUMJ >= 0.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'J' IP_FORMULA  = LSOTXT  IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LO_STYLE_BOLD_BORDER_CURR ).ELSE.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'J' IP_FORMULA  = LSOTXT  IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE = LV_STY_GUID_CURR_R ).ENDIF.LSOTXT = 'SUM(K4:K' && PREPROW && ')'.IF SUMK >= 0.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'K' IP_FORMULA  = LSOTXT  IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE = LO_STYLE_BOLD_BORDER_CURR  ).ELSE.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'K' IP_FORMULA  = LSOTXT  IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE = LV_STY_GUID_CURR_R  ).ENDIF.
*    月末余额PREPROW = PROW.PROW = PROW + 1.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'A' IP_VALUE = '月末余额' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_MERGE( IP_ROW = PROW IP_COLUMN_START = 'B' IP_COLUMN_END = 'K' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LSOTXT = 'F' && PREPROW && '-J' && PREPROW && '+K' && PREPROW.IF  SUMF - SUMJ  +  SUMK >= 0.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'B' IP_FORMULA  = LSOTXT  IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LO_STYLE_BOLD_BORDER_CURR  ).ELSE.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'B' IP_FORMULA  = LSOTXT  IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE = LV_STY_GUID_CURR_R  ).ENDIF.*    制表人PROW = PROW + 1.LO_WORKSHEET->SET_MERGE( IP_ROW = PROW IP_COLUMN_START = 'A' IP_COLUMN_END = 'F' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).SELECT SINGLE USREFUS~USERALIAS  FROM USREFUS WHERE BNAME = @SY-UNAME INTO @DATA(LALIAS).LSOTXT = '制表人:' && LALIAS ."' && '(' && SY-UNAME &&  ')'.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'A' IP_VALUE = LSOTXT IP_STYLE =   LV_STYLE_BOLD_BORDER_GUID_LT  ).LO_WORKSHEET->SET_AREA( IP_ROW = PROW  IP_COLUMN_START = 'G' IP_COLUMN_END = 'I' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).LO_WORKSHEET->SET_MERGE( IP_ROW = PROW IP_COLUMN_START = 'J' IP_COLUMN_END = 'K' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'J' IP_VALUE = '客户回签(签字/盖章)' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_RT ).
*    电话PROW = PROW + 1.LO_WORKSHEET->SET_MERGE( IP_ROW = PROW IP_COLUMN_START = 'A' IP_COLUMN_END = 'F' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID  ).LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'A' IP_VALUE = '电话:0576-88159077' IP_STYLE =   LV_STYLE_BOLD_BORDER_GUID_LT   ).LO_WORKSHEET->SET_AREA( IP_ROW = PROW  IP_COLUMN_START = 'G' IP_COLUMN_END = 'I' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).LO_WORKSHEET->SET_MERGE( IP_ROW = PROW IP_COLUMN_START = 'J' IP_COLUMN_END = 'K' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'J' IP_VALUE = '传真:0576-88177758' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_RT ).
*    截止本月零件销售余额:                   877.97PROW = PROW + 1.LO_WORKSHEET->SET_MERGE( IP_ROW = PROW IP_COLUMN_START = 'A' IP_COLUMN_END = 'F' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'A' IP_VALUE = '截止本月零件销售余额' IP_STYLE =  LV_STYLE_BOLD_BORDER_GUID_LT  ).LO_WORKSHEET->SET_AREA( IP_ROW = PROW  IP_COLUMN_START = 'G' IP_COLUMN_END = 'I' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).
*               本月发生        年初       +  历史DeltaSUMBYXSYE = SUMBYXSYE + GTHEAD-ZXSQC + GTHEAD-ZXSQCY.LO_WORKSHEET->SET_MERGE( IP_ROW = PROW IP_COLUMN_START = 'J' IP_COLUMN_END = 'K' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).IF SUMBYXSYE >= 0.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'J' IP_VALUE = SUMBYXSYE IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STYLE_BOLD_BORDER_GUID_CURR  ).ELSE.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'J' IP_VALUE = SUMBYXSYE IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STY_GUID_CURR_R  ).ENDIF.
*截止本月零件备用余额:                   6,999.95PROW = PROW + 1.LO_WORKSHEET->SET_MERGE( IP_ROW = PROW IP_COLUMN_START = 'A' IP_COLUMN_END = 'F' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'A' IP_VALUE = '截止本月零件备用余额' IP_STYLE =  LV_STYLE_BOLD_BORDER_GUID_LT  ).LO_WORKSHEET->SET_AREA( IP_ROW = PROW  IP_COLUMN_START = 'G' IP_COLUMN_END = 'I' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).SUMBYBYYE = SUMBYBYYE + GTHEAD-ZLJQC + GTHEAD-ZLJQCY.LO_WORKSHEET->SET_MERGE( IP_ROW = PROW IP_COLUMN_START = 'J' IP_COLUMN_END = 'K' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).IF SUMBYBYYE >= 0.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'J' IP_VALUE = SUMBYBYYE IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STYLE_BOLD_BORDER_GUID_CURR  ).ELSE.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'J' IP_VALUE = SUMBYBYYE IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STY_GUID_CURR_R   ).ENDIF.
*截至本月零件回款合计:                   3,200.00PROW = PROW + 1.LO_WORKSHEET->SET_MERGE( IP_ROW = PROW IP_COLUMN_START = 'A' IP_COLUMN_END = 'F' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'A' IP_VALUE = '截至本月零件回款合计' IP_STYLE =  LV_STYLE_BOLD_BORDER_GUID_LT  ).LO_WORKSHEET->SET_AREA( IP_ROW = PROW  IP_COLUMN_START = 'G' IP_COLUMN_END = 'I' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).LO_WORKSHEET->SET_MERGE( IP_ROW = PROW IP_COLUMN_START = 'J' IP_COLUMN_END = 'K' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).IF SUMBYHKHJ >= 0.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'J' IP_VALUE = SUMBYHKHJ IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STYLE_BOLD_BORDER_GUID_CURR  ).ELSE.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'J' IP_VALUE = SUMBYHKHJ IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STY_GUID_CURR_R   ).ENDIF.
*截至本月零件余额合计:                   4,677.92PROW = PROW + 1.LO_WORKSHEET->SET_MERGE( IP_ROW = PROW IP_COLUMN_START = 'A' IP_COLUMN_END = 'F' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'A' IP_VALUE = '截至本月零件余额合计' IP_STYLE =   LV_STYLE_BOLD_BORDER_GUID_LT  ).LO_WORKSHEET->SET_AREA( IP_ROW = PROW  IP_COLUMN_START = 'G' IP_COLUMN_END = 'I' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LT ).LO_WORKSHEET->SET_MERGE( IP_ROW = PROW IP_COLUMN_START = 'J' IP_COLUMN_END = 'K' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID ).ZYMYE  = SUMBYXSYE + SUMBYBYYE - SUMBYHKHJ.IF ZYMYE >= 0.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'J' IP_VALUE = ZYMYE IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STYLE_BOLD_BORDER_GUID_CURR  ).ELSE.LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'J' IP_VALUE = ZYMYE IP_ABAP_TYPE = CL_ABAP_TYPEDESCR=>TYPEKIND_FLOAT IP_STYLE =  LV_STY_GUID_CURR_R  ).ENDIF.
*"温馨提醒:
*一、以上是贵司和我司发生的往来帐明细表,请及时核对确认,如有疑问请于一星期内前将问题书面反馈至我司,我司将及时给予处理,如未回复,视同贵司认可以上余额,谢谢合作。
*二、本司将以此为据确认贵司的实际应收款,负数表示您尚在我司的预付款。
*三、我司对帐时间:次月4-6号。"PROW = PROW + 1.LO_WORKSHEET->SET_MERGE( IP_ROW = PROW  IP_COLUMN_START = 'A' IP_COLUMN_END = 'K' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LR ).LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'A' IP_VALUE  = '温馨提醒' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LR ).PROW = PROW + 1.LO_WORKSHEET->SET_MERGE( IP_ROW = PROW  IP_COLUMN_START = 'A' IP_COLUMN_END = 'K' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LR ).LO_WORKSHEET->SET_CELL( IP_ROW = PROW IP_COLUMN = 'A' IP_VALUE  = '一、以上是贵司和我司发生的往来帐明细表如有疑问请于一星期内前将问题书面反馈至我司,我司将及时给予处理,如未回复,视同贵司认可以上余额,请及时核对确认,谢谢合作。' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LR  ).PROW = PROW + 1.LO_WORKSHEET->SET_MERGE( IP_ROW = PROW  IP_COLUMN_START = 'A' IP_COLUMN_END = 'K' IP_STYLE = LV_STYLE_BOLD_BORDER_GUID_LR ).LO_WORKSHEET->SET_CELL( IP_ROW    = PROWIP_COLUMN = 'A'IP_VALUE  = '二、本司将以此为据确认贵司的实际应收款,负数表示您尚在我司的预付款'IP_STYLE  = LV_STYLE_BOLD_BORDER_GUID_LR ).PROW = PROW + 1.LO_WORKSHEET->SET_MERGE(IP_ROW          = PROWIP_COLUMN_START = 'A'IP_COLUMN_END   = 'K'IP_STYLE        = LV_STYLE_BOLD_BORDER_GUID_NT ).LO_WORKSHEET->SET_CELL( IP_ROW    = PROWIP_COLUMN = 'A'IP_VALUE  = '三、我司对帐时间:次月4-6号。'IP_STYLE  = LV_STYLE_BOLD_BORDER_GUID_NT ).CREATE OBJECT LO_EXCEL_WRITER TYPE ZCL_EXCEL_WRITER_2007.LV_FILE = LO_EXCEL_WRITER->WRITE_FILE( LO_EXCEL )." Convert to binaryCALL FUNCTION 'SCMS_XSTRING_TO_BINARY'EXPORTINGBUFFER        = LV_FILEIMPORTINGOUTPUT_LENGTH = LV_BYTECOUNTTABLESBINARY_TAB    = LT_FILE_TAB." Save the fileCL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD( EXPORTING BIN_FILESIZE = LV_BYTECOUNTFILENAME     = LV_FULL_PATHFILETYPE     = 'BIN'CHANGING  DATA_TAB     = LT_FILE_TAB ).WRITE:/ '客户' && LKUNNR && '已经写入文件' && LV_FULL_PATH.
ENDFORM.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/10153.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

全新神经网络架构KAN——本文用于学习与探索

论文地址:https://arxiv.org/pdf/2404.19756 Github:GitHub - KindXiaoming/pykan: Kolmogorov Arnold Networks 文档说明:Welcome to Kolmogorov Arnold Network (KAN) documentation! — Kolmogorov Arnold Network documentation 本文仅…

二手交易系统基于Uniapp+FastAdmin+ThinkPHP(源码搭建/上线/运营/售后/更新)

​一款基于UniappFastAdminThinkPHP开发的二手交易系统,卖家可以发布二手信息,买家可以在线询价,支持在线聊天(高级授权),在线购买支付,支持发布高价回收(高级授权)信息。自带社交板块,用户可以发布帖子、加…

Prompt|Kimi高阶技巧,99%的人都不知道

大家好,我是无界生长。 今天分享一条咒语,轻松让Kimi帮你生成流程图,学会了的话,点赞收藏起来吧! 效果展示 我们演示一下让kimi帮忙绘制 关注微信公众号“无界生长”的流程图,最终效果图如下所示 效果还不…

针对 % 号 | 引起的 不安全情况

把网站开放的课程都检索下来了 一、情况1 org.apache.tomcat.util.http.Parameters processParameters 信息: Character decoding failed. Parameter [Mac] with value [%%%] has been ignored. Note that the name and value quoted here may be corrupted due to the failed…

数组元素翻倍C++

编写一个 C 程序&#xff0c;实现一个功能&#xff0c;即将数组中的每个元素值翻倍。程序应定义一个函数 doubleArray&#xff0c;该函数接收一个整数数组的指针和数组的大小&#xff0c;然后将数组中的每个元素都翻倍。 代码 #include <iostream>void doubleArray(int…

红帽为 Red Hat OpenShift AI 扩大与 Elasticsearch 向量数据库的合作

作者&#xff1a;来自 Elastic Aditya Tripathi 红帽和 Elastic 今天宣布开展合作&#xff0c;以便在 Red Hat OpenShift AI 上集成 Elasticsearch 向量数据库。 Red Hat OpenShift 用户现在可以通过红帽生态系统目录实施 Elasticsearch 以进行向量搜索和检索增强生成 (RAG) 应…

商机来了你能抓住吗?2024新商机!2024创业新风口!2024创业项目小成本!2024创业干什么最赚钱?

19世纪末&#xff0c;美国加利福尼亚州发现了黄金&#xff0c;出现了淘金热。有一位17岁的少年来到加州&#xff0c;是想加入淘金者的队伍&#xff0c;可看到金子没那么好淘&#xff0c;淘金的人很野蛮&#xff0c;他很害怕。这时&#xff0c;他看到淘金人在炎热的天气下干活口…

C++笔试强训day16

目录 1.字符串替换 2.神奇数 3.DNA序列 1.字符串替换 链接 简单的遍历替换即可&#xff1a; class Solution { public:string formatString(string str, vector<char>& arg) {string ret;int k 0;for (int i 0; i < str.size(); i){if (str[i] %){ret arg…

Windows10搭建GPU版Darknet—yolov4—VS2022+CUDA+CUDNN(亲测有效)

1 VS2019安装 网址&#xff1a;Visual Studio: 面向软件开发人员和 Teams 的 IDE 和代码编辑器 下载完成之后双击.exe文件 步骤严格如下安装 默认语音包为中文&#xff08;简体&#xff09; 安装位置可以自行选择&#xff0c;完成以后就可以点击安装了。 安装完毕以后需要重启…

464. 我能赢吗

464. 我能赢吗 原题链接&#xff1a;完成情况&#xff1a;解题思路&#xff1a;参考代码&#xff1a;_464我能赢吗_记忆化dp 错误经验吸取 原题链接&#xff1a; 464. 我能赢吗 https://leetcode.cn/problems/can-i-win/description/ 完成情况&#xff1a; 解题思路&#x…

【Go】Go Swagger 生成和转 openapi 3.0.3

本文档主要描述在 gin 框架下用 gin-swagger 生成 swagger.json 的内容&#xff0c;中间猜的坑。以及&#xff0c;如何把 swagger 2.0 转成 openapi 3.0.3 下面操作均在项目根目录下执行 生成 swagger 2.0 import swagger go get -u github.com/swaggo/gin-swagger go get …

炫酷个人主页(源码免费)

炫酷个人主页 效果图部分代码领取源码下期更新预报 效果图 部分代码 <!DOCTYPE html> <!--哪怕是深爱之人 对我们的痛苦一无所知&#xff01;* ░░░░░░░░░░░░░░░░░░░░░░░░▄░░* ░░░░░░░░░▐█░░░░░░░░░░░▄▀▒▌░* ░…

Jenkins android 自动打包安卓 centos8.5 运维系列五

1 新建项目android #cat android.sh #!/bin/bash rm -rf /data/.jenkins/workspace/android/app/build/outputs/apk/debug/* rm -rf /data/.jenkins/workspace/android/app/build/outputs/apk/release/* cd /data/.jenkins/workspace/android/app source /etc/profile g…

一文读懂:架构图类型、设计方法(内附大量案例)

架构图是一种用于描述和展示软件系统或应用程序的结构和组成的图形表示。它通常包括系统的各个组件、模块、接口、数据流等元素&#xff0c;并显示它们之间的关系和交互。 一、架构图的类型 架构图有多种类型&#xff0c;常见的几种类型包括&#xff1a; 高层架构图&#xff0…

政安晨【零基础玩转各类开源AI项目】:基于Ubuntu系统本地部署使用GPT-SoVITS进行语音克隆与TTS语音生成

目录 介绍 什么是TTS 安装Miniconda 框架功能 测试通过的环境 开始 1. 安装好miniconda 2. 进入下载的GPT-SoVITS目录 3. 创建虚拟环境并执行脚本 4. 执行过程中可能会出错 5. 下载预训练模型 6. 训练过程中可能会报错 7. 使用过程中可能出错 8.以下是使用全过程…

JavaEE技术之MySql主从复制及mycat[了解,不讲]

文章目录 1. 主从复制1.1. 主从同步的原理1.2. 检查数据库远程访问权限1.3. 主从配置1.3.1. master配置1.3.2. slave配置1.3.3. 主库创建同步用户1.3.4. 从库配置主从关系1.3.5. 重置主从关系 1.4. 测试主从复制 2. Mycat2.1. Mycat简介2.2. MyCat读写分离原理2.3. 不废话&…

代码随想录day63 | 单调栈P3 | ● 84.

84.柱状图中最大的矩形 给定 n 个非负整数&#xff0c;用来表示柱状图中各个柱子的高度。每个柱子彼此相邻&#xff0c;且宽度为 1 。 求在该柱状图中&#xff0c;能够勾勒出来的矩形的最大面积。 示例 1: 输入&#xff1a;heights [2,1,5,6,2,3] 输出&#xff1a;10 解释&a…

docker部署minio和业务服务因变更minio密码导致访问不到图片的问题

问题起因 业务application和minio都是docker部署。按部署规则minio的环境变量中设置了MINIO_ROOT_USER和MINIO_ROOT_PASSWORD。这样就可以用这套用户名密码登录minio了。而我的application中是通过api访问minio获取资源URL&#xff0c;提供给前端的。所以在application的环境变…

苹果电脑MAC清理系统空间工具CleanMyMacX4.15.3中文版下载

苹果电脑以其出色的性能、优雅的设计和高效的操作系统而受到许多用户的喜爱。然而&#xff0c;随着时间的推移和使用量的增加&#xff0c;你可能会发现你的Mac开始变得缓慢和响应迟缓。这通常是因为硬盘空间被大量占用&#xff0c;影响了系统的整体性能。幸运的是&#xff0c;有…

qt: undefined reference to `vtable for aaa‘

版本qt4.8.6&#xff0c;编译报错“main.cpp:(.text0x3b): undefined reference to vtable for aaa” 就一个main.cpp #include <QApplication> #include <QTimer> #include <QCursor> #include <QMouseEvent> #include <QDesktopWidget> #inc…