<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SAP VBAK / VBAP Extract in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SAP-VBAK-VBAP-Extract/m-p/222921#M75495</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is my issue. I am trying to extract from VBAK all sales documents where AUART = 'ZRRC' or 'ZBPC' and GUEBG &amp;gt;= '20050101'. This extract works fine. The problem is I only want to extract from VBAP where I have a match from VBAK. For some reason it's not returning the correct VBAP records. Here is the script I am using.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Thom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[VBAK]:&lt;BR /&gt;Load&lt;BR /&gt; [VKORG] as [Sales Organization],&lt;BR /&gt; [VTWEG] as [Dist Ch],&lt;BR /&gt; [VBTYP] as [Doc Cat],&lt;BR /&gt; [AUART] as [Sales Document Type],&lt;BR /&gt; [VGBEL] as [Reference document],&lt;BR /&gt; [KURST] as [Exchange Rate Type],&lt;BR /&gt; [VBELN], //as [Sales Document_VBELN],&lt;BR /&gt; [KUNNR] as [Sold To],&lt;BR /&gt; [VKBUR] as [Sales Office],&lt;BR /&gt; [VKGRP] as [Sales Group],&lt;BR /&gt; [ANGDT] as [Quote Valid From],&lt;BR /&gt; [BNDDT] as [Quote Valid To],&lt;BR /&gt; [AUDAT] as [Document Date],&lt;BR /&gt; [TRVOG] as [Trans Grp],&lt;BR /&gt; [AUGRU] as [Order Reason],&lt;BR /&gt; [FAKSK] as [Billing Block],&lt;BR /&gt; [NETWR] as [Contract Net Value],&lt;BR /&gt; [WAERK] as [Doc Curr],&lt;BR /&gt; [GUEBG] as [Valid From Date],&lt;BR /&gt; [GUEEN] as [Valid To Date],&lt;BR /&gt; [KNUMV] as [Doc Cond No.],&lt;BR /&gt; [KALSM] as [Pricing Proceedure],&lt;BR /&gt; [FKARA] as [Order Rel Bill Type],&lt;BR /&gt; [KTEXT] as [Description],&lt;BR /&gt; [BNAME] as [Name_BNAME],&lt;BR /&gt; [TELF1] as [Phone No.],&lt;BR /&gt; [KOSTL] as [Cost Center Hdr],&lt;BR /&gt; [STWAE] as [Statistics Curr],&lt;BR /&gt; [KVGR1] as [Cust Grp1],&lt;BR /&gt; [KVGR2] as [Cust Grp2],&lt;BR /&gt; [KVGR3] as [Cust Grp3],&lt;BR /&gt; [KVGR4] as [Cust Grp4],&lt;BR /&gt; [KVGR5] as [Cust Grp5],&lt;BR /&gt; [KOKRS] as [Controlling Area],&lt;BR /&gt; [PS_PSP_PNR] as [WBS Element],&lt;BR /&gt; [KNKLI] as [Credit Acct],&lt;BR /&gt; [OBJNR] as [Object No. Hdr],&lt;BR /&gt; [TAXK1] as [Alt Tax Class],&lt;BR /&gt; [TAXK2] as [Tax Class2],&lt;BR /&gt; [TAXK3] as [Tax Class3],&lt;BR /&gt; [TAXK4] as [Tax Class4],&lt;BR /&gt; [TAXK5] as [Tax Class5],&lt;BR /&gt; [TAXK6] as [Tax Class6],&lt;BR /&gt; [TAXK7] as [Tax Class7],&lt;BR /&gt; [TAXK8] as [Tax Class8],&lt;BR /&gt; [TAXK9] as [Tax Class9],&lt;BR /&gt; [ZZDT_DOORHANG] as [Door Hanger],&lt;BR /&gt; [ZZDT_POSTCARD] as [Post Card Mailing],&lt;BR /&gt; [ZZDT_MAILED] as [Mailed],&lt;BR /&gt; [ZZDT_FOLLOWUP] as [Follow-Up Date]&lt;BR /&gt;;&lt;BR /&gt;SQL Select * from VBAK where AUART = 'ZRRC' or AUART = 'ZBPC' and GUEBG &amp;gt;= '$(vYear)'&lt;BR /&gt;;&lt;BR /&gt;Store VBAK into QVD\VBAK.QVD&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;[VBAPTEMP]:&lt;BR /&gt;SQL Select *&lt;BR /&gt;FROM VBAP&lt;BR /&gt;WHERE MATNR &amp;lt;&amp;gt; '000000000000000951' and KZWI1 &amp;lt;&amp;gt; 0&lt;BR /&gt; (Select VBELN from VBAK where AUART = 'ZRRC' or AUART = 'ZBPC' and GUEBG &amp;gt;= '$(vYear)')&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[VBAP_Temp]: // Sales Document: Item Data&lt;BR /&gt;Load&lt;BR /&gt; [MATNR] as [Material],&lt;BR /&gt; [SPART] as [Div],&lt;BR /&gt; [KMEIN] as [UOM],&lt;BR /&gt; [MEINS] as [Base UOM],&lt;BR /&gt; [VRKME] as [Sales Unit],&lt;BR /&gt; [VBELV] as [Originating Doc],&lt;BR /&gt; [VGBEL] as [Quote],&lt;BR /&gt; [VGPOS] as [Quote Line],&lt;BR /&gt; [PSTYV] as [Item Category],&lt;BR /&gt; [VBELN],&lt;BR /&gt; [WERKS] as [Plant],&lt;BR /&gt; [NETWR] as [Net Value],&lt;BR /&gt; [WAERK] as [DocCurr],&lt;BR /&gt; [KOSTL] as [Cost Center],&lt;BR /&gt; [PS_PSP_PNR] as [WBS Element Line],&lt;BR /&gt; [POSNR] as [Contract Line],&lt;BR /&gt; [MATKL] as [Material Grp],&lt;BR /&gt; [ABGRU] as [Reject Reason],&lt;BR /&gt; [ZMENG] as [QTY],&lt;BR /&gt; [FAKSP] as [Billing Block Line],&lt;BR /&gt; [TAXM1] as [Tax Class 1],&lt;BR /&gt; [TAXM2] as [Tax Class 2],&lt;BR /&gt; [TAXM3] as [Tax Class 3],&lt;BR /&gt; [TAXM4] as [Tax Class 4],&lt;BR /&gt; [TAXM5] as [Tax Class 5],&lt;BR /&gt; [TAXM6] as [Tax Class 6],&lt;BR /&gt; [TAXM7] as [Tax Class 7],&lt;BR /&gt; [TAXM8] as [Tax Class 8],&lt;BR /&gt; [TAXM9] as [Tax Class 9],&lt;BR /&gt; [KZWI1] as [Subtotal 1],&lt;BR /&gt; [KZWI2] as [Subtotal 2],&lt;BR /&gt; [KZWI3] as [Subtotal 3],&lt;BR /&gt; [KZWI4] as [Subtotal 4],&lt;BR /&gt; [KZWI5] as [Subtotal 5],&lt;BR /&gt; [KZWI6] as [Subtotal 6],&lt;BR /&gt; [STCUR] as [Exchange Rate],&lt;BR /&gt; [PRCTR] as [Profit Center],&lt;BR /&gt; [MVGR1] as [MatGrp1],&lt;BR /&gt; [MVGR2] as [MatGrp2],&lt;BR /&gt; [MVGR3] as [MatGrp3],&lt;BR /&gt; [MVGR4] as [MatGrp4],&lt;BR /&gt; [MVGR5] as [MatGrp5],&lt;BR /&gt; [OBJNR] as [Object No.Item],&lt;BR /&gt; [VKAUS] as [TPLR],&lt;BR /&gt; [FKBER] as [Functional Area]&lt;BR /&gt;RESIDENT VBAPTEMP&lt;BR /&gt; WHERE exists([VBELN], [VBELN])&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;//Drop table VBAP_Temp;&lt;BR /&gt;Drop table VBAPTEMP;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jan 2010 16:23:18 GMT</pubDate>
    <dc:creator>tmumaw</dc:creator>
    <dc:date>2010-01-26T16:23:18Z</dc:date>
    <item>
      <title>SAP VBAK / VBAP Extract</title>
      <link>https://community.qlik.com/t5/QlikView/SAP-VBAK-VBAP-Extract/m-p/222921#M75495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is my issue. I am trying to extract from VBAK all sales documents where AUART = 'ZRRC' or 'ZBPC' and GUEBG &amp;gt;= '20050101'. This extract works fine. The problem is I only want to extract from VBAP where I have a match from VBAK. For some reason it's not returning the correct VBAP records. Here is the script I am using.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Thom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[VBAK]:&lt;BR /&gt;Load&lt;BR /&gt; [VKORG] as [Sales Organization],&lt;BR /&gt; [VTWEG] as [Dist Ch],&lt;BR /&gt; [VBTYP] as [Doc Cat],&lt;BR /&gt; [AUART] as [Sales Document Type],&lt;BR /&gt; [VGBEL] as [Reference document],&lt;BR /&gt; [KURST] as [Exchange Rate Type],&lt;BR /&gt; [VBELN], //as [Sales Document_VBELN],&lt;BR /&gt; [KUNNR] as [Sold To],&lt;BR /&gt; [VKBUR] as [Sales Office],&lt;BR /&gt; [VKGRP] as [Sales Group],&lt;BR /&gt; [ANGDT] as [Quote Valid From],&lt;BR /&gt; [BNDDT] as [Quote Valid To],&lt;BR /&gt; [AUDAT] as [Document Date],&lt;BR /&gt; [TRVOG] as [Trans Grp],&lt;BR /&gt; [AUGRU] as [Order Reason],&lt;BR /&gt; [FAKSK] as [Billing Block],&lt;BR /&gt; [NETWR] as [Contract Net Value],&lt;BR /&gt; [WAERK] as [Doc Curr],&lt;BR /&gt; [GUEBG] as [Valid From Date],&lt;BR /&gt; [GUEEN] as [Valid To Date],&lt;BR /&gt; [KNUMV] as [Doc Cond No.],&lt;BR /&gt; [KALSM] as [Pricing Proceedure],&lt;BR /&gt; [FKARA] as [Order Rel Bill Type],&lt;BR /&gt; [KTEXT] as [Description],&lt;BR /&gt; [BNAME] as [Name_BNAME],&lt;BR /&gt; [TELF1] as [Phone No.],&lt;BR /&gt; [KOSTL] as [Cost Center Hdr],&lt;BR /&gt; [STWAE] as [Statistics Curr],&lt;BR /&gt; [KVGR1] as [Cust Grp1],&lt;BR /&gt; [KVGR2] as [Cust Grp2],&lt;BR /&gt; [KVGR3] as [Cust Grp3],&lt;BR /&gt; [KVGR4] as [Cust Grp4],&lt;BR /&gt; [KVGR5] as [Cust Grp5],&lt;BR /&gt; [KOKRS] as [Controlling Area],&lt;BR /&gt; [PS_PSP_PNR] as [WBS Element],&lt;BR /&gt; [KNKLI] as [Credit Acct],&lt;BR /&gt; [OBJNR] as [Object No. Hdr],&lt;BR /&gt; [TAXK1] as [Alt Tax Class],&lt;BR /&gt; [TAXK2] as [Tax Class2],&lt;BR /&gt; [TAXK3] as [Tax Class3],&lt;BR /&gt; [TAXK4] as [Tax Class4],&lt;BR /&gt; [TAXK5] as [Tax Class5],&lt;BR /&gt; [TAXK6] as [Tax Class6],&lt;BR /&gt; [TAXK7] as [Tax Class7],&lt;BR /&gt; [TAXK8] as [Tax Class8],&lt;BR /&gt; [TAXK9] as [Tax Class9],&lt;BR /&gt; [ZZDT_DOORHANG] as [Door Hanger],&lt;BR /&gt; [ZZDT_POSTCARD] as [Post Card Mailing],&lt;BR /&gt; [ZZDT_MAILED] as [Mailed],&lt;BR /&gt; [ZZDT_FOLLOWUP] as [Follow-Up Date]&lt;BR /&gt;;&lt;BR /&gt;SQL Select * from VBAK where AUART = 'ZRRC' or AUART = 'ZBPC' and GUEBG &amp;gt;= '$(vYear)'&lt;BR /&gt;;&lt;BR /&gt;Store VBAK into QVD\VBAK.QVD&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;[VBAPTEMP]:&lt;BR /&gt;SQL Select *&lt;BR /&gt;FROM VBAP&lt;BR /&gt;WHERE MATNR &amp;lt;&amp;gt; '000000000000000951' and KZWI1 &amp;lt;&amp;gt; 0&lt;BR /&gt; (Select VBELN from VBAK where AUART = 'ZRRC' or AUART = 'ZBPC' and GUEBG &amp;gt;= '$(vYear)')&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[VBAP_Temp]: // Sales Document: Item Data&lt;BR /&gt;Load&lt;BR /&gt; [MATNR] as [Material],&lt;BR /&gt; [SPART] as [Div],&lt;BR /&gt; [KMEIN] as [UOM],&lt;BR /&gt; [MEINS] as [Base UOM],&lt;BR /&gt; [VRKME] as [Sales Unit],&lt;BR /&gt; [VBELV] as [Originating Doc],&lt;BR /&gt; [VGBEL] as [Quote],&lt;BR /&gt; [VGPOS] as [Quote Line],&lt;BR /&gt; [PSTYV] as [Item Category],&lt;BR /&gt; [VBELN],&lt;BR /&gt; [WERKS] as [Plant],&lt;BR /&gt; [NETWR] as [Net Value],&lt;BR /&gt; [WAERK] as [DocCurr],&lt;BR /&gt; [KOSTL] as [Cost Center],&lt;BR /&gt; [PS_PSP_PNR] as [WBS Element Line],&lt;BR /&gt; [POSNR] as [Contract Line],&lt;BR /&gt; [MATKL] as [Material Grp],&lt;BR /&gt; [ABGRU] as [Reject Reason],&lt;BR /&gt; [ZMENG] as [QTY],&lt;BR /&gt; [FAKSP] as [Billing Block Line],&lt;BR /&gt; [TAXM1] as [Tax Class 1],&lt;BR /&gt; [TAXM2] as [Tax Class 2],&lt;BR /&gt; [TAXM3] as [Tax Class 3],&lt;BR /&gt; [TAXM4] as [Tax Class 4],&lt;BR /&gt; [TAXM5] as [Tax Class 5],&lt;BR /&gt; [TAXM6] as [Tax Class 6],&lt;BR /&gt; [TAXM7] as [Tax Class 7],&lt;BR /&gt; [TAXM8] as [Tax Class 8],&lt;BR /&gt; [TAXM9] as [Tax Class 9],&lt;BR /&gt; [KZWI1] as [Subtotal 1],&lt;BR /&gt; [KZWI2] as [Subtotal 2],&lt;BR /&gt; [KZWI3] as [Subtotal 3],&lt;BR /&gt; [KZWI4] as [Subtotal 4],&lt;BR /&gt; [KZWI5] as [Subtotal 5],&lt;BR /&gt; [KZWI6] as [Subtotal 6],&lt;BR /&gt; [STCUR] as [Exchange Rate],&lt;BR /&gt; [PRCTR] as [Profit Center],&lt;BR /&gt; [MVGR1] as [MatGrp1],&lt;BR /&gt; [MVGR2] as [MatGrp2],&lt;BR /&gt; [MVGR3] as [MatGrp3],&lt;BR /&gt; [MVGR4] as [MatGrp4],&lt;BR /&gt; [MVGR5] as [MatGrp5],&lt;BR /&gt; [OBJNR] as [Object No.Item],&lt;BR /&gt; [VKAUS] as [TPLR],&lt;BR /&gt; [FKBER] as [Functional Area]&lt;BR /&gt;RESIDENT VBAPTEMP&lt;BR /&gt; WHERE exists([VBELN], [VBELN])&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;//Drop table VBAP_Temp;&lt;BR /&gt;Drop table VBAPTEMP;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2010 16:23:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SAP-VBAK-VBAP-Extract/m-p/222921#M75495</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2010-01-26T16:23:18Z</dc:date>
    </item>
    <item>
      <title>SAP VBAK / VBAP Extract</title>
      <link>https://community.qlik.com/t5/QlikView/SAP-VBAK-VBAP-Extract/m-p/222922#M75496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved the problem.....Here is my solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[VBAK]:&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;Load&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[VKORG] as [Sales Organization],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[VTWEG] as [Dist Ch],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[VBTYP] as [Doc Cat],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[AUART] as [Sales Document Type],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[VGBEL] as [Reference document],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KURST] as [Exchange Rate Type],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[VBELN], //as [Sales Document_VBELN],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KUNNR] as [Sold To],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[VKBUR] as [Sales Office],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[VKGRP] as [Sales Group],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[ANGDT] as [Quote Valid From],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[BNDDT] as [Quote Valid To],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[AUDAT] as [Document Date],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TRVOG] as [Trans Grp],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[AUGRU] as [Order Reason],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[FAKSK] as [Billing Block],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[NETWR] as [Contract Net Value],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[WAERK] as [Doc Curr],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[GUEBG] as [Valid From Date],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[GUEEN] as [Valid To Date],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KNUMV] as [Doc Cond No.],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KALSM] as [Pricing Proceedure],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[FKARA] as [Order Rel Bill Type],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KTEXT] as [Description],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[BNAME] as [Name_BNAME],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TELF1] as [Phone No.],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KOSTL] as [Cost Center Hdr],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[STWAE] as [Statistics Curr],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KVGR1] as [Cust Grp1],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KVGR2] as [Cust Grp2],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KVGR3] as [Cust Grp3],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KVGR4] as [Cust Grp4],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KVGR5] as [Cust Grp5],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KOKRS] as [Controlling Area],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[PS_PSP_PNR] as [WBS Element],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KNKLI] as [Credit Acct],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[OBJNR] as [Object No. Hdr],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXK1] as [Alt Tax Class],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXK2] as [Tax Class2],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXK3] as [Tax Class3],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXK4] as [Tax Class4],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXK5] as [Tax Class5],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXK6] as [Tax Class6],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXK7] as [Tax Class7],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXK8] as [Tax Class8],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXK9] as [Tax Class9],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[ZZDT_DOORHANG] as [Door Hanger],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[ZZDT_POSTCARD] as [Post Card Mailing],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[ZZDT_MAILED] as [Mailed],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[ZZDT_FOLLOWUP] as [Follow-Up Date]&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;SQL Select * from VBAK where (AUART = 'ZRRC' or AUART = 'ZBPC') and&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;GUEBG &amp;gt;= '$(vYear)' and GUEBG &amp;lt;&amp;gt; ''&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;Store VBAK into QVD\VBAK.QVD&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[VBAPTEMP]:&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;SQL Select *&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;FROM VBAP&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;WHERE MATNR &amp;lt;&amp;gt; '000000000000000951' and KZWI1 &amp;lt;&amp;gt; 0&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;AND VBELN in (Select VBELN from VBAK where (AUART = 'ZRRC' or AUART = 'ZBPC') and&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;GUEBG &amp;gt;= '$(vYear)' AND GUEBG &amp;lt;&amp;gt; '')&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[VBAP_Temp]: // Sales Document: Item Data&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;Load&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[MATNR] as [Material],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[SPART] as [Div],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KMEIN] as [UOM],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[MEINS] as [Base UOM],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[VRKME] as [Sales Unit],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[VBELV] as [Originating Doc],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[VGBEL] as [Quote],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[VGPOS] as [Quote Line],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[PSTYV] as [Item Category],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[VBELN],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[WERKS] as [Plant],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[NETWR] as [Net Value],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[WAERK] as [DocCurr],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KOSTL] as [Cost Center],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[PS_PSP_PNR] as [WBS Element Line],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[POSNR] as [Contract Line],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[MATKL] as [Material Grp],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[ABGRU] as [Reject Reason],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[ZMENG] as [QTY],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[FAKSP] as [Billing Block Line],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXM1] as [Tax Class 1],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXM2] as [Tax Class 2],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXM3] as [Tax Class 3],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXM4] as [Tax Class 4],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXM5] as [Tax Class 5],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXM6] as [Tax Class 6],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXM7] as [Tax Class 7],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXM8] as [Tax Class 8],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[TAXM9] as [Tax Class 9],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KZWI1] as [Subtotal 1],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KZWI2] as [Subtotal 2],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KZWI3] as [Subtotal 3],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KZWI4] as [Subtotal 4],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KZWI5] as [Subtotal 5],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[KZWI6] as [Subtotal 6],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[STCUR] as [Exchange Rate],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[PRCTR] as [Profit Center],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[MVGR1] as [MatGrp1],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[MVGR2] as [MatGrp2],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[MVGR3] as [MatGrp3],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[MVGR4] as [MatGrp4],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[MVGR5] as [MatGrp5],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[OBJNR] as [Object No.Item],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[VKAUS] as [TPLR],&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;[FKBER] as [Functional Area]&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;RESIDENT VBAPTEMP&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;WHERE exists([VBELN], [VBELN])&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;Drop table VBAPTEMP;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;Left join (VBAK)&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;Load *&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;Resident VBAP_Temp;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;"&gt;Drop table VBAP_Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 15:16:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SAP-VBAK-VBAP-Extract/m-p/222922#M75496</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2010-01-27T15:16:18Z</dc:date>
    </item>
  </channel>
</rss>

