‎2015 Apr 21 12:45 PM
Hi Experts,
I am using RFC_READ_TABLE to get data from different R/3 systems.
There is no problem while getting data from Unicode systems.
But when I run the same query on t006 table with a non-unicode system, I am getting a sy-subrc as 7.
Error occurs at type casting
ASSIGN WORK TO <WA> CASTING TYPE (QUERY_TABLE). - line 166 of the FM.
This error doent come when I am using table T006A.
I suspect difference between T006 and T006A (unicode direction) is, T006 has field names as name1_name2. I suppose, '_' is the reason for above error.
Please let me know how to correct the issue.
I have searched for alternate FMs
<b>RFC_GET_TABLE_ENTRIES
TABLE_ENTRIES_GET_VIA_RFC
GET_TABLE_RFC</b>
All of them seem to be unreleased by SAP.
kindly share your expertise in resolving the issue.
Thanks and Regards,
Anil Supraj
‎2015 Apr 21 1:12 PM
Hi Anil,
the T006 table has some domain for which the Casting operation may not be supported for some data types.
i suspect that the casting operation might be failing for the field "TEMP_VALUE", try excluding these suspect fields.
also please cross check the structure of the field in the internal table in which you are storing the data(when you are calling the FM) and the definition of the structure that is there in the target system that is causing this sy-subrc failure.
there could be a mismatch between the structure definitions.
Do let me know if you require any further inputs.
regards,
Vamsi
‎2015 Apr 22 4:29 AM
Hi Vamsi,
Type casting statement,
ASSIGN WORK TO <WA> CASTING TYPE (QUERY_TABLE). - line 166 of the FM.
is not dependent on fields which we are passing. Only dependant variable is (QUERY_TABLE) which is T006 in our case.
Yes the error should be because of "TEMP_VALUE" and other fields of format name1_name2. But passing required fields to FM is not helping.
Thanks,
Anil
‎2015 Apr 22 1:04 PM
Hi Anil,
we should be able to fetch the data on a field by field basis.
try one field at a time to understand how the FM accepts the input.
as far as the casting statement is concerned try to check the sy-subrc value right after the statement and see if that helps you in anyway.
regards,
Vamsi
‎2015 Apr 22 1:11 PM
No Vamsi. I have tried passing seperate fields.
It doesnt work with non-unicode systems.
Thanks,
Anil
‎2015 Apr 27 8:12 AM
Hi Experts,
A correction :
Error is not because of the highlighted in grey.
Even for non-unicode system, it works for table which have field names like name1, name2 (eg. T006A) etc.. But fails for tables with field names like name1_name2 (T006-TEMP_VALUE).
It is because of below highlighted in yellow.
We are unable to read table data for those table which have data type defined as float (FLTP).
Thanks,
Anil