YTST_CX_0001(ALV栏位汇总)
***********************************************************************
* Title : X *
* Application : X *
* Subject : X *
* Requested by : X *
* Execution : X *
* Ref no: : X *
* Author : X *
* Req Date : X *
***********************************************************************
* 设计主要逻辑与原理说明 *
***********************************************************************
* 1.XXX *
* XXX *
* XXX *
* *
***********************************************************************
* MODIFICATIONS (latest entry at the top) *
* ------------------------------------------------------------------- *
* REL DATE NAME (COMPANY) DESCRIPTION TASK-NO *
* --- ---- ---- --------- ----------- ------- *
* *
***********************************************************************
REPORT YTST_CX_0001 NO STANDARD PAGE HEADING
LINE-COUNT 65
LINE-SIZE 135
MESSAGE-ID YTCX_01.
*----------------------------------------------------------------------
* TYPE-POOLS
*----------------------------------------------------------------------
TYPE-POOLS: SLIS. "ALV
*----------------------------------------------------------------------
* TABLES/Structure
*----------------------------------------------------------------------
TABLES: MARA,
MBEW.
*----------------------------------------------------------------------
* TYPES
*----------------------------------------------------------------------
TYPES:BEGIN OF T_ITAB,
MATNR LIKE MARA-MATNR,
ERSDA LIKE MARA-ERSDA,
MATKL LIKE MARA-MATKL,
LBKUM LIKE MBEW-LBKUM,
SALK3 LIKE MBEW-SALK3,
END OF T_ITAB.
*----------------------------------------------------------------------
* Internal table
*----------------------------------------------------------------------
DATA:ITAB TYPE TABLE OF T_ITAB WITH HEADER LINE.
DATA:G_LEN TYPE I.
*======================================================================
* SELECTION-SCREEN
*======================================================================
SELECTION-SCREEN BEGIN OF BLOCK BLOK WITH FRAME TITLE TXT1.
SELECT-OPTIONS: MATNR FOR MARA-MATNR.
SELECTION-SCREEN END OF BLOCK BLOK.
*----------------------------------------------------------------------
* INITIALIZATION
*----------------------------------------------------------------------
INITIALIZATION.
TXT1 = '请输入选择条件'.
*&G1 初始化数据
PERFORM FRM_INITIAL.
*----------------------------------------------------------------------
* AT SELECTION-SCREEN
*----------------------------------------------------------------------
AT SELECTION-SCREEN.
*G2 权限检查部分
PERFORM FRM_CHECK_AUTHOR.
*======================================================================
* MAIN PROGRAM
*======================================================================
* START-OF-SELECTION
*----------------------------------------------------------------------
START-OF-SELECTION.
*&G3 获取数据
PERFORM FRM_GET_DATA.
*&G4 ALV展示输出
PERFORM FRM_ALV_OUTPUT.
*======================================================================
* END-OF-SELECTION
*----------------------------------------------------------------------
END-OF-SELECTION.
**&G3 获取数据
* PERFORM FRM_GET_DATA.
**&G4 ALV展示输出
* PERFORM FRM_ALV_OUTPUT.
TOP-OF-PAGE.
END-OF-PAGE.
*&---------------------------------------------------------------------*
*& Form FRM_INITIAL
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM FRM_INITIAL .
ENDFORM. " FRM_INITIAL
*&---------------------------------------------------------------------*
*& Form FRM_CHECK_AUTHOR
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM FRM_CHECK_AUTHOR .
ENDFORM. " FRM_CHECK_AUTHOR
*&---------------------------------------------------------------------*
*& Form FRM_GET_DATA
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM FRM_GET_DATA .
SELECT MARA~MATNR
MARA~ERSDA
MARA~MATKL
MBEW~LBKUM
MBEW~SALK3
INTO TABLE ITAB
FROM MARA
JOIN MBEW ON ( MARA~MATNR = MBEW~MATNR AND MBEW~BWKEY = '1000' )
WHERE MARA~MATNR IN MATNR
ORDER BY MARA~MATNR.
DESCRIBE TABLE ITAB LINES G_LEN.
IF G_LEN EQ 0.
MESSAGE E000 WITH '没有找到符合条件的数据!'.
ELSE.
MESSAGE S002 WITH '找到符合条件数据' G_LEN '条!'.
ENDIF.
ENDFORM. " FRM_GET_DATA
*&---------------------------------------------------------------------*
*& Form FRM_ALV_OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM FRM_ALV_OUTPUT .
DATA:IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
IS_VARIANT LIKE DISVARIANT,
IT_EVENTS TYPE SLIS_T_EVENT,
IS_LAYOUT TYPE SLIS_LAYOUT_ALV,"ALV的格式
I_LIST_COMMENTS TYPE SLIS_T_LISTHEADER,
I_CALLBACK_PROGRAM TYPE SY-REPID,
TITLE TYPE LVC_TITLE,
IT_SORT TYPE SLIS_T_SORTINFO_ALV.
PERFORM FIELDCAT_INIT USING IT_FIELDCAT."输出列表控件表头
* PERFORM layout_init USING is_layout.
* PERFORM eventtab_build USING it_events.
PERFORM E02_LAYOUT_SORT_BUILD CHANGING IT_SORT.
I_CALLBACK_PROGRAM = SY-REPID.
TITLE = '测试'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = I_CALLBACK_PROGRAM
I_GRID_TITLE = TITLE
IS_LAYOUT = IS_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
IT_EVENTS = IT_EVENTS
IT_SORT = IT_SORT[]
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
ENDIF.
ENDFORM. " FRM_ALV_OUTPUT
*&---------------------------------------------------------------------*
*& Form FIELDCAT_INIT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_IT_FIELDCAT text
*----------------------------------------------------------------------*
FORM FIELDCAT_INIT USING IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
LS_FIELDCAT-FIELDNAME = 'MATNR'.
LS_FIELDCAT-REPTEXT_DDIC = '物料号'.
LS_FIELDCAT-NO_ZERO = 'X'.
APPEND LS_FIELDCAT TO IT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'ERSDA'.
LS_FIELDCAT-REPTEXT_DDIC = '创建日期'.
APPEND LS_FIELDCAT TO IT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MATKL'.
LS_FIELDCAT-REPTEXT_DDIC = '物料组'.
APPEND LS_FIELDCAT TO IT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'LBKUM'.
LS_FIELDCAT-REPTEXT_DDIC = '总评估的库存'.
LS_FIELDCAT-DO_SUM = 'X'.
APPEND LS_FIELDCAT TO IT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'SALK3'.
LS_FIELDCAT-REPTEXT_DDIC = '估价的总库存价值'.
LS_FIELDCAT-DO_SUM = 'X'.
APPEND LS_FIELDCAT TO IT_FIELDCAT.
CLEAR LS_FIELDCAT.
ENDFORM. " fieldcat_init
*&---------------------------------------------------------------------*
*& Form E02_LAYOUT_SORT_BUILD
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* <--P_IT_SORT text
*----------------------------------------------------------------------*
FORM E02_LAYOUT_SORT_BUILD CHANGING LT_SORT TYPE SLIS_T_SORTINFO_ALV.
DATA LS_SORT TYPE SLIS_SORTINFO_ALV.
CLEAR LS_SORT.
LS_SORT-FIELDNAME = 'ERSDA'. "#EC *
LS_SORT-SPOS = 1.
LS_SORT-UP = 'X'.
LS_SORT-SUBTOT = 'X'.
APPEND LS_SORT TO LT_SORT.
CLEAR LS_SORT.
LS_SORT-FIELDNAME = 'MATKL'. "#EC *
LS_SORT-SPOS = 1.
LS_SORT-UP = 'X'.
LS_SORT-SUBTOT = 'X'.
APPEND LS_SORT TO LT_SORT.
ENDFORM. " e02_layout_sort_build
YTST_CX_0001(ALV栏位汇总)的更多相关文章
- input 栏位光标末尾闪烁
var input1 =window.document.getElementById("input1").createTextRange(); input1.collapse(fa ...
- 6 关于 Oracle NULL栏位和PL./SQL执行实验
今日有针对NULL值有了相关实验. 对NULL 值插入的讨论. 1, PL/SQL 中可以执行插入''或者NULL 的操作, 前提是栏位允许为空. 2, 可以对NULL进行一系列数据库运算. 如: ...
- ZZ_INEERNAL每个栏位的含义
ZZ_INEERNAL包含10列,每列之间用,隔开 第一列:exception class,有KE/NE/JE/EE等 第二列:pid 第三列:tid 第四列:固定是99 第五列:固定是/data/c ...
- Linux显示各栏位的标题信息列
Linux显示各栏位的标题信息列 youhaidong@youhaidong-ThinkPad-Edge-E545:~$ who -H 名称 线路 时间 备注 youhaidong :0 2015-0 ...
- Rails Migration Data Model栏位修改及数据类型介绍
测试版本Ruby:2.3.1 Rails:5.0.1 一.增加栏位 给devise默认的用户新增增加username字段 $ rails generate migration add_ ...
- SAP 销售条件表增强栏位
有时遇到一个比较特殊的业务,比如公司间免费订单,既要让价格为0,不读取VK11里创建的价格, 又要让公司间的价格读取VK11,这实际上是有矛盾的,也就是说一个订单里面的两行,物料一样,客户一样,就会出 ...
- org.postgresql.util.PSQLException: 栏位索引超过许可范围:3,栏位数:2。
org.postgresql.util.PSQLException: 栏位索引超过许可范围:3,栏位数:2. 今天在写完SQL进行查询的时候,后台一直报错显示上面的信息.看错误完全不知道原因,就重新检 ...
- pymysql 单独获取表的栏位名称
有时需要获取表的栏位+数值,请参考 https://www.cnblogs.com/xibuhaohao/p/9996571.html 有时只需要栏位名称,那么可以使用 col=self.cursor ...
- OFBiz:添加实体栏位
如何添加实体栏位?这里演示为PostalAddress添加planet栏位.打开applications/party/entitydef/entitymodel.xml,找到PostalAddress ...
随机推荐
- TiKV 源码解析系列——Placement Driver
https://zhuanlan.zhihu.com/p/24809131?refer=newsql
- What are Windows ACLs and why are they important?
An access control list (ACL), with respect to a computer file system, is a list of permissions attac ...
- linux查看端口状态相关命令
netstat netstat 命令应用是比较频繁的,比如查看端口占用啦,查看端口进程啦,这些时候都是有必要的. netstat命令各个参数说明如下: -t : 指明显示TCP端口 -u : 指明显示 ...
- Graphicmagick编译
为了需求给Graphicmagick加了几个支持,版本分别为mozjpeg2.1,bzip2-1.0.6,libpng-1.6.18,libwebp-0.4.3,mozjpeg-2.1,tiff-4. ...
- 微信小程序 - 下载图片并且显示进度
lastUpDate: 2018-8-12 请把请求地址加入到downLoadFile 提示:首先得要在公众号设置对应的downLoadFile地址. downImg : 下载图片 wxml js d ...
- binary-tree-zigzag-level-order-traversal——二叉树分层输出
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to ...
- SAS中的自动变量
Sas自动变量:由数据步语句自动创建的. _n_ :观测序号: _error_:错误信息变量; _numeric_ :所有数值变量: _character_:所有字符变量; _all_:所有变量; f ...
- Java Jsoup Spider抓取数据入库
这里从车商网上进行数据抓取,请保持良好的职业道德不要将数据用于商业途径.工信部官网有汽车方面的公告目录,那里有最全的pdf或word数据,鉴于word和pdf解析的繁琐和耗时,我暂时用这个网站的数据进 ...
- Leetcode Array 11 Container With Most Water
题目: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, a ...
- cheap louis vuitton outlet
<h1>louis vuitton outlet store</h1>2 nigerian networking systems chosen seeing that enem ...