门店查询报表

REPORT  ZSDR004.

INCLUDE ZSDR004TOP.

TABLES: KNA1,/ATU/STOREMASTER,KNVV,ZSSTORE02.

TYPE-POOLS: slis.

DATA: ls_data type ZSSTORE02,
      it_data type TABLE OF ZSSTORE02 WITH HEADER LINE.

"设置面积
DATA: it_ZSTORE_A like TABLE OF ZSTORE_A WITH HEADER LINE,
      it_ZSTORE_AR like TABLE OF ZSTORE_AR WITH HEADER LINE,
      it_3ASEAN like TABLE OF J_3ASEANT WITH HEADER LINE,
      it_ZSTORE_QR like TABLE OF ZSTORE_QR WITH HEADER LINE,
      it_ZMAP_VFILD like TABLE OF ZMAP_VFILD WITH HEADER LINE,
      it_ZMAP_TFILD like TABLE OF ZMAP_TFILD WITH HEADER LINE,
      it_ZST_SEAN_PATTR like TABLE OF ZST_SEAN_PATTR WITH HEADER LINE.

FIELD-symbols: <dyn_table> TYPE STANDARD TABLE,       " 内表结构
               <dyn_wa>,                              " 表头
               <dyn_field>.                           " 项

DATA: it_alv_cat TYPE TABLE OF lvc_s_fcat,
      ls_alv_cat LIKE LINE OF it_alv_cat,
      it_alv_cat_s TYPE TABLE OF lvc_s_fcat.

INCLUDE ZSDR004SCR.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
  SELECT-OPTIONS: S_3ADCCU FOR KNA1-J_3ADCCU,
                  S_KUNNR FOR KNA1-KUNNR,
                  S_NAME1 FOR KNA1-NAME1 NO INTERVALS,
                  S_KATR2 FOR KNA1-KATR2,
                  S_VKORG FOR /ATU/STOREMASTER-VKORG,
                  S_BRSCH FOR KNA1-BRSCH,
                  S_SPART FOR /ATU/STOREMASTER-SPART,
                  S_OMODE FOR /ATU/STOREMASTER-/ATU/STORETYPE,
                  S_KDGRP FOR KNVV-KDGRP,
                  S_KDKG1 FOR KNA1-KDKG1,
                  s_KONZS FOR KNA1-KONZS,
                  s_VWERK FOR KNVV-VWERK,
                  s_LGORT FOR /ATU/STOREMASTER-LGORT,
                  S_VKGRP FOR KNVV-VKGRP,
                  S_VKTXT FOR ZSSTORE02-VKTXT NO INTERVALS,
                  S_VKBUR FOR KNVV-VKBUR,
                  S_VBTXT FOR ZSSTORE02-VBTXT NO INTERVALS,
                  S_BZIRK FOR KNVV-BZIRK,
                  S_BZTXT FOR ZSSTORE02-BZTXT NO INTERVALS.
SELECTION-SCREEN END OF BLOCK B1.

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
  PARAMETERS: P_SHOWA AS CHECKBOX DEFAULT ‘‘,
              P_SHOWP AS CHECKBOX DEFAULT ‘‘,
              P_SHOWC AS CHECKBOX DEFAULT ‘‘,"显示关闭店
              P_SHOWQ AS CHECKBOX DEFAULT ‘‘.
SELECTION-SCREEN END OF BLOCK B2.

START-OF-SELECTION.
  PERFORM FRM_GET_LIST.
  PERFORM FRM_DEFINE_STRUCTURE.
  PERFORM FRM_CREATE_TABLE.
  PERFORM FRM_FILL_TABLE.
  PERFORM FRM_SHOW_ALV.

INCLUDE ZSDR004I01.

