Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

QlikView Script fails

Hello,

my QlikView script  Fails again and again. Here is the Exception:

please help me.

(2015-06-17 05:00:11) Error: The task "QVDGenerator/QVD-Gen-BAPI-LOAD-1.qvw" failed. Exception:

 

(2015-06-17 05:00:11) Error: QDSMain.Exceptions.DistributionFailedException: Distribute failed with errors to follow. ---> QDSMain.Exceptions.ReloadFailedException: Reload failed --->  System.Threading.ThreadAbortException: Thread was being aborted.

 

(2015-06-17 05:00:11) Error:    at System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, UInt32 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)

 

(2015-06-17 05:00:11) Error:    at System.Threading.WaitHandle.InternalWaitOne(SafeHandle waitableSafeHandle, Int64 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)

 

(2015-06-17 05:00:11) Error:    at SolutionGlobal.ThreadPool.ThreadPoolJob.SafeWaitEvent(WaitHandle eventWaitHandle)

 

(2015-06-17 05:00:11) Error:    at QDSMain.ReloadTask.Reload(String fileName, TaskResult taskResult, String sectionAccessUserName, String sectionAccessPassword, eReloadOptions reloadOption, String variableName, String variableValue, Boolean moniterCpuUsage)

 

(2015-06-17 05:00:11) Error:    --- End of inner exception stack trace ---

 

(2015-06-17 05:00:11) Error:    at QDSMain.ReloadTask.Reload(String fileName, TaskResult taskResult, String sectionAccessUserName, String sectionAccessPassword, eReloadOptions reloadOption, String variableName, String variableValue, Boolean moniterCpuUsage)

 

(2015-06-17 05:00:11) Error:    at QDSMain.DistributeTask.Execute(TaskResult currentTaskResult)

 

(2015-06-17 05:00:11) Error:    --- End of inner exception stack trace ---

 

(2015-06-17 05:00:11) Error:    at QDSMain.DistributeTask.Execute(TaskResult currentTaskResult)

 

(2015-06-17 05:00:11) Error:    at QDSMain.Task.AbstractTask.TaskExecution(ILogBucket logBucket, TaskResult taskResult)

 

(2015-06-17 05:00:11) Error: Task failed with exception

 

(2015-06-17 05:00:11) Error: Exception=The currently executing operation was aborted.

 

1 Solution

Accepted Solutions
Not applicable

Re: QlikView Script fails

I found the Problem. If the script loads data from SAP database, SAP will Encounter a timeout after 6 hours ish.

15 Replies
datanibbler
Esteemed Contributor

Re: QlikView Script fails

Hi Matthias,

that is the script from the QMC. That helps little to identify an error unfortunately ...Can you post the last few lines of the document_log? Maybe that gives you a better idea where the error lies ...

pokassov
Valued Contributor

Re: QlikView Script fails

Hello!

Set "generate Logfile" and check error in log-file.

6.png

Re: QlikView Script fails

Hi Matthias,

Can you please provide the actually log file? you can found it in the document folder with a extension of  filename.qvw.log

Not applicable

Re: QlikView Script fails

here are the last rows of my log file.

17.06.2015 05:00:04: 0023    let v_Material = FieldValue('Material_MATNR',11128)

17.06.2015 05:00:04: 0025    30286.1:

17.06.2015 05:00:04: 0026    LOAD *

17.06.2015 05:00:04: 0027    SQL {

17.06.2015 05:00:04: 0028      "function":"MD_STOCK_REQUIREMENTS_LIST_API",

17.06.2015 05:00:04: 0029      "output":"MDPSX",

17.06.2015 05:00:04: 0030      "parameters":

17.06.2015 05:00:04: 0031      [

17.06.2015 05:00:04: 0032        { "direction":"out", "name":"E_CM61M", "optional":false },

17.06.2015 05:00:04: 0033        { "direction":"in", "length":18, "name":"MATNR", "optional":false, "type":"CHAR", "value":"30286.1" },

17.06.2015 05:00:04: 0034        { "direction":"in", "length":3, "name":"PLSCN", "optional":true, "type":"NUM", "value":"000" },

17.06.2015 05:00:04: 0035        { "direction":"in", "length":4, "name":"WERKS", "optional":false, "type":"CHAR", "value":"1000" },

17.06.2015 05:00:04: 0036        { "direction":"tables", "name":"MDPSX", "optional":true }

17.06.2015 05:00:04: 0037      ]

17.06.2015 05:00:04: 0038    }

