2012 Jun 20 10:31 AM
Hello Experts,
I have created RFC enabled function module and calling from another system. RFC connection is working perfectly fine.
This RFC function module don't return anthing when it is being called from system, but when this RFC FM is being called from same system and same parameter it returns correct value.
Is there is any setting that i am missing? Please suggest
Thanks,
Pritam
Code Sample
<code>
CALL FUNCTION 'ZGET_DATA' DESTINATION 'DP1CLNT501'
EXPORTING
port = port
idoc_num = lt_idoc_number
TABLES
idoc_status = idoc_record.
<code>
Hello Experts,
I have created RFC enabled function module and calling from another system. RFC connection is working perfectly fine.
This RFC function module don't return anthing when it is being called from system, but when this RFC FM is being called from same system and same parameter it returns correct value.
Is there is any setting that i am missing? Please suggest
Thanks,
Pritam
Code Sample
<code>
CALL FUNCTION 'ZGET_DATA' DESTINATION 'DP1CLNT501'
EXPORTING
port = port
idoc_num = lt_idoc_number
TABLES
idoc_status = idoc_record.
<code>
2012 Jun 20 10:51 AM
How do you pass the input parameters? Port number and IDOC number.
If Idoc_number is char type, do you add leading Zeros..
REgards,
Venkat
2012 Jun 20 11:24 AM
Idoc number is being passed in range format wherein its data type is same as idoc number. In debugging i can see its value is with leading zeros.
2012 Jun 20 11:08 AM
Hi Pritam,
The user in RFC login tab has correct authorisations?
2012 Jun 20 11:23 AM
Hi Abhijeet,
There is no issue with authorization. I guess issue is something related to table parameter, coz when i was taking all parameter except table parameter it was returning correct value.
Thanks,
Pritam
2012 Jun 20 11:38 AM
Hi Pritam,
The tables parameter is deprecated. In case of RFC calls, happening across systems, it involves further complications (explained in this document). I would suggest your to use importing or changing parameters (in general), over tables parameter. You might need to search for the appropriate table type of the structure, or if not present, create one.
2012 Jun 20 11:50 AM
Hi Abhijeet,
I tried both importing as well as changing parameter.
I have added one more dummy parameter as char2 and assign value in it. it is returning correct value.
but at the same time it don't return any value in table parameter.
Please suggest.
Regards,
Pritam
2012 Jun 20 11:54 AM
Hi Pritam,
As I mentioned in last reply, replace the tables parameter with a changing parameter (as you need updated values) with suitable table type. It should
2012 Jun 20 12:01 PM
When i changed table parameter from table to importing and changing i defined its data type as table type of the structure i used.
Guess your reply got truncated, can you mention it again?
2012 Jun 20 12:08 PM
Hi Pritam,
The reply did get truncated.
I wanted to add that if you do put a changing parameter with a table type, instead of tables parameter, it should work.
One more thing. The data type you use in the host system must exist in the remote system. So, if you have created a z-table type, it must be present in the remote system too.
2012 Jun 20 12:12 PM
Hi Abhijeet,
I have done exactly what you have mentioned here. I am getting values in character form but not in table parameter.
2012 Jun 20 12:28 PM
Hi Pritam,
That's very odd. Are you sure the logic that fill the internal table is working fine? If you can't see it during run time, due to RFC call, try pushing the values in database and check after call.
2012 Jun 20 11:15 AM
Hi Pritam,
Try enabling FBGENDAT functionality against your custom RFC in the target system, so you can see exacltly what data has been passed across and rule out any issues there.
Gareth.
2012 Jun 20 11:21 AM
Hi Gareth,
Can you please explain what is FBGENDAT functionality and how will i enable it?
Pritam
2012 Jun 20 11:29 AM
Google is your friend There are lots of examples and demo's on how to use it.
In short, it allows you to automatically create test data against a function module whenever it is called, so you can then see what data is passed in and perform controlled tests. It is also useful in an RFC scenario where you aren't 100% sure what is being passed in to your target system. I use it a lot from Web applications when calling RFC's for example.
Gareth.
2012 Jun 20 11:52 AM
Hi Gareth,
Report FBGENDAT is available only in the module Sales. It is not available in all system and I think this can't be configured in all system. Can you please check in your system and let me know if my analysis is wrong.
Thanks
Pritam
2012 Jun 20 12:51 PM
Hi Pritam,
I think you need to Google harder! FBGENDAT is not a module specific report - it can be used anywhere and is easy to implement in your own custom function modules.
I'd suggest searching both SCN and Google for some more useful resources...
Gareth.
2012 Jun 26 2:06 PM
Guys,
Thanks for the inputs for the issue. Got many points and learnt new things.
Final Solution i got for this issue is, Delete original FM and copied it to new FM, Surprisingly it worked and i got the solution.
Still i am not sure why originally same functionality was not working.
Thanks again.
Pritam