on 03-19-2012 11:54 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.