cancel
Showing results for 
Search instead for 
Did you mean: 

Options in RFC_READ_TABLE

Former Member
0 Kudos

Hi all,

 

In RFC_TABLE_READ as I can put in an option like? when the field type like * XXXX *.

 

It's more if someone could tell which are the operators that exist in the where clause.

Thank you very much

Accepted Solutions (1)

Accepted Solutions (1)

Benny
Product and Topic Expert
Product and Topic Expert
0 Kudos

Are you sure you are developing in Java? Can you be more specific what you want to do?

Regards,

Benny

Former Member
0 Kudos

Hi Benny,

Yes, I'm sure, I attaching my code:



try {



JCoParameterList jcoParameterList = function.getTableParameterList();



JCoTable jcoTableOptions = jcoParameterList.getTable("OPTIONS");



JCoTable jcoTableFields = jcoParameterList.getTable("FIELDS");



jcoTableOptions.clear();



jcoTableFields.clear();



jcoTableOptions.appendRow();



jcoTableOptions.setValue("TEXT", "XBLNR CT '*" + sXBLNR.trim() + "*' AND ");



jcoTableOptions.appendRow();



jcoTableOptions.setValue("TEXT", "UMSKZ EQ 'I'");




jcoTableFields.appendRow();



jcoTableFields.setValue("FIELDNAME", "REBZG");



jcoTableFields.appendRow();



jcoTableFields.setValue("FIELDNAME", "REBZJ");



jcoTableFields.appendRow();



jcoTableFields.setValue("FIELDNAME", "REBZZ");



jcoTableFields.appendRow();



jcoTableFields.setValue("FIELDNAME", "SGTXT");



connect.execute(function);




JCoTable jcotable = function.getTableParameterList().getTable("DATA");

In the bold line I need put one LIKE, but I don't know the operation code for this.

This code have the next error:

com.sap.conn.rfc.exceptions.RfcGetException: A condition specified dynamically has an unexpected format.

Many thanks.

Former Member
0 Kudos

Hi Arturo

You can use options in RFC_READ_TABLE like SQL where clause.

Example

Plant includes "ABC" in string and material is "XYZ".

WERKS like ‘%ABC%’ AND MATNR ='XYZ'

Regards

Former Member
0 Kudos

Many thanks.

I solved the problem with your help.

Former Member
0 Kudos

for creation date and changed date how can i pass in the OPTIONS table

Former Member
0 Kudos

how can use options in RFC_READ_TABLE like SQL where clause.

date
ex: includes creation date and changed date from Mara table


Answers (1)

Answers (1)

Former Member
0 Kudos

Hello All,

Could you please tell me if I want to send big query for OPTION table what should be the better approach. One in my mind we can execute in batch.

As option field having some limitation in size So I am getting invalid sql exception due to truncation on my query.

Thanks in advance

Raj

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Raj,

the better approach is not to use RFC_READ_TABLE, but to create a dedicated function module, in which the appropriate authorization checks are done.

Best regards,

Markus