Professional Documents
Culture Documents
Applies to:
SAP ECC 6.0, For more information, visit the Web Dynpro ABAP homepage.
Summary
The article aims to help the professionals who have only ABAP knowledge and desire to develop their Web Dynpro knowledge in ABAP. This article provides the knowledge for designing select option and Tab strip in Web dynpro. Author: J.Jay anthi
Company: Siemens Information Processing Services P vt. Ltd. Created on: 20 Sep 2010
Author Bio
J.Jay anthi is a Certified ABAP consultant with HR ABAP knowledge.
Table of Contents
Objective ................................................................................................................................................ 3 Prerequisites ........................................................................................................................................... 3 Creating Web Dynpro ........................................................................................................................... 3 Component Controller .......................................................................................................................... 4 Designing View .................................................................................................................................... 4 Embedding View ................................................................................................................................ 11 Creating Web Dynpro Application........................................................................................................ 11 Code. ................................................................................................................................................ 12 Output ............................................................................................................................................... 14 Relat ed Content .................................................................................................................................... 15 Disclaimer and Liability Notice................................................................................................................ 16
Objective
In this article, we are going to use a select option for sales document, and then bas ed on t he information; we will be displaying the sales details and Billing details. We are going to see how to develop Tab strip. In addition to that, this article is aimed to explain the use of select option.
Prerequisites
Component The component is the central, reusable unit of the application project. You can create any number of views in a component and arrange them in any number of windows. Component Usage s Web Dynpro components can be nested. This means that you can integrate any number of other, alr eady existing components into a component. View The view is the smallest unit of a Web Dynpro application visible for the user. The layout elements and dialog elements - for example, tables, text fields, or buttons - required for the application are arranged in a view. The view contains a controller and a controller context in which the application dat a to be processed is stored in a hierarchical structure. This allows the linking of the graphical elements with the application data.
Window A window is used to group multiple views and to specify the navigation bet ween the views. A view can only
Component Controller
Go to Component Cont roller and Right click the context. Then select Create Node VBAK and VBRK as below.
Designing View
In View-> Cont ext, copy and map the nodes VBAK and VBRK to the view cont ext from component controller. In context tab, drag and drop the context which appears under component controller to view(Main is the view name).
Go to the layout in view and right click the ROOTUIELEME NTCONTA INER and then choose Insert element . Create a transparent container with name say TC1(layout as Matrix). Then create ViewContainerUIElement with name say SELECT_OP TIONS inside transparent cont ainer TC1.
Create a button for Display and create event on Action (say Buttonclick). Set the height of the button as required so that the transparent container and Button will appear in the same line. Do the necessary changes for alignment, if required for halign and valign.
Then create element for Tab strip. Right click the tab strip and insert tab.
Mention the data source against the tab(Change caption as VBAK). Right click the tab and create table say VBAK. This is done by Adding Elements to tab since Table is element inside the tab.
The right click the table VBAK and create binding as above. Insert another tab for VBRK and then create table, map datasource, create binding as explained above. Now the layout will appear as below.
The caption of the tables can be changed as desired. Here it is changed into Sales and Billing.
Then we can use Web Dynpro code wizard Select DOINIT method. Use Code Wizard as below.
Create range table using the method CREATE _RA NGE _TABLE in if_wd_select_options.
DATA lt_range TYPE REF TO data.
The field is made as mandatory by making the obligatory option. I_VALUE_HELP _TYPE is set to searchhelp to display F4 help.
Select the method ONA CTIONBUTTONCLICK(method created for Display button) in methods tab in View. Then our aim is to get the values entered in the select option.
Then assign the range table to the field symbol. FIELD-SYMBOLS: <FS_vbeln> TYPE TABLE. ASSIGN lt_range1->* TO <FS_vbeln>. Then read both contexts VBAK and VBRK.
Embedding View
Embed the view as below.
Code
Output
Mention the sales document (us e F4 help) and then press Display button.
Related Content
For more information, visit the Web Dynpro ABAP homepage