Skip to Content

How to extend cargo management tab in the cockpit?

Dear experts,

We are trying to add the consignee description to the cargo management tab in the cockpit. We have identified the component as /SCMTMS/WDCC_BOOK_LOAD, but we have problems to find what is the structure that must be extended to add the new fields, as well as the method to fill these fields. Would there be a kind of procedure to find this information by ourselves? We have done this kind of thing in the past, but other developpers had created a new component and it was easy to just modify the same Objects (also described in note 1818803). But now we start from scratch...

Also, is it better to copy the component configuration and modify it directly (how to use it in the cockpit then?), or is OK with creating some customizing for the existing component?

Thanks for your input

Petra

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 27, 2015 at 11:59 AM

    Hi Petra,

    I strongly advise to create a customizing for the component, instead of copying, but technically both work.

    The UI structure is maintained, in the corresponding FBI view, whose name can be determined as per here: UI: Determining the names of the relevant repository objects

    In this case, it is /SCMTMS/S_UI_FRE_ORDER_OVW, which needs two additional fields, like SHIPPER_DESCR and CONSIGNEE_DESCR.

    To fill this fields with data, I suggest to create an enhancement in class /SCMTMS/CL_UI_CONVERSION_TOR. Add a POST-Exit to the method BUILD_MAP_TABLE, in which you write:

      IF iv_ui_struct = '/SCMTMS/S_UI_FRE_ORDER_OVW'.

        mv_call_exit = abap_true.

      ENDIF.

    This will trigger the call to the method CALL_EXIT_METH in the same class, during data conversion (from backend format to UI format). Therefore, you need a POST-Exit attached to this method as well, in which you write (of course, IF mv_ui_struct = '/SCMTMS/S_UI_FRE_ORDER_OVW'...) the coding to determine the missing data. The parameter CT_UI_DATA is generically typed in the signture, but it can be cast to a field symbol which is TYPE TABLE OF /SCMTMS/S_UI_FRE_ORDER_OVW (to avoid using dynamic "assign component"). It should already contain SHIPPER_ID and CONSIGNEE_ID with correct values.

    Another performance hint: one should not try to determine the descriptions for each partner sequentially. Instead, there should be two LOOPs over the data table, one to collect all relevant IDs, then another one to write the descriptions into table. Between them, the functionality to determine the description can be called. You can use e.g. /SCMTMS/CL_BUPA_HELPER=>IT_PARTNER (providing IT_PARTNER).

    Regards,

    Dragos

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Dragos,

      your advise has helped us fulfill our customers need. We have followed your advise and included the field in the cockpit on the cargo management tab. Now, we can show the cars and their customers on one view (see picture). Thank you so much !

      Regards

      Petra

      For confidentiality reasons, I had to grey out the customer description, but it is visible that they are shown. To show only the products, I have used standard hierarchy PSHP (Parcel shipment).