Skip to Content
Author's profile photo Horst Schaude

Easy Way of Using Language-Dependent Descriptions for Identifiers

With 1605 the Business Object Definition Language (BODL) will support a new type of nodes which can be used to display text in different languages dependent on the logon language (see Delta Highlights for 1605).

Imagine you have master data with some text maintained in the languages of your customers and want to display theses text in the individual logon language of each customer.

Currently you need a transient element, some ABSL coding to fill this element and an association based on a valuation with this transient field. 😯

With the new annotation [Description] you need nothing of that stuff. 😎

Precondition

The node with the text or descriptions has to have at least one element which is typed by a GDT with a language code component, so the resp. language can be determined (see example).

Of course this makes only sense if the node has a multiplicity to many.

This feature will work for identifiers at the Root node level as well as in other nodes.

Example

We will take this BODL for our example:

import AP.Common.GDT as apCommonGDT;

businessobject SomeBusinessObject {

    [AlternativeKey] [Label(“Identifier”)] element Id : ID;

    [Label(“Quantity”)] element Quantity : Quantity;

    [Label(“Amount”)]   element Amount   : Amount;

    [Label(“Date”)]     element Date     : Date;

    [Description] node SomeText [0,n] {

        [Label(“Description”)]         element Description     : LONG_Description;

        [Label(“More Description”)]    element MoreDescription : LONG_Description;

        [Label(“Another Description”)] element AnotherDescript : LONG_Description;

    }

    node ThisProduct {

        element ProductId : ID;

        [Description] node ProductDescription [0,n] {

            [Label(“Description”)] element Description  : LONG_Description;

        }

    }

}

The first task of this example is to use the language dependent content of the element Description of the node SomeText for the element Id of the Root node.

To show that this works not only at the Root node level we do the same for the identifier ProductId of the node ThisProduct.

User Interface

After activation this BODL you generate the UIs and define in the resp. UI model from which node the description has to be taken.

Just open the UI Designer for the resp. UI model: First we work on the OWL.

In the DataModel section we choose here the SAP_UUID and define in the “Design” tag the “IdentifierDescription”.

Here we choose from the Business Object model the element “Description” from the “SomeText” node. This means that this element even does not need to be part of the data model itself, but is taken from the Business Object model direct.

/wp-content/uploads/2016/04/img1_923487.png

Finally we define in the Designer section for the same SAP_UUID element in the tag “CCTS Information” that the “Presentation Mode” will be “DescriptionOnly”.

/wp-content/uploads/2016/04/img2_923488.png

We do the similar thing for the ProductID (as described above) in the ThingInspector UI, but here we choose “IDAndDescription” as “Presentation Mode”.

/wp-content/uploads/2016/04/img3_923561.png

Runtime

After maintaining the resp. data in the several languages, let’s see what we get.

Of course the user needs to be assigned to the resp. work center. πŸ˜‰

  1. First we logon into the system with logon language “English”
    /wp-content/uploads/2016/04/img4_923562.png
  2. The OWL is showing us the English description for the identifier
    /wp-content/uploads/2016/04/img5_923563.png
  3. In the ThingInspector we verify the maintained language dependent descriptions
    /wp-content/uploads/2016/04/img6_923564.png

    and the ProductID
    /wp-content/uploads/2016/04/img7_923565.png

  4. So we try this for German
    /wp-content/uploads/2016/04/img8_923566.png

    and get this for the identifier
    /wp-content/uploads/2016/04/img9_923567.png

    and this for the ProductID
    /wp-content/uploads/2016/04/img10_923569.png

  5. The same for French
    /wp-content/uploads/2016/04/img11_923570.png

    will return
    /wp-content/uploads/2016/04/img12_923571.png

    as well as
    /wp-content/uploads/2016/04/img13_923572.png

That’s all, folks.

Horst

PS: Please excuse my French. 😳

