Skip to Content
avatar image
Former Member

Calculatged field of a nested field in linked lookup


I have the following situation

Calculated field --> Lookup table --> field (lookup table) --> field

Calculated field --> Customer Hierarchy --> Branch --> Code

and if you look on the calculated expression is:

"Customer Hierarchy [Branch] & 4 digits generated sequentially"

the problem is that branch is a lookup and i don't want to get the default field but a other field from this lookup.

if it was java it was something like this

"Customer Hierarchy [Branch].Code & 4 digits generated sequentially"

Were "Code" is a field inside Branch

What is the solution?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 17, 2006 at 05:11 PM

    Hi Noam,

    I am assuming that your scenario is as given below:

    1. You have a Field (Let us say CH) in your main table refering to a "Customer Hierarchy" (Hierarchy table).

    2. This Customer Hierarchy table has a field "BR" and the field type of this field is "Lookup[Flat]" and the lookup is to another flat table "Branch".

    3. You created a calculated field on your main table with a reference to the field that has Lookup to Customer Hierachy.

    4. You are trying to create a calculation expression on this field with a reference to field CH. But, you also want to bring the "Code" in the table "Branch".

    Calculation Expression currenctly supports selection of all fields to one level -> In your case, you can select all the fields available in your Customer Hierarchy table while rering to "CH" field. So, all the fields in the "Fields" drop down of your calculation Expression editor will be CH[Field 1 in Customer Hierarchy], CH[Field 2 in Customer Hierarchy], CH[BR] etc.

    Here, you will be able to see only the field "BR" but not all the fields in the "Branch" Lookup table. By default, the "CH[BR]" field will hold the value corresponding to the "DISPLAY FIELD" of the underlying "Branch" table. If you want to get another value ( "Code" in your case), you need to change this field to be "Display Field" in the underlying Lookup table.

    Hope the above explanation (eventhough it may be confusing...:) ) helps you.

    Please let me know in case I understood it completely wrong !


    Rajani Kumar

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Noam,

      That is what I feel to the best of my knowledge. If you would like to know what SAP Development team says on this, I would suggest to log an OSS for this.

      Hope you understand,


      Rajani Kumar