cancel
Showing results for 
Search instead for 
Did you mean: 

Problem using RFC_READ_TABLE and OPTIONS

Former Member
0 Kudos

Hi,

Sorry my poor English, i'm brazilian.

I need use the OPTIONS table =, but I didn't know how to use.

When I execute my PHP code:

Warning:  CALDBG: Can't find structure item TEXT for interface OPTIONS, __cal_set() in .....

saprfc_import ($fce,"QUERY_TABLE",$Table);

saprfc_import ($fce,"DELIMITER","/");

saprfc_import ($fce,"NO_DATA","");

saprfc_import ($fce,"ROWSKIPS","");

saprfc_import ($fce,"ROWCOUNT","30");

   

//Pass table parameters

saprfc_table_init ($fce,"DATA");       

saprfc_table_init ($fce,"FIELDS");

saprfc_table_init ($fce,"OPTIONS");

saprfc_table_append ($fce,"OPTIONS", array ("TEXT"=>"PERIODO = '201204'"));

I tried this too

saprfc_table_append ($fce,"OPTIONS", array ("0"=>"PERIODO = '201204'"));

       

//Call and execute the function

$rfcresults = saprfc_call_and_receive ($fce);

In 'red case' the PHP don't show error, but not respect the where clause.

help me?

Thanks,

Accepted Solutions (0)

Answers (2)

Answers (2)

Flavio
Active Contributor
0 Kudos

Hi Willians,

One last question: what is the data type for the field 'PERIODO'?

Thank you

Bye,

Flavio

Former Member
0 Kudos

Hi Flavio,

PERIODO is a field of table "CONTADOR" and the data type is NUMC(6). Examples of data:

201204

201202

201203

201110

201109

201008

I think the sintaxe is OK but don't work:

saprfc_table_append ($fce,"OPTIONS", array ("0"=>"PERIODO = '201204'"));


Thanks,

Flavio
Active Contributor
0 Kudos

Hi Willians,

Thank you for answering. I believe it is an issue with the quotation marks around 201204.

Could you please try with

("TEXT"=>"PERIODO = 201204"));

that is, 201204 should not be surrounded by quotation marks as it is NUMC.

Hope this could help.

Thank you and ciao,

Flavio

Flavio
Active Contributor
0 Kudos

Hi Willians,

One question: Is 'PERIODO' a field of your table $Table?

And, what about if you test the FM in SE37 with the options "PERIODO = '201204'"? Do you get a result?

Alternatively, what is the result when reading the table by means of the saprfc_test script (again using that options)?

Just let me know.

Thank you and bye,

Flavio