SELECT * FROM OUT_PR_jiankong WHERE ITEM IN ('000000103040004372','000000103040000788'); --PR 净需求 SELECT * FROM OUT_PR WHERE ITEM IN ('000000103040004372','000000103040000788'); ---加上PR回写逻辑后 SELECT * FROM TEMP_OUT_PR WHERE ITEM IN ('000000103040004372','000000103040000788'); ---加上PR回写逻辑后 SELECT * FROM TP_TEMP_PR WHERE ITEM IN ('000000103040004372','000000103040000788') order by item; ---最终回写去SAP的数据 select out_pr.PO_RELEASE_DATE,out_pr.supplier_id,out_pr.site_id,sap_eord.ekorg,out_pr.proc_group_id,out_pr.item,out_pr.qty,out_pr.qtyuom,substr(loc_id,-4) as LGORT ,'SAPRFC' as ERNAM,out_pr.due_datetime,out_pr.so_id,out_pr.so_lineid,out_pr.sobsl from V_OUT_PR out_pr --其实是select * from tp_temp_pr join sap_eord on out_pr.item = sap_eord.matnr and out_pr.supplier_id = sap_eord.lifnr and out_pr.site_id = sap_eord.werks where out_pr.item IN ('000000103040004372','000000103040000788');
TP_TEMP_PR表与最后的视图表数据显示如下,均没合并
修改如下:FP_PRDUEDATE_GQZQ