cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in calling a FM via RFC in IDOC scenario

Former Member
0 Kudos

Hi experts,

I have a file to IDOC scenario in which I call via UDF RFClookup a custom function module with a certain key to retrieve some values from a custom table of ECC.

In DEV and QTY env. it's all ok, XI retrieve the correct record.

In DSP XI retrieve always the first record of the table called by the FM.

It seems like there is some problem in accessing the FM with the key.

Any hints?

Thanks

Fabio

Accepted Solutions (1)

Accepted Solutions (1)

former_member186851
Active Contributor
0 Kudos

Hello Fabio,

I guess there might a problem in RFC code as it might retrive the first value only.

The RFC code also has been moved and activated at ECC side?

Former Member
0 Kudos

Hi,

please explain.

I have a UDF rfc function called RFClookup in XI.

What I have to do in ECC side?

Fabio

former_member182412
Active Contributor
0 Kudos

Hi Fabio,

Execute the function module with same key which you are trying in DSP using transaction SE37 and see how many values it returns?

Regards,

Praveen.

former_member186851
Active Contributor
0 Kudos

Hello Fabio,

The RFC will be in ECC.

So Ensure the RFC is returing correct values in Production as well.

As Praveen suggested you can run it in SE37 and check.

Former Member
0 Kudos

Executing via SE37 returns correct values.

Fabio

former_member186851
Active Contributor
0 Kudos

The same code returing the values in Qualtiy and Dev,

so might be an issue in the values.

The particular key is returing only single value in Production.

Former Member
0 Kudos

Via se37 values are ok

former_member186851
Active Contributor
0 Kudos

The same UDF Is returning multiple values in other environments?

This is strange.Try once Stop/Starting the channel.

Former Member
0 Kudos

In QTY same UDF returns correct values.

former_member186851
Active Contributor
0 Kudos

Ok Fabio,

SE37 returning multiple values,But not via UDF

Same UDF returns multi values in other environment.

Is this correct?

Did you try stop/Starting the channel once?

Former Member
0 Kudos

Hi,

UDF call a function module with a key.

In QTY FM returns correct record, in PROD seems to return always same record.

The key has 3 field, the last field was added in the last trasport from QTY to PROD.

In Prod seems that system don't valorize last field.

Fabio

former_member182412
Active Contributor
0 Kudos

Hi Fabio,

Adding to Raghu's reply above.

RFC adapter maintain the metadata cache for function modules, The cache only contains two key fields currently you need to refresh the function module cache by using below options. Raghu mentioned the first option, have you done this?


The cache is cleared when any of the following happen:

- The corresponding RFC channel is restarted

- The RFC channel is changed in the Integration Directory

- The RFC adapter service is restarted

- The Dependent J2EE services are restarted (MessagingSystem,

CPACache, and so on)

- The J2EE server is restarted

Regards,

Praveen.

Former Member
0 Kudos

Hi Praveen,

thank you!

I have solved by restarting the J2EE server.

Problem was exactly a cache problem, as you said.

Thanks!!!

Fabio

former_member182412
Active Contributor
0 Kudos

Hi Fabio,

I am glad to know that the problem was resolved, i see you mark all the replies as helpful, can you take a look again and see which ones are really helpful to resolve your problem means if the reply fixed your problem partially then you can mark them helpful, if the reply is not helpful for your problem then unmark them because in future some one else look at this thread they will quickly look only helpful and correct answer no need to read the entire thread which is very time consuming.

Regards,

Praveen.

Former Member
0 Kudos

Done!

Thanks

Fabio

Answers (0)