17.06.2015 05:00:06:          156 fields found: PLAAB, PLANR, DAT00, TAG00, SORT1, SORT2, DELKZ, VSTAT, VRFKZ, PLUMI, MNG01, MNG02, MNG03, MNG04, DAT01, DAT02, DAT03, PERKZ, PRPER, WEBAZ, UKZ01, UMDAT, UMDA2, RDMNG, FIX01, FIX02, BAART, PLART, BESKZ, SOBES, ESOBS, UMSKZ, AUSSL, OLDSL, ABEKZ, WRK01, WRK02, LGORT, CHARG, LSOBS, DELNR, DEL12, DELPS, DELET, VPZUO, ZUVKZ, VERVP, VERSB, AKTAL, RSNUM, SERNR, PALTR, TECHS, REVLV, VERID, STLAN, STALT, STSTA, NFPKZ, KZAUS, NFEAG, NFGRP, NAFKZ, NFMNG, NFMAT, AENNR, DELVR, AUFVR, POSVR, EINVR, BAUGR, KNTTP, KZVBR, SOBKZ, KDAUF, KDPOS, PSPEL, CUOBJ, AUFNR, VERTO, QUNUM, QUPOS, LIFNR, EKORG, EBELN, EBELP, VRTYP, AUTET, BEDAT, ETMEN, GLMNG, FRTHW, AKTFT, BEDID, TRMER, AKTRT, RATID, RATER, AKTGT, GROID, GROER, AUFTM, ARSNR, ARSPS, PRNKZ, KAPFX, PSTTI, PEDTI, RSART, XFEHL, MONKZ, MDFST, VRPLA, PBDNR, KUNNR, KZBWS, MDMNG, WAMNG, EDGNO, TPMNG, EMATN, UMREZ, UMREN, ERFME, ERFMG, PRSCH, LVSCH, DBSKZ, STLTY, STLNR, STLKN, STPOZ, EKGRP, MATKL, PLIFZ, PSTMP, EXTNL, ADINF, STAEX, RESLO, PRIO_URG, PRIO_REQ, MDMAT, MDLOC, MDWRK, MDBER, SRM_CONTRACT_ID, SRM_CONTRACT_ITM, DISUB_SOBKZ, IMWERK, VBELN, ATRKZ, M_MRP, MPNMT, PCMNG, PVGUID, 1 lines fetched

17.06.2015 05:00:06: 0040    store [30286.1] into [Rückstandsliste\MDPSX___30286.1.qvd]

17.06.2015 05:00:06: 0041    drop table 30286.1

17.06.2015 05:00:06: 0043  next

17.06.2015 05:00:06: 0023    let v_Material = FieldValue('Material_MATNR',11129)

17.06.2015 05:00:06: 0025    30287.1:

17.06.2015 05:00:06: 0026    LOAD *

datanibbler
Esteemed Contributor

Re: QlikView Script fails

Hi Matthias,