FORM user_command USING r_ucomm LIKE sy-ucomm
                        rs_selfield TYPE slis_selfield.

  READ TABLE it_data INDEX rs_selfield-tabindex.

  CASE r_ucomm.
    WHEN ‘&IC1‘.

      DATA: bdcdata_wa  TYPE bdcdata,
            bdcdata_tab TYPE TABLE OF bdcdata.
      DATA opt TYPE ctu_params.

      CLEAR bdcdata_wa.
      bdcdata_wa-program  = ‘/ATU/CA_STORE_MASTER‘.
      bdcdata_wa-dynpro   = ‘0050‘.
      bdcdata_wa-dynbegin = ‘X‘.
      APPEND bdcdata_wa TO bdcdata_tab.

      CLEAR bdcdata_wa.
      bdcdata_wa-fnam = ‘BDC_CURSOR‘.
      bdcdata_wa-fval = ‘/ATU/STOREMASTER-/ATU/STORE_ID‘.
      APPEND bdcdata_wa TO bdcdata_tab.

      CLEAR bdcdata_wa.
      bdcdata_wa-fnam = ‘/ATU/STOREMASTER-/ATU/STORE_ID‘.
      bdcdata_wa-fval = it_data-kunnr.
      APPEND bdcdata_wa TO bdcdata_tab.

      opt-dismode = ‘E‘.

      CALL TRANSACTION ‘/ATU/STORE3‘ USING bdcdata_tab OPTIONS FROM opt.

  ENDCASE.

  " 刷新ALV报表
  rs_selfield-row_stable = rs_selfield-tabindex.
  rs_selfield-refresh = ‘X‘.

ENDFORM.

INCLUDE ZSDR004F01.

FORM FRM_GET_LIST.
  RANGES: lra_kunnr for kna1-kunnr.

  CLEAR: IT_ZSTORE_A,IT_DATA,it_ZMAP_VFILD,it_ZMAP_TFILD,it_ZST_SEAN_PATTR.
  REFRESH: IT_ZSTORE_A,IT_DATA,it_ZMAP_VFILD,it_ZMAP_TFILD,it_ZST_SEAN_PATTR.

  CALL FUNCTION ‘ZSD_GET_STORE‘
    EXPORTING
      IV_BLOCK     = P_SHOWC
      IV_SHOWTXT   = ‘X‘
      IV_SHOWAREA  = P_SHOWA
      IV_SHOWQR    = P_SHOWP
    TABLES
      IT_3ADCCU    = S_3ADCCU
      IT_KUNNR     = S_KUNNR
      IT_NAME1     = S_NAME1
      IT_BZIRK     = S_BZIRK
      IT_VKORG     = S_VKORG
      IT_VKGRP     = S_VKGRP
      IT_VKBUR     = S_VKBUR
      IT_KATR2     = S_KATR2
      IT_STORETYPE = S_OMODE
      IT_KDGRP     = S_KDGRP
      IT_KDKG1     = S_KDKG1
      IT_KONZS     = S_KONZS
      IT_VWERK     = S_VWERK
      IT_LGORT     = S_LGORT
      ET_STORE     = IT_DATA
      ET_STORE_A   = IT_ZSTORE_A
      ET_STORE_AR  = IT_ZSTORE_AR
      ET_STORE_Q   = IT_3ASEAN
      ET_STORE_QR  = IT_ZSTORE_QR.

  DELETE IT_DATA WHERE VKTXT NOT IN S_VKTXT OR VBTXT NOT IN S_VBTXT OR BZTXT NOT IN S_BZTXT.
  DELETE IT_DATA WHERE STORETYPE eq ‘DC‘.

  SORT IT_ZSTORE_A BY ZAREA.
  SORT IT_3ASEAN BY J_3ASEAN.

  if P_SHOWQ eq ‘X‘.
    "取季节属性
    LOOP AT IT_DATA.
      clear lra_kunnr.
      lra_kunnr-sign = ‘I‘.
      lra_kunnr-option = ‘EQ‘.
      lra_kunnr-low  = IT_DATA-KUNNR.
      COLLECT lra_kunnr.
    ENDLOOP.

    CALL FUNCTION ‘ZSD_GET_STORE_SEAN_ATTR‘
      TABLES
        IT_STORE      = lra_kunnr
        ET_MAP_VALUE  = it_ZMAP_VFILD
        ET_MAP_TEXT   = it_ZMAP_TFILD
        ET_DATA       = it_ZST_SEAN_PATTR.

  endif.
ENDFORM.                    "FRM_GET_LIST

