Web Dynpro: Coloring Table Conditionally

Similar documents
Table Properties and Table Popin

Web Dynpro ABAP: Changing ALV Contents and Saving in Database

Web Dynpro ABAP: Dynamic Table

Table Row Popup in Web Dynpro Component

Integration of Web Dynpro for ABAP Application in Microsoft Share Point Portal

POWL: Infoset Generation with Web Dynpro ABAP

Totals in Adobe forms

Freely Programmed Help- Web Dynpro

Using Radio Buttons in Web Template

How to Create Top of List and End of List of the ALV Output in Web Dynpro for ABAP

Web Dynpro: Column Coloring in ALV

SDN Community Contribution

Displaying SAP Transaction as Internet Application in Portal

Extracting Missing Fields of Data Source Which Are Present In Their Extract Structure

Creating Custom SU01 Transaction Code with Display and Password Reset Buttons

Dialog Windows in WebDynpro ABAP Applications

Material Listing and Exclusion

How to Reference External JAR Files in Web Dynpro DC in SAP NW Portal 7.3

Creating Rules in Process Composer and using them in Process

Material Master Archiving in Simple Method

Easy Lookup in Process Integration 7.1

Internationalization in WebDynpro ABAP Applications

Add /Remove Links on ESS Home Page in Business Package 1.5

Template Designer: Create Automatic PDF Documents for Attachment or Print Purpose

Step by Step Guide How to Use BI Queries in Visual Composer

Data Extraction & DS Enhancement in SAP BI Step by Step

SMT (Service Mapping Tool)

MDM Syndicator: Custom Items Tab

DB Connect with Delta Mechanism

How to Create View on Different Tables and Load Data through Generic Datasource based on that View

How to Display Result Row in One Line While Reporting On Multiproviderer

Standalone BW System Refresh

Linking Documents with Web Templates

ABAP HR: Standard Info Type Enhancement

Dynamically Enable / Disable Fields in Table Maintenance Generator

BAPI Execution in offline Adobe Form

Changing the Source System Assignments in SAP BW Objects without Affecting the Data Modeling

Working with Tabstrip in Webdynpro for ABAP

Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable

Step by Step Procedure for DSO Creation

Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports

MDM Import Manager - Taxonomy Data (Attribute Text Values) Part 3

Replacement Path: Explained with an Illustrated Example

How to Default Variant Created for Report Developed In Report Painter/Writer

SDN Community Contribution

This article explains the steps to create a Move-in letter using Print Workbench and SAPScripts.

ecatt Part 6 System Data Container

Limitation in BAPI Scheduling Agreement (SA) Create or Change

How to Work with F4 Input Help Effectively in BEX

How to Create Business Graphics in Web Dynpro for ABAP

Step by Step Guide on How to Use Cell Definition in BEx Query

Transfer Material Attributes (Material Type) from R/3 to SAP GRC Global Trade Services (GTS)

Data Mining: Scoring (Linear Regression)

Fetching User Details from the Portal and Displaying it in Web Dynpro with Authentication in the Portal

Financial Statement Version into PDF Reader

Maintaining Roles and Authorizations in BI7.0 - RSECADMIN

Information Broadcasting Part 3 Scheduling the First Report

Methods of Selecting BOM Variant Parts in Variant Configuration

Graphical Mapping Technique in SAP NetWeaver Process Integration

SDN Community Contribution

Step-By-Step guide to Virtual InfoCube Implementation

How to Integrate SAP xmii Services with Web Dynpro Java

Process Chain Log Deletion

Reading Enhanced DataSource fields for the Remote Cube

Developing Crystal Reports on SAP BW

Setting up Connection between BW and R/3 for Data Load

Purpose of Goods Receipt Message indicator in Purchase Orders

Xcelsius Tricks Part 5 Create a Loading Bar in SAP Crystal Dashboard and Presentation Design (Xcelsius 2008)

Different Types of iviews in Enterprise Portal 7.0

Creating, Configuring and Testing a Web Service Based on a Function Module

Open Text DocuLink Configuration - To Access Documents which are Archived using SAP

Download SAP Query Output to Local/ Network Folders in Background

Working with Dynamic Tables in Interactive Adobe Forms and WebDynpro ABAP

WDA Tutorial II: Using Select Options in a WDA Application

Step by Step Guide for PI Server Start and Stop Procedure

SUP: Personalization Keys and Synchronize Parameter

How to use Boolean Operations in the Formula as Subsidiary for IF Condition

Recreating BIA Indexes to Address the Growth of Fact Index Table

Reporting Duplicate Entries

Extraction of Hierarchy into Flat File from R/3 and Loading in BW System

