Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Several mechanisms are available for building search helps into your FAB applications.

In summary there are four options.

  1.   Search help supplied as standard within FAB.

CompanyCode

ControllingArea

CostCentre

PersonnelNo

Plant

Material

 2.  A mechanism for leveraging off existing SAP search helps.

Note: you can also build your own customized search help within SAP and then use the custom search help created from your FAB application.

 *SAP Search Help

 3.  Designing and building your own Entity Sets from within FAB.

 4.  CustomSearchHelp


Following is an example of each option.

Example 1: Using search help provided as part of FAB. In the FAB Properties, select Search Help

and make use of the search icon on the Search Help.

Select one of the in-built search helps. 

 


Move to the Search Definition and bind your Company Code variable and Company Code name variable to the search.




Example 2. Use SAP transaction code SE11 and Search Help.

Search for a suitable SAP search help or create your own.

Using the SAP transaction code SE11 and the values it requires as input and

test it here before deciding to use it.




Once you have established the SAP search help that you are going to use and tested it

to see if it is fit for purpose then proceed to use it within FAB.

On the FAB UI control where you want to initiate a search choose *SAP Search Help.



Go to the Search Definition and fill in your requirements binding the SAP Search Help variables

(seen before using SE11) to the fields on your form.



If you tick Remove Leading Zeros the data presented to the form shows without leading zeros on the key.

The value is also saved without leading zeros in the FAB form.

Later in your development  you may need to pick up the value  e.g. during a backend validation.

TIP: Remember to give any select in the  backend the full variable value (including leading zeroes).


Example 3. FAB Entity Set Designer. Build a Model from within FAB that you can use to retrieve data from SAP tables.

In the FAB workbench use the Entity Set Designer icon.


This allows you to build a dynamic gateway service specific to your requirements.

In the example below two Entity Sets have been defined from within FAB using the FAB Entity Set Designer.

Add ABAP code and activate the service.

Make the Model of the service available within your FAB application.

For details on how to proceed after defining your Entity Sets refer to the ‘How To Article’ – Dynamic Model/oData Service in the documentation.


Example 4. This search help depends on FAB class ZCL_IQX_SH_DATA and method GET_GENSEARCHHELP.

Within this method the system makes use of the standard SAP function module BAPI_HELPVALUES_GET.

FAB sends a string delimited by a colon (:) on the field required in the search.





Refer to FAB demo SEARCH_HELP_DEMO where the service is defined.

Also make use of the Data Provider Class provided with FAB that uses 

Class ZCL_IQX_SH_DATA and Method GET_GENSEARCHHELP to achieve the

required outcome.

 

The Standard SAP function module in use within the GET_GENSEARCHHELP method

is BAPI_HELPVALUES_GET.


call function 'BAPI_HELPVALUES_GET'
    exporting
        objtype                       = lv_objtype
        field                            = lv_field
        method                       = lv_method
        parameter                   = lv_parameter
        explicit_shlp                = lv_sh
    tables
        selection_for_helpvalues     = i_sel
        helpvalues                            = i_helpvalues
        values_for_field                    = i_values_for_field
        description_for_helpvalues  = i_desc.


Input to the SAP function module:



Results are returned in i_helpvalues and mapped back into FAB.

Experiment with the standard SAP function module before you weave its use into your FAB application.




  • No labels