Skip to Content

Hi everybody,

There are four different ways to store text in a Web Dynpro and FPM application.

  1. Data element
  2. OTR (Online Text Repository)
  3. Text elements of a class
  4. In the configuration

You can read all about how to translate these texts in the following blog: ** TEAM FPM ** – All about Translation and Texts of FPM applications

But what about the choice of which way we should use to store the text.

In this blog I will describe my preferred choice in different scenario’s. This is not a guideline from SAP, but it is my preferred way based on practical experience.

First of all you should always prefer to use a data element with the correct text.

Unfortunately this is not always possible.

There are four scenario’s which I will describe below based on the difference that the text is static or dynamic and if you use the text for a Web Dynpro (freestyle) or for FPM.

Scenario 1: The text is static and is bound to an UI element in Web Dynpro

Preferred choice: You should store the text in the OTR (Online Text Repository)

Why: You can easily translate the text with function module: SOTR_API_WB_TRANSLATE

Scenario 2: The text is static, but not bound to an UI element in Web Dynpro

Preferred choice: You should store the text in the text element of a class

Why: If a text in the OTR is not bound to an UI element, then you can’t easily translate it. For example you won’t see the text in function module: SOTR_API_WB_TRANSLATE

Scenario 3: The text is static and used for FPM. This includes the FPM application (OIF, OVP, GAF) and also the GUIBBs

Preferred choice: You should store the text in the configuration.

Why: If you would use the OTR, then you don’t see the text in administration or configuration mode, but you see the link to the OTR. That is not very user friendly.

Tip for FPM feeder class. In the method GET_DEFINITION set “label_by_ddic = abap_false” for table ET_FIELD_DESCRIPTION.

If you do this, then you will have the option to change the label in the configuration. Also if you leave the label empty in the configuration, then FPM will use the label of the data element.

Scenario 4: The text is dynamic and used in Web Dynpro or FPM

Preferred choice: You should store the text in the text element of a class

Why: The text is not bound to an UI element. You can’t easily translate it when you use the OTR. For example you won’t see the text in function module: SOTR_API_WB_TRANSLATE

Best regards,

Robin Vleeschhouwer

@RVSAP

RV SAP Consultancy

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Naimesh Patel

    Hello Robin,

    Using the Text Symbols of Class, raises the question of the visibility of the Text Symbols. I had trouble getting the text symbols of the Super class in Sub class, which I have noted down with the solution on my site – ABAP Objects – Access Text from Super Class Text Symbols.

    It also raised the question about the visibility of the Text Symbols as I asked in the Poll – Poll – Are Text Symbols Private or Public in OO ABAP? | ABAP Help Blog When I got very mixed votes.

    I would try to stay away from the Text Symbols of the class since I can’t reuse them.

    Thanks,
    Naimesh Patel

    (0) 
  2. Wouter Peeters

    Hello Robin,

    Great post. But to be honest, in case of static text but not bound to an UI element, I create dummy UI elements.

    Scenario example: Webdynpro ALV where some columns need a different header/tooltip, across multiple components. I created OTR texts for it and created a dummy transp. container with dummy UI elements, where the OTR texts were bound to it.

    Just for tracability (where used) and easier maintenance using the *WB_TRANSLATE function module. If I’m correct, you cannot use a where used list with Assistance Class texts, unless you do an effort yourself with creating constants for all message class numbers and use these.

    I’ve had big issues with translations on this before. But now with the OTR translation function module, and bit more effort by creating dummy UI elements ( set to invisible ) I can easily trace them back and translate them.

    ( to be honest, I never use assistance classes )

    Regards,

    Wouter

    (0) 

Leave a Reply