cancel
Showing results for 
Search instead for 
Did you mean: 

Hide Custom Embedded Component based on Standard bo when no data found in C4C PDI

lif3styl3
Explorer
0 Kudos

Hi,

currently we have some embedded components within Ticket TI screen.
Some of them are displaying no data.

Is there any option to hide these Components when no data is found ?
I've already tryed to use ui-switches, which allows me to configure the embedded component for different user roles, but empty embedded components are still visible.

Any ideas ?

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member606838
Participant
0 Kudos

Hi Christopher,

One work around is to define an indicator in the custom BO(if the EC is associated to a custom BO) then set it to false if there is no data (can be done in the afterloading event).

In the EC Level in the properties, set the binding of the EC to that indicator.

There is one drawback however that the heading of the EC when you bind it to the screen will be visible (no sure if you can make it empty and use the heading from the EC instead):

This is how it will look like with the heading

I hope that helps 🙂

Mousa

lif3styl3
Explorer
0 Kudos

Hi,

I think this will work for me.
But it would be much nicer to enable UI Rules for the EC as mentioned by saurabhkabra2009.
Any Ideas how to do this ?

former_member606838
Participant
0 Kudos

Hi,

I am not sure if it will work with EC, I have to check. Usually, you will start adaption mode in the front end you will locate the UI element you want to hide and click on the small pencil on top of it and you will have the rules option in the right side menu, when you go there you will find visibility.

If I have time today I will create one EC in C4C and test it out.

lif3styl3
Explorer
0 Kudos

Hi,

thx for your information.
Setting an UI Rule wiould be an option, but how to make Use of Ui Rules within custom embedded components.

Currently i'am only able to enable or disable the embedded component.

former_member226
Employee
Employee
0 Kudos

Hi Christopher.

Aah, I got it. Apologies, I overlooked your problem. Now I see that for custom EC even after generating/assigning. all the anchors I can't see the "ADD" button in "Rules and Validations".

I think you might need to reach out to SAP Support to know if this is even possible with the current system design.

Sorry!

former_member226
Employee
Employee
0 Kudos

Hi,

You can make use of "UI Rule" to manage the visibility of empty components assuming that data is shown in those embedded components comes from the same Standard BO. if not then you need to implement some workaround to make sure that you have atleast one identifier at Standard BO root level as root fields can be evaluated in UI Rules.

Once done then you can:

1. Using kUT, define a Rule at UI Component where you will evaluate if fields to be shown are empty or not. Pls check https://enable.cx.sap.com/media/t/1_iitw93sw for more details about how to create UI rules.

2. Associate the Rule created to the corresponding EC visibility conditon.

lif3styl3
Explorer
0 Kudos

Hi,

thx for your information.
Setting an UI Rule would be an option, but how to make Use of Ui Rules within custom embedded components.

Currently i'am only able to enable or disable the embedded component.

former_member226
Employee
Employee
0 Kudos

Hi Christopher.

Aah, I got it. Apologies, I overlooked your problem. Now I see that for custom EC even after generating/assigning. all the anchors I can't see the "ADD" button in "Rules and Validations".

I think you might need to reach out to SAP Support to know if this is even possible with the current system design.

Sorry!