Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I would like to load incremental from the BSEG table. BSEG is a cluster table and there is no date field for incremental load. In BKPF table I'm using CPUDT field for incremental load. I get a error when I use the script below (see attachment). Can somebody help me to solve this issue?
[BKPF]: // Accounting Document Header
Load *;
SQL Select BUKRS MANDT GJAHR BELNR BUDAT WAERS MONAT BLART BLDAT CPUDT from BKPF
where CPUDT >= '$(vDateBKPF)';
CONCATENATE
LOAD * FROM [..\..\DATA\RAW\BKPF.QVD](qvd)
where CPUDT < '$(vDateBKPF_ALL)';
store BKPF into ..\..\DATA\RAW\BKPF.qvd (qvd);
//For BSEG load:
[BSEG]: // Accounting Document Segment
Load *;
Select MANDT KOKRS KOSTL BUKRS GJAHR BELNR BUZEI DMBTR UMSKS UMSKZ KOART AUGDT AUGBL ZUONR WRBTR MWSTS WMWST LIFNR KUNNR HKONT GSBER SAKNR SGTXT PRCTR SHKZG from BSEG
WHERE BELNR = ( SELECT BELNR FROM BKPF WHERE CPUDT >= '$(vDateBKPF)' );
CONCATENATE
LOAD * FROM [..\..\DATA\RAW\BSEG_ALL.QVD] (qvd);
store BSEG into ..\..\DATA\RAW\BSEG_ALL.qvd (qvd);
DROP TABLE [BKPF];
HIIII
BKPF: // Accounting Document Header
Load *;
SQL Select BUKRS MANDT GJAHR BELNR BUDAT WAERS MONAT BLART BLDAT CPUDT from BKPF
where CPUDT >= '$(vDateBKPF)';
JOIN(BKPF)
LOAD * FROM [..\..\DATA\RAW\BKPF.QVD](qvd)
where CPUDT < '$(vDateBKPF_ALL)';
store BKPF into ..\..\DATA\RAW\BKPF.qvd (qvd);
//For BSEG load:
BSEG: // Accounting Document Segment
CONCATENATE
Load *;
Select MANDT KOKRS KOSTL BUKRS GJAHR BELNR BUZEI DMBTR UMSKS UMSKZ KOART AUGDT AUGBL ZUONR WRBTR MWSTS WMWST LIFNR KUNNR HKONT GSBER SAKNR SGTXT PRCTR SHKZG from BSEG;
LOAD * RESIDENT BKPF
WHERE CPUDT >= '$(vDateBKPF)' );
JOIN(BSEG)
LOAD * FROM [..\..\DATA\RAW\BSEG_ALL.QVD] (qvd);
store BSEG into ..\..\DATA\RAW\BSEG_ALL.qvd (qvd);
DROP TABLE [BKPF];
Hi,
Thanks for your reply. Is this script a full reload or incremental load of BSEG?