cancel
Showing results for 
Search instead for 
Did you mean: 

How to Set a Variant in Web dynpro using FPM

Former Member
0 Kudos

Dear Experts,

I have created two variants in my FPM Configuration.

I need to set default the variant in my Web Dynpro Component based on some condition.

I have used the Implemented interface IF_FPM_GAF_CONF_EXIT to get the method OVERRIDE_EVENT_GAF which has a functionality to set the Default Variant ( set variant ,method ).

But this event is not getting triggered when the Web dynpro Component is getting initiated.

Kindly give some suggestion where can i set the Variant in the Web dynpro Component during the initialization itself.

Thanks,

Nalla B.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos
Former Member
0 Kudos

Dear Shiven,

That blog contains information but which not suitable for my requirement. There is one for creating a new Variant but how to set that variant in the Webdynpro Component when it is initialized.

Thanks

Nalla B.

former_member184741
Active Contributor
0 Kudos

HI Nalla,

Once you create a new variant, create a implicit enhancement at beginning  in method OVERRIDE_EVENT_START of class /SAPSRM/CL_FPM_OVRIDE_HDLR

use the below code

mo_fpm->mo_app_parameter->set_value( EXPORTING iv_key   = 'SAPSRM_VARIANT_ID'

                                                    iv_value = 'Your variant' )