"定义内表结构
*&---------------------------------------------------------------------*
*&      Form  FRM_DEFINE_STRUCTURE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM FRM_DEFINE_STRUCTURE.
  DATA: LS_TABLE TYPE DNTAB,
        IT_TABLE TYPE TABLE OF DNTAB.

  "根据表名取出表结构的字段目录
  CALL FUNCTION ‘NAMETAB_GET‘
    EXPORTING
      LANGU          = SY-LANGU
      TABNAME        = ‘ZSSTORE02‘
    TABLES
      NAMETAB        = IT_TABLE
    EXCEPTIONS
      NO_TEXTS_FOUND = 1.

  LOOP AT IT_TABLE INTO LS_TABLE.
    CLEAR LS_ALV_CAT.
    LS_ALV_CAT-FIELDNAME = LS_TABLE-FIELDNAME.
    LS_ALV_CAT-INTLEN    = LS_TABLE-INTLEN.
    APPEND LS_ALV_CAT TO IT_ALV_CAT.
  ENDLOOP.

  IT_ALV_CAT_S[] = IT_ALV_CAT[].

  IF P_SHOWA EQ ‘X‘.

    LOOP AT IT_ZSTORE_A.
      CLEAR LS_ALV_CAT.
      LS_ALV_CAT-FIELDNAME = IT_ZSTORE_A-ZAREA.
      APPEND LS_ALV_CAT TO IT_ALV_CAT.
    ENDLOOP.
  ENDIF.

  IF P_SHOWP EQ ‘X‘.
    LOOP AT IT_3ASEAN.
      CLEAR LS_ALV_CAT.
      LS_ALV_CAT-FIELDNAME = IT_3ASEAN-J_3ASEAN.
      APPEND LS_ALV_CAT TO IT_ALV_CAT.
    ENDLOOP.
  ENDIF.

  if P_SHOWQ eq ‘X‘.
    LOOP AT IT_ZMAP_TFILD.
      CLEAR LS_ALV_CAT.
      LS_ALV_CAT-FIELDNAME = IT_ZMAP_TFILD-FIELDNAME.
      APPEND LS_ALV_CAT TO IT_ALV_CAT.
    ENDLOOP.
  ENDIF.
ENDFORM.                    "FRM_DEFINE_STRUCTURE

"创建动态内表
*&---------------------------------------------------------------------*
*&      Form  FRM_CREATE_TABLE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM FRM_CREATE_TABLE.

  DATA: DY_TABLE TYPE REF TO DATA,
  DY_LINE TYPE REF TO DATA.

  CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
    EXPORTING
      IT_FIELDCATALOG = IT_ALV_CAT
    IMPORTING
      EP_TABLE        = DY_TABLE.

  ASSIGN DY_TABLE->* TO <DYN_TABLE>.

  CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE>.
  ASSIGN DY_LINE->* TO <DYN_WA>.

ENDFORM.                    "FRM_CREATE_TABLE

"填 充内表
*&---------------------------------------------------------------------*
*&      Form  FRM_FILL_TABLE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM FRM_FILL_TABLE.
  FIELD-SYMBOLS: <DYN_FIELD_TEMP> TYPE ANY.
  DATA:LV_FIELD(50) TYPE C.

  SORT IT_DATA BY KUNNR.

  LOOP AT IT_DATA.
    CLEAR: <DYN_WA>.
    LOOP AT IT_ALV_CAT_S INTO LS_ALV_CAT.
      CLEAR LV_FIELD.
      CONCATENATE ‘IT_DATA-‘ LS_ALV_CAT-FIELDNAME INTO LV_FIELD.
      ASSIGN (LV_FIELD) TO <DYN_FIELD_TEMP>.
      ASSIGN COMPONENT LS_ALV_CAT-FIELDNAME OF STRUCTURE <DYN_WA> TO <DYN_FIELD>.
      <DYN_FIELD> = <DYN_FIELD_TEMP>.
    ENDLOOP.

    IF P_SHOWA EQ ‘X‘.
      LOOP AT IT_ZSTORE_AR WHERE KUNNR = IT_DATA-KUNNR.
        ASSIGN COMPONENT IT_ZSTORE_AR-ZAREA OF STRUCTURE <DYN_WA> TO <DYN_FIELD>.
        <DYN_FIELD> = IT_ZSTORE_AR-VALUE.
      ENDLOOP.
    ENDIF.

    IF P_SHOWP EQ ‘X‘.
      LOOP AT IT_ZSTORE_QR WHERE KUNNR = IT_DATA-KUNNR.
        ASSIGN COMPONENT IT_ZSTORE_QR-QUART OF STRUCTURE <DYN_WA> TO <DYN_FIELD>.
        <DYN_FIELD> = IT_ZSTORE_QR-KDKG1.
      ENDLOOP.
    ENDIF.

    if P_SHOWQ eq ‘X‘.
      LOOP AT it_ZST_SEAN_PATTR WHERE KUNNR = IT_DATA-KUNNR.

        LOOP AT IT_ZMAP_TFILD.
          CLEAR LV_FIELD.
          CONCATENATE ‘IT_ZST_SEAN_PATTR-‘ IT_ZMAP_TFILD-FIELDNAME INTO LV_FIELD.
          ASSIGN (LV_FIELD) TO <DYN_FIELD_TEMP>.
          ASSIGN COMPONENT IT_ZMAP_TFILD-FIELDNAME OF STRUCTURE <DYN_WA> TO <DYN_FIELD>.
          <DYN_FIELD> = <DYN_FIELD_TEMP>.
        ENDLOOP.

      ENDLOOP.
    endif.

    APPEND <DYN_WA> TO <DYN_TABLE>.
  ENDLOOP.

