Skip to Content

Multiple FPM chart selection/deselection

Hi!

We have 2 charts within same FPM component and we would like to clear the selection of first one when selecting data from the other.

We are trying to do that at app controller feeder, using chart methods like: IF_FPM_CHART_TABLE_SELECTION~SET_SELECTION_BY_INDICES or CL_FPM_CHART_TABLE_MODEL->reset_selection

But when using any of them, the event "FPM_CHART_SELECTION" is triggered so we are not able to know if it is from the manual selection or the automatic deselection.

I mean, if we select some data from chart A, it is highlighted. Then we select data in chart B and we would like to unselect data from chart A.

We were able to unselect the data from chart A using mentioned methods, but both of them trigger a new event "FPM_CHART_SELECTION" with chart A information. We are not able to know if it comes from the manual selection of A chart (which should reset chart B selection) or the automatic event trigered selecting chart B (should not reset chart B selection)

Any suggestion?

Thanks a lot in advance,

Kr,

Agustín.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • May 02 at 09:10 AM

    Hello Agustín,

    there is the flag IV_RAISED_BY_OWN_UI in feeder methods GET_DATA and PROCESS_EVENT, which is only set if the event is triggered from the UIBB, where the feeder instance is assigned to.

    Additionally you will find the source UIBB of the event in the event parameters (as PARENT_UIBB).

    These information should be sufficient to distinguish the different CHART_SELECTION events.

    Best regards,

    Christian

    Add comment
    10|10000 characters needed characters exceeded

  • May 08 at 06:05 AM

    Hi Christian,

    We already tried with those options, the problem is that when the second chart is selected, if any of the mentioned methods is used, the action is the same than selecting the first chart again.

    I mean:

    Select chart 1.

    Select chart 2. (Own chart not deselected as we know the select event is raised by own ui). Chart 1 deselected, as the selection was done in chart 2. This deselection launch another event, from chart 1. So this one is not raised by own chart for the 2nd and then, the chart 2 is also deselected.

    Sorry for the explanation, its difficult if you are not trying it directly at system.

    Thanks a lot,

    Kr,

    Agustín.

    Add comment
    10|10000 characters needed characters exceeded

  • May 14 at 07:30 AM

    Hello Agustín

    I'm still not sure if I understand the issue - let me try to rephrase it:

    You have 2 charts A and B. Now the user selects something in A. And afterwards he selects something in B. Now you are deselecting Chart A by code. This results in an "echo" deselection event from chart A.

    Your problem is now that you don't know that the echo event wasn't triggered by user interaction. Because there is no way to decide this.

    And you want only to react on user interactions.

    So the problem is not, that you don't know which chart is raising the event, but the problem is that you don't know how the event is triggered.

    Unfortunately there is no simple solution for this.

    What you can do is comparing the selection you set by code with the selection provided by the echo event. If there is no difference ignore the event!

    A further solution is an upgrade to SAP_UI 7.52 and use the new Vizframe UIBB This UIBB allows to get rid of the echo events.

    Best regards,

    Christian

    Add comment
    10|10000 characters needed characters exceeded

  • May 24 at 09:33 AM

    Hi Christian,

    That was exactly the problem. We solved it with a workaround, using a custom event + attribute at app controller.

    Once the selection is done, using this approach we are able to determine if the selection was done manually or via coding.

    Thanks a lot!!

    Kr,

    Agustín.

    Add comment
    10|10000 characters needed characters exceeded