Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Master III
Master III

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
Author

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

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
Author

SQL Select VBELN FKDAT from VBRK

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

Not applicable
Author

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
Creator III
Creator III

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
Author

Hi all,

Thanks everybody for your replies.

Got my solution.

Used where subquery after vbrp. And it worked fine.

Thanks ,

S Shrivas