Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

please check script

hi,

I Have this script.

Plz tell me where I am wrong.

let vFromDATE = '20130101';
let vToDATE= '20131231';

[VBRK]:

Load
  
  
   [VBELN] as [Billing Document_VBELN.VBRK],
   [FKDAT] as [Billing date_FKDAT.VBRK];
  
SQL Select VBELN FKDAT from VBRK

WHERE FKDAT >= '$(vFromDATE)'and FKDAT <= '$(vToDATE)'
;

Left join([VBRK])


[VBRP]:   // Billing Document: Item Data
Load

   [VBELN] as [Billing Document_VBELN.VBRK].....
 
SQL Select VBELN from VBRP
;
STORE * FROM [VBRP] INTO F:\...............................\VBRP2013.QVD(qvd);
DROP TABLE [VBRP];

thanks

7 Replies
anbu1984
Not applicable

Re: please check script

SQL Select VBELN , FKDAT from VBRK //Add comma between fields

Is format of FKDAT same like the format of variables vFromDATE and vToDATE ?

Not applicable

Re: please check script

Think the date format is correct, even though the output might have diff format.

Think it might be due to the lack of "space" between the date and "and" as per the bold below

SQL Select VBELN FKDAT from VBRKWHERE FKDAT >= '$(vFromDATE)'and FKDAT <= '$(vToDATE)'

Give it a try.

its_anandrjs
Not applicable

Re: please check script

Hi,

Try this your complete SQL SAP script.

[VBRK]:
Load
[VBELN], //Create this another field for table joining
[VBELN] as [Billing Document_VBELN.VBRK],
[FKDAT] as [Billing date_FKDAT.VBRK];
SQL Select VBELN,FKDAT from VBRK //And you left comma here also
WHERE FKDAT >= '$(vFromDATE)' and FKDAT <= '$(vToDATE)';

Left join([VBRK])

[VBRP]:  
// Billing Document: Item Data
Load
[VBELN], //Create this another field for table joining
[VBELN] as [Billing Document_VBELN.VBRP]; //check this field also i rename here suppose it is from VBRP
SQL Select VBELN from VBRP;
STORE * FROM [VBRP] INTO F:\...............................\VBRP2013.QVD(qvd);
DROP TABLE [VBRP];

Regards

Anand

Not applicable

Re: please check script

SQL Select VBELN FKDAT from VBRK

WHERE FKDAT >= '$(vFromDATE)'and FKDAT <= '$(vToDATE)'

Not applicable

Re: please check script

Hi Shrivas,

in the end of your script you are left joining VBRP to VBRK and then you are storing VBRP table using store command.

once left join is done you will not be able to find the table Named VBRP to Store

check whether it is either VBRK .

Thanks

alkesh_sharma
Not applicable

Re: please check script

Mr. Srivas,

I told you to to use use SQL Join to fetch the data from SAP server.

In which universe, do you use LEFT JOIN(TABLE) in SQL Query???

Read syntax for Joins in SQL and copy paste that statement..

Not applicable

Re: please check script

Hi all,

Thanks everybody for your replies.

Got my solution.

Used where subquery after vbrp. And it worked fine.

Thanks ,

S Shrivas