Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Gurus, When we run BAPI, I suppose SAP writes records to all the output tables. Each output table has slightly different combination of return value. So develolpers have to select one. Question arises:
I should appreciate for your valuable feedback in advance.
Hi Atsushi,
It is always good to test a BAPI using the 'Test tool' in transaction SE37 in SAP, before you execute it from the connector. There you can find out more about which output table to use. Don't forget to check that the function module is 'Remote-Enabled' (Attributes tab).
The content of the output table sent to Qlik is only temporary, so there is no need to clear any memory in SAP after executing the BAPI.
Best Regards,
Hakan
Hi Atsushi,
It is always good to test a BAPI using the 'Test tool' in transaction SE37 in SAP, before you execute it from the connector. There you can find out more about which output table to use. Don't forget to check that the function module is 'Remote-Enabled' (Attributes tab).
The content of the output table sent to Qlik is only temporary, so there is no need to clear any memory in SAP after executing the BAPI.
Best Regards,
Hakan
Thank you Hakan for fast feedback. I verified that I can see Export parameters with useable output tables.
Indeed this BAPI was remote-enabled.
Thank you for your advices.
Dear Hakan,
Is there any possibility to get a solution for the following problem?
SAP Connector BAPI: Return multiple tables from one statement.
I have a function which takes a long time to run. I need to run it 2 times, to get 2 different table.
Or I will ask to our abap developer for changing the function.
Thank you,
Regards,
Josh
Hi Josh,
The intention is to add the possibility to use multiple tables at the same time, in a future release of Qlik Connector for SAP. It is not yet decided when the functionality will be available.
Regards,
Hakan
Dear Hakan,
I read that there is capability of handling multiple output in the new release of Sap connector 6.6.
That's a very good news. This is working only in Qliksense as I understand.
(*)
Technical Bulletin
Hi Coskun,
It's correct that the new BAPI Connector for Sense in v6.6 can handle multiple outputs.
The script syntax for scripts generated in Sense differs from the old BAPI script syntax in QV but the new connector can also parse and handle the old legacy script format, with possibility to add more outputs in the format of:
"output":"RETVALUE,OUTPUT_TABLE1,OUTPUTTABLE_2",
Just an example but just add more outputs separated with comma(s).
To use the new BAPI Connector in QV you need to manually copy over the connector folder "QVSAPBAPIConnector" from:
"C:\Program Files\Common Files\Qlik\Custom Data\"
to
"C:\Program Files\Common Files\QlikTech\Custom Data\"
And restart QlikView for the connector to show up in the list of connectors, there you can create a connection and use the generated connection string for executing BAPI scripts.
Note that the select dialog in QlikView for the new BAPI Connector is not complete nor thoroughly tested yet so I recommend using the legacy BAPI Connector for generating the scripts and then manually add the additional outputs you need. Also the result set will be a concatenation of all resulting output, for guidance how to split it up you can see how scripts is generated in Sense when selecting multiple outputs (using resident loads). If you have Sense installed you can also generate the scripts in Sense using the new script syntax and then just copy them over to QlikView for consumption (still need to manually copy the connector as described above and creating a connection string).
Hope the info/trick helps,
// Thomas Örnmarker
SAP Connectors Developer
Hi Thomas,
We faced the problem of converting RfcTypeConversionException types: FIELD ZFLOAT of STRUCTURE ZTQLIK_TEST_RFC (SETTER): cannot convert String into BCD [9: 3]. Our version of the BAPI connector is 7.0.1. We have two Qlik version systems: qlik sense april 19 patch1 and qlik sense september 2017. There are no conversion errors when using bapi in september 2017 version. When using the same code in version april 19, an error occurs.
code example:
SELECT
IT_TAB.MANDT
IT_TAB.BUKRS
IT_TAB.ZFLOAT
FROM [ZFM_QLIK_TEST_RFC]
WHERE
IT_TAB = TABLEROW(900, 1000, 9.8)
;
Error:
RfcTypeConversionException:FIELD ZFLOAT of STRUCTURE ZTQLIK_TEST_RFC (SETTER): cannot convert String into BCD[9:3] ---> RfcTypeConversionException:Cannot convert "9.8" into a BCD because of invalid character '.' in integer part: SELECT IT_TAB.MANDT IT_TAB.BUKRS IT_TAB.ZFLOAT FROM [ZFM_QLIK_TEST_RFC] WHERE IT_TAB = TABLEROW(900, 1000, 9.8)
MAIN:
SET ThousandSep=' ';
SET DecimalSep='.';
SET MoneyThousandSep='.';
SET MoneyDecimalSep=':';
Data is transferred to one and the same system under the same user. If you use 9,8, then another error occurs.
RfcInvalidParameterException:Access of element's metadata via index=3 (TABLE [STRUCTURE ZTQLIK_TEST_RFC]) failed ---> ArgumentOutOfRangeException:Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index: SELECT IT_TAB.MANDT IT_TAB.BUKRS IT_TAB.ZFLOAT FROM [ZFM_QLIK_TEST_RFC] WHERE IT_TAB = TABLEROW(900, 1000, 9,8)
Please, help me)
Hi Ellarg2019,
I believe this is not down to the version of Qlik Sense but rather the region settings of the computer running Sense. It turns out that the internal conversion from string to BCD is using the decimal separator set in region settings. And what makes it worse is that the connector is expecting the decimal separator to be a dot '.', as you discovered the comma ',' can't be used as it's used for separating fields. So for it to work you need to make sure the region setting has the decimal separator set to dot '.'
This is something I will look into for coming releases so we are not dependant on region settings of the computer for type conversions.
Regards,
// Thomas Örnmarker
Hi Thomas,
Thank you so much for your quick reply. We have tested your suggestion. We tried dot and comma. The error is still occured.
RfcTypeConversionException:FIELD ZFLOAT of STRUCTURE ZTQLIK_TEST_RFC (SETTER): cannot convert String into BCD[9:3] ---> RfcTypeConversionException:Cannot convert "9.8" into a BCD because of invalid character '.' in integer part: SELECT IT_TAB.MANDT IT_TAB.BUKRS IT_TAB.ZFLOAT FROM [ZFM_QLIK_TEST_RFC] WHERE IT_TAB = TABLEROW(900, 1000, 9.8)
Screens of server settings attached.