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: 

Display texts in multiple languages using READ_TEXT

Former Member
0 Kudos

<Modified the subject line>

Function module read_text will give result only if the language entered in the function module is same as the text language stored in the document(sale order) i.e. if the text is stored in EN lang then if we give EN in the function module then only the system will give the result, if we give JA(JAPNESE) then system wont convert EN to JP and therefore system will not give any result

My requirement is system should give the desired result across language and should not ONLY display the result to the language on what the text is stored. As said in above example system should ALSO show the result for JP even if text is stored in EN.

Can anyone suggest on how we can translate the text.

Raj.

Moderator Message: Please use more specific subject-lines for your question.

Edited by: Suhas Saha on Nov 24, 2011 12:45 PM

8 REPLIES 8

SuhaSaha
Advisor
Advisor

Can anyone suggest on how we can translate the text.

First-things-first, don't expect SAP to translate the text. The translation has to be maintained by the user, i.e., in this case user needs to maintain the text explicitly in JP(t-code SO10).

My requirement is system should give the desired result across language and should not ONLY display the result to the language on what the text is stored. As said in above example system should ALSO show the result for JP even if text is stored in EN.

This can be achieved only if the texts are maintained in relevant languages. You can follow the following algorithm,

1. SELECT data from STXH using the text id, text object & text name. You'll get the languages in which the text is maintained.

2. LOOP on the internal table from Step1 & call the FM READ_TEXT passing the language( STXH-TDSPRAS ).

BR,

Suhas

Former Member
0 Kudos

Thanks for your valuable suggestion and I understand your concept, in our case the text entered by the user is a free text which cannot be predicated, in such case it cannot be translated in advance, what would you suggest/?

Raj

0 Kudos

Hello Raj,

in our case the text entered by the user is a free text which cannot be predicated

If it is a free text, then where do you intend to use the READ_TEXT module?

Former Member
0 Kudos

Free text I mean is user can enter any sentence. Currently these sentence are stored under a text type in the sale order, We are accessing this text xt from a portal using this read_text function module, if it is a free text why do you say that we cannot use this FM?

We want system to translate the text stored under a text type to any language passed as input, if read_text cannot do this is there any other fm which can solve my requirment?

raj

Former Member
0 Kudos

Hi Raj

Your requirement seems not to make a sense

Just Suhas wrote you can only read the text in the languages used to write it.

If you need the text is maintained in several languages you can only impose the text is written in all languages you need by the user while the sales order is created or changed.

SAP doesn't translate a text automatically: if you want to do it, you can only read the text in the original language by fm READ_TEXT and then to create a your own routine (something like google translator) to translate the text.

Max

Former Member
0 Kudos

I dont knw why are you telling that it does'nt make sense when the business calls for it, i had clearly told that if it is not possible thru read_text, whether it is possible to make this happen thru any other function module.

Understood that standard sap does not support this requirment.

Raj

0 Kudos

I dont knw why are you telling that it does'nt make sense when the business calls for it

Golden rule of consultants, "Business is not always right"

As you've already realised standard SAP doesn't cater to this requirement, so you need you analyse the options at hand. You can think about consuming some translation service available online(for e.g., Google translator). But is it worth the effort?

To be honest, i'm still not clear with your requirement! You wan the EN long text to be automatically translated to JP, or is the JP text already available in the system?

Please clarify!

BR,

Suhas

Former Member
0 Kudos

I find that this golden rule is not applicable for my requirement

I want the text that is stored in one language to be automatically converted to other language based on my language selection. It was explained by you that it is not possible in standard, hence closing the ticket.

Edited by: RAJ THOMAS on Nov 24, 2011 12:38 PM