Application Development 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: 

RFC_READ_TABLE - long texts

Former Member
0 Kudos
1,272

Hi,

I use fm RFC_READ_TABLE to download long texts from table STXL to Excel by using VBA. However the format of the texts in Excel (VBA) is inadequate and some special characters of our alphabet are replaced with '#'.

Example> 18/11 p#epl-> nový po#adavek zák.

Anyone has an advice, please?

1 ACCEPTED SOLUTION

Former Member
0 Kudos
553

Hi,

Where to find DLL version. Unicode issue sounds probable.

The original text is: dělej z "B" vřetně vrtání z průměru

The output text is: d#lej z "B" v#etn# vrtání z pr#m#ru

Appreaciate your help!!

9 REPLIES 9

Former Member
0 Kudos
553

Hi brtkow,

unless RFC is necessary, you could use FM READ_TEXT.

Regards

REA

Former Member
0 Kudos
553

Hi,

I need RFC as plan to call it from Access and downloaded there as well.

Thanks anyway for reply!

Martin

0 Kudos
553

Then maybe FM RFC_READ_TEXT

Rob

Former Member
0 Kudos
553

HI,

RFC_READ_TEXT is giving me the same error letters - isn't there any field in the interface which is controlling this?

Thanks,

Martin

0 Kudos
553

Hi, Which DLL are you using? Could this be a unicode vs non-unicode issue?

Could you post what the text should be? I'll try and re-create issue.

Edited by: Mike Watson on Dec 8, 2010 2:21 PM

Former Member
0 Kudos
554

Hi,

Where to find DLL version. Unicode issue sounds probable.

The original text is: dělej z "B" vřetně vrtání z průměru

The output text is: d#lej z "B" v#etn# vrtání z pr#m#ru

Appreaciate your help!!

0 Kudos
553

Couldn't re-create as soon as I paste into my SAP implementation it makes the characters change. But pasting into notepad did re-create so I'd say unicode or the language used on your extracting system (the one running Excel). There are two DLLs used for RFC - librfc32.dll and librfc32u.dll the one with u is used for unicode both in Windows>system32. I've always plugged them into VS.net so not sure how you would reference the specific DLL from Excel.

Have you tested the function module RFC_READ_TEXT in se37 - what was the result?

If it is ok in the results of the FM then you are down to your local machine, excel and the DLL your using.

The DLLs appear in VS as "SAP Remote Function Call Control" and "SAP Remote Function Call Unicode Control" if that help.

Good luck.

Former Member
0 Kudos
553

Thanks. I checked some docs relating to Unicode and it seems this causes the issue with VBA in Excel.

Martin

holger_khn
Contributor
0 Kudos
553

Hello. Very late reply on this. But may anyone search for an solution on this. When you use RFC_READ_TEXT in MS Office VBA create your SAP connection with reference to UNICODE:

Set sapConn = CreateObject("SAP.Functions.Unicode")