取未清PO逻辑
注意这里的 GR qty 【 WEMNG】 和 Open Quantity 【OBMNG】
*&---------------------------------------------------------------------*
*& Report ZMM_GET_OPEN_PO *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------* REPORT zmm_get_open_po . TYPE-POOLS: slis.
TABLES:ekko,ekpo,eket.
DATA: gt_fcat TYPE slis_t_fieldcat_alv,
g_layout TYPE slis_layout_alv,
wa_fcat TYPE slis_fieldcat_alv.
*PARAMETERS:i_werks LIKE eine-werks OBLIGATORY .
SELECT-OPTIONS: i_werks FOR ekpo-werks,
i_ebeln FOR ekpo-ebeln,
i_matnr FOR ekpo-matnr.
DATA:BEGIN OF tb_po OCCURS ,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
pstyp TYPE ekpo-pstyp,
loekz TYPE ekpo-loekz,
txz01 TYPE ekpo-txz01,
matnr TYPE ekpo-matnr,
werks TYPE ekpo-werks,
lgort TYPE ekpo-lgort,
bednr TYPE ekpo-bednr,
matkl TYPE ekpo-matkl,
infnr TYPE ekpo-infnr,
idnlf TYPE ekpo-idnlf,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
elikz TYPE ekpo-elikz,
bsart TYPE ekko-bsart,
lifnr TYPE ekko-lifnr,
ernam TYPE ekko-ernam,
aedat TYPE ekko-aedat,
frggr TYPE ekko-frggr,
frgsx TYPE ekko-frgsx,
frgke TYPE ekko-frgke,
wamng TYPE eket-wamng,
flag(),
END OF tb_po. SELECT ekpo~ebeln
ekpo~ebelp
ekpo~loekz
ekpo~pstyp
ekpo~txz01
ekpo~matnr
ekpo~werks
ekpo~lgort
ekpo~bednr
ekpo~matkl
ekpo~infnr
ekpo~idnlf
ekpo~menge
ekpo~meins
ekpo~elikz
ekko~bsart
ekko~lifnr
ekko~ernam
ekko~aedat
ekko~frggr
ekko~frgsx
ekko~frgke
eket~wamng
INTO CORRESPONDING FIELDS OF TABLE tb_po FROM ekpo
INNER JOIN ekko ON ekpo~ebeln = ekko~ebeln
INNER JOIN eket ON ekpo~ebeln = eket~ebeln AND ekpo~ebelp = eket~ebelp
WHERE ekpo~loekz EQ space
AND ekpo~elikz EQ space
AND ekpo~werks IN i_werks
AND ekpo~matnr IN i_matnr
AND ekpo~ebeln IN i_ebeln
AND ekpo~bstyp = 'F'
AND ekko~bsart <> 'ZIO'. LOOP AT tb_po. IF tb_po-wamng = .
tb_po-flag = '未交货'.
ELSE.
IF tb_po-menge = tb_po-wamng.
tb_po-flag = '已交货,需勾选交货完成'.
ELSE.
IF tb_po-wamng < tb_po-menge .
tb_po-flag = '部分交货'.
ENDIF.
ENDIF.
ENDIF.
MODIFY tb_po.
CLEAR tb_po.
ENDLOOP. wa_fcat-fieldname = 'BSART'.
wa_fcat-seltext_m = '凭证类型'.
APPEND wa_fcat TO gt_fcat. wa_fcat-fieldname = 'EBELN'.
wa_fcat-seltext_m = 'PO号'.
APPEND wa_fcat TO gt_fcat. wa_fcat-fieldname = 'EBELP'.
wa_fcat-seltext_m = 'PO项目号'.
APPEND wa_fcat TO gt_fcat. wa_fcat-fieldname = 'PSTYP'.
wa_fcat-seltext_m = '类别'.
APPEND wa_fcat TO gt_fcat.
*
*wa_fcat-fieldname = 'LOEKZ'.
*wa_fcat-seltext_m = 'PO删除标识'.
*APPEND wa_fcat TO gt_fcat. wa_fcat-fieldname = 'TXZ01'.
wa_fcat-seltext_m = '短文本'.
APPEND wa_fcat TO gt_fcat.
wa_fcat-fieldname = 'MATNR'.
wa_fcat-seltext_m = '物料号'.
APPEND wa_fcat TO gt_fcat.
wa_fcat-fieldname = 'WERKS'.
wa_fcat-seltext_m = '工厂'.
APPEND wa_fcat TO gt_fcat.
wa_fcat-fieldname = 'LGORT'.
wa_fcat-seltext_m = '库存地点'.
APPEND wa_fcat TO gt_fcat.
wa_fcat-fieldname = 'BEDNR'.
wa_fcat-seltext_m = '需求跟踪号'.
APPEND wa_fcat TO gt_fcat.
wa_fcat-fieldname = 'MATKL'.
wa_fcat-seltext_m = '物料组'.
APPEND wa_fcat TO gt_fcat.
wa_fcat-fieldname = 'INFNR'.
wa_fcat-seltext_m = '采购信息记录号'.
APPEND wa_fcat TO gt_fcat.
wa_fcat-fieldname = 'IDNLF'.
wa_fcat-seltext_m = '供应商物料编号'.
APPEND wa_fcat TO gt_fcat.
wa_fcat-fieldname = 'MENGE'.
wa_fcat-seltext_m = '采购订单数量'.
APPEND wa_fcat TO gt_fcat.
wa_fcat-fieldname = 'WAMNG'.
wa_fcat-seltext_m = '交货数量'.
APPEND wa_fcat TO gt_fcat. wa_fcat-fieldname = 'MEINS'.
wa_fcat-seltext_m = '订单单位'.
APPEND wa_fcat TO gt_fcat.
*wa_fcat-fieldname = 'ELIKZ'.
*wa_fcat-seltext_m = '交货已完成'.
*APPEND wa_fcat TO gt_fcat.
wa_fcat-fieldname = 'LIFNR'.
wa_fcat-seltext_m = '供应商'.
APPEND wa_fcat TO gt_fcat.
wa_fcat-fieldname = 'ERNAM'.
wa_fcat-seltext_m = '人名'.
APPEND wa_fcat TO gt_fcat.
wa_fcat-fieldname = 'AEDAT'.
wa_fcat-seltext_m = '创建日期'.
APPEND wa_fcat TO gt_fcat.
wa_fcat-fieldname = 'FLAG'.
wa_fcat-seltext_m = '状态'.
APPEND wa_fcat TO gt_fcat.
wa_fcat-fieldname = 'FRGGR'.
wa_fcat-seltext_m = '审批组'.
APPEND wa_fcat TO gt_fcat.
wa_fcat-fieldname = 'FRGSX'.
wa_fcat-seltext_m = '批准策略'.
APPEND wa_fcat TO gt_fcat.
wa_fcat-fieldname = 'FRGKE'.
wa_fcat-seltext_m = '批准标识'.
APPEND wa_fcat TO gt_fcat. g_layout-colwidth_optimize = 'X'.
g_layout-info_fieldname = 'COL_COLOR'.
* g_layout-coltab_fieldname = 'COL_COLOR'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
i_callback_program = sy-repid
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* I_CALLBACK_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
* I_GRID_TITLE =
* I_GRID_SETTINGS =
is_layout = g_layout
it_fieldcat = gt_fcat[]
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
i_save = 'A'
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* I_HTML_HEIGHT_TOP =
* I_HTML_HEIGHT_END =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = tb_po
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
.
IF sy-subrc <> .
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
取未清PO逻辑的更多相关文章
- JIT物料在途未清PO作为供给
以下是本应在TEMP中处理,目前是写到FP_CHECK_SAP_DATA中 ----JIT物料在途未清PO作为供给 add by landor on 20180809 INSERT INTO SAP_ ...
- 未清SO关闭处理
使用: SD_SALESDOCUMENT_CHANGE 关闭订单 DATA: ls_header_in LIKE bapisdhd1 . DATA: ls_header_inx LIKE bap ...
- openrstry 限流 是否有清零逻辑
openrstry 限流 是否有清零逻辑 https://github.com/openresty/lua-resty-limit-traffic
- 【FICO系列】SAP FICO FS00修改科目为未清项目管理
公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[FICO系列]SAP FICO FS00修改科 ...
- openrstry 限流 是否有清零逻辑 连接池
openrstry 限流 是否有清零逻辑 https://github.com/openresty/lua-resty-limit-traffic # encoding=utf-8 # Shawn ...
- Python 爬取高清桌面壁纸
今天写了一个脚本用来爬取ZOL桌面壁纸网站的高清图片: 链接:http://desk.zol.com.cn/1920x1080/ 本程序只爬了美女板块的图片,若要下载其他板块,只需修改程序中的&quo ...
- Fidder详解-抓取HTTPS清求(Web/App)抓包分析(靠谱篇)
为什么要学Fidder抓包? 学习接口,必须要学http协议,不要求您对协议的掌握有多深.只是希望你能够了解什么是协议.协议的报文.状态码等等!本文通过抓包工具Fidder带你进入接口的大门.我们通过 ...
- ABAP-根据采购订单行项目统计供应商未清额和已清额
1.传入和传出表结构都是一样的: FUNCTION zmm_fm_po_invence. *"------------------------------------------------ ...
- 查找担保圈-step7-提取未被包含过组的成员,得出结论
USE [test] GO /****** Object: StoredProcedure [dbo].[p05_get_group_member_cleared] Script Date: 2019 ...
随机推荐
- ServicePoint 类
地址:https://docs.microsoft.com/zh-cn/dotnet/api/system.net.servicepoint?view=netframework-4.7.2 提供 HT ...
- fastjson异常(字符串集合转成字符串数组)
我是在项目中,因为受到一个string类型的list集合,然后需要把这个字符串发送给前端,进行解析. 但是前端收到的是一个字符串,不能进行解析. 所以采用 ArrayUtils.clone(JSONO ...
- 与你一起学习MS Project——高级篇:Project高级应用
我们再来看Project的一些高级应用. 一.设置任务依赖性的几种方法 首先是设置任务依赖性的几种方法,这里介绍三种方法. 方法一:选中两个需要建立依赖型的任务.选中用 ctrl 鼠标左键 的方式即可 ...
- List.Sort
static void Main(string[] args) { List<double> valuesList = new List<double>(); valuesLi ...
- 获取国定字符的内容split
a="Time:20190822_111655_554 Start Cloud new case, Num=1, Input=/data/voice/20190725_035326_2_vo ...
- Python3 - 基础(运算符)
Python3-运算符 举个简单的例子 4 +5 = 9 . 例子中,4 和 5 被称为操作数,"+" 称为运算符. 算术运算符 比较(关系)运算符 赋值运算符 逻辑运算符 位运算 ...
- c#——ref 和 out 的区别
一个用关键字 ref 标示,一个用 out 标示. 牵扯到数据是引用类型还是值类型. 一般用这两个关键字你是想调用一个函数将某个值类型的数据通过一个函数后进行更改.传 out 定义的参数进去的时候这个 ...
- 浏览器报400-Bad Request异常
今天在使用ie浏览器在测试程序的时候,报这个错误,后台日志打印出来显示的是:连接一个远程主机失败 解决Invalid character found in the request target. Th ...
- 浅入不深出--vuex的简单使用
什么是vuex,官网的描述是:Vuex 是一个专为 Vue.js 应用程序开发的状态管理模式.状态管理模式包含3个部分: 1.state,驱动应用的数据源: 2.view,以声明方式将state映射到 ...
- docker更换源
$ cd /etc/docker $ cat daemon.json { "registry-mirrors": [ "https://kfwkfulq.mirror.a ...