Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SAP Connector BAPI: Return multiple tables from one statement.

Hello Community,

I try to create a SAP BAPI Connection and read from one function multiple tables at the same time. In QlikView Help I found:

"Some Functions return more than one table, but QlikView can only handle one for each statement. Select the output table you want and then click Add call to script."

I tried to solve this problem with a loop where I call the same function multiple times each with different output.

The problem is that for each output the tables has slightly different combination of return value. The reason is that the function should be called only once.


Is there another way to solve it or some kind of workaround? Thanks in advance.

Here is some reduced script (the syntax is not quite right but you get the idea):

Do while run = 1

[/FUNCTION/]:

LOAD *;

SQL {

  "function":"\/FUNCTION/",

  "output":"TABLE_NAME1",

  "parameters":

  [

    { "direction":"out", "name":"TABLE_NAME1", "optional":false },

    { "direction":"out", "name":"TABLE_NAME2", "optional":false },

    { "direction":"out", "name":"TABLE_NAME3", "optional":false },

    { "direction":"in", "length":1, "name":"I_MODUS", "optional":true, "type":"CHAR", "value":" " }

  ]

};

sleep 100;

[/FUNCTION/]:

LOAD *;

SQL {

  "function":"\/FUNCTION/",

  "output":"TABLE_NAME2",

  "parameters":

  [

    { "direction":"out", "name":"TABLE_NAME1", "optional":false },

    { "direction":"out", "name":"TABLE_NAME2", "optional":false },

    { "direction":"out", "name":"TABLE_NAME3", "optional":false },

    { "direction":"in", "length":1, "name":"I_MODUS", "optional":true, "type":"CHAR", "value":" " }

  ]

};

let pass = pass + 1;

LOOP;

3 Replies
coskunist
Contributor III
Contributor III

Hello.

I have same question. Did you find any answer? There can be a solution with new driver versions.

My function runs around 15 mins.... So, I need to run it twice to get the same results tables.

coskunist
Contributor III
Contributor III

Dear Victor,

This problem can be resolved in the new version of Sap Connector (the bullletin says it works in Qlik sense, you can check)

Qlik SAP Connector v6.6 now avaliable

trm
Employee
Employee

Hi Viktor,

See https://community.qlik.com/message/1410427#1410427 for instructions how to handle multiple tables in output.