cancel
Showing results for 
Search instead for 
Did you mean: 

Best Practice for Feeder Classes

Former Member
0 Kudos

Hi FPM Gurus,

I am new to FPM and would like to know the best practice for creating feeder classes. Lets say i have a Search GUIBB which is used to hold the selection criteria and a List GUIBB to display the results based on the selection criteria. In this case what is the best way to have the feeder classes

Option 1

  1. Create a common base class which would be used for data storage(results).
  2. Create a Feeder class for Search GUIBB which defines the search criteria with super class as the base class defined above.
  3. Create a Feeder class for List GUIBB which displays the results with super class as the base class defined above.

Option 2

  1. Create a Feeder class for Search GUIBB which defines the search criteria.
  2. Create a Feeder class for List GUIBB which displays the results .
  3. Pass the search criteria from search feeder class to list feeder class - not sure if this is possible


Option 3

  1. Create one Feeder class for both Search GUIBB  and List GUIBB and implement jnterfaces IF_FPM_GUIBB_SEARCH and IF_FPM_GUIBB_LIST in the same class.

Accepted Solutions (1)

Accepted Solutions (1)

jens_boeckenhauer
Active Participant
0 Kudos

Hi Imran,

there is no best practice for these options; it is really up to the developer and the specific context which option suits best. Option 1 is often preferred for generic feeder classes with a large reuse potential, but as for Option 2 you need to take care about the data flow from search to list as you will have separate instances for these classes (unless you want to use static attributes in the common super class - somewhat dirty). In fact Option 3 is also a valid one (and no, you won't get error messages in the configuration) and it comes with the advantage that FPM will indeed resuse the same instance of the feeder class (unless you don't go for different feeder class parameterization in the configurations). This makes that data flow handling pretty easy: Store the search criteria in SEARCH~PROCESS_EVENT and retrieve the search results in LIST~GET_DATA.

Best regards

Jens

Former Member
0 Kudos

Thanks Jens for your advice, so i feel the following option is also feasible if we don't need to re-use the search feeder class.

  1. Create a common base class which would be used for data storage(results).
  2. Create one common Feeder class for Search GUIBB and List GUIBB with base class defined above as the super class.
  3. Implement the methods of Search and List GUIBB in this common class - SEARCH~PROCESS_EVENT and  LIST~GET_DATA.
jens_boeckenhauer
Active Participant
0 Kudos

Hi Imran,

not sure if I got you right, but now you seem to be back to Option 1. I addressed Option 3, i.e. one single class implementing the search and list interface. Then you don't need a joint base (super) class, and FPM will take the same instance. (This is not the case if you use different classes, even if they have a joint super class.)

Best regards

Jens

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Imran,

Normally we always go for option 1.

Option 1: when ever the result data need to required in further processing will store the data in base class. Whenever need this data will get it using the base class reference. Which is the best practice for FPM applications.

Option 2: It just like particular to those feeder classes only, if there is no dependency you can prefer this option. i.e; if the data is not required for further processing. This option is not suggestible.

Option 3: It won't be possible. While doing the component configuration will get an error.

Regards,

Naga

Former Member
0 Kudos

Hi Nagendra,

  Thanks for your advice. I checked some standard SAP FPM application where they have used the below option, i feel this is better if we don't need to re-use the search feeder class, what is your opinion on this.?

  1. Create a common base class which would be used for data storage(results).
  2. Create one common Feeder class for Search GUIBB and List GUIBB with base class as the super class.
  3. Implement the methods of Search and List GUIBB in this common class

Check the example feeder class - CL_FPM_TEST_SEARCH_E_SBOOK