cancel
Showing results for 
Search instead for 
Did you mean: 

BTP side-by-side extension - Annotation

sameerdesai
Newcomer
0 Kudos

Hello,

I'm new to BTP environment &  have started to learn BTP side-by-side extension via C_CPE_14 learning journey. I have a question reg. annotation for value help in Risks entity. below is snippet of code. 

if you see, in one place it's used "miti.descr" while in other place it's used "miti_ID".

Can you help me understand difference & when to use correct annotation?

Thank you.

Risk Entity Annotation

annotate rm.Risks with {
    miti
       @(Common: {
        //show text, not id for mitigation in the context of risks
        Text           : miti.descr,
        TextArrangement: #TextOnly,
        ValueList      : {
            Label         : 'Mitigations',
            CollectionPath: 'Mitigations',
            Parameters    : [
                {
                    $Type            : 'Common.ValueListParameterInOut',
                    LocalDataProperty: miti_ID,
                    ValueListProperty: 'ID'
                },
                {
                    $Type            : 'Common.ValueListParameterDisplayOnly',
                    ValueListProperty: 'descr'
                }
            ]
        }
    });
}
 
DB Schema
entity Risks : managed {
    key ID          : UUID @(Core.Computed: true);
        title       : String(100);
        owner       : String;
        prio        : String(5);
        descr       : String;
        miti        : Association to Mitigations;
        impact      : Integer;
        bp          : Association to BusinessPartners;
        // You will need this definition in a later step
        criticality : Integer;
}

entity Mitigations : managed {
    key ID       : UUID @(Core.Computed: true);
        descr    : String;
        owner    : String;
        timeline : String;
        risks    : Association to many Risks
                       on risks.miti = $self;
}
 

Accepted Solutions (0)

Answers (0)