Изменение цены для 919 вида движения при подтверждении производственного заказа CO15

Enhancement Spot (точка расширения(просмотр в транзакции SE18)): WORKORDER_GOODSMVT

Enhacement Implementation: ZHM_WORKORDER_GOODSMVT

Method: IF_EX_WORKORDER_GOODSMVT~GM_SCREEN_OKCODE_CHECK

method IF_EX_WORKORDER_GOODSMVT~GM_SCREEN_OKCODE_CHECK.
*<--Ввод фактической цены для 919 вида движения
data: kalnr type ckmlhd-kalnr,
ls_ckmlpp type ckmlpp,
it_ckmlpp type table of ckmlpp,
pvprs type ck_pvprs_1.
field-symbols: type cowb_comp.
loop at ct_comp assigning where bwart = '919'.
select single kalnr into kalnr from ckmlhd
where matnr = -matnr and bwtar = -bwtar and bwkey = -werks.
*{ INSERT EGTK901062 3
if sy-subrc = 0.
*} INSERT
select * from ckmlpp into corresponding fields of table it_ckmlpp where kalnr = kalnr and status >= '70'.
sort it_ckmlpp by bdatj descending poper descending.
read table it_ckmlpp into ls_ckmlpp index 1.
clear pvprs.
select single pvprs into pvprs from ckmlcr where kalnr = ls_ckmlpp-kalnr and bdatj = ls_ckmlpp-bdatj and poper = ls_ckmlpp-poper.
if pvprs > 0.
-exbwr = pvprs * -erfmg.
endif.
*{ INSERT EGTK901062 2
endif.
*} INSERT
endloop.
endmethod.

 

Добавить комментарий