Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
AbdulGafoor
Advisor
Advisor

ABAP Value Help in SAP Process Orchestration

The Value Help feature has been part of SAP Process Orchestration as of SAP NetWeaver 7.3 EhP1 SP10.  You may be excited about using Help values from an ABAP backend in your application.  This blog takes you through the steps to achieve this.  The features described here are available as of SAP NetWeaver 7.3 EhP1 SP11.


Pre-requisites

  • For ABAP Value Help, you should have a Search Help defined and a Destination configured in NetWeaver Administrator.
  • The consumption of the Value Help API requires the SAP_BPM_VALUE_HELP action. 
    You may also need one or more roles that are defined while configuring a Value Help Alias.
  • For configuring the Value Help alias you need the SAP_BPM_VALUE_HELP_ADMIN action


1. Configure a Destination in NetWeaver Administrator

  • Login to NetWeaver Administrator
  • Navigate to the Configuration tab > Infrastructure > Destinations (refer to screenshot)
  • Click Create for a new Destination
  • Provide a Destination name, let us say Destination1
  • Choose RFC as the Destination Type
  • Configure the Connection settings on the next screen
  • Provide the logon data on the next screen (Typically, Client, Username and Password)
  • You should now be able to test the Destination by clicking on the Ping Destination button.
  • If the ping is successful, you are all set to use this Destination.  Otherwise, you may have to revisit the credentials section of the Destination.



2. Configure an ABAP Value Help alias in NetWeaver Administrator

  • Login to NetWeaver Administrator
  • Navigate to the Configuration tab > Connectivity > Value Help (refer to screenshot below)

  • Click the Create button and choose "New ABAP Alias"
  • Provide a unique and meaningful "Alias Name"
  • Provide an appropriate Destination name for the alias.  (See section above for details on configuring a Destination)
  • An optional description may be provided for the allias.
  • Enter the ABAP Source Location fields.  You can find these details by referring to the ABAP Search Help (refer to screenshot below)
    • Enter the Object Name, Object Type, Method Name, Parameter, Field, Search Help and Value Column
    • If you also need the Description Column in your application, enter the Description Column.

  • Navigate to the Roles tab
  • Add as many relevant Roles as necessary for your application
  • (Optional) Navigate to the Filters tab if you would like a filter defined for your Value Help
    • Add a Filter Alias and the associated ABAP Field Name for the Filter Alias
    • You can add additional Filter Aliases, but keep in mind that the Filter Conditions will be 'AND'ed logically, potentially giving you a smaller subset of results to choose from in your application
  • Finally, Save the Alias Definition
  • You should be able to see the Alias Name, Type (ABAP) and Description in the Table.
  • The Value Help alias is ready to be used in a consumption application



3. Consumption of Value Help

  • Value Helps can be consumed via SAP UI5 or any Custom UI
  • When a Search Help is fetched for the very first time from the backend ABAP system, the help values are cached in a database.  Subsequently, the values are fetched from the cache.  API is used to refresh the cache based on your preferences, via a scheduled job or on-demand.
  • A typical consumption URI for Value Help looks like this

              valuehelp://ALIAS/aliasname

  • Here's an example of a Value Help consumption URI with a filter
        valuehelp://ALIAS/aliasname?filter=FILTER_ALIAS:filterstring,operation:CP
  • And here's one with a language 'EN' specified

              valuehelp://ALIAS/aliasname?lang=EN

  • You can fetch a set of values via OData using a URL that looks like this

              http://nwaserver:50000/metadata/valuehelp.svc/Country/HelpValues?lang=EN

  • A sample code snippet for consumption of an alias called 'Country' is provided here


Code snippet to demonstrate the consumption of Value Help using OData
var aliasName="Country";
var lang="EN";
var url = "/bpmodata/valuehelp.svc/"+ aliasName +"?lang="+lang;

var oTable = new sap.ui.table.Table ({ // create Table UI
  selectionMode
: sap.ui.table.SelectionMode.Single, visibleRowCount: 10,  
                      navigationMode
:sap.ui.table.NavigationMode.Scrollbar, });

oTable.addColumn
( new sap.ui.table.Column ({
 
label: new sap.ui.commons.Label({text: "City"}),
  template
: new sap.ui.commons.TextView().bindProperty("text", "Value") }));
oTable.addColumn
( new sap.ui.table.Column ({
 
label: new sap.ui.commons.Label({text: "Country"}),
  template
: new sap.ui.commons.TextView().bindProperty("text", "DisplayText")}));

oModel
= new sap.ui.model.odata.ODataModel(url,true);
oTable.setModel
(oModel);   // set model to Table
oTable.bindRows
("/HelpValues"); oTable.placeAt("contentLocation");

References / Related content

[1] Value Help in Process Orchestration

[2] Using SSO to access ABAP Search Help in Process Orchestration

[3] SAP Help documentation for BPM Value Help

[4] SAP NetWeaver Identity Management Help Portal

[5] Value Help Public API

9 Comments