:ZPP016
:HANDXXX
:20190528
:
*--------------------------------------------------------------------
--*
* 程序名称
* 创建者
* 创建日期
* 申请人
*--------------------------------------------------------------------
--*
* 概要说明
* 工艺路线批量导出
*--------------------------------------------------------------------
--*
*--------------------------------------------------------------------
--*
*
变 更 记 录
------------
--------------------------
修改者
------------
*
*--------------------------------------------------------------------
--*
* 日期
*----------
--*
*20190528
*
*--------------------------------------------------------------------
--*
report zppr002_7 no standard page heading.
type-pools : slis.
include .
tables:mapl,stko,stpo,mara,t100.
types: begin of ty_list,
传输请求号
修改内容及原因
创建
matnr(40)," type mast-matnr,
werks
type mapl-werks,
plnnr
plnal
plnkn
vornr
arbid
arbpl
plnfl
stlnr
stlal
stlkn
idnrk
ltxa1
ktext
maktx
stlal
type mapl-plnnr, "工艺路线
type mapl-plnal, "工艺路线组
type capp_com-plnkn, "
type plpo-vornr, "工艺路线序号
type plpo-arbid, "
type crhd-arbpl, "工作中心
type plmz-plnfl, "序列
type stpo-stlnr, "BOM
type mast-stlal, "替代BOM
type stpo-stlkn, "内部计数器
type stpo-idnrk, "子件物料
type plpo-ltxa1, " 文本描述
type plko-ktext, "
type makt-maktx,
type mast-stlal,"可选BOM
*
end of ty_list.
types:begin of ty_list1.
include structure capp_opr.
types:matnr(40)," type mast-matnr,
types: end of ty_list1.
types: begin of ty_internal,
_number
_excp
type i , "序列号
type c, "需要在LAYOUT-EXCP_FNAME 中指定,绿灯3,
红灯1,黄灯2"
_check
type c , "复选框,还需要在FCAT 中设置成CHECKBOX,记
录用户的选择
_box
type c , "需要在LAYOUT-BOX_NAME 中指定,记录用户的
选择,跟_BOX 不同,记录的是ALV 控件的标准选择框,
type c , "记录删除标识X"
type c , "用户操作,插入I,更新U,删除D"
type sytabix, "行项目ID"
type sytabix, "引用的表行标识"
_delete
_action
_row_id
_tabix
_line_color(4) type c, "行项目的颜色"
_field_style
type lvc_t_styl, "行项目的样式"
ktext1
ktext2
ktext3
ktext4
ktext5
arbpl
ktext
maktx
type cslt-ktext,
type cslt-ktext,
type cslt-ktext,
type cslt-ktext,
type cslt-ktext,
type crhd-arbpl, "工作中心
type plko-ktext, "
type makt-maktx.
_mess_type
_message
type c, "消息类型,用于数据检查"
type char255, "行项目的消息内容"
end of ty_internal.
types: begin of ty_type.
include type ty_internal.
include type ty_list.
types end of ty_type.
types: begin of ty_type1.
include type ty_internal.
include type ty_list1.
types end of ty_type1.
data: gt_table type table of ty_type with header line.
data: gt_table1 type table of ty_type1 with header line.
*ALV 类变量定义
data: gs_layout
data: gt_fieldcat
data: gt_alv_sort
type lvc_s_layo.
type lvc_t_fcat.
type lvc_t_sort.
data: ls_style type lvc_s_styl,
lt_style type lvc_t_styl.
data: x_save
type c,
gs_variant type disvariant,
type lvc_title.
g_title
data: g_grid
type ref to cl_gui_alv_grid.
selection-screen begin of block b1 with frame title text-001.
select-options:s_matnr for mapl-matnr,
s_werks for mapl-werks memory id wrk obligatory,
s_mtart for mara-mtart,
s_matkl for mara-matkl,
s_plnal for mapl-plnal,
s_PRDHA for mara-PRDHA.
parameters:p1 radiobutton group g1 ,
p2 radiobutton group g1 default 'X'.
selection-screen end of block b1.
start-of-selection.
perform get_data.
end-of-selection.
perform upd_show_data.
form upd_show_data.
perform upd_prepare_layout
changing gs_layout.
perform upd_prepare_field_catalog changing gt_fieldcat.
perform upd_prepare_field_catalog1 changing gt_fieldcat.
if p1 = 'X'.
else.
endif.
perform upd_show_data_alv.
Form
UPD_PREPARE_LAYOUT
endform.
*&-------------------------------------------------------------------
--*
*&
*&-------------------------------------------------------------------
--*
*
*--------------------------------------------------------------------
--*
*
*--------------------------------------------------------------------
--*
form upd_prepare_layout
changing ps_layout type lvc_s_layo.
<--P_GS_LAYOUT
text
text
*
*
g_title = sy-title.
ps_layout-cwidth_opt = 'X'.
= 'X'.
ps_layout-zebra
ps_layout-box_fname
= '_BOX'.
ps_layout-sel_mode
= 'A'.
ps_layout-excp_fname = '_EXCP'.
ps_layout-info_fname = '_LINE_COLOR'.
ps_layout-grid_title = g_title.
ps_layout-detailinit = 'X' . " 是否可以弹出细节屏幕
ps_layout-detailtitl = g_title. " 细节屏幕标题
Form
UPD_PREPARE_FIELD_CATALOG
endform.
*&-------------------------------------------------------------------
--*
*&
*&-------------------------------------------------------------------
--*
*
*--------------------------------------------------------------------
--*
*
*--------------------------------------------------------------------
--*
form upd_prepare_field_catalog changing pt_fieldcat type lvc_t_fcat.
<--P_GT_FIELDCAT
text
text
clear pt_fieldcat[].
data ls_fcat type lvc_s_fcat .
= '物料号'.
= 'MATNR'.
= 'X'.
= 'X'.
= '工厂'.
= 'WERKS'.
= 'X'.
= 'X'.
clear ls_fcat .
clear ls_fcat .
clear ls_fcat .
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-no_zero
ls_fcat-fix_column
append ls_fcat to pt_fieldcat.clear ls_fcat.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-no_zero
ls_fcat-fix_column
append ls_fcat to pt_fieldcat.clear ls_fcat.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
= '任务清单组码'.
= 'PLNNR'.
= ''.
= 'X'.
= '组计数器'.
= 'PLNAL'.
= ''.
= 'X'.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
= '任务清单描述'.
= 'KTEXT'.
= ''.
= 'X'.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
= '物料描述'.
= 'MAKTX'.
= ''.
= 'X'.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
= '工序'.
= 'VORNR'.
= ''.
= 'X'.
*
*
*
*
*
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-datatype
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
= '工作中心'.
= 'ARBPL'.
= ''.
= 'N'.
= 'X'.
= '序列'.
= 'PLNFL'.
= ''.
= 'N'.
= 'X'.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-datatype
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-datatype
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-datatype
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
= '替代 BOM'.
= 'STLAL'.
= ''.
= 'N'.
= 'X'.
= '子件物料'.
= 'IDNRK'.
= ''.
= 'N'.
= 'X'.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-datatype
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
clear ls_fcat .
= '文本描述'.
= 'LTXA1'.
= ''.
= 'N'.
= 'X'.
ls_fcat-fieldname
= '_MESS_TYPE'. ls_fcat-coltext = ' 消息类型
append ls_fcat to pt_fieldcat .
*
'. ls_fcat-seltext = '消息类型'.
*
*
*
*
' .ls_fcat-seltext = '处理消息' .
*
endform.
clear ls_fcat .
ls_fcat-fieldname
append ls_fcat to pt_fieldcat .
= '_MESSAGE'.ls_fcat-coltext
= ' 处理消息
text
Form
UPD_PREPARE_FIELD_CATALOG
*&-------------------------------------------------------------------
--*
*&
*&-------------------------------------------------------------------
--*
*
*--------------------------------------------------------------------
--*
*
*--------------------------------------------------------------------
--*
form upd_prepare_field_catalog1 changing pt_fieldcat type lvc_t_fcat.
<--P_GT_FIELDCAT
text
= '物料号'.
= 'MATNR'.
= 'X'.
= 'X'.
clear pt_fieldcat[].
data ls_fcat type lvc_s_fcat .
clear ls_fcat .
clear ls_fcat .
clear ls_fcat .
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-no_zero
ls_fcat-fix_column
append ls_fcat to pt_fieldcat.clear ls_fcat.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-no_zero
ls_fcat-fix_column
append ls_fcat to pt_fieldcat.clear ls_fcat.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
= '任务清单组码'.
= 'PLNNR'.
= ''.
= 'X'.
= '组计数器'.
= 'PLNAL'.
= ''.
= 'X'.
= '工厂'.
= 'WERKS'.
= 'X'.
= 'X'.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
= '任务清单描述'.
= 'KTEXT'.
= ''.
= 'X'.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
= '物料描述'.
= 'MAKTX'.
= ''.
= 'X'.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
= '工序'.
= 'VORNR'.
= ''.
= 'X'.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-datatype
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
= '工作中心'.
= 'ARBPL'.
= ''.
= 'N'.
= 'X'.
= '序列'.
= 'PLNFL'.
= ''.
= 'N'.
= 'X'.
= '控制码'.
= 'STEUS'.
= ''.
= 'N'.
= 'X'.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-datatype
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-datatype
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-datatype
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
= '基本数量'.
= 'BMSCH'.
= ''.
= 'N'.
= 'X'.
ls_fcat-coltext
ls_fcat-fieldname
ls_fcat-edit
ls_fcat-datatype
ls_fcat-no_zero
append ls_fcat to pt_fieldcat.clear ls_fcat.
= '工序文本描述'.
= 'LTXA1'.
= ''.
= 'N'.
= 'X'.
*
*
*
*
*