A Step-by-Step guide to create a simple FPM application using Feeder Class for FORM GUIBB

By Rahul Manoj Mahajan, John Deere India Pvt. Ltd

Introduction:

In this article, we will create a simple FPM Application using FEEDER CLASS for FORM GUIBB (Generic User Interface Building Blocks). We will use OIF (Object Instance Floorplan) in this article.

We will take a simple example of getting the material number from user and displaying the description of it using FORM GUIBB. One needs to follow all the steps to avoid the runtime errors.

Prerequisite: Before following this document, one should have a basic knowledge of WebDynpro ABAP and ABAP Classes.

What is Feeder Class?

A class that implements the IF_FPM_GUIBB_FORM ABAP interface (for form components) or the IF_FPM_GUIBB_LIST ABAP interface (for list components). Business logic can be access through it. It is the link between the application and the GUIBB.

There are 2 ways which can be used to develop the FPM application. One is using Free Style UIBB and Generic UIBB. In this article we will use the GUIBB (FORM is one of the available GUIBB).

Steps to be followed:

1)     Go to transaction code SE24 and create a FEEDER Class as follows.

 

2)     Go to the “Interfaces” tab and enter the interface for FORM GUIBB “IF_FPM_GUIBB_FORM”.

And press Enter. It will automatically add the interface for the generic UIBB “IF_FPM_GUIBB

3)     Now if you click on the Methods tab, you will see all the methods implemented by these two interfaces. Make Sure you go inside each and every Method and activate them so it won’t give short dump.  

4)     Now, go to method “GET_DEFINITION” enter the following code.  

* This method is for building Field catalog and actions required in the form

* Local Varibale declarations

  DATA: li_action_line    TYPE fpmgb_s_actiondef.  

* Prepare Field catalog

  eo_field_catalog ?= cl_abap_tabledescr=>describe_by_name( 'MAKT' ). " Here we can use any flat strutures or local types  

* Prepare actions

  li_action_line-id       = 'GET_MAT'.  " You can give wahtever name you want to the action ID

  li_action_line-visible  = cl_wd_uielement=>e_visible-visible.

  li_action_line-enabled  = abap_true.

  li_action_line-imagesrc = 'ICON_ADDRESS'.                          " Image for actions

  APPEND li_action_line TO et_action_definition.  

5)     Go to method “GET_DATA” enter the following code.

  DATA : li_makt_line TYPE makt.  

  li_makt_line = cs_data.  "cs_data contains the data

  IF li_makt_line-matnr IS NOT INITIAL.

    SELECT SINGLE * FROM makt INTO cs_data WHERE matnr = li_makt_line-matnr .

    ev_data_changed = abap_true.

  ENDIF.  

* Check if the "Start Over" Button in clicked ; If yes clear the contents

  if io_event->MV_EVENT_ID = 'FPM_GOTO_START'.

    CLEAR cs_data.

  ENDIF.  

Click here to continue...

 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image