SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software SAP ABAP Programming and HANA Database Tutorials
Development resources, articles, tutorials, samples, codes and tools for .Net, SQL Server, Windows, Windows Phone, SAP and ABAP, like SAP UI5, Screen Personas, etc.




Install SAP Free


Add Value Help to Web Dynpro Select Options

Search Help or Value Help screens in ABAP screens are very useful for SAP users to filter data using Select Options. In this SAP Web Dynpro tutorial, I'ld like to show how I added missing Value Help for Web Dynpro Select Options.

If you look at the below Web Dynpro application screen, you will notice that there is no Value Help button for Sales Document Type, Sales Document and Delivery Block select options.

SAP Web Dynpro application Select Options without Value Help





But I want to enhance my SAP Web Dynpro applications into the following form where Select Options are provided with Search Help functions, or Value Help options.

Select Options Search Value List on Web Dynpro screen

The original Web Dynpro application is created as follows.
I created the Select Options displayed on the WebDynpro screen in the WDDOINIT Controller Initialization Method of the MAIN View.

Here is the ABAP code in Web Dynpro application that I use in INIT method in order to create the SAP Sales Document Type, AUART field Select Option.

DATA: read_only TYPE abap_bool.

***** SELECT OPTIONS for: Sales Document Type - AUART

lt_range_auart = wd_this->m_handler->create_range_table( i_typename = 'AUART' ).

* add a new field to the selection
wd_this->m_handler->add_selection_field(
 i_id = 'AUART'
 it_result = lt_range_auart
 i_read_only = read_only
).

What I changed in this ADD_SELECTION_FIELD method to add Value Help for the Selection screen is using the I_VALUE_HELP_STRUCTURE and I_VALUE_HELP_STRUCTURE_FIELD input parameters which are optional.

Here is the modified ABAP code that calls add_selection_field method with i_value_help_structure is read from VBAK Sales Order table and i_value_help_structure_field is AUART field in VBAK table.

DATA: read_only TYPE abap_bool.

***** SELECT OPTIONS for: Sales Document Type - AUART

lt_range_auart = wd_this->m_handler->create_range_table( i_typename = 'AUART' ).

* add a new field to the selection
wd_this->m_handler->add_selection_field(
 i_id = 'AUART'
 it_result = lt_range_auart
 i_read_only = read_only
 i_value_help_structure = 'VBAK'
 i_value_help_structure_field = 'AUART'
).

You can see which search help will be used by calling SAP transaction code SE11 and checking AUART Sales Document Type field of VBAK table as seen below.

search-help-for-vbak-auart-sales-document-type-field

I've also altered my ABAP codes to provide search help or value help for SAP Web Dynpro application users for Sales Document number, Delivery Block using the following code.

**********
***** SELECT OPTIONS for: Sales Order Number - VBELN
**********
lt_range_vbeln = wd_this->m_handler->create_range_table( i_typename = 'VBELN' ).

* add a new field to the selection
wd_this->m_handler->add_selection_field(
 i_id = 'VBELN'
 it_result = lt_range_vbeln
 i_read_only = read_only
 i_value_help_structure = 'VBAK'
 i_value_help_structure_field = 'VBELN'
).

**********
***** SELECT OPTIONS for: Delivery Block - LIFSK
**********
lt_range_lifsk = wd_this->m_handler->create_range_table( i_typename = 'LIFSK' ).

* add a new field to the selection
wd_this->m_handler->add_selection_field(
 i_id = 'LIFSK'
 it_result = lt_range_lifsk
 i_read_only = read_only
 i_value_help_structure = 'VBAK'
 i_value_help_structure_field = 'LIFSK'
).





SAP Tutorials

SAP Tutorial

SAP Forums

SAP Tools

SAP Transaction Codes Table






Related Articles and Tutorials(http://www.kodyaz.com/sap-abap/web-dynpro-select-options-value-help.aspx)
SAP Web Dynpro ALV Tutorial
Add Value Help to Web Dynpro Select Options
Translate Web Dynpro Header Title displayed on Web Browser
SAP Web Dynpro Service Cannot be Reached Error
Add Button to ALV Table Header on SAP Web Dynpro
Add Web Dynpro Applications to SAP Favorites Menu
Traffic Lights in SAP Web Dynpro ALV Table
Component Usage ALV Does Not Have an Active Component
Create Search Help in ABAP for Web Dynpro Component
Create Transaction Code for Web Dynpro Application
Display Adobe Form in SAP Web Dynpro
Display Data on Web DynPro Table Element
Display and Download Adobe Form as PDF File in SAP Web Dynpro
Find Web Dynpro Class Name to Search in ABAP Code
How to Clear Web Dynpro Cache
Web DynPro Tutorial - How to create Web Dynpro Application (Web Dynpro Component)
Set Page Title in Web Dynpro Application
Web Dynpro Text Translation using Assistance Class
Trigger ALV Events in Web Dynpro Component
Test Web Dynpro ABAP Component by Creating Web Dynpro Application
Remove ALV Buttons on SAP Web Dynpro Component
Read Checkbox Value in Web Dynpro Editable ALV
SAP Web Dynpro File Upload using GOS cl_fitv_gos Class
Web Dynpro Component Service Syntax Error in Program /1BCWDY/O3EC1AX6A3OVKK9L5FXO==CP
Web DynPro Tutorial - Display Spool Requests using Web DynPro Table


Copyright © 2004 - 2019 Eralper YILMAZ. All rights reserved.
Community Server by Telligent Systems