取未清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 ...
随机推荐
- 洛谷 P2384 最短路题解
题目背景 狗哥做烂了最短路,突然机智的考了Bosh一道,没想到把Bosh考住了...你能帮Bosh解决吗? 他会给你100000000000000000000000000000000000%10金币w ...
- Jenkins+robotframework单机版简约教程
迫于某人极渴望学自动化测试,因此写下此简约教程.妈蛋我是个JAVA后端开发啊... 此教程为基于window系统的Jenkins单机版,测试代码无版本控制的精要压缩版本教程,勿喷 前提:通过Jenki ...
- 删除WordPress菜单wp-nav-menu中li的class或id样式
我们都知道wordpress已经集成了一些通用的css样式,比如wp-nav-menu菜单会有很多的class,不想看到那么多的选择器,想要清净的世界要如何操作呢?随ytkah一起来看看 <li ...
- createTextRange 创建文本对象
document.body.createTextRange 主要是用来对一些文本对象进行操作.比如你有一大段文字,都在同一个P标签内,但是你只希望通过JS改变其中的一小部分,这时就可以用createT ...
- 更新GitHub上自己 Fork 的代码与原作者的项目进度一致
在GitHub上我们会去fork别人的一个项目,这就在自己的Github上生成了一个与原作者项目互不影响的副本,自己可以将自己Github上的这个项目再clone到本地进行修改,修改后再push,只有 ...
- 实现:调用API函数ShowWindow()来隐藏窗口
只需要将相应代码复制即可. 代码如下: #include <iostream> #include <windows.h> int main() { HWND hDos; //声 ...
- docker更换源
$ cd /etc/docker $ cat daemon.json { "registry-mirrors": [ "https://kfwkfulq.mirror.a ...
- LeetCode 787. Cheapest Flights Within K Stops
原题链接在这里:https://leetcode.com/problems/cheapest-flights-within-k-stops/ 题目: There are n cities connec ...
- go语言的坑
go语言在for循环中遍历的临时变量地址是一样的 func main() { //SetLogConfToEtcd() for i := 0; i < 5; i++ { a := i fmt.P ...
- B/S之大文件分段上传、断点续传
4GB以上超大文件上传和断点续传服务器的实现 随着视频网站和大数据应用的普及,特别是高清视频和4K视频应用的到来,超大文件上传已经成为了日常的基础应用需求. 但是在很多情况下,平台运营方并没有大文件上 ...