ENDFORM.                    "FRM_FILL_TABLE

*&---------------------------------------------------------------------*
*&      Form  FRM_SHOW_ALV
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM FRM_SHOW_ALV.
  DATA: IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
        LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
        LS_LAYOUT TYPE SLIS_LAYOUT_ALV.

  CLEAR LS_LAYOUT.
  LS_LAYOUT-EDIT              = ‘‘.
  LS_LAYOUT-EDIT_MODE         = SPACE.
  LS_LAYOUT-ZEBRA             = ‘X‘.
  LS_LAYOUT-COLWIDTH_OPTIMIZE = ‘‘.

  DEFINE ADD_FIELD.
    CLEAR: LS_FIELDCAT.
    LS_FIELDCAT-FIELDNAME    = &1.
    LS_FIELDCAT-REPTEXT_DDIC = &2.
    LS_FIELDCAT-INTLEN       = &3.
    LS_FIELDCAT-DO_SUM       = &4.
    LS_FIELDCAT-NO_ZERO      = &5.
    LS_FIELDCAT-KEY          = &6.
    LS_FIELDCAT-FIX_COLUMN   = &7.
    APPEND LS_FIELDCAT TO IT_FIELDCAT.
  END-OF-DEFINITION.

  ADD_FIELD ‘J_3ADCCU‘ ‘总店编号‘ 10 ‘‘ ‘‘ ‘X‘ ‘X‘.
  ADD_FIELD ‘KUNNR‘ ‘子店编号‘ 10 ‘‘ ‘‘ ‘X‘ ‘X‘.
  ADD_FIELD ‘NAME1‘ ‘名称‘ 20 ‘‘ ‘‘ ‘X‘ ‘X‘.
  ADD_FIELD ‘LOEVM‘ ‘关闭‘ 4 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘STORETYPETXT‘ ‘运营模式‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘VKORG‘ ‘销售机构‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘VKORGTXT‘ ‘销售机构名称‘ 10 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘BRSCH‘ ‘营销品牌‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘BRSCHTXT‘ ‘营销品牌名称‘ 10 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘SPART‘ ‘品牌‘ 10 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘KATR2TXT‘ ‘店铺类型‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘KDGRPTXT‘ ‘客户组‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘KONZS‘ ‘商场‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘KDKG1‘ ‘门店属性‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘VWERK‘ ‘交货工厂‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘LPRIO‘ ‘交货优先权‘ 10 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘LGORT‘ ‘库存地点‘ 10 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘/ATU/REGION‘ ‘门店地区‘ 10 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘/ATU/DISTRICT‘ ‘所属经营部‘ 10 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘/ATU/AREA‘ ‘商圈‘ 10 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘/ATU/ST_SEL_AREA‘ ‘营业面积‘ 10 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘/ATU/STORE_AREA‘ ‘建筑面积‘ 10 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘/ATU/NUM_WINDOWS‘ ‘橱窗数量‘ 10 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘/ATU/NUM_REGSTER‘ ‘导购人数‘ 10 ‘‘ ‘‘ ‘‘ ‘‘.

  ADD_FIELD ‘DATLT‘ ‘联系人‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘VIPAR‘ ‘积分区域‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘TELF1‘ ‘电话‘ 10 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘TELF2‘ ‘移动电话‘ 11 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘TELFX‘ ‘传真‘ 10 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘P_TEL1‘ ‘电话号码1‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘P_TEL2‘ ‘电话号码2‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  "ADD_FIELD ‘REMARK‘ ‘VOIP电话‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.

  ADD_FIELD ‘P_TFX‘ ‘传真号码‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘VKTXT‘ ‘主管‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘BZTXT‘ ‘地区‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘VBTXT‘ ‘管理区域‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘RETXT‘ ‘省‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘ORT01‘ ‘城市‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘PSTLZ‘ ‘邮政编码‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘TELBX‘ ‘承运商‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  add_field ‘CITY2‘ ‘收货城市‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘STR_SUPPL1‘ ‘收货地址‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘STRAS‘ ‘门店地址‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘SENDDAY‘ ‘发送周期‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘BACKDAY‘ ‘退货周期‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘OPENINGDATE‘ ‘开店日期‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘REMODDATE‘ ‘改型日期‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘CLOSINGDATE‘ ‘关店日期‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘SMSNM‘ ‘短信接收人‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘SMSTL‘ ‘短信接收号‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘SMSNM_D‘ ‘调拨短信接收人‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘SMSTL_D‘ ‘调拨短信接收号‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘SMSFQ‘ ‘短信发送频率‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.

  ADD_FIELD ‘RTE_NBR‘ ‘运输区域‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘SPL1‘ ‘周一波次序号‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘SPL2‘ ‘周二波次序号‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘SPL3‘ ‘周三波次序号‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘SPL4‘ ‘周四波次序号‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘SPL5‘ ‘周五波次序号‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘SPL6‘ ‘周六波次序号‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.
  ADD_FIELD ‘SPL7‘ ‘周七波次序号‘ 8 ‘‘ ‘‘ ‘‘ ‘‘.

  IF P_SHOWA EQ ‘X‘.

    LOOP AT IT_ZSTORE_A.
      ADD_FIELD IT_ZSTORE_A-ZAREA IT_ZSTORE_A-NAME1 6 ‘‘ ‘‘ ‘‘ ‘‘.
    ENDLOOP.

  ENDIF.

  IF P_SHOWP EQ ‘X‘.

    LOOP AT IT_3ASEAN.
      ADD_FIELD IT_3ASEAN-J_3ASEAN IT_3ASEAN-TEXT 6 ‘‘ ‘‘ ‘‘ ‘‘.
    ENDLOOP.

  ENDIF.

  if P_SHOWQ eq ‘X‘.
    LOOP AT IT_ZMAP_TFILD.
      ADD_FIELD IT_ZMAP_TFILD-FIELDNAME IT_ZMAP_TFILD-DDTEXT 10 ‘‘ ‘‘ ‘‘ ‘‘.
    ENDLOOP.
  ENDIF.

  CALL FUNCTION ‘REUSE_ALV_GRID_DISPLAY‘
    EXPORTING
      I_CALLBACK_PROGRAM      = SY-REPID
      IT_FIELDCAT             = IT_FIELDCAT
      IS_LAYOUT               = LS_LAYOUT
              "i_callback_pf_status_set = ‘SET_PF_STATUS‘
      I_CALLBACK_USER_COMMAND = ‘USER_COMMAND‘
      I_SAVE                  = ‘A‘
    TABLES
      T_OUTTAB                = <DYN_TABLE>.

  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    "FRM_SHOW_ALV