Assigned Tags

      20 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Chandan Bankar
      Chandan Bankar

      Awesome πŸ˜€ Thanks for sharing this new feature!!

      Cheers,

      Chandan

      Author's profile photo Former Member
      Former Member

      Thanks for this πŸ™‚ !

      Any other interesting features in 1605?

      Thanks,

      Will

      Author's profile photo Horst Schaude
      Horst Schaude
      Blog Post Author

      Hello Will,

      We will wait for Kumar Raj Moorthy to add this info into the Delta Highliths section. πŸ˜‰

      Bye,

         Horst

      Author's profile photo Kumar Raj Moorthy
      Kumar Raj Moorthy

      Hello Will,

      Please find the key 1605 features added in the Delta highlights section.

      Regards

      Kumar Raj

      Author's profile photo Former Member
      Former Member

      Thanks, can you show and simple example of web service to fill language data in this case ?

      Cheers Ognian

      Author's profile photo Horst Schaude
      Horst Schaude
      Blog Post Author

      Hello Ognian,

      Sorry, this feature is for UI only. πŸ™

          Horst

      Author's profile photo Former Member
      Former Member

      Hi Horst,

      but how you are going to uploadd mass data in this case ?

      Cheers Ognian

      Author's profile photo Horst Schaude
      Horst Schaude
      Blog Post Author

      Hello Ognian,

      Sorry, I did not get your point: πŸ™

      Do you mean

      • How to maintain the data so the UI can show the text in the resp, language?
      • Hot to configure a WebService using this feature?

      Bye,

          Horst

      Author's profile photo Former Member
      Former Member

      Hi Horst,

      Usual case scenario is:

      You have language dependent data in structured way ( file, db etc.) and you want to upload it based on some key. For example English value or any unique key.

      So you have tab delimited file for example:

      Key Lang Description

      1     EN      One

      1     DE      Eins

      2     EN     Two

      2     DE     Zwei

      3     EN     Three

      3     DE     Drei

      etc.

      So prior to 1605, you create webservise

      <Node>

           <Key>1</Key>

           <Lang>EN</Lang>

           <Value>One</Value>

      </Node>

      <Node>

           <Key>1</Key>

           <Lang>DE</Lang>

           <Value>Eins</Value>

      </Node>

      etc.

      Now wherever you create webservise for this BO with description, how you are going to do mass entry.

      Cheers Ognian

      Author's profile photo Horst Schaude
      Horst Schaude
      Blog Post Author

      Hello Ognian,

      The node annotated with [Description] can be used as a regular node in any coding.

      So your WebService will work as before.

      Only the UI makes an advatage out of this information.

      HTH,

          Horst

      Author's profile photo Former Member
      Former Member

      Thanks Horst.

      Cheers Ognian

      Author's profile photo Md Quddus
      Md Quddus

      Wow.. Thanks you. Horst Schaude.

      Regards,

      Quddus.

      Author's profile photo Former Member
      Former Member

      Hi Horst! Thanks for information. I believe we can use the main idea to achieve one of our requirement.

      We have an Embedded Component (based on Custom BO) under Account, having two fields based on OVS. Values in the OVS are language dependent, like in your example related to SomeText node. The problem we have is to save value into ID field under EC and show the Description in users language.

      As far as I understand you example describes case when child records already filled for root record. But how can we pass and display description in EC from OVS.

      P.s. We are using OVS because we are synchronizing records with external system.

      Author's profile photo Horst Schaude
      Horst Schaude
      Blog Post Author

      Hello Oleg,

      I am throughly aware of your requirement but

      • The ID will be the same for any language
        The system will determine the description durng runtime based on the current logon language
      • If the description showed in the OVS is based on such an [Description] annotated association the langauge-dependent value will be automagically determined by the system on runtime
        As long as there is a value in that given language

      HTH,

         Horst

      Author's profile photo Ludger Buenger
      Ludger Buenger

      Wow.

      This feature two years earlier would have save me multiple weeks of work... πŸ™‚

      Author's profile photo Horst Schaude
      Horst Schaude
      Blog Post Author

      I am happy that you find it useful. πŸ™‚

      Thanks,

          Horst

      Author's profile photo Former Member
      Former Member

      Hi Horst,

      How can we handle data sources based on this node? For instance, show only values for the logged language? A data source will show all the entries available on the node with such annotation.

      If not possible with this approach, is there any other which might help this case?

      Thanks.

      Fernando

      Author's profile photo Horst Schaude
      Horst Schaude
      Blog Post Author

      Hello Fernando,

      This annotation works only for Custom Business Objects on the UI.

      If you access the node without any filtering you will get all values.

      I don't know if a similar mechanism is availabel for Data Sources. πŸ˜•

      Bye,

         Horst

      Author's profile photo Cesar Huasupoma
      Cesar Huasupoma

      Hi,

      Is it possible to do this inside a Business Object Extension? And this work on the new Cloud Studio? Because i try to replicate this but i don't find the tag "IdentifierDescription" and i'm lost right now.

      Thanks.

      Cesar Huasupoma

      Author's profile photo Horst Schaude
      Horst Schaude
      Blog Post Author

      Hello Cesar,

      The annotation is also supported for extension nodes in a SAP BO.

      But - as the Extension Explorer in the UI does not support such stuff - you need to model your own UI, be it an EC or from scratch.

      HTH,
      .Β  Β  Horst