cancel
Showing results for 
Search instead for 
Did you mean: 

Code Whether UIBB is Empty or Not!

benjamin_allsopp
Active Participant
0 Kudos

We are using code to determine which fields are available at certain points in our MDGM process.

The fields are hidden when they need to be BUT if there are no fields left in the UIBB, we need the UIBB itself to be hidden.

There is no way to do it via CBA as far as I know because the filter criteria available does not apply. So I plan to use CL_MDG_BS_MAT_APPCC->OVERRIDE_EVENT_OVP to hide the UIBBs by modifyng the table of UIBBs HOWEVER the table only has the UI config name and relative data. How can I determine if the UI config has no visible fields in it?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Benjamin

You can do it by setting display property as Hidden in UI configuration

benjamin_allsopp
Active Participant
0 Kudos

Would this only hide it if there are no fields left in it after a dynamic hide at run time, and display it if there are fields present?

Additional Comment:

I've just tried flagging it as hidden in the UI config and the flag appears to do nothing on our system. Maybe due to our custom enhancements on the feeder classes etc. So I'm back to my original question of...how can I determine from a UIBB config name if it has any visible fields or not?

Message was edited by: Benjamin Allsopp

bavinash1
Explorer
0 Kudos

Hello Benjamin,

Controlling the visibility of individual UIBB can be controlled via APPCC only, like you have already mentioned above.

May be you can try this approach. because only that'd be at a higher level than that of individual UIBBs and corresponding feeder classes.

In the get data method of individual UIBB, check if the data of each element is present or not.

If none of the fields have data, raise a custom event and pass the required data from the corresponding feeder class as event data.

OVERRIDE_EVENT_OVP will be called for any event that is raised and that'd be the first method that'd called. Here control the visibility of the UIBB, based on the data received for whichever UIBB you need..

Hope this helps.

Best Regards,

Avinash

benjamin_allsopp
Active Participant
0 Kudos

I have done this an added an enhancement to the bottom of the OVERRIDE_EVENT_OVP method in the APPCC class.

And this worked perfectly. Thank you!

Answers (0)