Sie sind auf Seite 1von 8

Web Dynpro ABAP Training Day 3

[Component Usage, ALV, Assistance Class]

Confidential | Copyright Larsen & Toubro Infotech Ltd.

Agenda
Introduction

Course Objectives Participant Expectations

Component Usage ALV Select Options, OVS Assistance Class OTR and Messages Hands-on Exercises

Component Usage ALV Assistance Class

Review Objectives and Participant Expectations

Action Items

Confidential | Copyright Larsen & Toubro Infotech Ltd.

Hands-On - Component Usage


This exercise will help understand the following How large Web Dynpro projects can be structured with several Web Dynpro Components Include reusable Web Dynpro component into another Web Dynpro component How methods of a used Web Dynpros Interface Controller are called This exercise will help understand the following -

Component Usage of SALV_WD_TABLE


Configure non-editable ALV Configure editable ALV

Confidential | Copyright Larsen & Toubro Infotech Ltd.

Select Options, OVS


Select-Options Component usage WDR_SELECT_OPTIONS User must register for events for cancelling and copying Valid for freely defined input help and ABAP dictionary search help Option to deactivate standard buttons and define custom buttons Object Value Selection Value Help Component usage WDR_OVS Event OVS automatically triggered 4 times one after the other
PHASE_INDICATOR = IF_WD_OVS=>CO_PHASE_0, IF_WD_OVS=>CO_PHASE_1, IF_WD_OVS=>CO_PHASE_2 and IF_WD_OVS=>CO_PHASE_3
Confidential | Copyright Larsen & Toubro Infotech Ltd. 4

Hands-On Assistance class


code that can be reused within various components, better

performance dynamic texts derived from the class CL_WD_COMPONENT_ASSISTANCE available to each controller of the component through the attribute WD_ASSIST

Confidential | Copyright Larsen & Toubro Infotech Ltd.

Online Text Repository (OTR)


Various ways to make the literals translatable in WDA environment are:
1. Online text repository (OTR) 2. Text elements in an ABAP class 3. ABAP dictionary

OTR is a central storage area for texts that can be used not only in a Web Dynpro context but also in BSPs, classes and normal ABAP reports

Different kinds of texts that can be defined in the OTR are


Long texts: Do not have a limit on their length. They can be used only once. If the same long text has to be used again, it has to be rewritten in the original language again and translated again Alias texts (Short Texts): Limited to 255 characters. They can be reused and they have to be translated only once. In the web Dynpro context only OTR alias texts should be used

Confidential | Copyright Larsen & Toubro Infotech Ltd.

Using OTR
To create a new OTR short text, the Online Text Repository browser can be used
The transaction SOTR_EDIT can also be used to create an OTR text Name of an OTR short text: <package>/<alias> To use an OTR short text as the value of a UI element property:
Press the value help button in the properties value field. The browser showing all standard texts of SOTR_VOCABULARY_BASIC

package as

well as the texts of your package will appear. Select your text. The OTR directive that will appear will have the format: $OTR:<package>/<alias>

Confidential | Copyright Larsen & Toubro Infotech Ltd.

Messages
Messages are used to provide the user with status information of the

application, and to display warnings and errors


Position of the messages
Default

position of the message area is on top of the page If another position is required then the MessageArea container UI element has to be used
Message handling: In a web dynpro application you can set the way the

messages are displayed on the properties tab On demand Always


Interface

IF_WD_MESSAGE_MANAGER Methods report_exception(), report_error_message(), report_warning(), report_t100_message(), etc


8

Confidential | Copyright Larsen & Toubro Infotech Ltd.