Qlik Community

QlikView Connectors

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

How to load incremental data from BSEG and BKPF table

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];

2 Replies
er_mohit
Honored Contributor II

Re: How to load incremental data from BSEG and BKPF table

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];

Not applicable

Re: How to load incremental data from BSEG and BKPF table

Hi,

Thanks for your reply. Is this script a full reload or incremental load of BSEG?

Community Browser