Skip to Content
avatar image
Former Member

UI refresh when changing data in cross-derivation BADi

We have the following scenario:

We created a Z-Entity for a material. Using the standard insert/delete options for this entity works fine and creates the new entities for this material in the data model and shows them in a table in the UIBB.

Then we enhanced the UIBB with two extra buttons. Depending on which button is pressed, an entity should be created/copied from another material. This implementation is done in the cross-entity derivation BADi.

We enhanced method /PLMU/IF_FRW_G_ACTIONS~PROCESS_ACTION_EVENT in order to recognize which button is pressed.

Then we implemented the cross-entity derivation BADi, which gets triggered and changes the data model and creates the entry we need in the model. This works fine and the new entity is available in the model data.

Our problem with this approach is, that the UI isn't refreshed when one of these buttons is pressed and the new entry does not appear in the entity's table.

If we change a material's standard field (e.g. material type) afterwards, another roundtrip is triggered and the UI is refreshed including the update of our entity table.

We have already tried to raise a roundtrip event when the button is pressed and also have tried to change a field manually using the convenience API with no luck so far.

Does somebody know how we can trigger a complete roundtrip or something that also updates the UI component?

Kind regards,

Sebastian

uibb.JPG (33.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jan 08, 2015 at 11:37 AM

    Hello Sebastian,

    why is the CE Derivation BAdi called?

    Normally this BAdi is called by the SAP Standard when the MDG data model gets changed. But you wrote that the BAdi gets triggered and creates the new entity. So where exactly is the model change happening that triggers the CE Derive?

    Kind regards

    Jürgen

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Which SPI action is your button invoking? Have you extended the SPI layer using the BAdis?

      You don't just write to the io_model with flush, do you? Because that wouldn't suffice.

  • avatar image
    Former Member
    Jan 08, 2015 at 12:05 PM

    When you configured the new buttons, did you select the option where the button triggers a round-trip? It is in one of the attributes of any FPM button.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      You might have to enhance the PROCESS_EVENT method of the feeder class. Basically, capture your new event and then raise the refresh event. This will force a standard round-trip.