2007 Jul 25 2:42 PM
Hi folks,
I tried to read IDoc data thru RFC. FM RFC_READ_TABLE does not support records exceeding 512 chars, SDATA is 1000.
Is there any RFC-capable generic select function?
TIA,
Clemens
2007 Jul 25 5:16 PM
2007 Jul 25 5:25 PM
Hi Prasad Dixit,
I am sorry I can't reward this because it is far awy froim the answer to my question.
FIY: RPY_TABLE_READ can't read data.
Regards,
Clemens
P.S.: You hereby qualify for points deduction
2007 Jul 25 5:28 PM
Hi,
If you fill QUERY_TABLE it will read data.
Reward <b>IF</b> useful!
2007 Jul 25 5:32 PM
function rpy_table_read.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(ACTIVATION_TYPE_I) LIKE DDREFSTRUC-STATE
*" DEFAULT 'M'
*" VALUE(LANGUAGE) LIKE SY-LANGU DEFAULT SY-LANGU
*" VALUE(TABLE_NAME) LIKE RPY_TABL-TABLNAME
*" VALUE(WITH_DOCU) LIKE RGLIF-WITH_DOCU DEFAULT ' '
*" VALUE(DOCUTYPE) LIKE RGLIF-DOCUTYPE DEFAULT 'U'
*" EXPORTING
*" VALUE(TABL_INF) LIKE RPY_TABL STRUCTURE RPY_TABL
*" VALUE(TABL_TECHNICS) LIKE RPY_TBTECH
*" STRUCTURE RPY_TBTECH
*" VALUE(ACTIVATION_TYPE_O) LIKE DDREFSTRUC-STATE
*" TABLES
*" TABL_FIELDS STRUCTURE RPY_FIEL
*" DOCU_TABLE_USER STRUCTURE RPY_OBJTAB OPTIONAL
*" DOCU_TABLE_TECH STRUCTURE TLINE OPTIONAL
*" EXCEPTIONS
*" CANCELLED
*" NOT_FOUND
*" PERMISSION_ERROR
*" ILLEGAL_TYPE
*"----------------------------------------------------------------------sorry, can't find QUERY_TABLE, [dummy!].
You may provide an example or aplogize.
Regards,
Clemens
2007 Jul 25 5:35 PM
Hi,
Check this OSS Note 382318 - RFC_READ_TABLE
If you are changing RFC_READ_TABLE, please change this also. this is not in the above said NOTE.
old code:-->
data: begin of work, buffer(30000), end of work.
field-symbols: <wa> type any, <comp> type any.
assign work to <wa> casting type (query_table).
if rowcount > 0.
rowcount = rowcount + rowskips.
endif.
New Code :-->
data: dref type ref to data.
field-symbols: <wa> type any, <comp> type any.
create data dref type (query_table).
assign dref->* to <wa>.
aRs
2007 Jul 25 5:44 PM
Hi a®s,
thanks a lot. When the time allows, I will apply the note. Maybe not your addition because I'm not sure this is unicode-compatible because query_table may contain non-char components casting alignment problems.
But the length restriction should be relaxed.
Regards,
Clemens
2007 Jul 25 5:51 PM
In type casting i got error in unicode, thats why i changed the code
May be it will be useful to you.
aRs
2007 Oct 18 5:20 PM
Hi,
this code is resolve problem mentioned by the notes 382318.
A problem occurs in function module RFC_READ_TABLE.
Reason and Prerequisites
The scope of function module RFC_READ_TABLE is very restricted. E.g., due to the fixed maximum row size only smaller tables can be accessed. There are several data types that cannot be handled, and also there are doubts regarding the Unicode compatibility of the function module.
However, all this is quite immaterial, because the function is not meant to be publicly used anyway. It was only created to be used as a sample in various training courses, and is clearly flagged as "not released for customer".
Solution
and any further modification we have to do.....
if any further modification means please let me know. it is very urgent.
poit will be awarded.
Thanks in advance.
Best Regds,
zubera
2007 Oct 18 5:34 PM
Hi,
Changes mentioned in the note, is enough for working with long structures.
a®
2007 Oct 19 12:42 PM
Hi aRs,
Thanks for your reply. so code mentioned above solve all the problem of notes 382318, or i have to add anything else.
Please reply. if it is enough i will reward point to you.
Thanks in advance.
Best Regds,
zubera
2008 Jul 24 10:10 AM
OK, use of RFC_READ_TABLE remains restricted - for quality assurance reasons it is OK. Generic tools of this kind of scope may get adapted by the customer to actual needs.
Regards,
Clemens