Customizing F4 Help in Web Dynpro ABAP Using OVS
Customizing F4 Help in Web Dynpro ABAP Using OVS
Applies to:
All Web Dynpro ABAP Technical Consultants. For more information, visit the ABAP homepage.
Summary
This document helps to create customized value help using OVS.
Author Bio
Sudarsan Dande is working with L & T Infotech as a Web Dynpro ABAP Consultant in
Chennai. He is currently working E-Rec project using Web Dynpro ABAP. He has worked
under various ABAP functionalities. His hobbies include playing cricket, watching TV.
Table of Contents
Purpose of the Document ................................................................................................................................... 3
Step by Step Procedure...................................................................................................................................... 3
OVS help in Web Dynpro ABAP ..................................................................................................................... 3
WDDOINIT Method .................................................................................................................................................... 19
ON_OVSSEL Event Handler...................................................................................................................................... 20
DO_OVS_APPSRC Method ...................................................................................................................................... 21
DO_OVS_APPSRCTYP Method ............................................................................................................................... 22
Related Content ................................................................................................................................................ 23
Disclaimer and Liability Notice .......................................................................................................................... 24
a) Go to SE80 and see the screen shot below for your reference.
b) Enter a name for the Web Dynpro component and click on ‘Enter’ button, then the following pop up
appears.
c) Click on ‘Yes’ button. Enter the description for the component and provide window name and view
name. See the below screen shot
e) Double click on component ‘ZOVSHELP’ and provide used components for the select options. Refer
the screen shot below.
f) ‘SAVE’ the component. Expand the views and double click on the ‘INPUTVIEW’ and click on the
‘LAYOUT’ tab
g) Click on ‘Insert Element’ and provide the details as below and click on ‘OK’
h) Enter the text for the Caption as ‘Value Help’ as shown below
i) Insert the Group in the input view by following the above procedure as shown below
l) Now click on the ‘Properties’ tab of the INPUTVIEW and create controller usages for the select
options as shown below
m) Click on the ‘Attributes’ tab of the INPUTVIEW and provide the following attributes as below
o) Please refer the screen shots below for all the methods
p) Please find the screen shots below for inserting select options in the view of the window
q) Save the entire component. Create a Web Dynpro application as shown below
r) Click ‘OK’ and save it as local object. Now save, check and activate the entire component and test
the application
WDDOINIT Method
METHOD WDDOINIT .
ENDMETHOD.
METHOD ON_OVSSEL .
IF I_OVS_DATA-M_SELECTION_FIELD_ID = 'RCF_APPL_SOURCE'.
DO_OVS_APPSRC( I_OVS_DATA ).
ELSEIF I_OVS_DATA-M_SELECTION_FIELD_ID = 'RCF_APPL_SOURCE_TYPE'.
DO_OVS_APPSRCTYP( I_OVS_DATA ).
ENDIF.
ENDMETHOD.
DO_OVS_APPSRC Method
METHOD DO_OVS_APPSRC .
DATA:
LT_APPSRC TYPE TABLE OF T77RCF_APPLSRC_T,
WA_APPSRC LIKE LINE OF LT_APPSRC,
FIELDNAME TYPE STRING,
LV_APPSRCTY TYPE REF TO DATA.
FIELD-SYMBOLS:
<LT_OVS_RESULT> TYPE T77RCF_APPLSRC_T,
<LT_SEL_OPT_RESULT> TYPE STANDARD TABLE,
<FS_APPSRCTY> TYPE TABLE,
<FIELD> TYPE DATA.
CASE I_OVS_DATA-M_OVS_CALLBACK_OBJECT->PHASE_INDICATOR.
WHEN IF_WD_OVS=>CO_PHASE_2.
SELECT APPL_SOURCE
FROM T77RCF_APPLSRC
INTO TABLE IT_APPSRC
WHERE APPL_SOURCE_TYPE IN <FS_APPSRCTY>.
IF SY-SUBRC = 0.
SELECT APPL_SOURCE DESCRIPTION
FROM T77RCF_APPLSRC_T
INTO CORRESPONDING FIELDS OF TABLE LT_APPSRC
FOR ALL ENTRIES IN IT_APPSRC
WHERE APPL_SOURCE = IT_APPSRC-APPSRC
AND LANGU = 'EN'.
ENDIF.
I_OVS_DATA-M_OVS_CALLBACK_OBJECT->SET_OUTPUT_TABLE( OUTPUT = LT_APPSRC ).
WHEN IF_WD_OVS=>CO_PHASE_3.
ASSIGN I_OVS_DATA-M_OVS_CALLBACK_OBJECT->SELECTION->* TO <LT_OVS_RESULT>.
ASSIGN I_OVS_DATA-MT_SELECTED_VALUES->* TO <LT_SEL_OPT_RESULT>.
FIELDNAME = I_OVS_DATA-M_SELECTION_FIELD_ID+4. "Removing RCF_
ASSIGN COMPONENT FIELDNAME OF STRUCTURE <LT_OVS_RESULT> TO <FIELD>.
INSERT <FIELD> INTO TABLE <LT_SEL_OPT_RESULT>.
ENDCASE.
ENDMETHOD.
DO_OVS_APPSRCTYP Method
METHOD DO_OVS_APPSRCTYP .
FIELD-SYMBOLS:
<LT_OVS_RESULT> TYPE T_APPSRC,
<APPSRC> LIKE LINE OF <LT_OVS_RESULT>,
<LT_SEL_OPT_RESULT> TYPE STANDARD TABLE,
<FIELD> TYPE DATA.
CASE I_OVS_DATA-M_OVS_CALLBACK_OBJECT->PHASE_INDICATOR.
WHEN IF_WD_OVS=>CO_PHASE_0.
I_OVS_DATA-M_OVS_CALLBACK_OBJECT->SET_CONFIGURATION(
COL_COUNT = 3 TABLE_MULTI_SELECT = ABAP_TRUE ).
WHEN IF_WD_OVS=>CO_PHASE_1.
I_OVS_DATA-M_OVS_CALLBACK_OBJECT->SET_INPUT_STRUCTURE(
INPUT = WA_APPSRC ).
WHEN IF_WD_OVS=>CO_PHASE_2.
SELECT APPL_SOURCE_TYPE DESCRIPTION
FROM T77RCF_APPLSTY_T
INTO CORRESPONDING FIELDS OF TABLE LT_APPSRC
WHERE LANGU = 'EN'.
ENDMETHOD.
Related Content
Please find the below references links which will provide more information about the OVS help.
http://help.sap.com/saphelp_erp2005/helpdata/EN/30/d7fa41c915da6fe10000000a1550b0/content.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/47/9ef8c99b5e3c5ce10000000a421937/content.htm
https://wiki.sdn.sap.com/wiki/display/Snippets/OVS%20search%20help
For more information, visit the ABAP homepage