Qlik Community

QlikView Connectors

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
mrybalko
Contributor

SAP Report Connector 5.9 set several values to variable

I use QlikView SAP Connector 5.9IR.

I want transaction to return data for several materials. The materials list changes every day. So I cannot use variants but "Select Options". How can I set several values to variable? 

For example my query to SAP:

Select SAPREPORT (REPORT (ZLO_ASSORT), ROWS_PER_RECORD (1), SKIP (T (2), T (1), T (3), T (4), T (6), T (7), T (8), T (9)), 

OPTIONS (

  (SELNAME P_BUDAT, KIND P, SIGN I, OPTION EQ, LOW 20150727), // report date

  (SELNAME S_MATNR, KIND S, SIGN I, OPTION EQ, LOW 59),  // material

  (SELNAME S_WERKS, KIND S, SIGN I, OPTION EQ, LOW 5569) // plant

));

Now I want to get information for materials 59, 77, 123.

I tried

Select SAPREPORT (REPORT (ZLO_ASSORT), ROWS_PER_RECORD (1), SKIP (T (2), T (1), T (3), T (4), T (6), T (7), T (8), T (9)), 

OPTIONS (

  (SELNAME P_BUDAT, KIND P, SIGN I, OPTION EQ, LOW 20150727),

  (SELNAME S_MATNR, KIND S, SIGN I, OPTION EQ, LOW 59),

  (SELNAME S_MATNR, KIND S, SIGN I, OPTION EQ, LOW 77),

  (SELNAME S_MATNR, KIND S, SIGN I, OPTION EQ, LOW 123),

  (SELNAME S_WERKS, KIND S, SIGN I, OPTION EQ, LOW 5569)

));

Connector returns 1 string: the first material (59) only. In SAP there is information about each material. Any ideas?

Tags (1)
1 Solution

Accepted Solutions
Employee
Employee

Re: SAP Report Connector 5.9 set several values to variable

Hi,

You can enter S_MATNR many times, but the material numbers have to be in internal format, that is with leading zeroes in this case, like 000000000000000059 (18 characters) and so on. Then it will work!

Regards,

Hakan

5 Replies
Employee
Employee

Re: SAP Report Connector 5.9 set several values to variable

Hi,

You can enter S_MATNR many times, but the material numbers have to be in internal format, that is with leading zeroes in this case, like 000000000000000059 (18 characters) and so on. Then it will work!

Regards,

Hakan

mrybalko
Contributor

Re: SAP Report Connector 5.9 set several values to variable

Thank you for answer. I changed request and added leading zeroes, but nothing changed. QV takes the last variable value and returns just 1 string.

For example request with parameters:

(SELNAME S_MATNR, KIND S, SIGN I, OPTION EQ, LOW 000000000000000047),
(SELNAME S_MATNR, KIND S, SIGN I, OPTION EQ, LOW 000000000000000127),
(SELNAME S_MATNR, KIND S, SIGN I, OPTION EQ, LOW 000000000000000088), 

returns 1 string for 88 material.

Employee
Employee

Re: SAP Report Connector 5.9 set several values to variable

Have you tested your select options in transaction SE38 or SA38 in the SAP system to check that you receive 3 material numbers there?

I executed the SAP report RM08MMAT from QlikView in our SAP test system. The following returned 3 materials:

OPTIONS (

  (SELNAME MATNR, KIND S, SIGN I, OPTION EQ, LOW 000000000000000521)

  (SELNAME MATNR, KIND S, SIGN I, OPTION EQ, LOW 000000000000000578)

  (SELNAME MATNR, KIND S, SIGN I, OPTION EQ, LOW 000000000000001268)

));

The following returned 1 material:

OPTIONS (

  (SELNAME MATNR, KIND S, SIGN I, OPTION EQ, LOW 521)

  (SELNAME MATNR, KIND S, SIGN I, OPTION EQ, LOW 578)

  (SELNAME MATNR, KIND S, SIGN I, OPTION EQ, LOW 1268)

));

Regards,

Hakan

Employee
Employee

Re: SAP Report Connector 5.9 set several values to variable

Looks like you have a comma after each condition row. Try to remove those.

mrybalko
Contributor

Re: SAP Report Connector 5.9 set several values to variable

Hakan, thank you for help

Adding zeroes solved the problem. SAP returned all the requested strings but they had different row numbers and were removed by SKIP statement. I deleted SKIP statement and got all data needed.

Community Browser