Skip to Content
avatar image
Former Member

How to get ObjectHeader?

625.png

Hi!

I have one problem with ObjectHeader.

When I click on table row, I want to get not only data but also object header. Could you tell me how can I do it?

And also I have Progress Indicator and I don't know why my OData not so gut connecting...I don't get text information....

Look on this picture

This this my code

    showvalue: function(oEvent) {
        
            var oSelectedItem = oEvent.getParameter("listItem") || oEvent.getSource();
     

            var s1t = oSelectedItem.getBindingContext().getProperty("Status01Text");
            var oText = this.getView().byId("s1t");
            oText.setText(s1t);
            //Status01
            var s1 = oSelectedItem.getBindingContext().getProperty("Status01");
            var oText = this.getView().byId("s1");
            oText.setText(s1);

            var s1p = oSelectedItem.getBindingContext().getProperty("Status01Perc");
            var oText = this.getView().byId("s1p");
            oText.setText(s1p);
            //Status02        
            var s2t = oSelectedItem.getBindingContext().getProperty("Status02Text");
            var oText = this.getView().byId("s2t");
            oText.setText(s2t);

            var s2 = oSelectedItem.getBindingContext().getProperty("Status02");
            var oText = this.getView().byId("s2");
            oText.setText(s2);

            var s2p = oSelectedItem.getBindingContext().getProperty("Status02Perc");
            var oText = this.getView().byId("s2p");
            oText.setText(s2p);
            //Status03
            var s3t = oSelectedItem.getBindingContext().getProperty("Status03Text");
            var oText = this.getView().byId("s3t");
            oText.setText(s3t);

            var s3 = oSelectedItem.getBindingContext().getProperty("Status03");
            var oText = this.getView().byId("s3");
            oText.setText(s3);

            var s3p = oSelectedItem.getBindingContext().getProperty("Status03Perc");
            var oText = this.getView().byId("s3p");
            oText.setText(s3p);

            //status04

            var s4t = oSelectedItem.getBindingContext().getProperty("Status04Text");
            var oText = this.getView().byId("s4t");
            oText.setText(s4t);

            var s4 = oSelectedItem.getBindingContext().getProperty("Status04");
            var oText = this.getView().byId("s4");
            oText.setText(s4);

            var s4p = oSelectedItem.getBindingContext().getProperty("Status04Perc");
            var oText = this.getView().byId("s4p");
            oText.setText(s4p);

            //Status05

            var s5t = oSelectedItem.getBindingContext().getProperty("Status05Text");
            var oText = this.getView().byId("s5t");
            oText.setText(s5t);

            var s5 = oSelectedItem.getBindingContext().getProperty("Status05");
            var oText = this.getView().byId("s5");
            oText.setText(s5);

            var s5p = oSelectedItem.getBindingContext().getProperty("Status05Perc");
            var oText = this.getView().byId("s5p");
            oText.setText(s5p);

            //Status 06

            var s6t = oSelectedItem.getBindingContext().getProperty("Status06Text");
            var oText = this.getView().byId("s6t");
            oText.setText(s6t);

            var s6 = oSelectedItem.getBindingContext().getProperty("Status06");
            var oText = this.getView().byId("s6");
            oText.setText(s6);

            var s6p = oSelectedItem.getBindingContext().getProperty("Status06Perc");
            var oText = this.getView().byId("s6p");
            oText.setText(s6p);

            var pi1 = oSelectedItem.getBindingContext().getProperty("Status01Perc");
            pi1 = this.getView().byId("pi1");

            var pi2 = oSelectedItem.getBindingContext().getProperty("Status02Perc");
            pi2 = this.getView().byId("pi2");
            var pi3 = oSelectedItem.getBindingContext().getProperty("Status03Perc");
            pi3 = this.getView().byId("pi3");
            var pi4 = oSelectedItem.getBindingContext().getProperty("Status04Perc");
            pi4 = this.getView().byId("pi4");
            var pi5 = oSelectedItem.getBindingContext().getProperty("Status05Perc");
            pi5 = this.getView().byId("pi5");
            var pi6 = oSelectedItem.getBindingContext().getProperty("Status06Perc");
            pi6 = this.getView().byId("pi6");
//Status01
            if (s1p > 95.00) {
                pi1.setPercentValue(100);
            } else if (s1p > 90.00) {
                pi1.setPercentValue(92);
            } else if (s1p > 85.00) {
                pi1.setPercentValue(88);
            } else if (s1p > 80.00) {
                pi1.setPercentValue(82);
            } else if (s1p > 75.00) {
                pi1.setPercentValue(78);
            } else if (s1p > 70.00) {
                pi1.setPercentValue(72);
            } else if (s1p > 65.00) {
                pi1.setPercentValue(68);
            } else if (s1p > 60.00) {
                pi1.setPercentValue(62);
            } else if (s1p > 55.00) {
                pi1.setPercentValue(58);
            } else if (s1p > 50.00) {
                pi1.setPercentValue(52);
            } else if (s1p > 45.00) {
                pi1.setPercentValue(48);
            } else if (s1p > 40.00) {
                pi1.setPercentValue(42);
            } else if (s1p > 35.00) {
                pi1.setPercentValue(38);
            } else if (s1p > 30.00) {
                pi1.setPercentValue(32);
            } else if (s1p > 25.00) {
                pi1.setPercentValue(28);
            } else if (s1p > 20.00) {
                pi1.setPercentValue(22);
            } else if (s1p > 15.00) {
                pi1.setPercentValue(18);
            } else if (s1p > 10.00) {
                pi1.setPercentValue(12);
            } else if (s1p > 5.00) {
                pi1.setPercentValue(8);
            } else {
                pi1.setPercentValue(0);
            }
<content>
                                    <ProgressIndicator id="pi1" class="sapUiSmallMarginBottom" width="80%" percentValue="0"
                                        displayValue="{Status01Text}: {Status01} ({Status01Perc} %)" showValue="true" state="None"/>
                                    <ProgressIndicator id="pi2" class="sapUiSmallMarginBottom" width="80%" percentValue="0"
                                        displayValue="{Status02Text}: {Status02} ({Status02Perc} %)" showValue="true" state="None"/>
                                    <ProgressIndicator id="pi3" class="sapUiSmallMarginBottom" width="80%" percentValue="0"
                                        displayValue="{Status03Text}: {Status03} ({Status03Perc} %)" showValue="true" state="None"/>
                                    <ProgressIndicator id="pi4" class="sapUiSmallMarginBottom" width="80%" percentValue="0"
                                        displayValue="{Status04Text}: {Status04} ({Status04Perc} %)" showValue="true" state="None"/>
                                    <ProgressIndicator id="pi5" class="sapUiSmallMarginBottom" width="80%" percentValue="0"
                                        displayValue="{Status05Text}: {Status05} ({Status05Perc} %)" showValue="true" state="None"/>
                                    <ProgressIndicator id="pi6" class="sapUiSmallMarginBottom" width="80%" percentValue="0"
                                        displayValue="{Status06Text}: {Status06} ({Status06Perc} %)" showValue="true" state="None"/>
                                </content>
    <IconTabFilter icon="sap-icon://documents">
                                <ObjectHeader id="title" title=" {Kokrs} {Obart} {Layout} ( {Pjahr} / {Version} ) " introActive="false" titleActive="false"
                                    iconActive="false">
                                    <attributes>
                                        <ObjectAttribute active="false"/>
                                        <ObjectAttribute active="false"/>
                                    </attributes>
                                </ObjectHeader>
625.png (34.0 kB)
896.png (18.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers