**&---------------------------------------------------------*
**& Author : *
**& Create date : 2007/04/03 *
**& Program type : Report *
**& Report name : ZPPPR_ROUTING_INPUT *
**& Description : ROUTING_INPUT *
**& FINISH ON : *
**& TRANSPROT REQUEST : *
**&---------------------------------------------------------*
REPORT zpppr_routing_input MESSAGE-ID zmc95
NO STANDARD PAGE HEADING "输出的报表不使用标准的页标题
LINE-SIZE 500. "输出的报表每页的字符宽度.
*---->define table->bapi
DATA: group TYPE bapi1012_tsk_c-task_list_group,
group_counter TYPE bapi1012_tsk_c-group_counter,
sequence_no TYPE bapi1012_opr_c-sequence_no,
task_list_usage TYPE bapi1012_tsk_c-task_list_usage,
task_list_status TYPE bapi1012_tsk_c-task_list_status,
lot_size_from TYPE bapi1012_tsk_c-lot_size_from,
lot_size_to TYPE bapi1012_tsk_c-lot_size_to,
task_measure_unit TYPE bapi1012_tsk_c-task_measure_unit,
application TYPE bapi1012_control_data-application,
testrun TYPE bapiflag,
profile TYPE bapi1012_control_data-profile,
bomusage TYPE bapi1012_control_data-bom_usage,
task TYPE bapi1012_tsk_c OCCURS 0 WITH HEADER LINE,
materialtaskallocation TYPE bapi1012_mtk_c OCCURS 0 WITH HEADER LINE,
sequence TYPE bapi1012_seq_c OCCURS 0 WITH HEADER LINE,
operation TYPE bapi1012_opr_c OCCURS 0 WITH HEADER LINE,
suboperation TYPE bapi1012_sub_opr_c OCCURS 0 WITH HEADER LINE,
referenceoperation TYPE bapi1012_ref_opr_c OCCURS 0 WITH HEADER LINE,
workcenterreference TYPE bapi1012_wc_ref_opr_c OCCURS 0 WITH HEADER LINE,
componentallocation TYPE bapi1012_com_c OCCURS 0 WITH HEADER LINE,
productionresource TYPE bapi1012_prt_c OCCURS 0 WITH HEADER LINE,
inspcharacteristic TYPE bapi1012_cha_c OCCURS 0 WITH HEADER LINE,
textallocation TYPE bapi1012_txt_hdr_c OCCURS 0 WITH HEADER LINE,
text TYPE bapi1012_txt_c OCCURS 0 WITH HEADER LINE,
return TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
bapi_retn_info LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
*---->message table
DATA: BEGIN OF t_error OCCURS 0.
DATA material LIKE bapi1012_mtk_c-material.
INCLUDE STRUCTURE bapiret2.
DATA: END OF t_error.
*---->inner table
DATA: BEGIN OF itab1 OCCURS 0 ,
material LIKE bapi1012_mtk_c-material,
plant LIKE bapi1012_mtk_c-plant,
description1 LIKE bapi1012_tsk_c-description,
activity LIKE bapi1012_opr_c-activity,
work_cntr LIKE bapi1012_opr_c-work_cntr,
control_key LIKE bapi1012_opr_c-control_key,
description LIKE bapi1012_opr_c-description,
base_quantity LIKE bapi1012_opr_c-base_quantity,
std_value_01 LIKE bapi1012_opr_c-std_value_01,
std_value_02 LIKE bapi1012_opr_c-std_value_02,
* max_no_of_splits LIKE bapi1012_opr_c-max_no_of_splits,
FJS(2) TYPE C,
ind_splitting_reqrd LIKE bapi1012_opr_c-ind_splitting_reqrd,
required_overlapping LIKE bapi1012_opr_c-required_overlapping,
min_send_ahead_qty LIKE bapi1012_opr_c-min_send_ahead_qty,
ext_proc_with_subcontract_ind LIKE bapi1012_opr_c-ext_proc_with_subcontract_ind,
info_rec LIKE bapi1012_opr_c-info_rec,
purch_org LIKE bapi1012_opr_c-purch_org,
cost_elem LIKE bapi1012_opr_c-cost_elem,
COST_RELEVANT like bapi1012_opr_c-COST_RELEVANT,
END OF itab1.
DATA: BEGIN OF itab OCCURS 0 ,
material LIKE bapi1012_mtk_c-material,
plant LIKE bapi1012_mtk_c-plant,
description1 LIKE bapi1012_tsk_c-description,
activity LIKE bapi1012_opr_c-activity,
work_cntr LIKE bapi1012_opr_c-work_cntr,
control_key LIKE bapi1012_opr_c-control_key,
description LIKE bapi1012_opr_c-description,
base_quantity LIKE bapi1012_opr_c-base_quantity,
std_value_01 LIKE bapi1012_opr_c-std_value_01,
std_value_02 LIKE bapi1012_opr_c-std_value_02,
max_no_of_splits LIKE bapi1012_opr_c-max_no_of_splits,
ind_splitting_reqrd LIKE bapi1012_opr_c-ind_splitting_reqrd,
required_overlapping LIKE bapi1012_opr_c-required_overlapping,
min_send_ahead_qty LIKE bapi1012_opr_c-min_send_ahead_qty,
ext_proc_with_subcontract_ind LIKE bapi1012_opr_c-ext_proc_with_subcontract_ind,
info_rec LIKE bapi1012_opr_c-info_rec,
purch_org LIKE bapi1012_opr_c-purch_org,
cost_elem LIKE bapi1012_opr_c-cost_elem,
END OF itab.
DATA : gt_itab LIKE itab OCCURS 0 WITH HEADER LINE.
DATA : lv_cancel(1) TYPE c.
*---->upload
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = 'C:\Documents and Settings\Administrator\Desktop\工艺路线.txt'
filetype = 'DAT'
IMPORTING
cancel = lv_cancel
TABLES
data_tab = itab1
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.
IF lv_cancel EQ 'X'.
LEAVE PROGRAM.
ENDIF.
IF sy-subrc <> 0 .
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSEIF sy-subrc = 0.
SORT itab1 BY material plant activity.
LOOP AT ITAB1.
MOVE-CORRESPONDING ITAB1 TO ITAB.
CONDENSE ITAB1-FJS NO-GAPS.
ITAB-max_no_of_splits = ITAB1-FJS.
APPEND ITAB.
ENDLOOP.
SORT ITAB BY MATERIAL PLANT.
LOOP AT itab.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = itab-material
IMPORTING
output = itab-material.
MOVE itab TO gt_itab.
APPEND gt_itab.
*-----〉item-sequence
*operation-group_counter = '1'.
operation-activity = itab-activity.
operation-control_key = itab-control_key.
operation-work_cntr = itab-work_cntr.
operation-description = itab-description.
operation-plant = itab-plant.
* operation-operation_measure_unit = 'EA'.
operation-denominator = 1.
operation-nominator = 1.
operation-base_quantity = itab-base_quantity.
operation-std_value_01 = itab-std_value_01.
operation-std_value_02 = itab-std_value_02.
operation-ind_splitting_reqrd = itab-ind_splitting_reqrd." 'X'."分解
operation-max_no_of_splits = itab-max_no_of_splits."'1'."分解数
operation-required_overlapping = itab-required_overlapping."'X'."要求重叠
operation-min_send_ahead_qty = itab-min_send_ahead_qty."'10'."最小发送数量
operation-ext_proc_with_subcontract_ind = itab-ext_proc_with_subcontract_ind."'X'.
operation-info_rec = itab-info_rec.
operation-purch_org = itab-purch_org.
operation-cost_elem = itab-cost_elem.
operation-COST_RELEVANT = 'X'."成本核算标示
APPEND operation.
AT END OF material.
*-----〉header
task-task_list_usage = '1'.
task-task_list_status = '4'.
**---->unit
select single MEINS into task-task_measure_unit
from mara
where matnr = gt_itab-material.
* task-task_measure_unit = 'EA'.
task-description = gt_itab-description1."'TEST ROUTING'.
task-plant = gt_itab-plant.
task-valid_from = sy-datum.
task-valid_to_date = '99991231'.
APPEND task.
materialtaskallocation-material = gt_itab-material.
materialtaskallocation-plant = gt_itab-plant.
task-valid_from = sy-datum.
task-valid_to_date = '99991231'.
APPEND materialtaskallocation.
CALL FUNCTION 'BAPI_ROUTING_CREATE'
EXPORTING
testrun = testrun
profile = profile
bomusage = bomusage
application = application
IMPORTING
group = group
groupcounter = group_counter
TABLES
task = task
materialtaskallocation = materialtaskallocation
sequence = sequence
operation = operation
suboperation = suboperation
referenceoperation = referenceoperation
workcenterreference = workcenterreference
componentallocation = componentallocation
productionresource = productionresource
inspcharacteristic = inspcharacteristic
textallocation = textallocation
text = text
return = return.
REFRESH task.
REFRESH GT_ITAB.
REFRESH materialtaskallocation.
REFRESH operation.
LOOP AT return.
IF return-type EQ 'E' OR return-type EQ 'A'.
t_error-material = materialtaskallocation-material.
t_error-message = return-message.
APPEND t_error.
ELSE.
COMMIT WORK.
ENDIF.
ENDLOOP.
LOOP AT t_error.
WRITE:/ t_error-material,t_error-message.
ENDLOOP.
ENDAT.
ENDLOOP.
ENDIF.
模板
物料 |
工厂 |
工艺路线描述 |
工序号 |
工作中心 |
控制码 |
工序描述 |
基本数量 |
标准值 |
标准值 |
分解数 |
所需分解 |
要求重叠 |
最小发送数量 |
外协 |
信息记录 |
采购组织 |
成本要素 |
3010000001 |
1200 |
对些工艺路线的描述 |
0010 |
300000 |
PP01 |
本工艺的描述1 |
10 |
200 |
200 |
1 |
X |
X |
50 |
|
|
|
|
3010000001 |
1200 |
对些工艺路线的描述 |
0020 |
300001 |
PP03 |
本工艺的描述2 |
20 |
200 |
200 |
1 |
X |
X |
50 |
|
|
|
|
3010000001 |
1200 |
对些工艺路线的描述 |
0030 |
|
PP02 |
本工艺的描述3 |
1 |
200 |
200 |
1 |
X |
X |
50 |
X |
5500000021 |
1000 |
5001004000 |
2010000010 |
1200 |
对些工艺路线的描述 |
0020 |
300001 |
PP03 |
本工艺的描述22 |
100 |
130 |
130 |
1 |
X |
X |
50 |
|
|
|
|
分享到:
相关推荐
Download: Virtuous Ten Studio 2.9.15.10501 Released: 15.09.2013 MD5: A19BFFD7F27CB1FB4998FCE1C86C66D7 Latest version for Windows Vista and newer
1,三级分类,较强的类别管理功能。2,网友可以发表评论,后台可以管理这些评论,如删除,回复。3,较强的软件排行功能。4,公告管理功能。5,较强的数据统计功能。6,语言选择功能。7,图片上传功能 8,搜索引擎功能
本文将探讨如何使用DOS汇编语言编写一个名为"TextWindow_v0.7"的程序,该程序具有创建带边框的窗口、接受用户输入、控制屏幕滚动以及响应键盘事件等功能。 首先,我们来看“窗口”的概念。在DOS环境下,由于没有...
IIS是微软提供的一个强大的Web服务器软件,支持HTTP、HTTPS、FTP等多种网络协议,常用于企业级的Web应用程序部署。而“TSWEB1.HT_”再次提到了终端服务Web访问,这是IIS的一个扩展功能,使得用户可以通过Web浏览器...
C#是一种广泛用于构建桌面和Web应用程序的编程语言,它提供了强大的网络通信支持,其中包括使用UDP(用户数据报协议)的Socket通信。本项目"**C#_UDP_Socket_P2P_通信客户端.zip**"就是针对C# UDP Socket通信的一个...
同时,品牌知名度为零,面对市场竞争压力大,如柔依风、朵儿、太太等竞品已形成竞争障碍。因此,千美鹤面临的挑战包括如何塑造专业品牌形象、提升产品知名度、抢占市场份额以及在终端形成视觉冲击力。 针对这些挑战...
鼠标焦点检测,由python代码打包而来,直接运行后,鼠标不要动,看...本软件只能帮助你找到鼠标焦点被占用的程序进程名称,定位原因还得用户自行解决。多停留点时间观察进程占用焦点的切换,否则可能会导致错误的判断。
"64-Bit" 文件可能是该工具的安装程序或者执行文件,表明这是为64位Windows系统设计的,通常会有更好的性能表现和兼容性,特别是在处理大量日志数据时。 使用Evtsys时,管理员需要配置其接收端口、日志源、过滤条件...
说明:Windows 电源选项中有定时熄屏、定时睡眠和定时休眠功能,但是没有定时锁定的功能,所以在此提供定时锁定电脑的方法。 应用:有需要的可以配合电源选项设置电脑处于非活动状态a时间后熄屏,b时间后锁定,c时间...
新版的编辑器的更新包括:新的用户界面,一个支持Plug-in的Javascript API,并提供对视觉障碍者的使用支持。" 据官方的解释,CK是对FCK的代码的完全重写,而且此项工作从2007年就开始了,并在今年初发表了多个测试...
Windows下MySQL 服务管理器(中文版) 运行后自动获取管理员权限,自动判定MySQL服务运行状态,自动根据状态请求启动服务/停止服务操作。 请将代码中的MySQL80匹配你的MySQL服务名称。
几乎保函Adobe CS4的所有软件的注册
batch脚本,双击运行后在运行目录下生成“电池使用情况.html”,打开后在浏览器显示您电脑的电池使用情况统计信息。
VS2017 ReportViewer rdlc 项目控件,最新版插件 安装后添加报表项目
Ext Designer 最新1.01破解补丁 绝对可用 下载后解压放在同一个目录,不要覆盖.直接运行就可以.
C#,基于TCP/IP的Socket通信客户端,包含服务器端和客户端,有图形化界面,通过服务器IP连接,是异步通信,非同步通信,点对点通信,不支持一对多,功能上属于很简单的,演示和理解基于TCP/IP的Socket通信原理有一定...
Windows下MySQL 服务管理器(中英文版) ...运行后自动获取管理员权限,自动判定MySQL服务运行状态,自动根据状态请求启动服务/停止服务操作。 请将代码中的MySQL80匹配你的MySQL服务名称。 Please match the MySQL80 ...
MySQL Service Manager for Windows (English Version) Get administrator privileges after running, determine the running status of MySQL services, and start/stop services based on the status ...
专业数据恢复工具,支持手机,硬盘,U盘,格式化,删除后数据恢复,专业恢复率99%。
最新版监理施工标准表格,2014年国家规范用表,报审专用表格