11 Replies Latest reply: Feb 22, 2017 11:21 AM by swarnendu haldar RSS

    Script Error in Load time

    swarnendu haldar

      Hello ,

      Please help me..

      I have a problem in client site when i fetching the data from sap then i have got a error which show me

      scripting error

       

      SQL Select MANDT KNUMA VKORG VTWEG SPART VBELN ERNAM ERZET ERDAT AEDAT VBTYP AUART AUFNR KUNNR TELF1 VGBEL KURST BSTNK VKBUR VKGRP BSTDK STWAE STAFO ANGDT BNDDT AUDAT TRVOG AUGRU GWLDT SUBMI LIFSK FAKSK NETWR WAERK GSBER GSKST GUEBG GUEEN KNUMV VDATU VPRGR AUTLF VBKLA VBKLT KALSM VSBED FKARA AWAHR KTEXT BSARK BSTZD IHREZ BNAME MAHZA MAHDT KOSTL KVGR1 KVGR2 KVGR3 KVGR4 KVGR5 KOKRS PS_PSP_PNR KKBER KNKLI GRUPP SBGRP CTLPC CMWAE CMFRE CMNUP CMNGV AMTBL HITYP_PR ABRVW ABDIS OBJNR BUKRS_VF TAXK1 TAXK2 TAXK3 TAXK4 TAXK5 TAXK6 TAXK7 TAXK8 TAXK9 XBLNR ZUONR VGTYP KALSM_CH AGRZR QMNUM VBELN_GRP SCHEME_GRP ABRUF_PART ABHOD ABHOV ABHOB RPLNR VZEIT STCEG_L LANDTX XEGDR ENQUEUE_GRP DAT_FZAU FMBDAT VSNMR_V EQUNR HANDLE TPLNR CONT_DG STAGE PROLI CRM_GUID PHASE MTLAUR SWENR MULTI SMENR KALCD LOGSYSB HB_CONT_REASON HB_EXPDATE HB_RESDATE ZAPPL_CARD ZZEQTYP ZZEQCODE ZZEQSIZE ZZAUART ZZSUPTYP ZZINQTYP ZZOFFERTYP ZZSTATUS ZZCHANNEL ZZORDEXP ZZORDREV ZZOFFDUE ZZTOTWT ZZOFFPRICE ZZWAERS1 ZZDMBTR ZZKURSF ZZCPNAME ZZCPPRICE ZZWAERS2 ZZCOST ZZREASON ZZFACTOR ZZBSTNK ZZDRST ZZDRDT ZZDRRL  from VBAK

      can any one please help me.....

        • Re: Script Error in Load time
          Aar Kay

          Try this

          SQL Select * from VBAK;

          • Re: Script Error in Load time
            Marcus Sommer

            I think your sql-statement is missing the comma as delimiter for the fields - I mean something like:

             

            SQL Select MANDT, KNUMA, ...

             

            - Marcus

              • Re: Script Error in Load time
                swarnendu haldar

                Marcus Thanks For Your Reply ,

                I Try your solution But its not correct cause if this is the problem than why other tables fetch the appropriate data?

                If u have any other solution please told me ..

                Thanks and regards Swarnendu Haldar

                  • Re: Script Error in Load time
                    Marcus Sommer

                    By the most databases the comma is the delimiter for the fields - but I don't know how SAP respectively your used connector it handled. Maybe you could here: SAP or here: QlikView Connector for SAP find more informations and/or asking a new question there with more details - used releases, connectors, whole script-statement and so on.

                     

                    On the other hand you could try to reduce possible errors by approaches like loading only field and/or using a rather restricting where-clause to find out if the query itself worked.

                     

                    - Marcus

                      • Re: Script Error in Load time
                        swarnendu haldar

                        I cant understand why this problem occure i will share my code if u can than solve it

                         

                        VBAK:   // Sales Document: Header Data

                        Load

                           //MANDT & VBELN AS %KEY_VBAK_MANDT_VBELN,

                        //Key Fields:

                               VKORG &'/'& VTWEG &'/'& SPART as [%SalesArea_Key],   

                               VBELN as [%SalesDocument_Key],   

                               KUNNR as [%Customer_Key],

                               KNUMV,

                               1 as [Sales Order Counter],

                        //Renamed Fields:          

                           [MANDT] as [Client_MANDT],

                           [KNUMA] as [Agreement_KNUMA],

                           [VKORG] as [Sales Organization_VKORG],

                           [VTWEG] as [Distribution Channel_VTWEG],

                           [SPART] as [Division_SPART],

                           [ERNAM] as [Created by_ERNAM],

                           [ERNAM] as [Created By],                                    //Orginal

                           [ERZET] as [Time_ERZET],

                           [ERDAT] as [Created on_ERDAT],

                           [ERDAT] as [Created On],                                    //Orginal

                           [AEDAT] as [Changed on_AEDAT],

                           [AEDAT] as [Changed on],                                 //Orginal

                           [VBTYP] as [SD document categ._VBTYP],

                           [AUART] as [Sales Document Type_AUART],

                           [AUART] as [Sales Document Type],                            //Orginal

                           [VGBEL] as [Reference document_VGBEL],

                           [KURST] as [Exchange Rate Type_KURST],

                           [VBELN] as [Sales Document_VBELN],

                           [VBELN] as [Order Number],                                //Orginal   

                           [KUNNR] as [Sold-to party_KUNNR],

                           [KUNNR] as [Customer Number],                               //Orginal

                           [BSTNK] as [Purchase order no._BSTNK],

                           [VKBUR] as [Sales Office_VKBUR],

                           [VKGRP] as [Sales Group_VKGRP],

                           [BSTDK] as [Purchase order date_BSTDK],

                           [AUFNR] as [Order_AUFNR],

                           [STAFO] as [Update group (stats)_STAFO],

                           [STAFO] as [Update_group],                                    //Orginal

                           [ANGDT] as [Quotation valid from_ANGDT],

                           [BNDDT] as [Quotation valid to_BNDDT],

                           [AUDAT] as [Document Date_AUDAT],                             //    Transaction Date

                           [AUDAT] as [Document Date],                                    //Orginal

                           [TRVOG] as [Transaction group_TRVOG],

                           [AUGRU] as [Order reason_AUGRU],

                           [AUGRU] as [Order Reason],                                    //Orginal

                           [GWLDT] as [Guarantee_GWLDT],

                           [SUBMI] as [Collective number_SUBMI],

                           [LIFSK] as [Delivery block_LIFSK],

                           [FAKSK] as [Billing block_FAKSK],

                           [NETWR] as [Net value_NETWR],

                           [NETWR] as [Net Sales Order Value],                            //Orginal

                           [WAERK] as [Document Currency_WAERK],

                           [WAERK] as [Document Currency],                                //Orginal

                           [GSBER] as [Business Area_GSBER],

                           [GSKST] as [Business area_GSKST],

                           [GUEBG] as [Valid-from date_GUEBG],

                           [GUEEN] as [Valid-to date_GUEEN],

                           [KNUMV] as [Doc. condition no._KNUMV],

                           [VDATU] as [Requested deliv.date_VDATU],

                           [VPRGR] as [Prop.date type_VPRGR],

                           [AUTLF] as [Complete delivery_AUTLF],

                           [VBKLA] as [Original system_VBKLA],

                           [VBKLT] as [Indicator_VBKLT],

                           [KALSM] as [Pricing procedure_KALSM],

                           [VSBED] as [Shipping Conditions_VSBED],

                           [FKARA] as [Order-rel.bill.type_FKARA],

                           [AWAHR] as [Probability_AWAHR],

                           [KTEXT] as [Description_KTEXT],

                           [KTEXT] as [Description],                                        //Orginal

                           [BSARK] as [Purchase order type_BSARK],

                           [BSTZD] as [Supplement_BSTZD],

                           [IHREZ] as [Your Reference_IHREZ],

                           [BNAME] as [Name_BNAME],

                           [TELF1] as [Telephone_TELF1],

                           [MAHZA] as [Number of contacts_MAHZA],

                           [MAHDT] as [Last contact date_MAHDT],

                           [KOSTL] as [Cost Center_KOSTL],

                           [STWAE] as [Statistics currency_STWAE],

                           [KVGR1] as [Customer group 1_KVGR1],

                           [KVGR2] as [Customer group 2_KVGR2],

                           [KVGR3] as [Customer group 3_KVGR3],

                           [KVGR4] as [Customer group 4_KVGR4],

                           [KVGR5] as [Customer group 5_KVGR5],

                           [KOKRS] as [Controlling Area_KOKRS],

                           [PS_PSP_PNR] as [WBS Element_PS_PSP_PNR],

                           [KKBER] as [Credit control area_KKBER],

                           [KNKLI] as [Credit account_KNKLI],

                           [GRUPP] as [Cust.cred.group_GRUPP],

                           [SBGRP] as [Credit rep.group_SBGRP],

                           [CTLPC] as [Risk category_CTLPC],

                           [CMWAE] as [Currency_CMWAE],

                           [CMFRE] as [Release date_CMFRE],

                           [CMNUP] as [Next check_CMNUP],

                           [CMNGV] as [Next date_CMNGV],

                           [AMTBL] as [Rel. credit value_AMTBL],

                           [HITYP_PR] as [HierarchyTypePricing_HITYP_PR],

                           [ABRVW] as [Usage_ABRVW],

                           [ABDIS] as [MRP for DlvSchType_ABDIS],

                           [OBJNR] as [Object no.header_OBJNR],

                           [BUKRS_VF] as [CCode to be billed_BUKRS_VF],

                           [TAXK1] as [Alt.tax classific._TAXK1],

                           [TAXK2] as [TaxClass2-Cust._TAXK2],

                           [TAXK3] as [TaxClass3-Cust._TAXK3],

                           [TAXK4] as [TaxClass4-Cust._TAXK4],

                           [TAXK5] as [TaxClass5-Cust._TAXK5],

                           [TAXK6] as [TaxClass6-Cust._TAXK6],

                           [TAXK7] as [TaxClass7-Cust._TAXK7],

                           [TAXK8] as [TaxClass8-Cust._TAXK8],

                           [TAXK9] as [TaxClass9-Cust._TAXK9],

                           [XBLNR] as [Reference_XBLNR],

                           [ZUONR] as [Assignment_ZUONR],

                           [VGTYP] as [Preceding doc.categ._VGTYP],

                           [KALSM_CH] as [Search procedure_KALSM_CH],

                           [AGRZR] as [Accrual period_AGRZR],

                           [QMNUM] as [Notification_QMNUM],

                           [VBELN_GRP] as [Master contract_VBELN_GRP],

                           [SCHEME_GRP] as [Group Ref. Procedure_SCHEME_GRP],

                           [ABRUF_PART] as [Check partner auth._ABRUF_PART],

                           [ABHOD] as [Pick up date_ABHOD],

                           [ABHOV] as [Pick up time_ABHOV],

                           [ABHOB] as [Pick up time_ABHOB],

                           [RPLNR] as [Paym.card plan no._RPLNR],

                           [VZEIT] as [Requested dely time_VZEIT],

                           [STCEG_L] as [Tax dest. country_STCEG_L],

                           [LANDTX] as [Tax depart. country_LANDTX],

                           [XEGDR] as [EU triangular deal_XEGDR],

                           [ENQUEUE_GRP] as [_ENQUEUE_GRP],

                           [DAT_FZAU] as [CmlQtyDate_DAT_FZAU],

                           [FMBDAT] as [Material Avail. Date_FMBDAT],

                           [VSNMR_V] as [Version_VSNMR_V],

                           [EQUNR] as [Equipment_EQUNR],

                           [TPLNR] as [Functional Location_TPLNR],

                           [CONT_DG] as [Contains DG_CONT_DG],

                           [PROLI] as [DG mgmt profile_PROLI],

                           [MTLAUR] as [Target Incom_MTLAUR],

                           [PHASE] as [Sales Phase_PHASE],

                           [HANDLE] as [Int.ID_HANDLE],

                           [KALCD] as [Proc. Camp.Determin._KALCD],

                           [LOGSYSB] as [Logical system_LOGSYSB],

                           [CRM_GUID] as [Char 70_CRM_GUID],

                           [SWENR] as [Business entity_SWENR],

                           [SMENR] as [Unit  Number_SMENR],

                           [STAGE] as [Construction stage_STAGE],

                           [HB_CONT_REASON] as [Contingency reason_HB_CONT_REASON],

                           [HB_EXPDATE] as [Expiration date_HB_EXPDATE],

                           [HB_RESDATE] as [Resolution date_HB_RESDATE],

                           [MULTI] as [Multiple Promotions_MULTI],

                           [ZAPPL_CARD] as [application card no._ZAPPL_CARD],

                           [ZZEQTYP] as [Equipment Type_ZZEQTYP],

                           [ZZEQCODE] as [Equipment Code_ZZEQCODE],

                           [ZZEQSIZE] as [Equipment Size_ZZEQSIZE],

                           [ZZAUART] as [Sales Document Type_ZZAUART],

                           [ZZSUPTYP] as [Supply Type_ZZSUPTYP],

                           [ZZINQTYP] as [Inquiry Type_ZZINQTYP],

                           [ZZOFFERTYP] as [Offer Type_ZZOFFERTYP],

                           [ZZSTATUS] as [Status_ZZSTATUS],

                           [ZZCHANNEL] as [Channel_ZZCHANNEL],

                           [ZZORDEXP] as [Order Expected By_ZZORDEXP],

                           [ZZORDREV] as [Last Reviewed on_ZZORDREV],

                           [ZZOFFDUE] as [Offer Due Date_ZZOFFDUE],

                           [ZZTOTWT] as [Total Weight_ZZTOTWT],

                           [ZZOFFPRICE] as [Offer Price_ZZOFFPRICE],

                           [ZZWAERS1] as [Currency 1_ZZWAERS1],

                           [ZZDMBTR] as [Amount in LC_ZZDMBTR],

                           [ZZKURSF] as [Exchange rate_ZZKURSF],

                           [ZZCPNAME] as [Lost Competitor Name_ZZCPNAME],

                           [ZZCPPRICE] as [Lost Comp Price_ZZCPPRICE],

                           [ZZWAERS2] as [Currency 2_ZZWAERS2],

                           [ZZCOST] as [Cost_ZZCOST],

                           [ZZREASON] as [Reason Code_ZZREASON],

                           [ZZFACTOR] as [Factor_ZZFACTOR],

                           [ZZBSTNK] as [Purchase order no._ZZBSTNK],

                           [ZZDRST] as [Drawing status_ZZDRST],

                           [ZZDRDT] as [Drawing release date_ZZDRDT],

                           [ZZDRRL] as [Drawing Released by_ZZDRRL];

                        SQL Select MANDT KNUMA VKORG VTWEG SPART VBELN ERNAM ERZET ERDAT AEDAT VBTYP AUART AUFNR KUNNR TELF1 VGBEL KURST BSTNK VKBUR VKGRP BSTDK STWAE STAFO ANGDT BNDDT AUDAT TRVOG AUGRU GWLDT SUBMI LIFSK FAKSK NETWR WAERK GSBER GSKST GUEBG GUEEN KNUMV VDATU VPRGR AUTLF VBKLA VBKLT KALSM VSBED FKARA AWAHR KTEXT BSARK BSTZD IHREZ BNAME MAHZA MAHDT KOSTL KVGR1 KVGR2 KVGR3 KVGR4 KVGR5 KOKRS PS_PSP_PNR KKBER KNKLI GRUPP SBGRP CTLPC CMWAE CMFRE CMNUP CMNGV AMTBL HITYP_PR ABRVW ABDIS OBJNR BUKRS_VF TAXK1 TAXK2 TAXK3 TAXK4 TAXK5 TAXK6 TAXK7 TAXK8 TAXK9 XBLNR ZUONR VGTYP KALSM_CH AGRZR QMNUM VBELN_GRP SCHEME_GRP ABRUF_PART ABHOD ABHOV ABHOB RPLNR VZEIT STCEG_L LANDTX XEGDR ENQUEUE_GRP DAT_FZAU FMBDAT VSNMR_V EQUNR HANDLE TPLNR CONT_DG STAGE PROLI CRM_GUID PHASE MTLAUR SWENR MULTI SMENR KALCD LOGSYSB HB_CONT_REASON HB_EXPDATE HB_RESDATE ZAPPL_CARD ZZEQTYP ZZEQCODE ZZEQSIZE ZZAUART ZZSUPTYP ZZINQTYP ZZOFFERTYP ZZSTATUS ZZCHANNEL ZZORDEXP ZZORDREV ZZOFFDUE ZZTOTWT ZZOFFPRICE ZZWAERS1 ZZDMBTR ZZKURSF ZZCPNAME ZZCPPRICE ZZWAERS2 ZZCOST ZZREASON ZZFACTOR ZZBSTNK ZZDRST ZZDRDT ZZDRRL  from VBAK;

                        STORE VBAK into $(VPath)VBAK_SalesDocument_Header.qvd;

                        DROP TABLE VBAK;