生产排产表DL-ZPPR002
*&---------------------------------------------------------------------*
*& Report ZPPR002
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------* REPORT zppr002 NO STANDARD PAGE HEADING MESSAGE-ID zpp. INCLUDE zppr002_top. SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-.
SELECT-OPTIONS:s_werks FOR marc-werks NO-EXTENSION NO INTERVALS OBLIGATORY,
s_dispo FOR marc-dispo,
s_matkl FOR mara-matkl,
s_matnr FOR marc-matnr,
s_gstrp FOR afko-gstrp NO-EXTENSION OBLIGATORY.
PARAMETERS:p_edatu TYPE vbep-edatu OBLIGATORY.
SELECTION-SCREEN END OF BLOCK blk1. SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-.
PARAMETERS:p_rb1 RADIOBUTTON GROUP r1 DEFAULT 'X',
p_rb2 RADIOBUTTON GROUP r1.
SELECTION-SCREEN END OF BLOCK blk2. INITIALIZATION.
PERFORM frm_initialization. START-OF-SELECTION.
PERFORM frm_auth_check. PERFORM frm_get_data. PERFORM frm_process_data. PERFORM frm_display_alv. *&---------------------------------------------------------------------*
*& Form FRM_INITIALIZATION
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM frm_initialization .
IF s_gstrp[] IS INITIAL.
s_gstrp-sign = 'I'.
s_gstrp-option = 'EQ'.
s_gstrp-low = sy-datum + .
APPEND s_gstrp.
ENDIF. IF p_edatu IS INITIAL.
p_edatu = sy-datum + .
ENDIF. * IF s_werks IS INITIAL.
* s_werks-sign = 'I'.
* s_werks-option = 'EQ'.
* s_werks-low = '2001'.
* APPEND s_werks.
* ENDIF.
ENDFORM. " FRM_INITIALIZATION
*&---------------------------------------------------------------------*
*& Form FRM_GET_DATA
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM frm_get_data .
DATA:l_datum TYPE sy-datum.
DATA:lt_rxsjh TYPE TABLE OF ztsd_rxsjh,
lw_rxsjh TYPE ztsd_rxsjh. "查询出“MRP控制者”(MARC-DISPO)为P01、P02、P03或P08,或“物料组”(MARC-MATKL)为5010110的所有物料 SELECT marc~matnr marc~werks marc~disgr marc~eisbe marc~frtme marc~dispo mara~meins mara~matkl t438m~auart
INTO CORRESPONDING FIELDS OF TABLE gt_matnr
FROM marc
INNER JOIN mara
ON mara~matnr EQ marc~matnr
LEFT JOIN t438m
ON t438m~werks = marc~werks
AND t438m~mtart = marc~disgr
WHERE marc~werks IN s_werks
AND marc~matnr IN s_matnr
AND ( marc~dispo IN ('P01','P02','P03','P08') OR mara~matkl EQ '' ). IF s_matkl[] IS NOT INITIAL.
DELETE gt_matnr WHERE matkl NOT IN s_matkl.
ENDIF. IF s_dispo[] IS NOT INITIAL.
DELETE gt_matnr WHERE dispo NOT IN s_dispo.
ENDIF. * SELECT marc~matnr marc~werks marc~disgr marc~eisbe marc~frtme mara~meins t438m~auart
* APPENDING CORRESPONDING FIELDS OF TABLE gt_matnr
* FROM marc
* INNER JOIN mara
* ON mara~matnr = marc~matnr
* LEFT JOIN t438m
* ON t438m~werks = marc~werks
* AND t438m~mtart = marc~disgr
* WHERE marc~werks IN s_werks
* AND marc~matnr IN s_matnr
* AND mara~matkl EQ '5010110'. * SELECT marc~matnr marc~werks marc~disgr marc~eisbe marc~frtme mara~meins t438m~auart
* APPENDING CORRESPONDING FIELDS OF TABLE gt_matnr
* FROM marc
* INNER JOIN mara
* ON mara~matnr = marc~matnr
* LEFT JOIN t438m
* ON t438m~werks = marc~werks
* AND t438m~mtart = marc~disgr
* WHERE marc~werks IN s_werks
* AND marc~matnr IN s_matnr
* AND marc~dispo IN s_dispo
* AND mara~matkl IN s_matkl. IF gt_matnr IS INITIAL.
MESSAGE s000 WITH '没有符合条件的数据' DISPLAY LIKE 'E'.
STOP.
ELSE.
LOOP AT gt_matnr INTO gw_matnr WHERE frtme IS INITIAL.
gw_matnr-frtme = gw_matnr-meins.
MODIFY gt_matnr FROM gw_matnr TRANSPORTING frtme.
ENDLOOP.
ENDIF. SORT gt_matnr BY matnr werks.
DELETE ADJACENT DUPLICATES FROM gt_matnr COMPARING matnr werks. "物料描述
SELECT * INTO CORRESPONDING FIELDS OF TABLE gt_makt
FROM makt
FOR ALL ENTRIES IN gt_matnr
WHERE matnr = gt_matnr-matnr
AND spras = sy-langu. "生产订单编号和数量
SELECT afpo~aufnr afpo~posnr afpo~dwerk afpo~matnr afpo~dauat afpo~psmng afko~gstrp
INTO CORRESPONDING FIELDS OF TABLE gt_afpo
FROM afpo
INNER JOIN afko
ON afko~aufnr EQ afpo~aufnr
FOR ALL ENTRIES IN gt_matnr
WHERE afpo~dwerk EQ gt_matnr-werks
AND afpo~matnr EQ gt_matnr-matnr
AND afpo~dauat EQ gt_matnr-auart
AND afko~gstrp IN s_gstrp. "订单开始时间
IF gt_afpo IS NOT INITIAL.
SELECT aufnr objnr INTO CORRESPONDING FIELDS OF TABLE gt_objnr FROM aufk
FOR ALL ENTRIES IN gt_afpo
WHERE aufnr = gt_afpo-aufnr .
SORT gt_objnr BY aufnr . LOOP AT gt_afpo INTO gw_afpo.
CLEAR:g_line,gw_objnr .
READ TABLE gt_objnr INTO gw_objnr WITH KEY aufnr = gw_afpo-aufnr BINARY SEARCH .
IF sy-subrc = .
"状态读取
CALL FUNCTION 'STATUS_TEXT_EDIT'
EXPORTING
objnr = gw_objnr-objnr
spras = sy-langu
IMPORTING
line = g_line
EXCEPTIONS
object_not_found =
OTHERS = .
FIND 'DLFL' IN g_line .
IF sy-subrc = .
DELETE gt_afpo.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF. "工艺路线版本和版本描述
SELECT mapl~matnr mapl~werks mapl~plnty mapl~plnnr mapl~plnal mapl~zaehl plko~ktext
INTO CORRESPONDING FIELDS OF TABLE gt_gylx
FROM mapl
INNER JOIN plko
ON plko~plnty = mapl~plnty
AND plko~plnnr = mapl~plnnr
AND plko~plnal = mapl~plnal
AND plko~zaehl = mapl~zaehl
WHERE mapl~plnty = 'N'
AND mapl~loekz = ''. "未清提单
SELECT vbbe~werks vbbe~matnr vbbe~vbeln vbbe~posnr vbbe~etenr vbbe~omeng AS bmeng vbbe~meins AS vrkme
INTO CORRESPONDING FIELDS OF TABLE gt_wqdd
FROM vbbe
FOR ALL ENTRIES IN gt_matnr
WHERE vbbe~werks EQ gt_matnr-werks
AND vbbe~matnr EQ gt_matnr-matnr
AND vbbe~vbtyp IN ('J','C')
AND vbbe~mbdat LE p_edatu.
* SELECT vbap~werks vbap~lgort vbap~matnr vbep~vbeln vbep~posnr vbep~etenr vbep~vrkme vbep~bmeng
* INTO CORRESPONDING FIELDS OF TABLE gt_wqdd
* FROM vbap
* INNER JOIN vbuk
* ON vbuk~vbeln = vbap~vbeln
* INNER JOIN vbep
* ON vbep~vbeln = vbap~vbeln
* AND vbep~posnr = vbap~posnr
* FOR ALL ENTRIES IN gt_matnr
* WHERE vbap~werks EQ gt_matnr-werks
* AND vbap~matnr EQ gt_matnr-matnr
* AND vbuk~vbtyp = 'C'
* AND vbuk~lfstk = 'A'
* AND vbep~edatu LE p_edatu.
"汇总未清提单数量
LOOP AT gt_wqdd INTO gw_wqdd.
CLEAR gw_matnr.
READ TABLE gt_matnr INTO gw_matnr WITH KEY matnr = gw_wqdd-matnr
werks = gw_wqdd-werks
BINARY SEARCH.
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = gw_matnr-matnr
i_in_me = gw_wqdd-vrkme
i_out_me = gw_matnr-frtme
i_menge = gw_wqdd-bmeng
IMPORTING
e_menge = gw_wqdd-bmeng
EXCEPTIONS
error_in_application =
error =
OTHERS = .
IF sy-subrc <> .
* Implement suitable error handling here
ENDIF. CLEAR gw_wqddsl.
MOVE-CORRESPONDING gw_wqdd TO gw_wqddsl. COLLECT gw_wqddsl INTO gt_wqddsl.
ENDLOOP. "当前库存
SELECT * INTO CORRESPONDING FIELDS OF TABLE gt_mard
FROM mard
INNER JOIN t001l
ON t001l~werks = mard~werks
AND t001l~lgort = mard~lgort
FOR ALL ENTRIES IN gt_matnr
WHERE mard~werks = gt_matnr-werks
AND mard~matnr = gt_matnr-matnr
AND t001l~diskz NE ''.
"汇总当前库存数量
LOOP AT gt_mard INTO gw_mard.
CLEAR gw_matnr.
READ TABLE gt_matnr INTO gw_matnr WITH KEY matnr = gw_mard-matnr
werks = gw_mard-werks
BINARY SEARCH.
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = gw_matnr-matnr
i_in_me = gw_matnr-meins
i_out_me = gw_matnr-frtme
i_menge = gw_mard-labst
IMPORTING
e_menge = gw_mard-labst
EXCEPTIONS
error_in_application =
error =
OTHERS = .
IF sy-subrc <> .
* Implement suitable error handling here
ENDIF. CLEAR gw_dqkcsl.
MOVE-CORRESPONDING gw_mard TO gw_dqkcsl.
COLLECT gw_dqkcsl INTO gt_dqkcsl.
ENDLOOP. * "在产订单
SELECT afpo~aufnr afpo~posnr afpo~dwerk afpo~matnr afpo~dauat afpo~psmng afko~gstrp
INTO CORRESPONDING FIELDS OF TABLE gt_afpo_zc
FROM afpo
INNER JOIN afko
ON afko~aufnr EQ afpo~aufnr
FOR ALL ENTRIES IN gt_matnr
WHERE afpo~dwerk EQ gt_matnr-werks
AND afpo~matnr EQ gt_matnr-matnr
AND afko~gstrp IN s_gstrp. "订单开始时间
"汇总在产数量
LOOP AT gt_afpo_zc INTO gw_afpo.
CLEAR gw_zcsl.
MOVE-CORRESPONDING gw_afpo TO gw_zcsl.
gw_zcsl-werks = gw_afpo-dwerk. * SELECT SINGLE gstrp INTO gw_zcsl-gstrp
* FROM afko
* WHERE aufnr = gw_afpo-aufnr. gw_zcsl-zcsl = gw_zcsl-psmng - gw_zcsl-wemng.
COLLECT gw_zcsl INTO gt_zcsl.
ENDLOOP.
SORT gt_zcsl BY werks matnr gstrp. "前1-7天出货量
DATA:l_date_low TYPE sy-datum,
l_date_high TYPE sy-datum.
l_date_low = sy-datum - .
l_date_high = sy-datum." - 1. "加当天出货数量 SELECT lips~vbeln lips~posnr lips~werks lips~matnr lips~lfimg lips~vrkme likp~wadat_ist AS lfdat
INTO CORRESPONDING FIELDS OF TABLE gt_lips
FROM lips
INNER JOIN likp
ON likp~vbeln = lips~vbeln
INNER JOIN vbuk
ON vbuk~vbeln = lips~vbeln
FOR ALL ENTRIES IN gt_matnr
WHERE lips~werks = gt_matnr-werks
AND lips~matnr = gt_matnr-matnr
AND likp~lfart = 'ZLF1'
AND likp~wadat_ist BETWEEN l_date_low AND l_date_high "WADAT_IST lfdat
AND vbuk~wbstk = 'C'.
"汇总出货量
LOOP AT gt_lips INTO gw_lips.
gw_chl-werks = gw_lips-werks.
gw_chl-matnr = gw_lips-matnr.
CLEAR gw_matnr.
READ TABLE gt_matnr INTO gw_matnr WITH KEY matnr = gw_lips-matnr
werks = gw_lips-werks
BINARY SEARCH.
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = gw_lips-matnr
i_in_me = gw_lips-vrkme
i_out_me = gw_matnr-frtme
i_menge = gw_lips-lfimg
IMPORTING
e_menge = gw_lips-lfimg
EXCEPTIONS
error_in_application =
error =
OTHERS = .
IF sy-subrc <> .
* Implement suitable error handling here
ENDIF. CLEAR g_ts.
CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
EXPORTING
i_date_from = gw_lips-lfdat
i_date_to = sy-datum
IMPORTING
e_days = g_ts. CASE g_ts.
WHEN ''.
gw_chl-zq0tchl = gw_lips-lfimg.
WHEN ''.
gw_chl-zq1tchl = gw_lips-lfimg.
WHEN ''.
gw_chl-zq2tchl = gw_lips-lfimg.
WHEN ''.
gw_chl-zq3tchl = gw_lips-lfimg.
WHEN ''.
gw_chl-zq4tchl = gw_lips-lfimg.
WHEN ''.
gw_chl-zq5tchl = gw_lips-lfimg.
WHEN ''.
gw_chl-zq6tchl = gw_lips-lfimg.
WHEN ''.
gw_chl-zq7tchl = gw_lips-lfimg.
WHEN OTHERS.
ENDCASE.
COLLECT gw_chl INTO gt_chl.
CLEAR gw_chl.
ENDLOOP. "日提货计划
CLEAR l_datum.
l_datum = sy-datum + .
SELECT * INTO CORRESPONDING FIELDS OF TABLE lt_rxsjh
FROM ztsd_rxsjh
FOR ALL ENTRIES IN gt_matnr
WHERE zwerks = gt_matnr-werks
AND zjhqj = l_datum
AND zmatnr = gt_matnr-matnr.
SORT lt_rxsjh BY zwerks zvkorg zjhqj zmatnr zbanbe DESCENDING.
DELETE ADJACENT DUPLICATES FROM lt_rxsjh COMPARING zwerks zvkorg zjhqj zmatnr.
"汇总日销售计划量
CLEAR:gw_rxsjh,gt_rxsjh.
LOOP AT lt_rxsjh INTO lw_rxsjh.
gw_rxsjh-zwerks = lw_rxsjh-zwerks.
gw_rxsjh-zjhqj = lw_rxsjh-zjhqj.
gw_rxsjh-zmatnr = lw_rxsjh-zmatnr. CLEAR gw_matnr.
READ TABLE gt_matnr INTO gw_matnr WITH KEY matnr = gw_rxsjh-zmatnr
werks = gw_rxsjh-zwerks
BINARY SEARCH.
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = gw_matnr-matnr
i_in_me = lw_rxsjh-zmeins
i_out_me = gw_matnr-frtme
i_menge = lw_rxsjh-zxjhsl1
IMPORTING
e_menge = gw_rxsjh-zxjhsl1
EXCEPTIONS
error_in_application =
error =
OTHERS = .
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = gw_matnr-matnr
i_in_me = lw_rxsjh-zmeins
i_out_me = gw_matnr-frtme
i_menge = lw_rxsjh-zxjhsl2
IMPORTING
e_menge = gw_rxsjh-zxjhsl2
EXCEPTIONS
error_in_application =
error =
OTHERS = .
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = gw_matnr-matnr
i_in_me = lw_rxsjh-zmeins
i_out_me = gw_matnr-frtme
i_menge = lw_rxsjh-zxjhsl3
IMPORTING
e_menge = gw_rxsjh-zxjhsl3
EXCEPTIONS
error_in_application =
error =
OTHERS = . "MODIFY gt_rxsjh FROM gw_rxsjh TRANSPORTING zxjhsl1 zxjhsl2 zxjhsl3.
COLLECT gw_rxsjh INTO gt_rxsjh.
ENDLOOP.
ENDFORM. " FRM_GET_DATA
*&---------------------------------------------------------------------*
*& Form FRM_PROCESS_DATA
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM frm_process_data .
DATA:l_begin_d TYPE sy-datum,
l_end_d TYPE sy-datum.
DATA:l_times TYPE i,
l_sqr TYPE i. IF s_gstrp-high IS INITIAL.
l_end_d = s_gstrp-low.
ELSE.
l_end_d = s_gstrp-high.
ENDIF. SORT gt_afpo BY matnr dwerk gstrp aufnr.
SORT gt_makt BY matnr.
SORT gt_gylx BY matnr werks.
SORT gt_wqddsl BY matnr werks.
SORT gt_dqkcsl BY matnr werks.
SORT gt_zcsl BY matnr werks gstrp.
SORT gt_chl BY matnr werks.
SORT gt_rxsjh BY zmatnr zwerks."zvkorg. LOOP AT gt_matnr INTO gw_matnr.
l_begin_d = s_gstrp-low.
CLEAR l_times.
DO.
l_times = l_times + .
IF l_begin_d GT l_end_d.
EXIT.
ENDIF.
gw_output-gstrp = l_begin_d.
gw_output-werks = gw_matnr-werks.
gw_output-matnr = gw_matnr-matnr.
gw_output-auart = gw_matnr-auart.
gw_output-eisbe = gw_matnr-eisbe. "安全库存
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = gw_matnr-matnr
i_in_me = gw_matnr-meins
i_out_me = gw_matnr-frtme
i_menge = gw_output-eisbe
IMPORTING
e_menge = gw_output-eisbe
EXCEPTIONS
error_in_application =
error =
OTHERS = . gw_output-frtme = gw_matnr-frtme. "生产单位
READ TABLE gt_makt INTO gw_makt WITH KEY matnr = gw_matnr-matnr BINARY SEARCH.
IF sy-subrc = .
gw_output-maktx = gw_makt-maktx.
ENDIF.
"生产订单号和生产订单数量
CLEAR gw_afpo.
READ TABLE gt_afpo INTO gw_afpo WITH KEY matnr = gw_matnr-matnr
dwerk = gw_matnr-werks
gstrp = l_begin_d
BINARY SEARCH.
IF sy-subrc = .
gw_output-aufnr = gw_afpo-aufnr.
gw_output-psmng = gw_afpo-psmng. CLEAR:g_fname,gw_tline,gt_tline. CONCATENATE sy-mandt gw_output-aufnr INTO g_fname.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'KOPF'
language = sy-langu
name = g_fname
object = 'AUFK'
TABLES
lines = gt_tline
EXCEPTIONS
id =
language =
name =
not_found =
object =
reference_check =
wrong_access_to_archive =
OTHERS = .
"原料来源
READ TABLE gt_tline INTO gw_tline INDEX .
IF sy-subrc = .
gw_output-zylly = gw_tline-tdline.
ENDIF. ENDIF.
"工艺路线版本&工艺路线版本描述
READ TABLE gt_gylx INTO gw_gylx WITH KEY matnr = gw_matnr-matnr
werks = gw_matnr-werks
BINARY SEARCH.
IF sy-subrc = .
gw_output-plnnr = gw_gylx-plnnr.
gw_output-plnal = gw_gylx-plnal.
gw_output-ktext = gw_gylx-ktext.
ENDIF.
"未清提单数量
READ TABLE gt_wqddsl INTO gw_wqddsl WITH KEY matnr = gw_matnr-matnr
werks = gw_matnr-werks
BINARY SEARCH.
IF sy-subrc = .
gw_output-zwqddsl = gw_wqddsl-bmeng.
ENDIF.
"当前库存 READ TABLE gt_dqkcsl INTO gw_dqkcsl WITH KEY matnr = gw_matnr-matnr
werks = gw_matnr-werks
BINARY SEARCH.
IF sy-subrc = .
gw_output-zdqkc = gw_dqkcsl-labst.
ENDIF. "在产数量
READ TABLE gt_zcsl INTO gw_zcsl WITH KEY matnr = gw_matnr-matnr
werks = gw_matnr-werks
gstrp = l_begin_d
BINARY SEARCH.
IF sy-subrc = .
gw_output-zzcsl = gw_zcsl-zcsl.
ENDIF. "后X天销售计划量
CLEAR gw_rxsjh.
READ TABLE gt_rxsjh INTO gw_rxsjh WITH KEY zmatnr = gw_matnr-matnr
zwerks = gw_matnr-werks
"zvkorg = gw_matnr-werks
BINARY SEARCH.
IF sy-subrc = .
gw_output-zh1txsjhl = gw_rxsjh-zxjhsl1.
gw_output-zh2txsjhl = gw_rxsjh-zxjhsl2.
gw_output-zh3txsjhl = gw_rxsjh-zxjhsl3.
ENDIF. IF l_times EQ .
gw_output-zjyscsl = gw_output-zwqddsl + gw_output-zh1txsjhl - gw_output-zdqkc
- gw_output-zzcsl + gw_output-eisbe.
ELSE.
gw_output-zjyscsl = gw_output-zh1txsjhl.
ENDIF.
IF gw_output-zjyscsl LT .
gw_output-zjyscsl = .
ENDIF.
"出货数量
CLEAR gw_chl.
READ TABLE gt_chl INTO gw_chl WITH KEY matnr = gw_matnr-matnr
werks = gw_matnr-werks
BINARY SEARCH.
IF sy-subrc = .
gw_output-zq0tchl = gw_chl-zq0tchl.
gw_output-zq1tchl = gw_chl-zq1tchl.
gw_output-zq2tchl = gw_chl-zq2tchl.
gw_output-zq3tchl = gw_chl-zq3tchl.
gw_output-zq4tchl = gw_chl-zq4tchl.
gw_output-zq5tchl = gw_chl-zq5tchl.
gw_output-zq6tchl = gw_chl-zq6tchl.
gw_output-zq7tchl = gw_chl-zq7tchl.
ENDIF. APPEND gw_output TO gt_output.
CLEAR gw_output. l_sqr = l_sqr + .
l_begin_d = l_begin_d + .
ENDDO.
ENDLOOP. IF p_rb1 EQ 'X'.
DELETE gt_output WHERE zjyscsl EQ .
ENDIF. l_sqr = .
LOOP AT gt_output INTO gw_output.
l_sqr = l_sqr + .
gw_output-sqr = l_sqr. IF gw_output-aufnr IS NOT INITIAL.
gw_style-style = cl_gui_alv_grid=>mc_style_disabled. " 设置为不可编辑状态
gw_style-fieldname = 'AUART'. " 需要编辑的列名
APPEND gw_style TO gw_output-style.
gw_style-fieldname = 'PLNAL'. " 需要编辑的列名
APPEND gw_style TO gw_output-style.
gw_style-fieldname = 'PLNNR'. " 需要编辑的列名
APPEND gw_style TO gw_output-style.
gw_style-fieldname = 'ZJYSCSL'. " 需要编辑的列名
APPEND gw_style TO gw_output-style.
gw_style-fieldname = 'ZYLLY'. " 需要编辑的列名
APPEND gw_style TO gw_output-style.
ENDIF.
MODIFY gt_output FROM gw_output TRANSPORTING sqr style.
ENDLOOP. ENDFORM. " FRM_PROCESS_DATA
*&---------------------------------------------------------------------*
*& Form FRM_DISPLAY_ALV
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM frm_display_alv .
PERFORM frm_build_fieldcat. gw_layout-zebra = 'X'.
gw_layout-cwidth_opt = 'X'.
gw_layout-stylefname = 'STYLE'. gw_events-name = 'CALLER_EXIT'. "slis_ev_caller_exit_at_start事件 调用来获取ALV对象并注册回车事件
gw_events-form = 'FRM_CALLER_EXIT'.
APPEND gw_events TO gt_events. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'FRM_PF_STATUS_SET'
i_callback_user_command = 'FRM_USER_COMMAND'
"i_grid_settings = gw_setting
is_layout_lvc = gw_layout
it_fieldcat_lvc = gt_fieldcat
" it_sort_lvc = gt_sort
it_events = gt_events
i_default = 'X'
i_save = 'A'
TABLES
t_outtab = gt_output
EXCEPTIONS
program_error =
OTHERS = .
IF sy-subrc <> .
* Implement suitable error handling here
ENDIF. ENDFORM. " FRM_DISPLAY_ALV
*&---------------------------------------------------------------------*
*& Form FRM_BUILD_FIELDCAT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM frm_build_fieldcat .
mcr_fieldcat:'ZSEL' '选择' 'X' '' '',
'ICON' '状态' '' 'ICON' 'ID',
'MSG' '消息' '' '' '',
'AUFNR' '生产订单号' '' 'AUFK' 'AUFNR',
'SQR' '序号' '' '' '',
'GSTRP' '计划生产日期' '' '' '',
'PSMNG' '生产订单数量' '' '' '',
'WERKS' '工厂' '' 'MARC' 'WERKS',
'MATNR' '物料编码' '' 'MARC' 'MATNR',
'MAKTX' '物料描述' '' '' '',
'AUART' '订单类型' 'X' 'T438M' 'AUART',
'PLNNR' '组' 'X' 'MAPL' 'PLNNR', "工艺路线版本编码
'PLNAL' '组计算器' 'X' 'MAPL' 'PLNAL',
'KTEXT' '工艺路线版本描述' '' '' '',
'ZWQDDSL' '未清提单数量' '' '' '',
'ZH1TXSJHL' '后1天销售计划量' '' '' '',
'ZH2TXSJHL' '后2天销售计划量' '' '' '',
'ZH3TXSJHL' '后3天销售计划量' '' '' '',
'ZDQKC' '当前库存' '' '' '',
'ZZCSL' '在产数量' '' '' '',
'EISBE' '安全库存' '' '' '',
'ZJYSCSL' '建议生产数量' 'X' 'VBEP' 'BMENG',
'FRTME' '单位' '' 'MARC' 'FRTME',
'ZYLLY' '原料来源' 'X' '' '',
'ZQ0TCHL' '当天出货数量' '' '' '',
'ZQ1TCHL' '前1天出货数量' '' '' '',
'ZQ2TCHL' '前2天出货数量' '' '' '',
'ZQ3TCHL' '前3天出货数量' '' '' '',
'ZQ4TCHL' '前4天出货数量' '' '' '',
'ZQ5TCHL' '前5天出货数量' '' '' '',
'ZQ6TCHL' '前6天出货数量' '' '' '',
'ZQ7TCHL' '前7天出货数量' '' '' ''.
* 'ZQ1TXSJHL' '前1天销售计划量' '' '' '',
* 'ZQ2TXSJHL' '前2天销售计划量' '' '' '',
* 'ZQ3TXSJHL' '前3天销售计划量' '' '' '',
* 'ZQ4TXSJHL' '前4天销售计划量' '' '' '',
* 'ZQ5TXSJHL' '前5天销售计划量' '' '' '',
* 'ZQ6TXSJHL' '前6天销售计划量' '' '' '',
* 'ZQ7TXSJHL' '前7天销售计划量' '' '' ''.
ENDFORM. " FRM_BUILD_FIELDCAT
*&---------------------------------------------------------------------*
*& Form FRM_AUTH_CHECK
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM frm_auth_check .
AUTHORITY-CHECK OBJECT 'C_AFKO_AWA'
ID 'ACTVT' DUMMY
ID 'AUTYP' DUMMY
ID 'AUFART' DUMMY
ID 'WERKS' FIELD s_werks-low .
IF sy-subrc <> .
MESSAGE e000 WITH '没有工厂' s_werks-low '权限'.
ENDIF. ENDFORM. " FRM_AUTH_CHECK FORM frm_pf_status_set USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'STANDARD_FULLSCREEN'.
ENDFORM. FORM frm_user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield. CALL METHOD g_grid->check_changed_data.
CLEAR:gt_message[].
CASE r_ucomm.
WHEN 'ALL'.
gw_output-zsel = 'X'.
MODIFY gt_output FROM gw_output TRANSPORTING zsel WHERE zsel NE 'X'.
WHEN 'DALL'.
CLEAR gw_output-zsel.
MODIFY gt_output FROM gw_output TRANSPORTING zsel WHERE zsel EQ 'X'.
WHEN 'CREATE'.
PERFORM frm_create_prodord.
WHEN 'SCBCAP'.
PERFORM frm_scbcap.
WHEN 'CHANGE'.
PERFORM frm_change_prodord.
WHEN 'KCXQQD'.
PERFORM frm_kcxqqd.
WHEN 'BACK' OR 'EXIT' OR 'CANC'.
LEAVE SCREEN.
WHEN OTHERS.
ENDCASE.
" rs_selfield-refresh = 'X'. "刷新ALV * 稳定刷新
g_stbl-row = 'X'." 基于行的稳定刷新
g_stbl-col = 'X'." 基于列稳定刷新
CALL METHOD g_grid->refresh_table_display
EXPORTING
is_stable = g_stbl. IF gt_message[] IS NOT INITIAL.
CALL FUNCTION 'USMD_MESSAGE_POPUP'
EXPORTING
it_message = gt_message[]
if_save_necessary = gv_necessary.
ENDIF. ENDFORM.
*&---------------------------------------------------------------------*
*& Form FRM_CREATE_PRODORD
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM frm_create_prodord .
DATA:lt_output LIKE TABLE OF gw_output.
DATA:gs_keko TYPE keko. CALL METHOD g_grid->check_changed_data
* IMPORTING
* e_valid =
* CHANGING
* c_refresh = 'X'
.
CLEAR:gw_order,gt_order,lt_output,gt_message[].
LOOP AT gt_output INTO gw_output WHERE aufnr IS INITIAL
AND zjyscsl GT
AND zsel EQ 'X'.
gw_orderdata-material = gw_output-matnr.
gw_orderdata-plant = gw_output-werks.
gw_orderdata-order_type = gw_output-auart.
gw_orderdata-basic_start_date = gw_output-gstrp.
gw_orderdata-basic_end_date = gw_output-gstrp.
gw_orderdata-quantity = gw_output-zjyscsl.
gw_orderdata-quantity_uom = gw_output-frtme.
gw_orderdata-routing_type = 'N'.
gw_orderdata-routing_group = gw_output-plnnr.
gw_orderdata-routing_counter = gw_output-plnal. "add by ly 20151124
SELECT SINGLE * INTO CORRESPONDING FIELDS OF gs_keko
FROM keko WHERE matnr = gw_output-matnr
AND werks = gw_output-werks
AND bwkey = gw_output-werks
AND kadat LE sy-datum
AND bidat GE sy-datum
AND freig = 'X'.
IF sy-subrc <> .
gs_message-msgid = 'ZPP'.
gs_message-msgty = 'E'.
gs_message-msgno = ''.
gs_message-msgv1 = '物料'.
gs_message-msgv2 = gw_output-matnr.
gs_message-msgv3 = '未下达标准成本估算!'.
APPEND gs_message TO gt_message.
CONTINUE.
ENDIF.
"add by ly 20151124 CLEAR:gw_return,g_aufnr.
CALL FUNCTION 'BAPI_PRODORD_CREATE'
EXPORTING
orderdata = gw_orderdata
IMPORTING
return = gw_return
order_number = g_aufnr
" ORDER_TYPE =
.
IF g_aufnr IS NOT INITIAL.
* CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* wait = 'X'. gw_output-aufnr = g_aufnr.
gw_output-psmng = gw_output-zjyscsl. gw_output-icon = icon_led_green. gw_order-order_number = gw_output-aufnr.
APPEND gw_order TO gt_order.
APPEND gw_output TO lt_output.
ELSE.
* CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
*
* gw_output-icon = icon_led_red.
ENDIF. gw_output-msg = gw_return-message. IF gw_output-aufnr IS NOT INITIAL.
gw_style-style = cl_gui_alv_grid=>mc_style_disabled. " 设置为不可编辑状态
gw_style-fieldname = 'AUART'. " 需要编辑的列名
APPEND gw_style TO gw_output-style.
gw_style-fieldname = 'PLNAL'. " 需要编辑的列名
APPEND gw_style TO gw_output-style.
gw_style-fieldname = 'PLNNR'. " 需要编辑的列名
APPEND gw_style TO gw_output-style.
gw_style-fieldname = 'ZJYSCSL'. " 需要编辑的列名
APPEND gw_style TO gw_output-style.
gw_style-fieldname = 'ZYLLY'. " 需要编辑的列名
APPEND gw_style TO gw_output-style.
ENDIF. MODIFY gt_output FROM gw_output.
ENDLOOP. IF gt_order IS NOT INITIAL.
WAIT UP TO SECONDS.
LOOP AT lt_output INTO gw_output.
IF gw_output-zylly IS NOT INITIAL.
CONCATENATE sy-mandt gw_output-aufnr INTO g_fname.
CLEAR:gw_tline,gt_tline.
gw_tline-tdline = gw_output-zylly.
APPEND gw_tline TO gt_tline.
CALL FUNCTION 'CREATE_TEXT'
EXPORTING
fid = 'KOPF'
flanguage = sy-langu
fname = g_fname
fobject = 'AUFK'
TABLES
flines = gt_tline
EXCEPTIONS
no_init =
no_save =
OTHERS = .
IF sy-subrc = .
UPDATE aufk SET ltext = WHERE aufnr = gw_output-aufnr.
ENDIF.
ENDIF.
ENDLOOP. CALL FUNCTION 'BAPI_PRODORD_RELEASE'
TABLES
orders = gt_order.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF. * IF gt_message[] IS NOT INITIAL.
* CALL FUNCTION 'USMD_MESSAGE_POPUP'
* EXPORTING
* it_message = gt_message[]
* if_save_necessary = gv_necessary.
* ENDIF.
ENDFORM. " FRM_CREATE_PRODORD
*&---------------------------------------------------------------------*
*& Form FRM_CHANGE_PRODORD
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM frm_change_prodord .
* CLEAR gt_row.
* CALL METHOD g_grid->get_selected_rows
* IMPORTING
* et_index_rows = gt_row
** et_row_no =
* .
* READ TABLE gt_row INTO gw_row INDEX 1.
* IF sy-subrc NE 0.
* MESSAGE s000 WITH '请选择一条数据' DISPLAY LIKE 'E'.
* RETURN.
* ENDIF.
*
* READ TABLE gt_output INTO gw_output INDEX gw_row-index. READ TABLE gt_output INTO gw_output WITH KEY zsel = 'X'.
IF sy-subrc NE .
MESSAGE s000 WITH '请选择一条数据' DISPLAY LIKE 'E'.
RETURN.
ENDIF. IF gw_output-aufnr IS INITIAL.
MESSAGE s000 WITH '生产订单为空,请先创建生产订单' DISPLAY LIKE 'E'.
RETURN.
ENDIF. SET PARAMETER ID 'ANR' FIELD gw_output-aufnr. CALL TRANSACTION 'CO02' AND SKIP FIRST SCREEN.
ENDFORM. " FRM_CHANGE_PRODORD
*&---------------------------------------------------------------------*
*& Form FRM_KCXQQD
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM frm_kcxqqd .
* CLEAR gt_row.
* CALL METHOD g_grid->get_selected_rows
* IMPORTING
* et_index_rows = gt_row
** et_row_no =
* .
* READ TABLE gt_row INTO gw_row INDEX 1.
* IF sy-subrc NE 0.
* MESSAGE s000 WITH '请选择一条数据' DISPLAY LIKE 'E'.
* RETURN.
* ENDIF.
*
* READ TABLE gt_output INTO gw_output INDEX gw_row-index.
READ TABLE gt_output INTO gw_output WITH KEY zsel = 'X'.
IF sy-subrc NE .
MESSAGE s000 WITH '请选择一条数据' DISPLAY LIKE 'E'.
RETURN.
ENDIF. SET PARAMETER ID 'MAT' FIELD gw_output-matnr.
SET PARAMETER ID 'WRK' FIELD gw_output-werks. CALL TRANSACTION 'MD04' AND SKIP FIRST SCREEN.
ENDFORM. " FRM_KCXQQD FORM frm_caller_exit USING e_grid TYPE slis_data_caller_exit.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = g_grid. " 设置enter事件
CALL METHOD g_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter
EXCEPTIONS
error =
OTHERS = . * 设置 单光标焦点移开被修改单元格后既触发事件
* CALL METHOD g_grid->register_edit_event
* EXPORTING
* i_event_id = cl_gui_alv_grid=>mc_evt_modified
* EXCEPTIONS
* error = 1
* OTHERS = 2.
CLEAR gw_f4.
gw_f4-fieldname = 'PLNNR'.
gw_f4-register = 'X'.
gw_f4-chngeafter = 'X'.
APPEND gw_f4 TO gt_f4.
CALL METHOD g_grid->register_f4_for_fields
EXPORTING
it_f4 = gt_f4[]. CREATE OBJECT gt_event_receiver.
* SET HANDLER gt_event_receiver->handle_modify FOR g_grid.
SET HANDLER gt_event_receiver->handle_onf4 FOR g_grid.
ENDFORM. INCLUDE zppr002_module.
*&---------------------------------------------------------------------*
*& Form FRM_UNIT_CONVERT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_GW_MATNR_MATNR text
* -->P_GW_MATNR_FRTME text
* -->P_GW_WQDD_VRKME text
* -->P_GW_WQDD_BMENG text
*----------------------------------------------------------------------*
FORM frm_unit_convert USING p_matnr
p_in_unit
p_out_unit
p_in_sl
CHANGING c_out_sl. ENDFORM. " FRM_UNIT_CONVERT
*&---------------------------------------------------------------------*
*& Form FRM_SCBCAP
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM frm_scbcap .
* CLEAR gt_row.
* CALL METHOD g_grid->get_selected_rows
* IMPORTING
* et_index_rows = gt_row
** et_row_no =
* .
* READ TABLE gt_row INTO gw_row INDEX 1.
* IF sy-subrc NE 0.
* MESSAGE s000 WITH '请选择一条数据' DISPLAY LIKE 'E'.
* RETURN.
* ENDIF.
*
* READ TABLE gt_output INTO gw_output INDEX gw_row-index. READ TABLE gt_output INTO gw_output WITH KEY zsel = 'X'.
IF sy-subrc NE .
MESSAGE s000 WITH '请选择一条数据' DISPLAY LIKE 'E'.
RETURN.
ENDIF. IF gw_output-aufnr IS INITIAL.
MESSAGE s000 WITH '生产订单编号为空,请先创建生产订单' DISPLAY LIKE 'E'.
RETURN.
ELSE.
CALL SCREEN STARTING AT ENDING AT .
ENDIF.
ENDFORM. " FRM_SCBCAP
*&---------------------------------------------------------------------*
*& Form FRM_QD_SCBC
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM frm_qd_scbc . PERFORM frm_save_longtext.
ENDFORM. " FRM_QD_SCBC
*&---------------------------------------------------------------------*
*& Form FRM_SAVE_LONGTEXT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM frm_save_longtext .
DATA:l_sl TYPE char20,
l_mseh3 TYPE t006a-mseh3. IF ( g_jb + g_yb + g_bb ) GT gw_output-psmng.
MESSAGE s000 WITH '生产订单' gw_output-aufnr '班次安排的数量之和要小于订单数量' DISPLAY LIKE 'E'.
LEAVE SCREEN .
ENDIF. CONCATENATE sy-mandt gw_output-aufnr INTO g_fname. CLEAR l_mseh3.
SELECT SINGLE mseh3 INTO l_mseh3
FROM t006a
WHERE spras = sy-langu
AND msehi = gw_output-frtme. CLEAR:gw_tline,gt_tline.
gw_tline-tdline = gw_output-zylly.
APPEND gw_tline TO gt_tline. l_sl = g_jb.
SHIFT l_sl LEFT DELETING LEADING space.
CONCATENATE '甲班' l_sl l_mseh3 INTO gw_tline-tdline SEPARATED BY '-'.
APPEND gw_tline TO gt_tline. l_sl = g_yb.
SHIFT l_sl LEFT DELETING LEADING space.
CONCATENATE '乙班' l_sl l_mseh3 INTO gw_tline-tdline SEPARATED BY '-'.
APPEND gw_tline TO gt_tline.
l_sl = g_bb.
SHIFT l_sl LEFT DELETING LEADING space.
CONCATENATE '丙班' l_sl l_mseh3 INTO gw_tline-tdline SEPARATED BY '-'.
APPEND gw_tline TO gt_tline. CALL FUNCTION 'CREATE_TEXT'
EXPORTING
fid = 'KOPF'
flanguage = sy-langu
fname = g_fname
fobject = 'AUFK'
TABLES
flines = gt_tline
EXCEPTIONS
no_init =
no_save =
OTHERS = .
IF sy-subrc EQ . UPDATE aufk SET ltext = WHERE aufnr = gw_output-aufnr. MESSAGE s000 WITH '生产订单' gw_output-aufnr '班次已安排'. ELSE.
MESSAGE s000 WITH '生产订单' gw_output-aufnr '班次安排失败' DISPLAY LIKE 'E'.
ENDIF. LEAVE TO SCREEN .
ENDFORM. " FRM_SAVE_LONGTEXT
*&---------------------------------------------------------------------*
*& Form FRM_GET_BC
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM frm_get_bc .
DATA:l_index TYPE i,
l_zbc TYPE string,
l_menge TYPE string,
l_meins TYPE string. CLEAR:g_fname,gw_tline,gt_tline. CONCATENATE sy-mandt gw_output-aufnr INTO g_fname.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'KOPF'
language = sy-langu
name = g_fname
object = 'AUFK'
TABLES
lines = gt_tline
EXCEPTIONS
id =
language =
name =
not_found =
object =
reference_check =
wrong_access_to_archive =
OTHERS = . CLEAR:g_jb,g_yb,g_bb.
LOOP AT gt_tline INTO gw_tline.
CLEAR:l_zbc,l_menge,l_meins.
SPLIT gw_tline-tdline AT '-' INTO l_zbc l_menge l_meins.
CASE l_zbc.
WHEN '甲班'.
g_jb = l_menge.
WHEN '乙班'.
g_yb = l_menge.
WHEN '丙班'.
g_bb = l_menge.
WHEN OTHERS.
ENDCASE.
ENDLOOP. * IF g_jb IS NOT INITIAL OR g_yb IS NOT INITIAL AND g_bb IS NOT INITIAL.
* "READ TABLE gt_order WITH KEY order_number = gw_output-aufnr TRANSPORTING NO FIELDS.
* "IF sy-subrc NE 0.
* LOOP AT SCREEN.
* IF screen-name = 'G_JB' OR screen-name = 'G_YB' OR screen-name = 'G_BB' .
* screen-input = 0.
* ELSEIF screen-name = 'QUEDING' .
* screen-input = 0.
* screen-invisible = 0.
* ENDIF.
* MODIFY SCREEN.
* ENDLOOP.
* ENDIF.
ENDFORM. " FRM_GET_BC FORM frm_plnnr TABLES it_shlp STRUCTURE seahlpres
CHANGING r_shlp TYPE shlp_descr_t
r_callcontrol LIKE ddshf4ctrl.
DATA: ls_interface TYPE ddshiface.
DATA: l_tabix TYPE sy-tabix. LOOP AT r_shlp-interface INTO ls_interface.
l_tabix = sy-tabix.
IF ls_interface-valfield IS INITIAL.
ls_interface-valfield = ls_interface-shlpfield. MODIFY r_shlp-interface FROM ls_interface INDEX l_tabix.
ENDIF.
ENDLOOP.
ENDFORM.
生产排产表DL-ZPPR002的更多相关文章
- APS高级计划排程系统和生产排产系统
一.什么是APS高级计划排程系统 APS高级计划与排程是解决生产排程和生产调度问题,常被称为排序问题或资源分配问题. 目前,市场逐步走向个性化.以销定产模式:生产逐步以多品种小批量形成存在.对于离散制 ...
- SO\PR\MO\排产回写的数据如下
QTYOPEN(WMENG).EDATU(promised_mat_availdate).... insert into OUT_ORDER_RES ' ; --PR 净需求 ' ; ---加上PR回 ...
- 易普优APS应用案例:线束行业生产计划排产
一.线束行业生产现状 (1)产品种类以及标准繁多,生产计划难协调 线束行业的生产,虽然原材料不多,但线束产品却多达几万种.一般线束企业,虽然不是每个月都生产数万种产品,但每月生产的产品品种在300种以 ...
- 什么是APS高级计划排程(生产计划排产)系统主要功能模块有哪些?
什么是APS高级计划排程(生产计划排产)系统? APS高级计划排程(高级计划排产)系统主要解决“在有限产能条件下,交期产能精确预测.工序生产与物料供应最优详细计划”的问题.APS高级计划排程(高级计划 ...
- 【案例】电子生产中的排程问题如何解决?APS助力智能化排产
共进电子是典型的消费类电子制造企业,以ODM业务为主,立足双O(OEM/ODM),发展自主品牌.其中,生产模式特点包括: 批量制造.多品种小批量.面向订单生产: 产品结构复杂,设计变更频繁:生产计划复 ...
- 为什么众多软件厂商无法提供APS高级计划排程系统?工厂目前生产计划是怎么排产的?
一.行业现状如想了解一下目前现状,去考察一下上了ERP的企业,会发现一个有趣的现象该企业无论ERP软件搞得如何如火如荼,似乎都与生产调度人员无关. 车间里或者生产线上的生产作业计划.生产过程的调度和管 ...
- 为什么没有APS排产的MES是没有灵魂的?
ERP系统在于对整个企业与集团企业间的全面管控,APS系统是生产规划及排程系统,MES系统重点在于车间现场的管理,下面用最简单方式讲讲ERP系统.APS系统和MES系统之间的区别与联系. 没有APS计 ...
- 排产的两种方式(前推式与后拉式)在Optaplanner上的体现
生产计划的约束 在制定生产计划过程中,必然是存在某些制约因素,满足某些需求才能进行的,或是交期保证.或是产能限制.或是关键工序制约.即TOC理论 - 任何系统至少存在着一个制约因素/瓶颈:否则它就可能 ...
- 【案例】大型摩托制造企业如何高效排产?看APS系统如何帮忙
江门市大长江集团有限公司(下文简称,大长江集团)创建于1991年11月,是豪爵控股下属子公司. 大长江生产计划管理从最初的电子表格Excel 公式辅助计算,发展到按公司业务需求,利用Excel VBA ...
随机推荐
- Kafka学习笔记-Java简单操作
Maven依赖包: <dependency> <groupId>org.apache.kafka</groupId> <artifactId>kafka ...
- 挑战程序2.1.5 穷竭搜索>>宽度优先搜索
先对比一下DFS和BFS 深度优先搜索DFS 宽度优先搜索BFS 明显可以看出搜索顺序不同. DFS是搜索单条路径到 ...
- 类加载机制(深入理解JAVA虚拟机学习笔记)
1.类加载机制的定义 将class文件加载到内存,然后对class文件中的数据进行校验.解析和初始化,转换成可以被虚拟机直接使用的JAVA类型,这就是虚拟机的类加载机制.(在JAVA中,类的加载.连接 ...
- R语言基本操作函数---变量的基本操作
1.变量变换 as.array(x),as.data.frame(x),as.numeric(x),as.logical(x),as.complex(x),as.character(x) ...
- Cheatsheet: 2016 12.01 ~ 12.31
Other Code review in remote teams 5 Signs That Your REST API Isn't RESTful Web Server Side React Sta ...
- 监狱3D指纹门禁系统解决方案
由于监狱的行业特殊性,其安全性对社会的安定团结具有重大影响力.因此,采用高新技术来建立监狱的安全屏障,提高监狱安全的规范化.科学化管理水平.用高效的技术防范手段对监狱安全实行事前的主动的防范,保障社会 ...
- MySQL自定义函数
用户自定义函数(user-defined function,UDF)是一种对MySQL扩展的途径,其用法与内置函数相同. 自定义函数两个必要条件: 参数:可以有另个或多个 返回值:只能有一个 创建自定 ...
- jxl_1
import java.io.File; import jxl.CellView; import jxl.Workbook; import jxl.format.Alignment; import j ...
- Stl源码剖析读书笔记之Alloc细节
阅读基础: Foo *pf = new Foo; 执行了两个步骤: 1)::operator new 向系统申请内存. 2) 调用Foo::Foo()构造函数构造实例. ==> 申请内存,构造 ...
- 【解决方法】magento paypal快速结账 不跳转
magento paypal Express Checkout(快速结账) 页面不跳转到Paypal的解放方法 我使用的magento 1.9.0.1 版本的,Paypal 快速结账都已经设置完毕,但 ...