Qlik Community

QlikView Connectivity

Discussion board for collaboration related to QlikView Connectors.

cancel
Showing results for 
Search instead for 
Did you mean: 
atsushi_saijo
Creator II
Creator II

SAP Connector BAPI: Output table: which one to use/when cleared?

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:

  • How could we select best output table? (Only trial-and-error?)
  • Once executed, I presume SAP writes these to output tables. QlikView subsequently read it via RFC. But thereafter, is there any script to clear these records? Or are they automatically cleared by SAP?

Dev 27-Jan-17 1  156.40.jpg

I should appreciate for your valuable feedback in advance.

1 Solution

Accepted Solutions
Hakan_Ronningberg

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

View solution in original post

11 Replies
Hakan_Ronningberg

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

atsushi_saijo
Creator II
Creator II
Author

Thank you Hakan for fast feedback. I verified that I can see Export parameters with useable output tables.

Dev 30-Jan-17 1  64.52.jpg

Indeed this BAPI was remote-enabled.

Dev 30-Jan-17 1  74.55.jpg

Thank you for your advices.

coskunist
Contributor III
Contributor III

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

Hakan_Ronningberg

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

coskunist
Contributor III
Contributor III

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.



(*)

http://help.qlik.com/en-US/connectors/Subsystems/SAP_SQL_Connector_help/Content/6.6/QV-connection/SA...


Technical Bulletin

Qlik SAP Connector v6.6 now avaliable

trm
Employee
Employee

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

ellarg2019
Contributor
Contributor

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)

 

 

trm
Employee
Employee

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

ellarg2019
Contributor
Contributor

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.