cancel
Showing results for 
Search instead for 
Did you mean: 

How to read Label Text from component configuration at Runtime?

Former Member
0 Kudos

Hi Gurus,

I have a requirement to show different Labels for Input field based on a set of conditions, so I decided to use only 1 feeder class with different component configurations. Now I have to save the Label Text also along with the data entered into a Long Text.

I am not able to read the Label Text for an element that was set at configuration. Can anyone help me here on how to retrieve the Label Text from component configuration?

Floor plan: OVP

UIBB: FORM_UIBB

Note: Import parameter CT_FIELD_USAGE in GET_DATA method is not returning the label text which is set at Configuration


Regards,

Venu

Accepted Solutions (0)

Answers (1)

Answers (1)

ChrisSolomon
Active Contributor
0 Kudos

Why are you using different labels? Are you using the SAME input for different field values?

In any event....why not....

1. use an input control with NO label...use a text element as your label....set the text as needed in your code....completely dynamic then.

2. simply use separate input controls and show/hide as needed for correct label/field combo?

Former Member
0 Kudos

Hi Christopher,

Basically the requirement is to display different set of questions to user based on the previous selections (conditions) and on Save, store the Question and Answer in the long text.

There are nearly 20 conditions and each condition as different Questions. Hard coding the Questions/ controlling them via code will be cumbersome.

ChrisSolomon
Active Contributor
0 Kudos

So don't hard code them....as I said in #1....just have your input control with no label and use a text control to set text dynamically to use as the label....then you can have however many you like....just have their "indexes" matched up....heck, why not just use a table and in one column, have the question and in the next, have it open for input for the answer.....then you can make sure to always match them up.

Former Member
0 Kudos

Thanks for the solution direction, will try to implement and let you know in case of issues...
However, I was just wondering, is it not possible to read the Label Text of elements from Component configuration?