Quantcast
Channel: SCN : Blog List - ABAP Development
Viewing all articles
Browse latest Browse all 943

Search GUIBB & List GUIBB

$
0
0

In my last blog(http://scn.sap.com/community/abap/blog/2012/12/08/search-generic-uibbSearch Generic UIBB) I demonstrated how to use the Search GUIBB and in this blog I shall continue to explain how to use the Search GUIBB and List GUIBB(The list GUIBB is used to display the results). I shall continue to give the formal introduction for Search GUIBB again ....

 

Quick Introduction on Search GUIBB from FPM Cookbook -

 

A generic design template for displaying a search query which is implemented using the Web Dynpro component FPM_SEARCH_UIBB. You can determine the search query by configuring the Web Dynpro component FPM_SEARCH_UIBB.

 

The following screenshot details the search component elements:

 

p1.jpg

 

I would like to demonstrate how to use this "Search Component" functionality. In this blog, I would develop an application which could search employees based on the Employee Number and list the Employee details.

 

As a part of this development I would perform the following main activities -

  1. Create a common class which would be used for data storage.
  2. Create a Feeder class for Search GUIBB which defines the search criteria.
  3. Create a Feeder class for List GUIBB which displays the results.
  4. Create WD Application and the respective Application and component configurations.

 

Step - 1 : Common Class for Data Storage

 

This class creates the generic data that is shared across components. Like, I would like to create an attribute that stores the search results in the form of table.

While creating this base class, please uncheck the "Final" attribute since we are going to use this class as a parent class in the steps ahead.

 

p2.jpg

 

Create the following attributes -

 

p3.jpg

 

Save and Activate this class.

 

 

Step-2 : Feeder class for Search GUIBB

 

This feeder class would define the "Search" criteria(Selection fields in SAP lingo). We have to implement the interface - IF_FPM_GUIBB_SEARCH to achieve this functionality.

 

Link the parent class - ZCL_FPM_BASE_CLASS to this newly created Search GUIBB -

 

p4.jpg

Implement the interface IF_FPM_GUIBB_SEARCH to add the interface methods -

 

p5.jpg

 

Though it sounds dumb, but went ahead following SAP's suggestion -

" If your application does not need a particular method, implement an empty method, otherwise the system will dump."

 

Whichever method you don't want to use, go ahead adding a simple "RETURN" statement to make sure that the application doesn't dump @ runtime.

 

p6.jpg

 

Built the selection criteria and result table's field catalog  in the following interface method -

 

p7.jpg

On clicking "SEARCH" button, extract the respective information into the respective attribute in the following method -

 

PIC8.jpg

 

Step - 3 : Feeder class for List GUIBB


This feeder class displays the search results. Create this feeder class with the super class as "ZCL_FPM_BASE_CLASS".

Implement the interface - IF_FPM_GUIBB_LIST to get the interface methods.

 

Move the extracted search results from the Parent class's table in the following method  -

 

p11.jpg

 

Also populate the results table field catalog in the following method -

 

p12.jpg

Make sure you implement the remaining interface methods even though they are not used.

 

Step - 4 : WD Application and respective Configurations

 

Used the smart "ACT" to create the FPM based WD Application and the respective application and component configurations in 1 shot -

 

p13.jpg

 

Opened my OIF Component configuration and added the "Search GUIBB" to my Subview -

 

p14.jpg

 

Created the component configuration for my Search GUIBB -

 

p15.jpg

 

Attached my above created feeder class to the freshly created Search GUIBB's component configuration -

 

p16.jpg

 

 

Defined my "Selection Criteria" as "PERNR" by clicking on "Add Selection Criteria". It lists all columns that are added as search criteria in "GET_DEFINITION" method -

 

p17.jpg

 

Added the List UIBB to this component Configuration.

 

p18.jpg

 

Went ahead creating the component configuration for List UIBB -

 

p19.jpg

 

Linked the newly created LIST UIBB's feeder class to this component configuration -

 

p20.jpg

 

 

Add the columns that needs to be displayed in the Results table -

 

p21.jpg

 

Went ahead testing my WD Application to see the desired results -

 

p22.jpg

 

That's all on "Search GUIBB" concept for now ! Shall continue writing more blogs on more FPM Concepts, so stay tuned !


Viewing all articles
Browse latest Browse all 943

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>