Вы находитесь на странице: 1из 19

Get Started

Solutions

Partner

Community

Support

About

Training

Community

Developer

Blogs

A Step-by-Step guide to create a


simple FPM application using
Feeder Class for FORM GUIBB
December 2, 2012

814 Views |

Rahul Mahajan
more by this author

UI Floorplan Manager for Web Dynpro ABAP


floorplan manager | floorplan manager for webdynpro abap; | fpm form uibb | Web Dynpro

share
0

share
0

tweet

share
0

Follow

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_FORMABAP 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 wont 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_eld_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_denition.

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.

REMOVED steps 6, 7 and 8


9) Create the WebDynpro Application by right clicking on component as
follows.

10) Change the component and View in the properties of WD Application. In


this example we are using OIF and hence the component is as follows.
In case of other floorplans like GAF and OVP write FPM_GAF* and do the
F4 and you will get the list.
Component : FPM_OIF_COMPONEN
T
Interface view: FPM_WINDOW

11) Now go to the package where you have saved the WebDynpro
Application and right click on the Application and click Create/Change
Conguration.

12) It will open the browser. Enter the Conguration ID. This is the FIRST
CONFIGURATION of your FPM application. This is called asAPPLICATION
CONFIGURATION. Press Enter so it will give the following ERROR.

This is expected because till this point your APPLICATION


CONFIGURATION does not exist. Click on Create button. You will
receive the success message.

13) After Application Conguration, its time to create the Component


Conguration for your OIF floorplan.
Enter the name component conguration name and click on Go to
Component Conguration.

This is again expected error and same as above (Step 12). Click on
Create and give your package and it will open the next screen with the
success message.

14) Click on the Attributes button and enter Component as


FPM_FORM_UIBB.

Now as mentioned in the informational message on screen, go to View


and click on F4 help and select the View as FORM_WINDOW.

Click OK

15) Now lets create the GUIBB Conguration and hence enter the
Conguration Name and click Enter. It will appear above the Congure
UIBB button.

16) You will receive the same error and that is expected error. Click on
Create.

17) Enter your package name and then it will ask for the FEEDER CL
ASS
name. Enter the Feeder Class name and click on Edit Parameters.

18) You will receive the warning message and that can be ignor
ed.

Just click OK.

19) On this screen, Click on the Add Group. It will add the group1 under
Form and you can name it.

20) After adding group, we need to congure that as follows. Select the
MATNR as we want to display it as Input eld and then add Button Row.
Click OK.

21) From Enhancement pack 5, we have some very good options like Value
Suggestion while entering the material number
. In order to view all the
options available; just click on the Element: Material link under FORM->
Group1.

22) After that lets congure the button we have added and add the action o
t
it.

23) To display the material details, lets add one more group and congure it
by selecting the elds we want o
t display as follows.

24) Click on the individual elements and set the pr


operty as follows :

Do it for all the elds and click on SAVE.

25) Finally, TEST the application. There are 2 ways to test the application as
follows.
a) Click on the Application Conguration link and then click on TEST
.
aa

It will take you to the Application Conguration. Just click on TEST


.

b) From SE80; enter your package name and select the application and
click on Application Conguration and execute.

26) The Result screen looks like as follows, Enter the material and the click
on Get Details it will populate the data.

Alert Moderator

18 Comments
You must be Logged on to comment or reply to a post.

Pratosh Kumar
April 15, 2013 at 6:26 pm

good explain.. very helpful to understand feeder class

Rahul Mahajan Post author


June 11, 2013 at 7:12 am

Thanks Pratosh !

girish kumar
May 10, 2013 at 3:09 pm

Great effort Rahul, you have made it simple, thanks for sharing!!!
Cheers,
Girish

Rahul Mahajan Post author


June 11, 2013 at 7:13 am

Thanks Girish !

Praveen Kumar
June 24, 2013 at 5:00 pm

Thank you:)

VR V
June 26, 2013 at 9:37 pm

Thanks Rahul
It is a good document.

Matt Harding
July 10, 2013 at 2:19 am

Hi Rahul,
Nice tutorial, though Im not sure why you did steps 6, 7 and 8 as it appears
you start to create a Web Dynpro Component that implements a UIBB that is
then not used in the rest of the tutorial; and you then create a Web Dynpro
Application that doesnt point at your new UIBB.
Am I missing something?

Cheers,
Matt

Christopher Linke
July 11, 2013 at 9:50 am

I also dont see the need for this

Rahul Mahajan Post author


July 15, 2013 at 5:31 am

Hi Matt/Christopher,
You are correct. In this case, we dont need to create WD
Component. I have removed those steps.
Regarding usage of wd application, i am attaching
FPM_OIF_COMPONENT as a component.
Appreciate your feedback.
Thanks,
Rahul

Peter Dornheim
August 15, 2013 at 9:51 am

Hello,
I think it is easy, but I dont know what to do with this
line:
DATA : li_makt_line TYPE makt.
I get the error: TYPE MAKT IS UNKNOWN What is
the right type?
Thanks
Peter

Rahul Mahajan Post author


August 15, 2013 at 10:13 am

Hi Peter,
DATA : li_makt_line TYPE makt.

With this line, we are declaring the work


area of type MAKT.
If you just copy and paste the code in
GET_DATA method mentioned above, it
should work.
Please let me know what code you
have written and getting that error.
Thanks,
Rahul

Peter Dornheim
August 15, 2013 at 10:26 am

The problem is, that table


MAKT is not available in
my System. Its NetWEaver
7.31

Rahul Mahajan Post author


August 15, 2013 at 11:03 am

Okay, In that case please


use available type.
Happy Learning!

Nishant Bansal
February 25, 2014 at 10:49 am

Thanks Rahul for sharing.


Thanks.
Nishant Bansal

Venkata Naga Chaitanya Bhatlapenumarthi


March 4, 2014 at 8:55 pm

Thanks Rahul.

Arshad Ansary
March 16, 2014 at 5:42 am

Hi Rahul
Thanks for the example .
But ideally you should be using IF_FPM_GUIBB_FORM~PROCESS_EVENT
method of
feeder class to process event GET_MAT.
My doubt is how do we pass event parameters to the PROCESS_EVENT .
For eg i want to pass matnr alone as importing parameter to the event handler
method . With tha MATNR i wil nd the MAKT and set the data within Event
hahdler
Regards
Arshad

Ghadeer Zahaiqa
August 7, 2014 at 5:14 pm
Hi Rahul
Thanks for example
I have problem that i dont have congure group button in GUIBB component conguration
even if i open SAP demo in display mode its not appear
could you please advice me.
like the shoot below:

zamini charak
March 13, 2015 at 1:48 pm

Hi Rahul,
I am not able to congure button row.Please help .

Share & Follow


Privacy

Terms of Use

Legal Disclosure

Copyright

Trademark

Sitemap

Newsletter