2012 Sep 03 10:40 AM
Hi Experts ,
I want to develop a new function module , the ouput table sholud be type any .
Example function module is 'SCMS_XSTRING_TO_BINARY', here output table binary_tab is type any.
when iam trying to do that post me error 'You can only use LIKE and TYPE to specify types in RFC' , explain how to do this .
regards
goudham
Hi,
Is there any option of type ref to?
Gourav.
2012 Sep 03 10:45 AM
2012 Sep 03 10:52 AM
hi gaurav ,
type ref to is there as option , giving same error.
regards
goudham
2012 Sep 03 10:46 AM
The error message is pretty much clear - "You cannot use generic types in RFM"
May be you can elaborate on your business requirement a lil' bit so that we can propose some genuine alternatives.
BR,
Suhas
2012 Sep 03 10:54 AM
hi saha ,
Requirement is :
Input : table name ( can be ekko,ekpo,vbap,any).
output : i have to fetch 5000 records from the input table, output type has to be assigned as runtime, for that i have to declare table as any .
regards
goudham
2012 Sep 03 12:05 PM
Do you really need this FM as RFC enabled? If so, you cannot use generic types (the system needs to generate proper interfaces internally).
You have to use ie. 3 different output parameters.
Regards, Uwe
2012 Sep 03 12:13 PM
hi Uwe ,
I have developed the code inside BAPI, so FM should be an RFC, Example function module is 'SCMS_XSTRING_TO_BINARY', is also an remote enabled .
can you make clear regarding 3 output parameters .
regards
goudham
2012 Sep 03 12:18 PM
Is the Function Module a BAPI or is it called within a BAPI?
If the FM is just called within the system itself, it doesn't have to be an RFC (you are not calling it from outside SAP) and you can use generic parameters.
2012 Sep 03 12:38 PM
Hi Goudham,
I tried creating the RFC FM with table parameters as any. I'm facing the error as you.
Now I copied the SCMS_XSTRING_TO_BINARY to ZFM and commeneted the Perform in the source code. I face no errors.
So you could copy the any existing RFC FM with tables parameter as TYPE ANY to Z FM and change other parameter name to your desired name.
I know this is not the correct approach but this is the only solution at this momment.
regards,
Ashwin.
2012 Sep 03 12:43 PM
Hi Goudham,
And also not to forget all the parameters should be declared as 'Pass by value'.
regards,
Ashwin.
2012 Sep 03 12:45 PM
Hi all ,
Thanks to Uwe, when FM is not remote enabled, i can able to give type any in output table, but having small problem in that.
Input parameter : EKPO
Output parameter : ET_TAB
requirement : 5000 rows
rows are getting fetched, when entries are xplored, nothing is showing, only blank field is displaying.
any more to be done in coding or anyother area .
regards
goudham
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |