Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
I found the Problem. If the script loads data from SAP database, SAP will Encounter a timeout after 6 hours ish.
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 ...
Hello!
Set "generate Logfile" and check error in log-file.
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
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 *
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
Yes the srcipt failed and stopped at this Point. Here is my script.
Export:
LOAD Material_MATNR
FROM
(
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
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 .
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.
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:
the loop will start here:
it always looks like this, only with other material numbers.