时间: 2024-10-12 10:18:36

门店查询报表的相关文章

JEPLUS图报表 查询报表——JEPLUS软件快速开发平台

JEPLUS图报表 查询报表 我们在配置完报表之后会发现数据太多,当我们需要查询某一条数据时很浪费时间,我们可以给他配置查询报表上面配置查询条件我们可以根据我们配置好的类型来查询我们需要的数据. 一.效果展示 二.实现步骤 1.首先还是先实现一个简单报表 2.在JEPLUS中提供了简单的查询配置. 在这里我们可以配置是否启用 背景颜色,查询按钮 查询参数 只需要在 查询信息里面配置完我们需要的查询参数 我们就可以实现我们的查询报表了. 查看原文及阅读更多 原文地址:http://blog.51c

关于查询报表总是&quot;超时已过期&quot;的问题解决

"超时已过期" 的问题一直在烦扰着我, 在查一些数据量比较大的表或者运行一些复杂存储过程的时候就会出现这个提示, 一开始是按下面的来设,有一些报表是可以正常查出来 a.在企业管理器中,选择菜单上的"工具",再选择"选项": b.在弹出的"SQL Server企业管理器属性"窗口中,点击"高级"选项卡 c.在"连接设置"下的"登录超时(秒)"右边的框中输入一个比较大的数

