Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

BSID - BSAD Delta Logic

Hi All,

Could anyone provide the SAP 'BSAD' table incremental load logic?

Implemented the below logic but with one issue.  if the Document is moved from BSAD to BSID (Open items), it is still there in BSAD.

BSAD:

LOAD 

*

, BUKRS & GJAHR & BELNR & BUZEI as Documentitem;


SELECT * FROM BSAD WHERE AUGBL IN

( SELECT BELNR FROM BSAD WHERE CPUDT >= '$(vLastChangeDate_num)' );

concatenate (BSAD)


LOAD *
from BSAD.qvd (qvd)
where not exists(Documentitem);

11 Replies

Re: BSID - BSAD Delta Logic

Could anyone have a look on this?

sannidhikumar
Contributor

Re: BSID - BSAD Delta Logic

Re: BSID - BSAD Delta Logic

Hi Pradeep,

Thanks. I want the 'BSAD' table delta logic from SAP.

The logic which i have implemented is working fine.

But, the issue here, some of the documents (BELNR) moved from BSAD to BSID in SAP. (Reversal Clearing)

In my qvd, it is still there.

BSID - Open Items

BSAD - Cleared Payment Items.

whenever the  document is completely cleared, those documents are moved to BSAD. If it is open / partially cleared, it will be available in BSID.

Re: BSID - BSAD Delta Logic

Hipcammaertmarcus_sommerstalwar1

Could you please have a look on this? User not able to provide the proper logic to create the Delta.

If you already implemented, Can you provide the hint.

Re: BSID - BSAD Delta Logic

Would you be able to provide some sample data to see how exactly the flow of data is with the events you are pointing out above. It might make it easy to understand with some data to look at

Re: BSID - BSAD Delta Logic

Hi Sunny,

Thanks for looking this. It is really difficult for me to explain. I will try.

This is related to 'Account Receivable' application.

We are pulling the BSAD table  from SAP using the CPUDT (Entered Date) as mentioned in my opening thread.

BSAD contains Partially Paid documents and Fully closed Documents .

But, some of document are deleted from BSAD table in SAP and moved to BSID table (This table contains only Open Items). For example, The data updated into our QVD on last week based on CPUDT. But, today, document removed it from SAP and moved to BSID table.

In our QVD, those documents are still available and doesn't match with SAP.

The business comparing the data from QV and SAP using the transaction FBL5n.

What i was thinking, Load the full documents (Field; BELNR) from BSAD, and using the where exist condition.

Due to huge data, It is taking around 2 hours.

Attached the sample data with actual fields. I thought, if someone implemented for their application, i can use it.

Re: BSID - BSAD Delta Logic

I will check this out and see if I can figure something out... never did it before... but no harm in giving it a shot

Re: BSID - BSAD Delta Logic

So, this all doesn't seem to bad... this is just looking to incrementally delete rows based on deletion of record in the database.... what you need is a unique key to determine which rows where deleted. I couldn't find a unique key, but do you have one? If you do... then you might have to just pull the unique key from the database for all the records (should be faster because it will be a single field) and right join into your table... this will drop all the columns which are not in the database anymore.

Re: BSID - BSAD Delta Logic

Primary key for BSID: AUGBL & AUGDT & BELNR & BUKRS & BUZEI & GJAHR & KUNNR & MANDT & UMSKS & UMSKZ & ZUONR

Primary key for BSAD: AUGBL & AUGDT & BELNR & BUKRS & BUZEI & GJAHR & KUNNR & MANDT & UMSKS & UMSKZ & ZUONR

Indeed, they are identical.

Community Browser