2009 May 21 11:59 AM
Hi,
I have writtten a program in APO that is required to read data from a bespoke table in R/3, so I'm using FM RFC_READ_TABLE to do this, I can easily retrieve 1 material by adding it to the Option table. My problem is that I have a select option in APO that I want to use to restrict the values being returned and I'm not sure how to code it.
Any ideas would be appreciated,
Regards
J-J
Hi,
I have writtten a program in APO that is required to read data from a bespoke table in R/3, so I'm using FM RFC_READ_TABLE to do this, I can easily retrieve 1 material by adding it to the Option table. My problem is that I have a select option in APO that I want to use to restrict the values being returned and I'm not sure how to code it.
Any ideas would be appreciated,
Regards
J-J
2009 May 21 12:10 PM
Hi
In Option You can write simple where clause as you write in select statement.
may be you will have to build string everytime using "Concatenate" in your program to pass it to the "option" parameter
Regards,
Prajakta
2009 May 21 12:23 PM
Hi,
In the Options tab you can write your where clause
like this:
matnr BETWEEN 'M1000' AND 'M1500'thanks\
Mahesh
2009 May 21 12:34 PM
HI,
try something like belwo..
LOOP AT s_matnr.
CONCATENATE 'MATNR-SIGN = ' s_matnr-sign
'MATNR-OPTION = ' s_matnr-option
'MATNR-LOW = ' s_matnr-low
'MATNR-HIGH = ' s_matnr-HIGH
OPTIONTEXT into OPTIONTEXT seperated by sapce.
ENDLOOP.
OPTIONS-TEXT = OPTIONTEXT.
APPEND OPTIONS.
Pas this
CALL FUNCTION 'RFC_READ_TABLE' DESTINATION RFCSYS
EXPORTING
QUERY_TABLE = 'AGR_1016'
TABLES
OPTIONS = OPTIONS "Pass to this as a option
FIELDS = FIELDS
DATA = ITAB .
IF SY-SUBRC <> 0.
ENDIF.
Prabhudas
2009 Jun 01 11:28 AM
I built up the select statement by loop through the select option, I thought there would be a quick way but no such luck.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |