cancel
Showing results for 
Search instead for 
Did you mean: 

Java <JCo> SAP XI <RFC> SAP R/3 6.C ... Unicode issue

Former Member
0 Kudos

Hello,

My scenario is very simple. I'd like to connect a Java program to a SAP R/3 (MDMP) for RFC calls (in both direction), using SAP XI (some of the RFC calls will redirected to some other systems). I use SAP JCo v2.1.8 and tried with Java 1.4.2_09 and Java 6.0.

It works well when the Java program is calling a function module, but when SAP R/3 is doing it, the returned texts looks like: S#A#P# #J#C#o# #v#2#.#1#.#8# #(#2#0#0#6#-#1#2#-#1#1#)# (the text should be SAP JCo v2.1.8).

It looks like an issue with Unicode. Although I didn't check the Unicode checkbox in the RFC sender adapter (the RFC receiver one doesn't offer the possibility to specify unicode or not).

Do anyone have a solution ? Is it a code in the Java program or something to set in SAP XI / SAP R/3 ?

Thanks in advance for your help.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Finally, the issue is linked to the fact that string in abap are fixed sized and in java are variable. By padding the spaces at the end, this issue is solved.

Former Member
0 Kudos

This is a workaround solution. In the case of this prototype it is ok, but the final plan is to migrate a web based application. It was directly connected to one SAP R/3, but now we would like to connect it to SAP XI because a few RFC calls will be re-directed to some other systems, but the majority of them will we'll still be sent to the SAP R/3. We don't want to make development on this part for cost reason (and time). Plus on some text there are the "#" character that is legitimate.

Former Member
0 Kudos

I you can't figure a way out of this, just use a UDF in mapping and use regex and replace # with null, there's probably a better way though.