does the log really stop at this LOAD statement?`That is strange.

I assume that is the problem. Could you post that entire LOAD? There must be something in there that causes QlikView to freeze. I assume you are sure that it's not working anymore (look at the Task_manager)?

Best regards,

DataNibbler

Not applicable

Re: QlikView Script fails

Yes the srcipt failed and stopped at this Point. Here is my script.

Export:
LOAD Material_MATNR
FROM

(
txt, utf8, embedded labels, delimiter is ' ', msq);

for i = 1 to NoOfRows('Export')

let v_Material = FieldValue('Material_MATNR',$(i)) ;

$(v_Material):
LOAD *;
SQL {
"function":"MD_STOCK_REQUIREMENTS_LIST_API",
"output":"MDPSX",
"parameters":
[
{ "direction":"out", "name":"E_CM61M", "optional":false },
{ "direction":"in", "length":18, "name":"MATNR", "optional":false, "type":"CHAR", "value":"$(v_Material)" },
{ "direction":"in", "length":3, "name":"PLSCN", "optional":true, "type":"NUM", "value":"000" },
{ "direction":"in", "length":4, "name":"WERKS", "optional":false, "type":"CHAR", "value":"1000" },
{ "direction":"tables", "name":"MDPSX", "optional":true }
]
};

store [$(v_Material)] into [Rückstandsliste\MDPSX___$(v_Material).qvd];
drop table $(v_Material);
//*****
next

Re: QlikView Script fails

Hi Matthias,

Please attach the entire log file, so that we trace the error.

I feel the SQL is taking a lot of time to process and its getting time out .

pokassov
Valued Contributor

Re: QlikView Script fails

Check your function using another client for values 30287.1

as we can see script is ok and works for previous values of v_Material.

Not applicable

Re: QlikView Script fails

 

I tried it with another user with SAP-All permissions. but the script Fails at the same Point.

 

Here is the start of my log file:

 

  1. 17.06.2015 23:00:04:      Execution started.
    17.06.2015 23:00:04:      QlikView Version:11.20.12354.0
    17.06.2015 23:00:04:      CPU Target x64
    17.06.2015 23:00:04:      Operating System Windows Server 2008 R2 Standard  (64 bit edition)
    17.06.2015 23:00:04:      Wow64 mode Not using Wow64
    17.06.2015 23:00:04:      MDAC Version 6.1.7600.16385
    17.06.2015 23:00:04:      MDAC Full Install Version     6.1.7600.16385
    17.06.2015 23:00:04: PreferredCompression          2
    17.06.2015 23:00:04: EnableParallelReload          1
    17.06.2015 23:00:04: ParallelizeQvdLoads 1
    17.06.2015 23:00:04: AutoSaveAfterReload 0
    17.06.2015 23:00:04: BackupBeforeReload 0
    17.06.2015 23:00:04: EnableFlushLog 0
    17.06.2015 23:00:04:      SaveInfoWhenSavingFile 0
    17.06.2015 23:00:04: UserLogfileCharset 1200
    17.06.2015 23:00:04: OdbcLoginTimeout -1
    17.06.2015 23:00:04: OdbcConnectionTimeout         -1
    17.06.2015 23:00:04:      ScriptWantsDbWrite false
    17.06.2015 23:00:04: ScriptWantsExe false
    17.06.2015 23:00:04:      LogFile CodePage Used:        1200
    17.06.2015 23:00:04:       Reload Executed By CONTA-QLIK\qlik-view
    17.06.2015 23:00:04:       Process Executing: QVB
    17.06.2015 23:00:04:       Process ID: 3632
    17.06.2015 23:00:04: 0002  SET ThousandSep='.'
    17.06.2015 23:00:04: 0003  SET DecimalSep=','
    17.06.2015 23:00:04: 0004  SET MoneyThousandSep='.'
    17.06.2015 23:00:04: 0005  SET MoneyDecimalSep=','
    17.06.2015 23:00:04: 0006  SET MoneyFormat='#.##0,00 €;-#.##0,00 €'
    17.06.2015 23:00:04: 0007  SET TimeFormat='hh:mm:ss'
    17.06.2015 23:00:04: 0008  SET DateFormat='DD.MM.YYYY'
    17.06.2015 23:00:04: 0009  SET TimestampFormat='DD.MM.YYYY hh:mm:ss[.fff]'
    17.06.2015 23:00:04: 0010  SET MonthNames='Jan;Feb;Mrz;Apr;Mai;Jun;Jul;Aug;Sep;Okt;Nov;Dez'
    17.06.2015 23:00:04: 0011  SET DayNames='Mo;Di;Mi;Do;Fr;Sa;So'
    17.06.2015 23:00:04: 0013  CUSTOM CONNECT*Provider*QvSAPBAPIConnector.dll*XUserId*XPassword*

 

the loop will start here:

 

  1. 18.06.2015 05:00:07: 0025    99358.4:
    18.06.2015 05:00:07: 0026    LOAD *
    18.06.2015 05:00:07: 0027    SQL {
    18.06.2015 05:00:07: 0028 "function":"MD_STOCK_REQUIREMENTS_LIST_API",
    18.06.2015 05:00:07: 0029 "output":"MDPSX",
    18.06.2015 05:00:07: 0030      "parameters":
    18.06.2015 05:00:07: 0031      [
    18.06.2015 05:00:07: 0032        { "direction":"out", "name":"E_CM61M", "optional":false },
    18.06.2015 05:00:07: 0033        { "direction":"in", "length":18, "name":"MATNR", "optional":false, "type":"CHAR", "value":"99358.4" },
    18.06.2015 05:00:07: 0034        { "direction":"in", "length":3, "name":"PLSCN", "optional":true, "type":"NUM", "value":"000" },
    18.06.2015 05:00:07: 0035        { "direction":"in", "length":4, "name":"WERKS", "optional":false, "type":"CHAR", "value":"1000" },
    18.06.2015 05:00:07: 0036        { "direction":"tables", "name":"MDPSX", "optional":true }
    18.06.2015 05:00:07: 0037      ]
    18.06.2015 05:00:07: 0038    }
    18.06.2015 05:00:09:          156 fields found: PLAAB, PLANR, DAT00, TAG00, SORT1, SORT2, DELKZ, VSTAT, VRFKZ, PLUMI, MNG01, MNG02, MNG03, MNG04, DAT01, DAT02, DAT03, PERKZ, PRPER, WEBAZ, UKZ01, UMDAT, UMDA2, RDMNG, FIX01, FIX02, BAART, PLART, BESKZ, SOBES, ESOBS, UMSKZ, AUSSL, OLDSL, ABEKZ, WRK01, WRK02, LGORT, CHARG, LSOBS, DELNR, DEL12, DELPS, DELET, VPZUO, ZUVKZ, VERVP, VERSB, AKTAL, RSNUM, SERNR, PALTR, TECHS, REVLV, VERID, STLAN, STALT, STSTA, NFPKZ, KZAUS, NFEAG, NFGRP, NAFKZ, NFMNG, NFMAT, AENNR, DELVR, AUFVR, POSVR, EINVR, BAUGR, KNTTP, KZVBR, SOBKZ, KDAUF, KDPOS, PSPEL, CUOBJ, AUFNR, VERTO, QUNUM, QUPOS, LIFNR, EKORG, EBELN, EBELP, VRTYP, AUTET, BEDAT, ETMEN, GLMNG, FRTHW, AKTFT, BEDID, TRMER, AKTRT, RATID, RATER, AKTGT, GROID, GROER, AUFTM, ARSNR, ARSPS, PRNKZ, KAPFX, PSTTI, PEDTI, RSART, XFEHL, MONKZ, MDFST, VRPLA, PBDNR, KUNNR, KZBWS, MDMNG, WAMNG, EDGNO, TPMNG, EMATN, UMREZ, UMREN, ERFME, ERFMG, PRSCH, LVSCH, DBSKZ, STLTY, STLNR, STLKN, STPOZ, EKGRP, MATKL, PLIFZ, PSTMP, EXTNL, ADINF, STAEX, RESLO, PRIO_URG, PRIO_REQ, MDMAT, MDLOC, MDWRK, MDBER, SRM_CONTRACT_ID, SRM_CONTRACT_ITM, DISUB_SOBKZ, IMWERK, VBELN, ATRKZ, M_MRP, MPNMT, PCMNG, PVGUID, 2 lines fetched
    18.06.2015 05:00:09: 0040    store [99358.4] into [Rückstandsliste\MDPSX___99358.4.qvd]
    18.06.2015 05:00:09: 0041    drop table 99358.4
    18.06.2015 05:00:09: 0043  next
    18.06.2015 05:00:09: 0023    let v_Material = FieldValue('Material_MATNR',10349)
    18.06.2015 05:00:09: 0025    99359.00:
    18.06.2015 05:00:09: 0026    LOAD *

 

it always looks like this, only with other material numbers.

   

 

 

 

Community Browser