SAP ehp7 on oracle 12c ,我用dbeaver连接的oracle,直接查数据出来 eg.物料,客户,供应商,凭证号等带有前导0 ,实际外部系统不需要前导0 要处理一下。
select trim(LEADING '0' FROM caufv.aufnr) AS aufnr,trim(LEADING '0' from caufv.PLNBEZ) AS PLNBEZ,caufv.GAMNG,trim(LEADING '0' FROM resb.matnr) AS matnr,
makt.MAKTX ,resb.lgort,mara.labor,resb.BDMNG,T024X.LBTXT
from caufv
join resb on resb.rsnum = caufv.rsnum AND resb.MANDT = caufv.MANDT
join mara on mara.matnr = resb.matnr AND mara.MANDT = resb.MANDT
JOIN makt ON makt.matnr = resb.matnr AND makt.SPRAS = '1' AND makt.MANDT = resb.MANDT
join T024X on t024X.labor = mara.labor AND T024X.SPRAS = '1' AND t024x.MANDT = mara.MANDT
where mara.labor in ('006','007','008','009') AND resb.XLOEK <> 'X' AND caufv.aufnr = '000301961416' AND resb.XLOEK <> 'X'