09-08-2014 4:15 PM
hi EXPERTS
how can use options in RFC_READ_TABLE like SQL where clause.
date
ex: includes creation date and changed date from Mara table
09-11-2014 11:36 AM
09-08-2014 4:38 PM
REFRESH: OPTIONS, FIELDS, ITAB.
CONCATENATE '''' IUST10S-OBJCT '''' INTO OPTIONTEXT.
CONCATENATE '''' IUST10S-AUTH '''' INTO OPTIONTEXT1.
CONCATENATE 'OBJCT =' OPTIONTEXT 'AND' 'AUTH = ' OPTIONTEXT1 INTO
OPTIONTEXT SEPARATED BY SPACE.
OPTIONS-TEXT = OPTIONTEXT.
APPEND OPTIONS.
FIELDS-FIELDNAME = 'OBJCT'. APPEND FIELDS.
FIELDS-FIELDNAME = 'AUTH'. APPEND FIELDS.
FIELDS-FIELDNAME = 'FIELD'. APPEND FIELDS.
FIELDS-FIELDNAME = 'VON'. APPEND FIELDS.
FIELDS-FIELDNAME = 'BIS'. APPEND FIELDS.
CALL FUNCTION 'RFC_READ_TABLE' DESTINATION RFCSYS
EXPORTING
QUERY_TABLE = 'UST12'
TABLES
OPTIONS = OPTIONS
FIELDS = FIELDS
DATA = ITAB
EXCEPTIONS
TABLE_NOT_AVAILABLE = 1
TABLE_WITHOUT_DATA = 2
OPTION_NOT_VALID = 3
FIELD_NOT_VALID = 4
NOT_AUTHORIZED = 5
DATA_BUFFER_EXCEEDED = 6
OTHERS = 7.
09-09-2014 4:53 AM
Here's a simple example.
cheers
Paul
* specify the fields to be selected in table 'i_fields'
i_fields-fieldname = 'AUART'.
append i_fields.
i_fields-fieldname = 'AUTYP'.
append i_fields.
* specify the selection conditions in table 'i_options'
i_options = 'AUART = ''OA01'''.
append i_options.
i_options = 'AND AUTYP = 01'.
append i_options.
call function 'RFC_READ_TABLE'
destination 'NONE'
exporting
query_table = 'AUFK'
delimiter = '|'
tables
options = i_options
fields = i_fields
data = i_data.
09-11-2014 10:48 AM
Hi ,
Thanks for the update,
but i need to extract Created materials from MARA Between two dates.
how can i pass two dates to to I_OTIONS ..
please help me it s very urjent
09-11-2014 10:57 AM
09-11-2014 11:04 AM
09-11-2014 11:18 AM
WHY '= BETWEEN'??? REMOVE =
IT SHOULD BE ERSDA BEWEEN '20140820' AND '20140911'
09-30-2014 8:45 AM
Hi,,
i passed the same ERSDA BETWEEN '20140918' AND '20140930'
in FM 'RFC_READ_TABLE' but i am getting the exception 7. i am gettig the values after run this FM.
Can u plse help me
09-30-2014 8:46 AM
09-11-2014 11:36 AM
09-11-2014 11:58 AM
That's great news. Please close the thread by marking the answers.
cheers
Paul