Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

RFC_READ_TABLE - options

former_member185537
Participant
0 Likes
9,475

Hello Experts,

Is there a possibility to give IN operator in the selection option of the query for the table in the RFC_READ_TABLE function module ?? Or is only the selection possible one by one using the options text. I have to select a range of document values for a particular field.

1 ACCEPTED SOLUTION
Read only

ArthurParisius
Contributor
0 Likes
5,633

I take it you're trying to read a table from a different server and that's why you're not using a SELECT?

IN can be used in the form of Field in (value1, value2,....)

10 REPLIES 10
Read only

ArthurParisius
Contributor
0 Likes
5,634

I take it you're trying to read a table from a different server and that's why you're not using a SELECT?

IN can be used in the form of Field in (value1, value2,....)

Read only

0 Likes
5,633

Hello Arthur,

It does not go with the FM

Read only

0 Likes
5,633
It does work.

Try testing it for example for table T000 and place MANDT IN ('000', '001') in the options table

Read only

0 Likes
5,633

Hello Arthur,

I had made a mistake in the query . I had used a period at the end. The ( ) technique works. Thanks for the suggestion.

Read only

DoanManhQuynh
Active Contributor
0 Likes
5,633

that function module call a dynamic SQL so you can define your WHERE clause as you want.

SELECT * FROM (QUERY_TABLE) INTO <WA> WHERE (OPTIONS).

You can use IN (value1, value2...) or if it required you can enhancement that rfc to add range variable.

Read only

0 Likes
5,633

Hello Quynh,

Same case as Arthur

Read only

0 Likes
5,633

The SQL i got abow is copied from that fm, so since its dynamic SQL and SQL accept the statement IN( ... ) then it should work. could you share your coding call fm?

Read only

harald_lesche-holzbecher
Product and Topic Expert
Product and Topic Expert
5,633

This FM is not released for customer and has further restrictions, see note

382318 - FAQ|Function module RFC_READ_TABLE

So you should avoid using it.
Read only

0 Likes
5,633

Hello Harald,

Is there any alternative for the reading of the table from another table ?

Read only

0 Likes
5,633

Expose the data you need as a service or callable RFC function in the remote system.