반응형
select a~*
from /scwm/ordim_c as a
inner join /scdl/db_proci_o as b
on a~lgnum = @iv_wh_info
and a~rdocid eq b~docid
and a~ritmid eq b~itemid
and a~trart eq '6'
and a~rdoccat eq b~doccat
and b~doccat eq 'PDO'
and b~doccat eq a~doccat
inner join @tt_odlv_info as c
on a~tostat eq 'C' " GI HU만 찾는다. VLENR
and right( b~docno , 10 ) eq c~dvbeln
and right( b~itemno , 6 ) eq c~dvbelp
order by a~vlenr, a~rdocid, a~ritmid, confirmed_at_wh descending
into table @data(lt_confwt).
"최신 GI WT만 남김
delete adjacent duplicates from lt_confwt comparing vlenr rdocid ritmid.
* read Goods issued HU
call function '/SCWM/HUMAIN_REFRESH'.
call method /scwm/cl_hu_appl_ewm=>hu_by_gmdoc
exporting
iv_lgnum = conv /scwm/lgnum( iv_wh_info )
it_ordim = corresponding #( lt_confwt )
importing
et_huhdr = lt_hu_headers
et_huitm = lt_hu_items.
catch /scwm/cx_core.
os_return-mtype = zgcm1_bapi_mtype-e.
os_return-message = text-004.
return.
반응형
'SAP' 카테고리의 다른 글
[EWM] EWM ABAP 프로그래밍 시 트랜잭션 관리 (0) | 2025.03.01 |
---|---|
[EWM] Inbound Delivery Item Purchase Order 조회 방법 (0) | 2025.02.19 |
[EWM] 비즈니스 기능 구현 Basic 1편 - 스탠다드 기능 찾아가기 (0) | 2025.02.17 |
[SAP ABAP] Group By로 중복 체크하기 (0) | 2025.02.17 |
[SAP ABAP] for loop with group (0) | 2025.02.17 |