cancel
Showing results for 
Search instead for 
Did you mean: 

How to call this interface if_fpm_oif methods in button onAction.

Former Member
0 Kudos

Hi All,

How to call this interface if_fpm_oif methods in button onAction.

Regards,

Sunaiana t

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Baskaran,

Thanks for your reply.

But my requirement is dynamically i have to call this method ADD_UIBB.

this method is available in this interface if_fpm_oif.

if i call this method in button onAction i am getting 'Accessing via null object reference' error.

so how can i call this method in button onAction.

Regards,

Sunaina reddy t

Former Member
0 Kudos

Hi,

onAction of your view ? then it wouldnt work.

Your application need to run in the webdynpro framework, in my code you have the (if_fpm_oif )implemented class

go_fpm_oif.

You have to test this if it is bound then try to add the UIBB.

Former Member
0 Kudos

Hi Baskaran,

In your code you r implementing if_fpm_cnr_oif interface not if_fpm_oif.

DATA: GO_FPM_OIF TYPE REF TO IF_FPM_CNR_OIF.

But i want to implement if_fpm_oif interface and i want to call ADD_UIBB method in button action.

Regards,

Sunaina reddy T

Former Member
0 Kudos

my mistake on that.

implement this interface in your wda component IF_FPM_OIF_CONF_EXIT

You will get the OVERRIDE_EVENT_OIF method implemented in your component controller. This method has the parameter io_oif.

Former Member
0 Kudos

Hi Baskaran,

Thanks for your replay.

i was implemented IF_FPM_OIF_CONF_EXIT interface and i am able to call ADD_UIBB method in OVERRIDE_EVENT_OIF method.

But my requirement is i have to call the ADD_UIBB method in button onAction not in OVERRIDE_EVENT_OIF method.

Regards,

Sunaina reddy t

Former Member
0 Kudos

You could save the reference of the io_oif in component controller attribute and then from onAction, perform your logic.

Former Member
0 Kudos

yes Baskaran i tried that option but i am getting 'Access via null object reference' error.

Regards,

Sunaina reddy t

Former Member
0 Kudos

Hi,

You are able to add_uibb from overridde method right ?.

I am not sure why it is not working from your action?. Probably what you can try is

raise a dummy FPM event (add_local_ uibb)from your action handler.

You will have to handle this again in overridde method .

Former Member
0 Kudos

yes Baskaran i was able to call in override method but not in action handler.

How to start FPM event loop in Action handler.

Regards,

Sunaina reddy t

Former Member
0 Kudos

I already gave you the link to the resources !!

See in this PDF [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90f3cfd2-46d0-2b10-b3ab-eabf3452cc50?quicklink=index&overridelayout=true|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90f3cfd2-46d0-2b10-b3ab-eabf3452cc50?quicklink=index&overridelayout=true]

Page 47, application specific events

Former Member
0 Kudos

Thanks Baskaran, problem solved.

Regards,

Sunaina reddy t

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Baskaran,

we developed one fpm application using fpm_oif_component component. now we need to integrate 2 components into this application.

now my requirement is depend on button action dynamically i want to call UIBB and i need to pass component window dynamically to that UIBB.

Regards,

sunaina t

Former Member
0 Kudos

Hi,

You can get the instance of fpm like this and the available buttons also in this way.

DATA: GO_FPM type ref to if_fpm.
DATA: GO_FPM_OIF TYPE REF TO IF_FPM_CNR_OIF.
 
  go_fpm = cl_fpm_factory=>get_instance( ).
  go_fpm_oif ?= go_fpm->get_service( iv_service_key = cl_fpm_service_manager=>gc_key_cnr_oif ).
 
  CALL METHOD go_fpm_oif->get_buttons
*  EXPORTING
*    iv_variant_id =
  IMPORTING
    et_buttons    = lt_buttons.  .

Former Member
0 Kudos

Hi,

You may have to explain more in detail. what you want to do?

are you developing FPM application ?

if_fpm_oif is just a interface, at runtime you need to get the instance of the oif from the factory methods. You get this only when the application runs in FPM framework.

APB_FPM package has several demo applications on FPM. You also have a FPM developers guide HERE

[ [original link is broken]| [original link is broken]]