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.
Is there any possibility to get a solution for the following problem?
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.
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.
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:
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\"
"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