cancel
Showing results for 
Search instead for 
Did you mean: 

How to give functionality to custom button in Webdynpro-Fpm ?

Former Member
0 Kudos

Hi experts,

I have created a simple display button using feeder class . When i click on it i want to display a text anywhere in the screen . Can you please suggest me the steps how to acheive this and which event i have to write the code and what code should be impelemented?

Warm Regards,

Ramesh Moka

Accepted Solutions (1)

Accepted Solutions (1)

AbhishekSharma
Active Contributor
0 Kudos

Hi Ramesh,

Assuming you have created Feeder class based on the structure or Fields you want to display data in.

Suppose you have structure with name ls_userinfo contain one field "FirstName".

To display this Information on form you need to perform below steps:

  1. First of all create Feeder Class (you already created)
  2. Implement Interface IF_FPM_GUIBB_FORM
  3. In  IF_FPM_GUIBB_FORM~GET_DEFINITION of your Feeder class write below code

*--> Bind Field Catalog

      eo_field_catalog ?= cl_abap_structdescr=>describe_by_data( ls_userinfo ).

      APPEND INITIAL LINE TO et_field_description ASSIGNING <fs_field_description>.

      <fs_field_description>-name = 'FIRST_NAME'.

by doing above code you will be able to get this structure in FPM UIBB  Configuration (How to access this UIBB Configuration see my below mentioned post)

Now Once you done with above things... you need to put fields in UIBB FORM

Go to Component Configuration >> UIBB  Configuration and add fields as shown below:

Click on Element Button


You will only get this Poup with fields once you set eo_field_catalog in GET_DEFINATION method of FORM Feeder class.


This is how your fields will be available on Form.

Now to display the text in this field, since this field is already attached to your structure through EO_FIELD_CATALOG in GET_DEFINATION method nothing much is remained.

Just go to GET_DATA or PROCESS_EVENT method of your Feeder class and write below code :

Assuming you have created one Button and attached an Event to it in Configuration:

Event Attached on Button in Configuration: ZZ_DISPLAY_FNM

*  --> Handle Inbound event from inventory search page.

CASE io_event->mv_event_id.

WHEN 'ZZ_DISPLAY_FNM'.

     ls_userinfo-FIRST_NAME = 'Ramesh'.

     cs_data = ls_userinfo.

*--> Below line is most important line if you not set this parameter nothing will be displayed.

     ev_data_changed = abap_true.

ENDCASE.

Please have a look to my post for more understanding.

Thanks-

Abhishek

Answers (0)