Skip to Content

Hi,

some of you may have already recognized that it is not possible to hide a thingGroup or row of a thingGroup on an overlay dialog using the sap.ui.viewModifications as described in the enhancement guide for the SAP TM collaboration portal. In order to hide a thingGroup or one of its rows, a new concept using sap.ui.ControllerExtensions has to be applied.

If you want to modify an overlay dialog, for instance the „Transport Details“ dialog for Freight Requests for Quotation, you need to identify the controller which refers to this overlay dialog, in this case the controller of view “sap.tl_collaboration_portal.view.requestsForQuotation”. Then you need to create a custom controller for exactly this view, which implements the following functions:

  • getThingGroupIdsToBeRemovedFromOverlay():
    Implement this, if you want to hide complete thingGroups on an overlay dialog, for instance group „Last Freight Quotation“ on overlay dialog „Transport Details“. Return an array with the technical IDs (string) of the thingGroup controls you want to hide.
  • getRowsToBeHiddenFromOverlay():
    Implement this, if you want to hide one or multiple rows of a thingGroup on an overlay dialog, for instance row „Dangerous Goods“ in group „Transport Details“ on overlay dialog „Transport Details“. Return an object of the following structure:

    { { thingGroupID      : “<thingGroupID1>”,

                 rowProperty        : “<PropertyOfRow1>” },

               { thingGroupID      : “<thingGroupID2>”,

                 rowProperty        : “<PropertyOfRow2>” }

             }

Within this object, property „thingGroupID“ must reflect the technical ID (string) of the thingGroup control, which contains the row, and property „rowProperty“ must contain the name (string) of the property, which is bound to this row, e.g. „DangerousGoodsIndicator“.

  • Enhance the custom Component.js as shown below:

jQuery.sap.declare(“zcoll_portal.Component”);

jQuery.sap.require(“sap.tl_collaboration_portal.Component”);

// new custom component

sap.tl_collaboration_portal.Component.extend(“zcoll_portal.Component”, {

  metadata : {

customizing : {

      “ sap.ui.controllerExtensions” : {

        “sap.tl_collaboration_portal.view.requestsForQuotation”: {

          controllerName: “zcoll_portal.CustomRequestsForQuotation”

        }

      }

    }

  }

});

  • Implement the custom controller Custom<xxx>.controller.js as shown below:

sap.ui.controller(“zcoll_portal.CustomRequestsForQuotation”, {

getThingGroupIdsToBeRemovedFromOverlay: function(){

      var aIdsToBeRemovedFromOverlay = new Array();

      // Hide Last Quotation Information

aIdsToBeRemovedFromOverlay.push(“thingGroupLastQuotation”);

      // Hide Business Partner Information

aIdsToBeRemovedFromOverlay.push(“thingGroupBusinessPartners”);

      return aIdsToBeRemovedFromOverlay;

  },

getRowsToBeHiddenFromOverlay: function(){

var oRowsToBeHidden  = {},

oNewElement1     = {},

oNewElement2     = {},

oNewElement3     = {};

      // Hide RFQ Status

oNewElement1.thingGroupID = “thingGroupRfq”;

oNewElement1.rowProperty = “LifecycleStatusDescription”;

      // Hide Contact Person Phone Number

oNewElement2.thingGroupID = “thingGroupRfq”;

oNewElement2.rowProperty = “ContactPersonPhoneNumber”;

      // Hide Dangerous Goods

oNewElement3.thingGroupID = “thingGroupTransport”;

oNewElement3.rowProperty = “DangerousGoodsIndicator”;

jQuery.extend(true, oRowsToBeHidden, [oNewElement1, oNewElement2, oNewElement3]);

      return oRowsToBeHidden;

  }

});


And that’s it! This is introduced with SAP Note 2354736 – Collaboration Portal: It is not possible to hide thingGroup or thingGroup row on an overlay, and the Enhancement Guide for the SAP TM collaboration portal will also be updated with this new concept very soon. Stay tuned!


Cheers,

Sabine

To report this post you need to login first.

10 Comments

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

  1. Vasantham S

    Hi Sabine,

    Thanks for helpful blog.

    Can we hide an item from ThingInspector with same approach?

    Ex: Cargo tab in Freight Order details screen.

    Thanks,

    Vasantham

    (0) 
    1. Sabine Hamlescher Post author

      Hi Vasantham,

      unfortunately, this specific new concept only allows to hide thingGrups or rows in thingGroups. As a workaround, you can however try to use the introduced functions in the controller to hide the item yourself…I did not try that, but I think it would be wort a try if you need to hide the item.

      Best regards,
      Sabine

      (0) 
      1. Vasantham S

        Hi Sabine,

        Sure. We need technical ID to hide the field. But NavigationItem (Cargo) dont have technical ID.

        Do you have any other approach to try.

        Thanks in advance.

        Regards,

        vasantham

        (0) 
        1. Sabine Hamlescher Post author

          Hi Vasantham,

          no, unfortunately not. If you have a use case where you need this, please open an SAP incident and we will analyze it.

          With kind regards,
          Sabine

          (0) 
        1. Vasantham S

          Thanks Sabine.

          Is it possible with any other extension methods?

          I could see the screen is built using HTML code. How can we resolve it.

          Thanks

          Vasantham

          (0) 
          1. Sabine Hamlescher Post author

            Hi Vasantham,

            I am sorry, but there is no support available for hiding parts of the detail screen. This would be a new requirement, which I can take with me, but this is nothing which we can provide a SAP Note for. Thanks for understanding.

            With ind regards,
            Sabine

            (0) 

Leave a Reply