‎2009 May 07 12:05 PM
Hi,
I wrote an FM which collects table contents of given table name in IMPORTING parameters and returns as EXPORTING paramater as a data object. It runs perfect.
When i change Processing type to "Remote-enabled module", system gives a message "You can only use LIKE and TYPE to specify types in RFC".
Is there any way to define paramaters as object. Or anything else to solve this problem.
(Note : I tried something to solve this problem but i cant reach the exact solution.
For example, i moved DATA parameter from Exporting tab to Tables tab with no TYPE or LIKE specification and system gives "You cannot use generic types in RFC".)
FUNCTION YTABLES_GET_ROWS.
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" VALUE(ROWS) TYPE I DEFAULT 0
*" VALUE(TABNAME) TYPE TABNAME DEFAULT 'ORDCOM'
*" EXPORTING
*" VALUE(DATA) TYPE REF TO DATA
*"----------------------------------------------------------------------
field-symbols : <fs> type standard table.
condense tabname.
catch system-exceptions CREATE_DATA_UNKNOWN_TYPE = 5.
CREATE DATA data TYPE STANDARD TABLE OF (tabname).
endcatch.
if sy-subrc is initial.
assign data->* to <fs>.
if rows > 0.
select * up to rows rows from (tabname) into table <fs>.
else.
select * from (tabname) into table <fs>.
endif.
endif.
ENDFUNCTION.
‎2009 May 07 12:12 PM
Hallo,
it is prohibited toi use a references as parameter in Remote-enabled function.
Regards
Bogdan
‎2009 May 07 12:23 PM
Ok, what do you think about generic types in Tables Tab ?
I need use some parameters which must not has a type or structure. Coz i will return given transparent table contents with their structure.
And also i need to use this function across-systems with RFC.
thanks in advance.
ibrahim
‎2009 May 07 12:34 PM
Hi,
I think generic type is allowed in table types with RFC, but reference types and changing parameters are not allowed in RFC...
if you keep reference types then between two different system it is not possible to give the memory reference... that is the reason why reference type does not work, but generic types does not give reference to memory it only transfers the data of table from one place to another....
Regards,
Siddarth
‎2009 May 07 12:35 PM
‎2009 May 07 12:38 PM
Yeah you right. They all are prohibited.
I'm still staying unresolved.
Thanks anyway.
‎2009 May 07 1:07 PM
Hi,
i suppose you have to try wrap your results in "defined" structure (b.e. name - value pair)
Regards
Bogdan
‎2009 May 07 1:12 PM
Yeah i know it will work if i specify table type or structure.
But this time, FM will loose its table indepency.
up....
‎2009 May 12 12:07 PM
Hi,
I have sugested an univesal stucture not a special structuire for a particular DB Table
Regards Bogdan