728x90
반응형
PO 변경이력
OBJECTID : PO Number
TCODE : Transaction code
TABNAME : Table name
SELECT a~ebeln
a~ebeln AS objectid
b~ebelp a~bedat b~werks
b~matnr b~matkl b~mtart b~txz01
INTO CORRESPONDING FIELDS OF TABLE gt_po
FROM ekko AS a
INNER JOIN ekpo AS b
ON a~ebeln EQ b~ebeln
WHERE a~ebeln IN s_ebeln
AND a~bstyp EQ c_f
AND a~bsart IN gr_bsart
AND a~loekz EQ space
AND b~loekz EQ space
AND a~bedat IN s_bedat
AND a~ekorg IN s_ekorg
AND a~ekgrp IN s_ekgrp
AND a~lifnr IN s_lifnr
AND b~werks IN s_werks
AND b~mtart IN s_mtart
AND b~matnr IN s_matnr
AND a~aedat NE space.
* 오더의 변경 번호 데이터
* CDHDR Read
CLEAR : gt_cdhdr, gt_cdhdr[].
SELECT objectclas objectid changenr username
udate utime tcode planchngnr act_chngno
was_plannd change_ind langu version
INTO CORRESPONDING FIELDS OF TABLE gt_cdhdr
FROM cdhdr
FOR ALL ENTRIES IN gt_po
WHERE objectclas EQ c_einkbeleg
AND objectid EQ gt_po-objectid
AND change_ind EQ c_u.
IF gt_cdhdr[] IS NOT INITIAL.
SELECT objectclas objectid changenr tabname tabkey
fname chngind text_case unit_old unit_new
cuky_old cuky_new value_new value_old
INTO CORRESPONDING FIELDS OF TABLE gt_cdpos
FROM cdpos
FOR ALL ENTRIES IN gt_cdhdr
WHERE objectclas EQ gt_cdhdr-objectclas
AND objectid EQ gt_cdhdr-objectid
AND changenr EQ gt_cdhdr-changenr
AND tabname IN ('EKPO', 'EKET')
AND chngind EQ c_u.
CLEAR : gt_name, gt_name[].
SELECT a~bname b~name_first b~name_last
INTO CORRESPONDING FIELDS OF TABLE gt_name
FROM usr21 AS a
INNER JOIN adrp AS b
ON a~persnumber EQ b~persnumber
FOR ALL ENTRIES IN gt_cdhdr
WHERE a~bname EQ gt_cdhdr-username.
728x90
반응형
'MM > Purchasing' 카테고리의 다른 글
[MM] 입고시 제조일/생산일 필수값 세팅 IMG (0) | 2024.08.19 |
---|---|
[MM] 외주임가공 TEST 공급업체 재고 업로드 (0) | 2024.08.13 |
비용계정이 아닌 계정의 금액 발생 원인 (0) | 2023.04.02 |
[PO] Create PO (2) | 2022.11.29 |
[PR] PR with source determination (0) | 2022.11.29 |
댓글