cancel
Showing results for 
Search instead for 
Did you mean: 

problems with RFC_READ_TEXT FM

Former Member
0 Kudos

Hello,

I have trouble with RFC_READ_TEXT fm. I supply all data and call it but I get no data. I discovered what's wrong but I do not know how or where to correct.

When I check php discovered description of RFC_READ_TEXT I find this:

TEXT_LINES MANDT C 3 0 offset = 0 TDOBJECT C 10 0 offset = 3 TDNAME C 70 0 offset = 13 TDID C 4 0 offset = 83 TDSPRAS C 1 0 offset = 87 COUNTER N 3 0 offset = 88 TDFORMAT C 2 0 offset = 91 TDLINE C 132 0 offset = 93

TDSPRAS is wrong, size should be 2 to allow 2 letter language description. However, when I call RFC_READ_TEXT from se37 TDSPRAS size is correct (2) and it accepts language description and returns correct data.

In php I tried to manually define RFC_READ_TEXT intereface and correct TDSPRAS field length and following field offsets but then I would get another error.

RFC call from php totally ignores Language during rfc login and defaults to user's SAP default language. And RFC_READ_TEXT accepts only single letter for language which in most cases is not enough.

Is there a way to overcome/workaround this problem with RFC_READ_TEXT or make it use selected language?

Accepted Solutions (0)

Answers (1)

Answers (1)

alespad
Contributor
0 Kudos

Hi Sasha,

it's correct because Sap Dictionary Domain SPRAS has a Conversion Routine in Output Characteristic , the real size is 1;

Check the functions CONVERSION_EXIT_ISOLA_INPUT and CONVERSION_EXIT_ISOLA_OUTPUT

for example, English EN = E ,ITALIAN IT = I