查询报表增加小计功能

SELECT ISNULL(T1.KHMC, '总计')客户名称, ISNULL(T1.DJMC, '小计')单据名称, CAST(SUM(T1.SL) AS INT)数量 FROM ( SELECT vl.DM1, k.KHMC, vl.DJMC, vl.SL FROM VW_LSXHDMX AS vl INNER JOIN KEHU AS k ON k.CKDM = vl.DM1 ) T1 GROUP BY T1.KHMC , T1.DJMC WITH ROLLUP

FastReport参数查询报表

1.添加Parameter 2.界面sql,ProjectName等于刚才设置的Parameter 3.Expression选择刚才添加的Parameter 4.下一步 原文地址:https://www.cnblogs.com/cuijx123/p/9210579.html

报表-条码未扫查询Controller

using Newtonsoft.Json; using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; using NPOI.XSSF.UserModel; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Linq.Expressions; using System.Web; using System.We

T100——查询 r类 报表开发流程

报表开发流程:1.建立入口程序 如r类的作业:cxmr500步骤: azzi900中建立程序代号 azzi910中建立作业代号 设计器--规格--签出 设计器--程序--签出 adzp168(r.a)产生画面 设计器--规格--下载规格--修改规格--上传规格 设计器--程序--下载程序--修改程序--上传程序 azzi850中给程序赋权限 范例cxmr503,r.a后,画面等内容弄好后,代码上call报表子程序,具体见: 主要关注cxmr503_process函数: #add-point:pr

利用SQL语句查询SCCM常用报表

2019年仅剩4天了,回头一看,今年都还没有写过博客.趁着2019的尾巴,分享一下今年做的SCCM项目经验.主要是关于如何通过SQL语句来查询SCCM相关报表信息.言归正传,默认安装报表服务后,可通过中心管理站点在sccm管理控制台查看报表数据,但是个人觉得自带的报表不好用,导出来的数据格式带各种链接,没有直接通过SQL查询报表来的方便.以下是通过SQL语句查询的常用10种SCCM统计报表: 1.系统发现数据System_Disc报表--查看SCCM系统发现的数据 2.计算机IP地址2.1 Sy

openerp 报表字段 report_rml_content_data

按需求修改一个报表,本想按照打印出来的报表内容搜索rml文件,找到需要修改的rml问加. 但是发现搜索不到,后来查询报表动作,确认对应的rml文件中,没有发现 "报表中" 的字串. 猜测可能是rml直接存入数据库了,果然在表ir_act_report_xml 中找到了report_rml_content_data ,report_sxw_content_data字段. 原因是使用base_report_designer模块,使用openoffice 直接修改报表上传后, rml 和 s

AnyReport 报表设计器

AnyReport报表设计器采用Flex开发,一个类似Excel表格形式的WEB报表设计与开发平台,能让用户在浏览器中进行所见即所得的可视化报表设计,而无须在客户端单独安装程序,这就提高了 Web 报表设计的灵活性.协同性,可设计参数查询报表.简单报表.自由报表.主子报表.分组报表.交叉报表.图形报表.数据下钻报表等,设计的报表模板将以XML的格式保存,设计器可以独立工作设计器不依赖其它的部分,可作为独立的工具使用导出报表配置信息. Web报表设计器工具栏主要包括开始.插入.公式函数等,开始菜单