QM取消UD ZQEVAC40

更新时间:2023-09-20 07:49:01 阅读量: 医药卫生 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

*&---------------------------------------------------------------------* *& Report ZQEVAC40 cancel UD to reREL *&

*&---------------------------------------------------------------------* *& *&

*&---------------------------------------------------------------------*

REPORT ZQEVAC40.

*----------------------------------------------------------------------* * Datendefinitionen

*----------------------------------------------------------------------* * Tabellen

*----------------------------------------------------------------------* tables sscrfields. tables qals. tables qave.

*----------------------------------------------------------------------* * Konstanten constants:

c_rc_0 like sy-subrc value 0, c_rc_4 like sy-subrc value 4, c_rc_20 like sy-subrc value 20, *

c_kreuz like qm00-qkz value 'X'. *

*----------------------------------------------------------------------* * Eingabebildschirm selection-screen skip 2.

parameters prueflos like qals-prueflos matchcode object qals memory id qls . selection-screen skip 1.

selection-screen begin of block search with frame. selection-screen begin of line.

selection-screen pushbutton 3(20) text-s01 user-command sear.

selection-screen pushbutton 40(20) text-s02 user-command show.

*--- text-s01 “Find insp .lot” text-s02 “Show insp .lot” prueflos “Inspection Lot “

selection-screen end of line.

selection-screen end of block search.

*----------------------------------------------------------------------* at selection-screen.

if sscrfields-ucomm eq 'SEAR' or prueflos is initial.

call function 'QELA_START_SELECTION_OF_LOTS' exporting

i_selid = ' ' i_stat_aenderung = 'X' i_stat_ero = 'X' i_stat_frei = 'X' i_stat_ve = ' ' importing

e_prueflos = prueflos exceptions

no_entry = 1 no_selected = 2 others = 3. endif.

if sscrfields-ucomm eq 'SHOW'. call function 'QSS1_LOT_SHOW' exporting

i_prueflos = prueflos. endif.

check sscrfields-ucomm eq 'ONLI'.

* ab hier mu# Pr#losnummer gef#lt sein. if prueflos is initial. message e164(qa). endif.

* Lesen Los

call function 'ENQUEUE_EQQALS1' exporting

prueflos = prueflos.

call function 'QPSE_LOT_READ' exporting

i_prueflos = prueflos importing

e_qals = qals exceptions

no_lot = 1. if not sy-subrc is initial. message e102(qa). endif.

*----------------- * Pr#en Status

call function 'QAST_STATUS_CHECK' exporting

i_objnr = qals-objnr

i_status = 'I0218' \ exceptions

status_not_activ = 1. if not sy-subrc is initial.

message e102(qv) with qals-prueflos. endif. *

call function 'QEVA_UD_READ' exporting

i_prueflos = qals-prueflos importing

e_qave = qave.

*---------------------------------------------------------------------* start-of-selection.

* Vorgaben sind ok. 1. Material Umlagern und Los 輋dern

perform qals_aendern.

************************************************************************ *----------------------------------------------------------------------* * FORM QALS_aendern

*----------------------------------------------------------------------* form qals_aendern. *

perform status_fix_setzen using 'I0002' c_kreuz. perform status_fix_setzen using 'I0216' space. perform status_fix_setzen using 'I0217' space. perform status_fix_setzen using 'I0218' space. clear: qals-stat14. clear: qals-stat35. clear: qave-vauswahlmg, qave-vwerks, qave-versionam, qave-vcodegrp, qave-vcode, qave-vbewertung, qave-versioncd, qave-vfolgeakti, qave-qkennzahl. *--... verbuchen

call function 'QEVA_UD_UPDATE' in update task exporting

qals_new = qals qave_new = qave.

commit work.

message s101(qa) with qals-prueflos. endform.

*----------------------------------------------------------------------* * Form STATUS_FIX_SETZEN

*----------------------------------------------------------------------*

* Setzen eines Status aufgrund von Voreinstellungen wie QMAT etc. * *----------------------------------------------------------------------* * --> STATUS Status der gesetzt werden soll

* --> AKTIV Status wird aktiviert sonst deaktiviert

*----------------------------------------------------------------------* form status_fix_setzen using

value(status) like tj02-istat value(aktiv) like c_kreuz.

* lokale Tabelle fuer Statusfortschreibung data: begin of l_stattab occurs 0. include structure jstat. data end of l_stattab.

*

* Falls Objektnr. nicht gef#lt. --> Fehlermeldung !!! if qals-objnr eq space.

message e013(qv).

* Fehlende Objektnr.: Problem f# endif.

move status to l_stattab-stat. if aktiv eq space.

move c_kreuz to l_stattab-inact. endif. *

append l_stattab. *

call function 'STATUS_CHANGE_INTERN' exporting

check_only = space objnr = qals-objnr tables

status = l_stattab.

endform. \

本文来源:https://www.bwwdw.com/article/y5gh.html

Top