cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic fields in popup

justin_moldrup
Explorer
0 Kudos

Hello,

I have a custom function module that makes use of the function 'POPUP_GET_VALUES' which takes a table of fields to be displayed in a popup window. I would like to use my function module in our portal but popup_get_values won't work since it uses SAPGUI interfaces. I'm wondering if anyone knows of a way (other than creating a view for every possible combination of filelds) to dynamically display (or popup) fields with WD abap.

Thanks,

Justin

Accepted Solutions (0)

Answers (2)

Answers (2)

alejandro_bindi
Active Contributor
0 Kudos

You could use the approach Lehka suggested (define all inputfields at design time and then control the appearance with the Visible property) or you could generate them dynamically at runtime (which is a more complex approach). In the second case you'll probably have to use RTTI (CL_ABAP_TYPEDESCR and its subclasses) to identify each field type, then create a context attribute dynamically with that type, then create the inputfield dynamically and finally bind it to the context.

If I recall correctly, Thomas Jung's recreation of SE16 in WDA follows this approach, so you could study that application (search in SDN).

Regards

Edited by: Alejandro Bindi on Aug 5, 2009 3:09 PM

justin_moldrup
Explorer
0 Kudos

I was considering setting up a view for each "configuration" of fields I have and then displaying a particular view dynamically...do you still suggest Lehka's approach?

Former Member
0 Kudos

Hi,

When you create the configurations for that view, then you will get the configuration ID.

Based on some condition, you need to call that configuration variant right.

Check if the popup thatyou are trying to create is a external view, rather a view of the component usage.

I mean check wether your view is listed under that condiguration editor.

Regards,

Lekha.

Former Member
0 Kudos

Hi,

Do you want to display the table fields or ALV table or individual UI elements for those fields.

Regards,

Lekha.

justin_moldrup
Explorer
0 Kudos

I want to display individual UI elements for each field with appropriate lengths and search help.

Former Member
0 Kudos

Hi,

you have to dispaly all of them but set thier visibilty status based on your condition by creating the context attrbute for visibility and bind this to the VISIBLE property to those UI elements.

Regards,

Lekha.