cancel
Showing results for 
Search instead for 
Did you mean: 

Passing custom URL parameter to a FPM app

Former Member
0 Kudos

Hello,

I am facing a problem when trying to pass an URL parameter to a GAF FPM application.

The standard way by adding a parameter to the WD application and adding a parameter to the default plug in the window doesn't work for FPM... at least in my case.

Does anyone know how URL parameters work with the FPM framework?

Thank you and BR,

Chris

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

Although the reply is a million years too late you can refer this recently posted thread

Use the DOINIT method for the COMPONENTCONTROLLER that should work.

Former Member
0 Kudos

Hi Chris,

It seems that you want to read the application parameters passed to the GAF application.

If this is the case....Reading this parameters in the HANDLE DEFAULT method of window controller of your component will not work because in FPM application the first window to be called is FPM WINDOW of the GAF component and not yours.

Hence to read the application parameters in the FPM application, use following code in the DOINIT of your component controller:


data lv_wi_id type SWW_WIID.
CALL METHOD cl_wd_runtime_services=>get_url_parameter
    EXPORTING
      name  = 'WI_ID'
    RECEIVING
      value = lv_wi_id.

Here I am reading application parameter WI_ID passed to application URL.

Regards,

Vikrant

Former Member
0 Kudos

You just need to declare parameters which you will be using in WD Application - Parameters tab.

To fetch parameters for application which is using FPM, you have to use following piece of code -

wd_this->app_param = wd_this->mr_fpm->mo_app_parameter.

CALL METHOD wd_this->app_param->get_value

EXPORTING

iv_key = 'INTERFACE_MODEL'

IMPORTING

ev_value = wd_this->lv_interface_model.

CALL METHOD wd_this->app_param->get_value

EXPORTING

iv_key = 'MODE'

IMPORTING

ev_value = wd_this->lv_mode.

Here wd_this->mr_fpm holds FPM reference and is of type ref to IF_FPM

and wd_this->app_param holds FPM parameters reference and is of type IF_FPM_PARAMETER.

After getting reference I'm calling methods to get individual application parameters by sending their names.

We called this in DOINIT of component controller.

Regards

Manas Dua

Former Member
0 Kudos

Hi,

I agree with Manas dua. In my case i have done the following

implement the IF_FPM_GAF_CONF_EXIT inteface to my component. So i get the

OVERRIDE_EVENT_GAF method in my component controller.

in the OVERRIDE_EVENT_GAF method retrieve the parameter in case of FPM_START event.

if io_gaf->mo_event->mv_event_id = if_fpm_constants=>gc_event-start.

wd_this->go_fpm->mo_app_parameter->get_value( exporting iv_key = 'key ' importing ev_value = lv_value).

endif.

in this way you can decide to skip the initial screen if you want it ofcourse.

ChrisPaine
Active Contributor
0 Kudos

It is worth noting that the FPM methods for getting the parameters (although cleaner than using the generic get URL details method) are only available after the main FPM window has been called. Therefore if your component is instantiated before this - you cannot access the parameters in the WDDOINIT of your application.

It may be that you instead put your logic inside the process_before_output method of your component and enclose it with a "if first_time" type construct.

Hope this helps anyone else who finds this thread when searching for a related problem!

Chris

Former Member
0 Kudos

HI,

I am facing the same problem.

Any ideas?

Thanks and best regards,

Roman