fpm application using feeder class for form guibb

19
 Generated by Jive on 2014-09-12+02:00 1 A Step-by-Step guide to create a simple FPM application using Feeder Class for FORM GUIBB 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 i s 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.  

Upload: shinde32

Post on 05-Oct-2015

18 views

Category:

Documents


0 download

DESCRIPTION

FPM Application Using Feeder Class for FORM GUIBB

TRANSCRIPT

  • Generated by Jive on 2014-09-12+02:001

    A Step-by-Step guide to create a simple FPMapplication using Feeder Class for FORMGUIBB

    Introduction:

    In this article, we will create a simple FPM Application using FEEDER CLASS for FORM GUIBB (Generic UserInterface 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 itusing 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 andABAP Classes.What is Feeder Class?A class that implements the IF_FPM_GUIBB_FORM ABAP interface (for form components) or theIF_FPM_GUIBB_LIST ABAP interface (for list components). Business logic can be access through it. It is thelink 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 andGeneric 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.

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

    Generated by Jive on 2014-09-12+02:002

    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 twointerfaces.Make Sure you go inside each and every Method and activate them so it wontgive short dump.

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

    Generated by Jive on 2014-09-12+02:003

    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 struturesor 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.

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

    Generated by Jive on 2014-09-12+02:004

    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.

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

    Generated by Jive on 2014-09-12+02:005

    REMOVED steps 6, 7 and 8

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

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

    Generated by Jive on 2014-09-12+02:006

    10) Change the component and View in the properties of WD Application. In this example we are using OIFand hence the component is as follows. In case of other floorplans like GAF and OVP write FPM_GAF* and dothe F4 and you will get the list. Component : FPM_OIF_COMPONENT Interface view: FPM_WINDOW

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

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

    Generated by Jive on 2014-09-12+02:007

    12) It will open the browser. Enter the Configuration ID. This is the FIRST CONFIGURATION of your FPMapplication. This is called as APPLICATION CONFIGURATION. Press Enter so it will give the followingERROR.

    This is expected because till this point your APPLICATION CONFIGURATION does not exist. Click on Createbutton. You will receive the success message.

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

    Generated by Jive on 2014-09-12+02:008

    13) After Application Configuration, its time to create the Component Configuration for your OIFfloorplan.Enter the name component configuration name and click on Go to Component Configuration.

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

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

    Generated by Jive on 2014-09-12+02:009

    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 theView as FORM_WINDOW.

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

    Generated by Jive on 2014-09-12+02:0010

    Click OK

    15) Now lets create the GUIBB Configuration and hence enter the Configuration Name and clickEnter. It will appear above the Configure UIBB button.

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

    Generated by Jive on 2014-09-12+02:0011

    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 CLASS name. Enter the Feeder Classname and click on Edit Parameters.

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

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

    Generated by Jive on 2014-09-12+02:0012

    Just click OK.

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

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

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

    Generated by Jive on 2014-09-12+02:0013

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

    22) After that lets configure the button we have added and add the action to it.

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

    Generated by Jive on 2014-09-12+02:0014

    23) To display the material details, lets add one more group and configure it by selecting the fields we want todisplay as follows.

    24) Click on the individual elements and set the property as follows :

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

    Generated by Jive on 2014-09-12+02:0015

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

    Generated by Jive on 2014-09-12+02:0016

    Do it for all the fields and click on SAVE.

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

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

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

    Generated by Jive on 2014-09-12+02:0017

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

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

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

    Generated by Jive on 2014-09-12+02:0018