Skip to Content
Author's profile photo Thomas Jung

Visual Composer: Value Help Data Service

Introduction
I have been working with Visual Composer quite a bit lately. I have been impressed by just how much can be done without writing any code and in a very short amount of time. But as I had been building a few demos, I had never ran across the Value Help Wizard. It wasn’t until the other day that a college pointed out this useful feature to me. So I thought it might be helpful to others to see this wizard in action. In addition, later in the weblog I will share some coding that I used to create a simple yet generic value help service for use in the Visual Composer Help Wizard.

Please Note: the screen shots and functionality that I present here are part of the Visual Composer version that ships as an integrated part of the SAP Netweaver Portal as of Netweaver04S. These capabilities will not be generally available until SP8 of Netweaver04S. Please refer to the Service Marketplace for the availability schedule of support stacks.

Sample Application
We will start by looking at the finished product- a simple report developed in Visual Composer.

image
Figure 1 – Sample Application Design

Our simple application revolves around a single business service. This business service is technically an RFC being hosted on an AS-ABAP backend system. We have our Input Form for data selection. We then visual the outputs of the service in a data table and a chart.

image
Figure 2 – Sample Application Output

But that is all really just background information for the purpose of what we want to look at today. We just want to focus on the Value Help. Notice the button that sits next to our Input Field. When we press this button, we get a popup window. This window contains a data table with all the keys and descriptions of possible values for our input field. This is what we are concerned with – how to build this functionality.

image
Figure 3 – Visual Composer Value Help in Action

Value Help Wizard
If we return to the Visual Composer Storyboard, we can see from the Layout View that the Value Help wizard is easy to invoke. You just have right mouse click on the field you want to generate the value help for. Then you choose Add Value Help from the context menu.

image
Figure 4 – Starting the Value Help Wizard

The first step of the wizard will show us details about the field we selected. The most important information is probably the system that it came from so that we know where we probably need to go to get the value help service. We can also choose type of selection we want to generate. The Visual Composer Value Help wizard analyses the meta data of the input field we are attaching the value help to suggest the best type of selection.

image
Figure 5 – Value Help Configuration Wizard

In the next step we can choose the system and service name that we want to connect to in order to get our value help values. In this example, we will connect to another RFC based data service in our same backend system.

image
Figure 6 – Select Data Service

In the final step of the wizard, we have to map the input and output parameters of the data service that we calling. Now the service I built is really quite simple. It contains one input field with the data of the data dictionary reference we want to generate help values for (later in the weblog I will detail how this works from the ABAP side). The output contains a key/description pair table. If this was a complex BAPI with many inputs and output, you would use this screen to choose the proper input and output mappings.

image
image
Figure 7 – Specify Data Service Runtime Parameters

After the completion of the wizard, we can return to the design view and we see a new event path emanating out of our input form. This path leads to to a Popup Signal.

image
Figure 8 – New Value Help Event

If you double click on the Popup Signal, you will be forward navigated to the popup iView that was generated by the wizard. Here we can see our value help data service and the data table that displays the results.

image
Figure 9 – Value Help iView Design

You even have the opportunity to change the look of the value help by altering the elements in the design or layout views. For instance you might decide later that you don’t want to display the Key field column. You can easily hide it by changing the properties on the Search results table view.

image
Figure 10 – Value Help iView Layout

ABAP RFC for the Data Service
As I was working on some demos I started to create dedicated RFCs for the different value helps that I wanted to use. Of course there are many BAPIs that can provide value lists, but they can’t cover all possible data elements. Then it occurred to me, wouldn’t it be nice to have one generic RFC that could supply key/description lists off of either basic data dictionary domains or simple search helps.

When doing BSP development, developers face a similar situation. In order to populate htmlb:dropDownListBox elements, you need a similarly structured internal table. To support BSP developers there is a utility for reading these value help pairs by just supplying a data object reference. This utility is CL_BSP_SERVICES=>GET_SIMPLE_HELPVALUES. This particular utility has no real inner ties to the BSP framework and therefore can be used in any type of application. I have found that many of the useful BSP services continue to add value in other development environments such as Web Dynpro and now Visual Composer.

