Qlik Community

QlikView Connectors

villafuerte
Contributor

Loading BSEG and BKPF

Hi,

I'm trying to get faster extractions from SAP. In this case I'm loading BKPF (header) and BSEG (lines). I have some filters for BKPF in the WHERE clause, so I only get around 20% of the total number of records. After that, I only want to load the lines that correspond to the loaded headers.

With QlikView syntax I'd use the EXIST function, something like this:

      WHERE Exists([Document Number_BELNR]);

But I want to filter directly on the extraction from SAP so I don't get all the records in my QVDs, but only the 20% that I really need. Any suggestions???

1 Solution

Accepted Solutions
suniljain
Honored Contributor

Loading BSEG and BKPF

pls use sub squery in

   where belnr = (Select Belnr from BSEG where  ...........)

9 Replies
suniljain
Honored Contributor

Loading BSEG and BKPF

pls use sub squery in

   where belnr = (Select Belnr from BSEG where  ...........)

Not applicable

Loading BSEG and BKPF

Hi,

another solution is to use/create a view in SAP which have all the fields you need of both tables.

Regards,

Jonathan

suniljain
Honored Contributor

Loading BSEG and BKPF

Agree with Jonathan

Not applicable

Loading BSEG and BKPF

pls use sub squery in

   where belnr = (Select Belnr from BSEG where  ...........)

NOT WORKING....

suniljain
Honored Contributor

Loading BSEG and BKPF

Dear Nandkishor,

             Can You Post Error details ?.

Not applicable

Re: Loading BSEG and BKPF

I am getting only Script Error on Reload.

Where Can I find the Details Error?

And after Searching on Web I found that BSEG table is Cluster Table and We can use this table in join and Subquery

pablolabbe
Valued Contributor II

Re: Loading BSEG and BKPF

Nandkishor,

   You can´t do joins or use subquerys with BSEG, because it´s a CLUSTER Table.

   The solution is to create a loop like this :   for each range of 200 document numbers in BKF table (already loaded in memory) do SELECT  <fields> from  BSEG where <document number field> = 0001 or <document number field> = 0002 and <document number field> = 0003 and <year field> = 2011.

   Sorry but I can´t share the script code implement because I don´t have it. It´s on customer site.

suniljain
Honored Contributor

Loading BSEG and BKPF

I alredy raised issue of delta extraction from cluster table .

As per the information that i got is

you can not extract cluster table by taking reference of any other table in sub query.

but As you know every problem have solution.

you can extract delta based on billing document, year and company code code.

Not applicable

Loading BSEG and BKPF

Hi Sunil,

Can you please post the script for the same.

Community Browser