cancel
Showing results for 
Search instead for 
Did you mean: 

RFC 2 File Error in RFC sender: java.lang.ArrayIndexOutOfBoundsException

Former Member
0 Kudos

Hello,

I'm sending data asynchronously from R3 to a file through XI, I've got the RFC destination (in R3) and sender RFC channel (in XI) configured and tested. Working fine.

Then in my report I've got the following code that sends 1 string and 4 internal tables 2 to XI:



  CALL FUNCTION 'Z_RFC_ENVIAR_DATOS_PSP'
    IN BACKGROUND TASK DESTINATION 'SAP_2_XI'
    EXPORTING
      RUTA                       = p_ruta
    TABLES
      IT_DEMANDA           = p_gt_demanda
      IT_STOCKS              = lt_stocks
      IT_CUARENTENAS   = lt_cuarent
      IT_COMPRAS           = lt_repartos.

  COMMIT WORK.

I've done that king of connection several times and allways worked but now I've got that error in the communication channel monitoring at RWB:

Error in processing caused by: java.lang.ArrayIndexOutOfBoundsException

And no message is created in XI. What can it be?

Thanks for your help

Accepted Solutions (0)

Answers (2)

Answers (2)

prateek
Active Contributor
0 Kudos

Have you tried to run the RFC standalone with the same data as you are doing in case of using the report. There could be some problem with your RFC code too.

Regards,

Prateek

Former Member
0 Kudos

Yes Prateek, I've tried that

Former Member
0 Kudos

Solved... The RFC destination was configured OK and the test works fine but in my last SAP ECC system there is a radiobutton to specify if the destiny system is non-unicode or unicode. By default that radiobutton is non-unicode... The value must be unicode in my case.

In all the RFC's destinations that I've created in other SAP versions till now I never changed that parameter

Former Member
0 Kudos

Wow, thank you for posting your solution. I've been scratching my head all day at this one and the Unicode setting nailed it.

0 Kudos

Oh so thanks for posting solution. it saved a lot of time.

Former Member
0 Kudos

Hi Marshal,

Why are your using report in your case ?

Thanks,

Pooja

Former Member
0 Kudos

Hi Pooja,

My report gets all the data that I need and at the end calls the RFC 'Z_RFC_ENVIAR_DATOS_PSP' to send the collected data to XI. And finally XI must generate 4 files, 1 for each internal table.

The problem is that the data is not reaching XI yet because my problem with RFC channel

Former Member
0 Kudos

Nobody can help me?

former_member9864
Participant
0 Kudos

Hi Marshal,

where is this error occurring? which channel? RFC or File Adapter? I assume it's file adapter, or? Check your Content Conversion Rule.

If possible, you can paste your XML content after the mapping and your configuration in the file adapter.

rg,

Chen

Former Member
0 Kudos

Hi Chen Lin,

The problem is with the adapter but no message is generated yet in XI, so I don't have XML yet.

The RFC sends the data to XI through the RFC destination and at this point something is wrong because that error is produced. The error is visible in both sides, In transaction SM58 at R3 I can see the error that tRFC hasn't been precessed because the ArrayIndexOutOfBoundsException.

But if I go to communication channel monitoring I can see the same error too, so that confirms that the communication between R3 and XI works fine but something is wrong and the error don't give me more details