Skip to Content
Author's profile photo Abdul-Gafoor Mohamed

ABAP Value Help in Process Orchestration

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.


/wp-content/uploads/2014/04/vh_1_dest_379493.png


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)

/wp-content/uploads/2014/04/vh_3_valuehelp_379496.png

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

VH_alias_1_set.png

  • 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

Assigned Tags

      9 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jocelyn Dart
      Jocelyn Dart

      Hi Abdul, Useful option. I'm wondering if there is any guidance around maximum size of a value help table, and performance costs of the initial call to fill the cache? Ordinary customizing tables should be fine I would have thought, but what if someone wants to use a master data table, like the list of all cost centers, in this way? Would you still approach it this way or would you look at an alternative such as an OData call via Gateway?

      Rgds,

      Jocelyn

      Author's profile photo Former Member
      Former Member

      Hi Abdul,

      This has been a really interesting blog, I've been implementing Value Help in a wdj app, using the flight example and the full URI string (this works great). I would now like to use the Value Help Alias Config detailed in your blog however the screen options on our version are quite different to the one shown above. The only value help fields we have are Source Location & Value column name, there are no tabs or filter options.

      We are using SP10, but are we missing something else?

      Thank you,

      Jon

      Author's profile photo Abdul-Gafoor Mohamed
      Abdul-Gafoor Mohamed
      Blog Post Author

      Hi Jon,

      Thanks for pointing it out.  Although the feature was available in SP10, the details for the source location fields with the enhanced UI was rolled out in SP11. 

      Thanks & Regards,

      Abdul

      Author's profile photo Jorge Huedo
      Jorge Huedo

      Hi Abdul,

      It's a very interesting blog, I have implemented the flight example and I was trying to fetch the set of values using a OData call, but it giving me an 404 error.

      I'm working in a SP10 version.

      Do you know if this feature is available on it? Do I have to activate something more?

      Thanks.

      Jorge

      Author's profile photo Abdul-Gafoor Mohamed
      Abdul-Gafoor Mohamed
      Blog Post Author

      Hi Jorge,

      Most of the features were available as of NW 7.31 SP10.  In SP11, we have rolled out the enhanced UI along with the filter options and the OData access.

      I am updating the section at the top accordingly.

      Best regards,

      Abdul

      Author's profile photo Jorge Huedo
      Jorge Huedo

      Hi Abdul,

      I'm created successfully and executed the examples provided.

      But when I'm trying to create a new one using the Material Object the API is throwing:

      com.sap.bpm.acc.valuehelp.spi.impl.BAPIHelpValueProvider@508beb85 for

      bean

      sap.com/tc~bpem~valuehelp~ear*annotation|sap.com~tc~bpem~valuehelp~ejb.ja

      r*annotation|BAPIHelpValueProvider in application

      sap.com/tc~bpem~valuehelp~ear.; nested exception is:

      com.sap.bpm.acc.valuehelp.api.ValueHelpException:

      java.lang.StringIndexOutOfBoundsException: String index out of range:

      -1javax.ejb.EJBException: ASJ.ejb.005043 (Failed in component:

      sap.com/tc~bpem~valuehelp~ear, BC-BMT-BPM-DSK) Exception raised from

      invocation of public

      com.sap.bpm.acc.valuehelp.spi.SearchHelpValuesAndMetaData

      com.sap.bpm.acc.valuehelp.spi.impl.BAPIHelpValueProvider.retrieveValuesFr

      omSource(java.net.URI,java.lang.String,java.lang.String) throws

      com.sap.bpm.acc.valuehelp.api.ValueHelpException method on bean

      instance

      I have opened already a ticket but maybe you had any clue about what is wrong.

      This is my configuration:

      <aliases>

           <alias name="SalesOrg" description="Sales Org" providerType="ABAP" srclocation="Material/BUS1001/GetProductHierarchy/SalesOrganization/SALES_ORG/H_TVKO" destination="ERP_BACKEND">

      <principals>

           <principal id="ROLE.UME_ROLE_PERSISTENCE.un:ZMMD_ADMIN" type="1"/>

      </principals>

      <properties>

      <item>

      <key>DESCCOL</key>

      <value>VTEXT</value>

      </item>

      <item>

      <key>VALCOL</key>

      <value>VKORG</value>

      </item>

      </properties>

      <filters/>

      </alias>

      </aliases>

      /wp-content/uploads/2014/06/config_477205.png

      Thanks!

      Jorge

      Author's profile photo Satish Bihari
      Satish Bihari

      Hi Jorge,

      Is it possible to copy paste the output of the few rows of the result of same search help when you execute them in ABAP

      Regards

      Satish Bihari

      Author's profile photo Former Member
      Former Member

      I am trying to determine where the Method(GetList), Parameter (DESTINATIONFROM) and Field(COUNTR_ISO) are being pulled from.  How do you determine that the method should be GetList?

      Shouldn't the search help (F4_INTCA) be available in the table SFLCONN if it is being listed here?

      Author's profile photo Former Member
      Former Member

      Light bulb came on!  BOR objects drive these input fields.  It's using BAPI_HELPVALUES_GET behind the scenes.