cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide the fields dynamically on WEB UI

Former Member

Hi All,

How to hide the fields dynamically on the web ui scree. I have some fields on the screen,based the radio button selection , some fields should be hide.

Is there any method to hide the fields ? I tried the method  GET_I_<field> , but it is only disabling the field.Please help me.

Thanks,

Venkky

Accepted Solutions (1)

Accepted Solutions (1)

VishnAndrDXC
Active Contributor
0 Kudos

Hello, Venkky.

Many people all over SDN (all right, all right: SCN ) ask the same question over and over again.

And receive the same correct answer: use DO_CONFIG_DETERMINATION method and some set of created configurations. And this is really correct and easiest way to achieve the needs. Also the most transparent one.

But actually not the only one.

Some time ago I found interesting view MKTPRJ_COMMCHNL/OVEFChannels. It is the view which keeps the logic of communication channels which you enter in a marketing campaign. It means here you define which channel is used to run your campaign through. And depends on the channel (dropdown list) appropriate fields are shown.

I supposed that it was written in purely html coding with lots of stuff in it. But I didn't found this. I found only <chtmlb:config> element in use. All right then. Let's go to Configuration tab and let's find a set of configs. Nope. There are no configs which would depend on the communication channel. I returned to the view code confused. And found a very interesting GET_CONFIG_DATA method in view controller. I dig dipper and found that here is standard coding with which system manipulates with config data truly dynamically! Yes, it could look a little bit complicated. And needs some ABAP coding and experience to get in use. But it's really worth to try! Or at least have a look at.

Hope this will be helpful for someone too.

Former Member
0 Kudos

Hi Andrei.

Thanks for sharing this.

-Dedeepya

kavindra_joshi
Active Contributor
0 Kudos

Dynamic hiding can also take using the Business Switch Framework.

Regards

Kavindra

Former Member
0 Kudos

Hi Kavindra,

It would be very useful, if you could share or point us to your blog on the approach with Business Switch Framework.

- Dedeepya

Former Member
0 Kudos

Hi Kavindra, 

Can you provide some details on this Business Switch framework you are talking about?

Thanks

Ashish

Answers (3)

Answers (3)

Former Member
0 Kudos

http://scn.sap.com/thread/3169931

Hi

In above link I have explaine dhow i achieved the same requirement in my project.

Please let me know after trying it

Former Member
0 Kudos

Hi,

Create seperate configurations based on requirement with different subtype and check all the required condition in DO_CONFIG_DETERMINATION method of view implementation class

    me->set_config_keys( iv_object_type          = lv_object_type
                       iv_object_sub_type      = lv_subtype
                       iv_propagate_2_children = abap_false ).

set  lv_subtype dyunamically based on condition.

Regards,

Thirukumaran. R

0 Kudos

Hi Venkky,

There is no way that you can hide dynamically the fields on the UI which are created by the configuration. You can achieve this using creating multiple configurations and loading them dynamically based on your requirement conditionally.

The other way you can achieve this functionality is by creating BSP page purely on html coding. Here you get complete control on all the html controls.

Regards,

Leon

Former Member
0 Kudos

Hi Leon,

Thanks for your reply.

Regards.

Venkky