Skip to Content
author's profile photo
Former Member

OTR - is it reallly that simple?

Hi all..

I have seen some posts by Craig and others talking about OTR. Most of my Error messages are OTRized.. but I never tested it because we didn't have a need for that..

Now we are planning to implement multiple language support for our BSP applications and I am trying to run some Tests and unable to produce the desired results.

          CALL METHOD runtime->get_otr_text
            EXPORTING
              alias = 'ZTRACK/TEST1'
            RECEIVING
              text  = my_mesg.

The above code ( for example ) always returns the values for 'my_mesg' in English.

My question is :

1) How do I test my BSP application in .. say .. French

I have tried to log on to my WAS box in French and also tried to Activate the Service in FRENCH with no luck..

2) Do I have to make my Labels ( for example ) as texts in OTR to use it? We are talking about 100s of texts on BSP application.. such as Labels, Push buttons etc..I am hoping this code will work..

          <phtmlb:formLayoutInputField id       = "fName"
                                       pos      = "col=1"
                                       label    = "<otr>First Name :</otr>"
                                       value    = "//mdl_track/LT_USR_SRCH.ZFIRST_NAME" />

or

<OTR>
          <phtmlb:formLayoutInputField id       = "lName"
                                       pos      = "asNeighbour,tiedTo=fName, row=+1,col=1"
                                       label    = "Last Name :"
                                       value    = "//mdl_track/LT_USR_SRCH.ZLAST_NAME" />
</OTR>

needless to say .. currently neither is working..

3) Is there any kind of installation that needs to be done to be able to run OTR on our Box.. I tried an ABAP test Program ( SE38 ) and it works only for Logon Language = EN and doesn't work if I log in with DE or FR.

REPORT  ZTEST_SHAY_1                            .
  class CL_BSP_RUNTIME definition load.
  data TEXT type STRING.
  TEXT = CL_BSP_RUNTIME=>GET_OTR_TEXT(
      ALIAS = 'ZBTS/ZCONGRESS_ZMGR_EVAL_ACT_ITEM' ).
  write / TEXT.

Any help in this regard is highly appreciated..

Many thanks in Advance..

'Shay

PS: Our box is SAP_BASIS 620 SAPKB62043 ( SP 43)

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Posted on Mar 02, 2005 at 07:26 PM

    You can test with a different language by adding it onto the url. Use sap-language. For example .../myapp/page.htm?sap-language=fr. However, you must NOT start it with a mangled URL, as the language is then already in there and your new requested language is not added.

    Keep in mind that you must translate all these texts. OTR just marks the text for you and push them into translation program. Then you have to start the correct transation (I have forgotten) and exercise your French.

    Add comment
    10|10000 characters needed characters exceeded

    • <i>2) Do I have to make my Labels ( for example ) as texts in OTR to use it? We are talking about 100s of texts on BSP application.. such as Labels, Push buttons etc..I am hoping this code will work..</i>

      Yes, you will have to translate them all but the nice thing about otr is that you can reuse a lot textpieces

      <i>1) How do I test my BSP application in .. say .. French</i>

      Modify the url like Brain told you or switch the language in your internet explorer (that's what I do when I test our english translations). Go internet options->general tab->Button languages. There you can add and set the language you need.

      <i>3) Is there any kind of installation that needs to be done to be able to run OTR on our Box.. </i>

      No it should work right away

      Further hints:

      -You have to use the transaction se63_otr for translating your otrs in the different languages.

      -When you are using MVC don't forget that SAP has this nice features called textpools and every class has its own textpool. It's great stuff especially for error messages (use the textpool in your controller classes).

      -Take a look at craigs weblog:

      /people/sap.user72/blog/2004/09/15/bsp-howto-exploring-bsp-development-and-the-miniwas-620-part-4b

      Have a nice day

      Thomas

  • author's profile photo
    Former Member
    Posted on Mar 02, 2005 at 06:54 PM

    Hi there, I know how you feel.

    How have you maintained the OTR values for your different languages?

    To test the best way of course is to login in that language then you are sure 100%.

    Try something like this code in your testing.

    <phtmlb:formLayoutInputField id = "fName"
    pos = "col=1"
    label = "<%= otr('ZTRACK/FirstName') %>"
    value = "//mdl_track/LT_USR_SRCH.ZFIRST_NAME" />
    

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Craig for your post.

      See.. I didn't know that we HAVE to maintain ( manually ) the texts in all different Languages ( desired Lang. ).

      I didn't have authorization to create a Transport request and hence couldn't really use SE63 to create Translation.

      Now.. I have Maintained texts for my OTR in two different Languages.. ( although the translation is not accurate - I am still testing )..

      I am not sure HOW TO TEST if that is working..

      How do I log into a BSP with a different Log-on Language..

      I tried logging into my 620 box with DE as Logon

      I also tried concatenating my BSP URL with

      ?~sap-language=DE still no luck.

      When I say Display OTR concept I can see two Languages that are maintained for that OTR text.

      To test for Q1 and Q2 .. I need to log into the BSP with DE as my Language.. How do I do this( how to test my BSP)?

      Thanks agin for your response ...

      Your question solved my Q3.It is working..

      >

      > How have you maintained the OTR values for your

      > different languages?

      >

  • author's profile photo
    Former Member
    Posted on Mar 02, 2005 at 07:53 PM

    Thanks All.

    Craig, Brian and Thomas..

    You gentlemen have a fine day as well ( or is it night? )..

    'Shay

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Thomas, your practice looks nice. actually I use OTR(Package/alias) ... Users were a little bit disturbed by SE63 and difference between short and long otr...

      Transport of OTR it's strange ... Some translations will be unvisible... I have to do a $sync or $otr ...

      Ok this message is to say : your practice will impact mine.

      Thanks a lot