cancel
Showing results for 
Search instead for 
Did you mean: 

Technical error: SAPSQL_IN_ITAB_ILLEGAL_OPTION

Former Member
0 Kudos

Hello,

I have a problem calling BAPI_BUSPARTNER_GETLISTINSPROV.

The error message (in German) is:

SAP-Meldung (technisch): saprfc::callFunction('BAPI_BUSPARTNER_GETLISTINSPROV') saprfc_call_and_receive(): Call error: RFC Error Info : Key : SAPSQL_IN_ITAB_ILLEGAL_OPTION Status : EXCEPTION SYSTEM_FAILURE RAISED Message : Unzulässiger Wert in OPTION-Feld der Wertetabelle für IN-itab-Operator. Internal: (Schwerwigender Fehler)

My Sourcecode:


    $hicNo['SIGN'] = "I";
    $hicNo['OPTION'] = "EQ";
    $hicNo['LOW'] = "1320270";
    $hicNo['HIGH'] = "1320270";
    
    $result = $saprfc->callFunction("BAPI_BUSPARTNER_GETLISTINSPROV",
      array(    array("EXPORT", "WORST_RETURNED_MSGTY", array()),                
                array("TABLE", "FILTER_HICOMPNO", $hicNo),
                array("TABLE", "BUSPARTNER_DATA", array()),
                array("TABLE", "RETURN", array())
            ));

I successfully tested the function in the SAP GUI with the same parameters.

So what is wrong?

Accepted Solutions (0)

Answers (1)

Answers (1)

gregorw
Active Contributor

Hi Kai,

have you tried to replace

$hicNo['LOW'] = "1320270";
    $hicNo['HIGH'] = "1320270";

with

$hicNo['LOW'] = "0001320270";
    $hicNo['HIGH'] = "0001320270";

?

Best regards

Gregor

Former Member
0 Kudos

I tried but no effect. I Also tried with exactly 12 characters.

gregorw
Active Contributor
0 Kudos

Hi,

if both, the LOW and HIGH Field is filled I think you should fill the OPTION with 'BT' which meens between.

Regards

Gregor

Former Member
0 Kudos

Still the same error message.Btw it works fine in the SAP GUI (with the same values).

Former Member
0 Kudos

There has to be a solution for this, or is it a bug in saprfc or in the BAPI-function?

The error message says there is a wrong value in the OPTION-field.

Does this mean

a) any field (SIGN, OPTION, LOW, HIGH) may be wrong

b) only THE OPTION field is wrong

?

If b) is right, which values are valid ?

I would think it has to be two characters like 'EQ', 'BT', 'NE', 'LE', 'GE' etc.

Or do I have to use certain constants instead of characters?

I also tried some combinations like 'EQ' with only the value 'LOW' set or 'BT' with both 'LOW' and 'HIGH' set.

When I omit the filer 'FILTER_HICOMPNO' I get all providers as result.

As you can see I am totally stuck and I appreciate any hints that could help me.

Best regards

Kai

Former Member
0 Kudos

please let me know the solution, i'm facing similar issue.

Thanks in advance

Former Member
0 Kudos

Changed to newer SAP-Release. Still the same problem.

Former Member

Hello Kai,

The import parameter is a ranges table. This means that you'll have to pass in a nested array representing a table consisting of table rows. I've adapted your example and renamed the variables to make it more clear:


    $hicNoRngTbl = array();
    $hicNoRngRow['SIGN'] = "I";
    $hicNoRngRow['OPTION'] = "BT";
    $hicNoRngRow['LOW'] = "1320270";
    $hicNoRngRow['HIGH'] = "1320270";
    $hicNoRngTbl[] = $hicNoRngRow;
    
    $result = $saprfc->callFunction("BAPI_BUSPARTNER_GETLISTINSPROV",
      array(    array("EXPORT", "WORST_RETURNED_MSGTY", array()),                
                array("TABLE", "FILTER_HICOMPNO", $hicNoRngTbl),
                array("TABLE", "BUSPARTNER_DATA", array()),
                array("TABLE", "RETURN", array())
            ));

Regards,

Joachim

Former Member
0 Kudos

Hello Joachim,

IT WORKS.

Thank you very much for the answer.