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.
Try to load less data and then see if it works.
Hi Matthias,
The issue is when it is going through the loop , whenever it finds a null value for the v_Material its not able to assign the table name i.e if v_Material=null()
then table will be like
null():
Load *
In Qlikview we cannot have a table name as blank and it will not allow you to load the data, that's why it getting failed at this LOAD * statement, so please check for the condition whether v_Material is null or not, if its null assign the table name with some other value it will surely work.
try like if($(v_Material)=null() or len($(v_Material))<=0,Null_Table)
so you final script would be:
Export:
LOAD Material_MATNR
FROM
(
for i = 1 to NoOfRows('Export')
let v_Material = FieldValue('Material_MATNR',$(i)) ;
if($(v_Material)=null() or len($(v_Material)<=0,'Null_Table',$(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
no thats not the Problem. As you can see in both log files above, there are the values for the material table:
18.06.2015 05:00:09: 0025 99359.00:
18.06.2015 05:00:09: 0026 LOAD *
AND
17.06.2015 05:00:06: 0025 30287.1:
17.06.2015 05:00:06: 0026 LOAD *
can you please share the QVD and QVW file ? so that we can have a cross check
I suggest that you enclose the table name in [ ]:
let v_Material = FieldValue('Material_MATNR',$(i)) ;
[$(v_Material)]:
LOAD *;
SQL {
But I suspect that the problem is the SQL taking too long. Have you tested the SQL in another tool (eg Toad)?
I found the Problem. If the script loads data from SAP database, SAP will Encounter a timeout after 6 hours ish.