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 本文仅…

Java 反射动态代理

反射 Java反射是一种强大的编程机制,它允许程序在运行时检查或修改对象和类的行为。具体来说,反射机制提供了以下功能: 类的动态加载:可以在运行时加载一个只知道名称的类,并创建该类的实例。获取类的详细信息&#…

二手交易系统基于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…

Kubernetes Cluster IP,Node IP,Pod IP间通信原理解析

目录 1、Cluster IP2、Node IP3、NodePort4、Pod IP5、LoadBalancer6、三种IP间通信6.1、Pod IP 与 Pod IP 通信6.2、Pod IP 与 Cluster IP 通信6.3、Node IP 与 Pod IP 通信6.4、Node IP 与 Cluster IP 7、YAML 示例7.1、ClusterIP Service7.2、LoadBalancer Service 1、Clust…

数组元素翻倍C++

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

【笔记】Android MVNO APN 字段配置方法

Android APN配置针对虚拟运营商包含以下两个字段对卡进行匹配(除了MCC、MNC之外): Mvno TypeMvno Match Data在 APN 配置中,运营商使用MVNO=IMSI时,一般开头是mccmnc+prefix+[range],那么mccmnc和 prefix正常配置,后面range的可变范围直接用“xxxx”同等长度占位。 MVNO…

红帽为 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;他看到淘金人在炎热的天气下干活口…

pytest 数据驱动

pytest 数据驱动 1.pytest 如何收集到用例的&#xff1f; 2.pytest 如何把 python 代码&#xff0c;转换成 pytest 测试用例&#xff08;又称 item&#xff09; &#xff1f; pytest如何做到收集到用例的&#xff1f; conftest编写以下 hook 函数&#xff1a; conftest.py de…

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;完成以后就可以点击安装了。 安装完毕以后需要重启…

如何解决 IPA 打包过程中的 “Invalid Bundle Structure“ 错误

哈喽&#xff0c;大家好呀&#xff0c;淼淼又来和大家见面啦&#xff0c;咱们行业内的应该都知道&#xff0c;在开发 iOS 应用时&#xff0c;将应用打包成 IPA 文件是常见的步骤之一。最近很多小伙伴们说在打包过程中&#xff0c;有时会遇到 "Invalid Bundle Structure&qu…

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 …

简述java中常见的运行时异常以及如何捕获和处理异常

一、在Java中&#xff0c;常见的运行时异常&#xff08;RuntimeException&#xff09;包括以下几种&#xff1a; NullPointerException&#xff1a;当应用程序试图访问空对象时&#xff0c;会抛出此异常。简单地说&#xff0c;就是调用了未经初始化的对象或者是不存在的对象。…

vue中this.$emit(“update:xx“,value)和xx.sync的用法

只做记录与讲解特别需要注意的地方 父组件 <hello-world :message.sync"originStr" /> 子组件 <button click"this.$emit("update:message", "Hello World");">兄弟点我</button>注意 父组件的message必须与子组件…

兴趣的转变

40多了&#xff0c;对事物的兴趣也变化了不少。之前的看过一些政兵文科的内容&#xff0c;现在也很少看了&#xff0c;前一段还关注一些华为手机&#xff0c;新能源汽车之类的新闻&#xff0c;看多了也觉得无趣了。 在想关注一个对自己比较有意义的内容&#xff0c;可以让自个沉…

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

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