So all my ABAP Function Module needs to do is create a data reference from the input description. This way from Visual Composer you can just type the name of the data dictionary element that you want to use to generate the value help list. Then we call the BSP utility and pass the results back out of the RFC.

Visual Composer Drop-Down List
Now that we have our simple data service, we can actually use this to populate drop down lists in Visual Composer as well. In the example that I used, there is a relatively small list of possible values. It really would be better suited to a drop down list than the full blown value help.

In order to start making the change, lets just return to the main design view of our application. From here we can view the properties for the Input Form. From the control column we can choose Drop-Down List.

image
Figure 11 – Changing to a Drop-Down List

Now when we go into the control properties, we can choose how we want to fill our entry list. If we choose Dynamic, we will be given the option to once again find a data service. The same data service that we designed for Value Help will work perfectly fine here as well.

image
Figure 12 – Find a Data Service

Although this step doesn’t trigger a wizard, the process for choosing the data service and then mapping the parameter is really quite similar to the Value Help Wizard. Just like before we will supply a literal for the name of the data dictionary data reference. We an then map our output value to the Value and Text Fields of the Drop-Down List.

image
Figure 13 – Mapping Data Service Parameters

You can then see that the final product works by seamlessly calling our data service to populate our Drop-down List.

image
Figure 14 – Drop-down Populated by Our Same Data Service

Assigned Tags

      9 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      I am trying to get this to work to populate a selection range. The user should be able to select multiple values.
      However when I try the above example, I cannot get it to work for a multi value select
      Author's profile photo Thomas Jung
      Thomas Jung
      Blog Post Author
      What exactly isn't working for you?  I tried some of the multiple selection options and they worked on my system.  Really the more complex selection options on the input field are designed for BI system fields.  Interval Selection is suggested for BI system interval variables, Multiple Selection is suggested for BI system multiple selection variables, Selection Options are suggested for BI system selection options variables and Single Value and Selection Options are suggestes for BI queries, query views or characteristics. 

      That said, I was able to get the multiple selection to work just fine for my data service. It returns the multiple selected values from the value help popup into my input field as a semi-colon delimited string.  I just needed to adjust my ABAP RFC data service to expect this and populate the input into a select-option range internally.

      Author's profile photo Former Member
      Former Member
      This is native functionality in SPS8. There is an Infoobject data service that gives you your master data...
      Author's profile photo Former Member
      Former Member
      Hi Thomas,
      Thanks for the example.  I was wondering if you are able to launch the value help wizard in VC CE.  When I right click my input boxes I no longer have that option.

      Regards
      Matt

      Author's profile photo Thomas Jung
      Thomas Jung
      Blog Post Author
      I'm afraid I can't answer your question. Topic assignments change over time and I haven't really worked with the regular version of VC since CE came out. What work I have done with VC on that release has been focused on NetWeaver Voice.
      Sorry.
      Author's profile photo Former Member
      Former Member
      Hi Thomas, we setting in BI Auth values by users in 0COMP_CODE_0COUNTRY.

      Value Help show all values and not detect AUTH value Setting, in BEx Analyser all working good.

      You have any ideas for make Value Helps listing only values defined in Auth for specifed user ?

      I try implementing Query in list values used in Value Help, this Query use vars in 0COUNTRY and return all 0COMP_CODE defined in AUTH.

      Or the best way is using Z BAPI ?

      Author's profile photo Thomas Jung
      Thomas Jung
      Blog Post Author
      I'm afraid that I don't have any personal experience with the BI specific version of the value help. I've only ever done the custom RFC route. Perhaps it would be best if you post this question in one of the SDN forums.
      Author's profile photo Former Member
      Former Member
      I need that the vale input for a Dynamic entry list are anohter field. when I select this field in the Dynamic entry List, they show a message: "this.diagram" is null
      I can compile but they not running.
      How can I assign the input value form anhoter filed?
      thank you
      Author's profile photo Thomas Jung
      Thomas Jung
      Blog Post Author
      I'm afraid that I don't know how to acomplish that in Visual Composer.  Perhaps you should ask this question in the forums.