Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi. I'm trying to extract data from SAP using BAPI_MATERIAL_STOCK_REQ_LIST". It results in a message instead of a table structure with the data. I've verified the BAPI is working fine usind SAP Gui and the same user. Connection is ok. I used the Qlikview script wizard. So I'm sure the script is ok. Did some of you experience the same problem? Thanks in advance for your support.
[BAPI_MATERIAL_STOCK_REQ_LIST_RETURN.ID]:
LOAD *;
SQL {
"function":"BAPI_MATERIAL_STOCK_REQ_LIST",
"output":"MRP_STOCK_DETAIL",
"parameters":
[
{ "direction":"out", "name":"MRP_CONTROL_PARAM", "optional":false },
{ "direction":"out", "name":"MRP_LIST", "optional":false },
{ "direction":"out", "name":"MRP_STOCK_DETAIL", "optional":false },
{ "direction":"out", "name":"RETURN", "optional":false },
{ "direction":"in", "length":8, "name":"DISPLAY_FILTER", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":1, "name":"GET_IND_LINES", "optional":true, "type":"CHAR", "value":"X" },
{ "direction":"in", "length":1, "name":"GET_ITEM_DETAILS", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":1, "name":"GET_TOTAL_LINES", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":1, "name":"IGNORE_BUFFER", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":18, "name":"MATERIAL", "optional":false, "type":"CHAR", "value":"000000000012000021" },
{ "direction":"in", "name":"MATERIAL_EVG", "optional":true },
{ "direction":"in", "length":10, "name":"MRP_AREA", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":1, "name":"PERIOD_INDICATOR", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":4, "name":"PLANT", "optional":true, "type":"CHAR", "value":"D190" },
{ "direction":"in", "length":3, "name":"PLAN_SCENARIO", "optional":true, "type":"NUM", "value":"000" },
{ "direction":"in", "length":8, "name":"SELECTION_RULE", "optional":true, "type":"CHAR", "value":" " }
]
};

Hi Hans,
Can you attach a log file that shows the issue?
(The log file can be found in: C:\ProgramData\QlikTech\Custom Data\QvSAPConnector\Log, for the QvSAPBAPIConnector)
Thanks,
Tomas
Thank you Tomas.
Here the script:
SET ThousandSep='.';
SET DecimalSep=',';
SET MoneyThousandSep='.';
SET MoneyDecimalSep=',';
SET MoneyFormat='$ #.##0,00;-$ #.##0,00';
SET TimeFormat='h:mm:ss';
SET DateFormat='DD-MM-YYYY';
SET TimestampFormat='DD-MM-YYYY h:mm:ss[.fff]';
SET MonthNames='ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic';
SET DayNames='lun;mar;mié;jue;vie;sáb;dom';
CUSTOM CONNECT TO "Provider=QvSAPBAPIConnector.dll;ASHOST=64.23.33.17;SYSNR=20;CLIENT=200;XUserId=QTDCXIRJJaSKUSB;XPassword=LTZCbBdJQaYeGYBGQZISC;";
:
LOAD *;
SQL {
"function":"BAPI_MATERIAL_STOCK_REQ_LIST",
"output":"MRP_STOCK_DETAIL",
"parameters":
[
{ "direction":"out", "name":"MRP_CONTROL_PARAM", "optional":false },
{ "direction":"out", "name":"MRP_LIST", "optional":false },
{ "direction":"out", "name":"MRP_STOCK_DETAIL", "optional":false },
{ "direction":"out", "name":"RETURN", "optional":false },
{ "direction":"in", "length":8, "name":"DISPLAY_FILTER", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":1, "name":"GET_IND_LINES", "optional":true, "type":"CHAR", "value":"X" },
{ "direction":"in", "length":1, "name":"GET_ITEM_DETAILS", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":1, "name":"GET_TOTAL_LINES", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":1, "name":"IGNORE_BUFFER", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":18, "name":"MATERIAL", "optional":false, "type":"CHAR", "value":"000000000012000021" },
{ "direction":"in", "name":"MATERIAL_EVG", "optional":true },
{ "direction":"in", "length":10, "name":"MRP_AREA", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":1, "name":"PERIOD_INDICATOR", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":4, "name":"PLANT", "optional":true, "type":"CHAR", "value":"D190" },
{ "direction":"in", "length":3, "name":"PLAN_SCENARIO", "optional":true, "type":"NUM", "value":"000" },
{ "direction":"in", "length":8, "name":"SELECTION_RULE", "optional":true, "type":"CHAR", "value":" " }
]
};
exit script;
And the log file text:
2015-05-26 08:04:07 Progress Connected to SAP with C:\Program Files\Common Files\QlikTech\Custom Data\QvSAPConnector\QvSAPBAPIConnector.dll 5.80 SR3, 2107
2015-05-26 08:04:07 Progress Log: 1
2015-05-26 08:04:07 Progress Logpath:
2015-05-26 08:04:07 Progress LogFile: QvSAPBAPIConnector
2015-05-26 08:04:07 Progress Creation of function /QTQVC/CHECK_RELEASE returned after 00:00:00
2015-05-26 08:04:07 Progress SAP Transport information: version: E66K900035; date: 20141212; time: 120708; SAP basis: 740;
2015-05-26 08:04:07 Progress Connected
2015-05-26 08:04:07 Progress Function called with statement: {
"function":"BAPI_MATERIAL_STOCK_REQ_LIST",
"output":"MRP_STOCK_DETAIL",
"parameters":
[
{ "direction":"out", "name":"MRP_CONTROL_PARAM", "optional":false },
{ "direction":"out", "name":"MRP_LIST", "optional":false },
{ "direction":"out", "name":"MRP_STOCK_DETAIL", "optional":false },
{ "direction":"out", "name":"RETURN", "optional":false },
{ "direction":"in", "length":8, "name":"DISPLAY_FILTER", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":1, "name":"GET_IND_LINES", "optional":true, "type":"CHAR", "value":"X" },
{ "direction":"in", "length":1, "name":"GET_ITEM_DETAILS", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":1, "name":"GET_TOTAL_LINES", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":1, "name":"IGNORE_BUFFER", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":18, "name":"MATERIAL", "optional":false, "type":"CHAR", "value":"000000000012000021" },
{ "direction":"in", "name":"MATERIAL_EVG", "optional":true },
{ "direction":"in", "length":10, "name":"MRP_AREA", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":1, "name":"PERIOD_INDICATOR", "optional":true, "type":"CHAR", "value":" " },
{ "direction":"in", "length":4, "name":"PLANT", "optional":true, "type":"CHAR", "value":"D190" },
{ "direction":"in", "length":3, "name":"PLAN_SCENARIO", "optional":true, "type":"NUM", "value":"000" },
{ "direction":"in", "length":8, "name":"SELECTION_RULE", "optional":true, "type":"CHAR", "value":" " }
]
}
2015-05-26 08:04:07 Progress Creation of function RFC_GET_FUNCTION_INTERFACE returned after 00:00:00
2015-05-26 08:04:07 Progress Creation of function BAPI_MATERIAL_STOCK_REQ_LIST returned after 00:00:00
2015-05-26 08:04:09 Progress Function called successfully.
2015-05-26 08:04:09 Error Returned: TYPE='S', ID='MD', NUMBER='053', MESSAGE='Se ha estructurado lista necesidades/stocks p.material 000000000012000021 D190', MESSAGE_V1='000000000012000021', MESSAGE_V2='D190', SYSTEM='COQCLNT200'
2015-05-26 08:04:09 Progress Creation of function /QTQVC/UPDATE_STATUS returned after 00:00:00
2015-05-26 08:04:09 Progress Function called successfully.
2015-05-26 08:04:12 Progress Disconnected
Regards
Hans Schröder E.
De: Tomas Sommergyll
Enviado el: martes, 26 de mayo de 2015 2:43
Para: Hans Schroder
Asunto: Re: - BAPI_MATERIAL_STOCK_REQ_LIST
<https://community.qlik.com/?et=watches.email.thread> Qlik Community
BAPI_MATERIAL_STOCK_REQ_LIST
respuesta de Tomas Sommergyll <https://community.qlik.com/people/tsy?et=watches.email.thread> en Connector for SAP - Ver la discusión completa <https://community.qlik.com/message/781721?et=watches.email.thread#781721>
Hi Hans,
Good news: you only need to upgrade to either version 5.80 SR4 or preferably the latest version 6.00 IR, and the problem will be solved! ![]()
(In your version, 5.80 SR3, the result type 'S' ('Success') was not handled properly but that is fixed from 5.80 SR4)
Thanks,
Tomas