Upload Image file from system in Web dynpro view

Data Source Replication and Activation of Transfer Structures

Solution to the Challenges in Pivoting

Step By Step: the Process of Selective Deletion from a DSO

Material Master Extension for New Plant

How to Create and Schedule Publications from Crystal Reports

All about Compression

SAP BusinessObjects Translation Manager Functionality and Use

How to Configure User Status in mysap SRM

Creating Multiple Methods/Operations and Exposing BAPI as a Webservice

Generate Export Data Source

Database Statistics During ODS Activation

Common Queries/Errors while working with Adobe Print PDF Forms

Triggering the Process Chains at Particular Date using Events

Data Mining: Decision Trees

Web Dynpro Interactive Forms Data Transfer and Scripting

Step by Step Method for File Archival in BW

Data Flow During Different Update Mode in LO Cockpit

Open Hub Destination - Make use of Navigational Attributes

How to Broadcast BEx Workbooks using BW Pre-calculation Server and through Process Chains

Transcription:

Web Dynpro: Coloring Table Conditionally Applies to: SAP ECC 6.0. For more information, visit the Web Dynpro ABAP homepage. Summary This article is designed for the beginners in Web Dynpro who have ABAP knowledge and want to learn Web Dynpro. It will help to design a table based on the input provided in the screen and conditionally color the cell in table. Author: J.Jayanthi Company: Siemens Information Processing Services Pvt. Ltd. Created on: 09.07.2010 Author Bio J.Jayanthi is an ABAP Certified professional with HR ABAP Knowledge. 2010 SAP AG 1

Table of Contents Prerequisite... 3 Creating Web Dynpro... 3 Component Controller... 4 View... 7 Web Dynpro Application... 11 Code... 12 Output... 14 Related Content... 15 Disclaimer and Liability Notice... 16 2010 SAP AG 2

Prerequisite Before creating a table, it is necessary to know about Component, View and Window. 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. 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 data 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 between the views. A view can only displayed by the browser if the view is embedded in a window. Creating Web Dynpro Go to SE80 and select Web Dynpro Comp./Intf. and provide the name(say ZZZ_JAYTEST4) to create. Then enter the description and choose the type as Web Dynpro Component. 2010 SAP AG 3

Component Controller Double click Component Controller and in the right side, right click Context->Create Node. Right Click the node Output and then create attribute Matnr as below. Similarly create attribute ERSDA from Mara. Then to color cells conditionally, create attribute COLOR inside node output. 2010 SAP AG 4

2010 SAP AG 5

Right Click Context and then Create Attribute which we can use for Input in the screen. After creating it, MATNR, ERSDA and COLOR should be inside OUTPUT node and CREATED should be outside the OUTPUT node. 2010 SAP AG 6

View Double click the view (Main). Go to Context and then drag Output from component controller context to left side context in Main. Then create attribute 'Created' in Context. Right click ROOTUIELEMENTCONTAINER and then choose Insert Element. Create a caption for Input field Created. Then create Input field. In the property, change the text as desired. Insert element for button DISPLAY. In the properties of the button, create Action Button click using create button. 2010 SAP AG 7

The layout will appear as below. Then create table for Output as follows. In Table Property, select the small button for Datasource and then from the popup, select the node. 2010 SAP AG 8

Similarly for ERSDA, in datasource use the button and select the Input field Created. Right click the node Output for Binding. Select Create Binding and then enter values as below. Change the text for table and then the text for the fields in the properties. After doing that, table will appear as below. 2010 SAP AG 9

Change the value in the property of MATNR and ERSDA in table. The table will appear as below. Double click the table column OUTPUT_ERSDA and then update the Properties of CellDesign as below(use the button in the right side to select COLOR). 2010 SAP AG 10

Web Dynpro Application Create Web Dynpro Application by right clicking the object(zzz_jaytest4). 2010 SAP AG 11

Code To display the output as table when button is clicked, we need to write the code in the method ONACTIONBUTTONCLICK. Use Code wizard to generate code. To read the context node Output, do as below. Keep the below code and remove the rest which is not required. To read context Attribute Created, do as below. We need to modify the color of the ERSDA field, if the material created date is equal to the date provided in the input field. We can check the Value range of the Domain to decide the color. In this example, we are going to provide value as '02'. 2010 SAP AG 12

2010 SAP AG 13

To bind the table Output Created Date appears with different color if date provided is same as of that created date. 2010 SAP AG 14

Related Content For more information, visit the Web Dynpro ABAP homepage. 2010 SAP AG 15

Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this do cument, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document. 2010 SAP AG 16