Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
subbareddykm
Creator II
Creator II

Incremental Load

Dear all,

can anyone created incremental load on following tables in SAP:

[VBRP]

[VBPA]

[VBKD]


please share any ready made script available with you or logic on the same.


Labels (1)
3 Replies
beck_bakytbek
Master
Master

subbareddykm
Creator II
Creator II
Author

I can not open youtube in office,

But I want incremental,load script for [VBRP], [VBPA], [VBKD].


Help me on this.




sanjay006
Creator
Creator

Hi Subbareddy !

Plz refer the below Script.

We are Refering EKKO For KONV Table incremental and its working fine.

Please refer below code:

Let vStartTime=num(Now());
/**************** Maxdate Start **************/
Temp_date:
LOAD  [Created on_AEDAT] as Date
FROM [$(vTransaction_Qvd)\EKKO.QVD] (qvd);

Max_Table_date:
LOAD Max(Date) as MaxDate;

LOAD FieldValue('Date',IterNo()) as Date
AutoGenerate(1)
While not IsNull(FieldValue('Date',IterNo()));

LET vDateMax = date(num(Peek('MaxDate',0,'Max_Table_date')-2),'YYYYMMDD');

DROP Table Temp_date;
DROP Table Max_Table_date;

/**************** Maximum Date Ends *************/
Let _vstart = 'Where AEDAT >=' & ' ' & Chr(39)& $(vDateMax) & chr(39);
Let _vend = 'AEDAT <=' & ' ' & Chr(39)& $(vToDate) & chr(39);

[KONV]: 
// Conditions (Transaction Data)
Load
[KBETR] as [Amount_KBETR],
[WAERS] as [Currency_WAERS]
[KSCHL] as [Condition type_KSCHL],
[KNUMV] as [Doc. condition_KNUMV],
[ZAEHK] as [Counter_ZAEHK],
[KPOSN] as [Item_KPOSN],
[STUNR] as [Step number_STUNR],
[KWERT] as [Condition value_KWERT],
[KAWRT] as [Condition.base value_KAWRT],
[KPEIN] as [Pricing unit_KPEIN],
[KKURS] as [Cond.exch.rate_KKURS],
[KMEIN] as [Condition unit_KMEIN] ,
[KNUMV] & [KPOSN] & [STUNR] & [ZAEHK]  as %Documentconditionkey;
SQL SUBSELECT KBETR WAERS KSCHL KNUMV KPOSN STUNR ZAEHK KWERT KAWRT KPEIN KKURS KMEIN from KONV
Where KNUMV In (Select KNUMV from EKKO
$(_vstart) and $(_vend));


Concatenate

Load *,
[Doc. condition_KNUMV] & [Item_KPOSN] & [Step number_STUNR] & [Counter_ZAEHK]  as %Documentconditionkey
From [$(vTransaction_Qvd)\KONV.QVD](qvd)
Where Not Exists(%Documentconditionkey,[Doc. condition_KNUMV] & [Item_KPOSN] & [Step number_STUNR] & [Counter_ZAEHK]);

DROP Field %Documentconditionkey;


STORE * FROM [KONV] INTO $(vTransaction_Qvd)\KONV.QVD;
DROP Table [KONV];