Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

RFC Call not Returning Values

PritamKunal
Participant
0 Likes
5,384

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>

17 REPLIES 17
Read only

venkateswaran_k
Active Contributor
3,773

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

Read only

0 Likes
3,773

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.

Read only

Abhijeet-K
Active Participant
0 Likes
3,773

Hi Pritam,

The user in RFC login tab has correct authorisations?

Read only

0 Likes
3,773

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

Read only

0 Likes
3,773

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.

Read only

0 Likes
3,773

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

Read only

0 Likes
3,773

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

Read only

0 Likes
3,773

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?

Read only

0 Likes
3,773

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.

Read only

0 Likes
3,773

Hi Abhijeet,

I have done exactly what you have mentioned here. I am getting values in character form  but not in table parameter.

Read only

0 Likes
3,773

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.

Read only

Former Member
0 Likes
3,773

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.

Read only

0 Likes
3,773

Hi Gareth,

Can you please explain what is FBGENDAT functionality and how will i enable it?

Pritam

Read only

0 Likes
3,773

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.

Read only

0 Likes
3,773

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

Read only

0 Likes
3,773

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.

Read only

PritamKunal
Participant
0 Likes
3,773

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