0% found this document useful (0 votes)
66 views12 pages

Web Dynpro Messages

This document provides steps to handle messages in a Web Dynpro application using an assistance class. It outlines creating a Web Dynpro component and assistance class, designing the UI layout with labels and input fields, binding attributes, and using the assistance class to display error or success messages depending on whether input is provided. The key steps are: 1) creating a Web Dynpro component and assistance class, 2) designing the UI layout and binding attributes, 3) writing a validation method to get the input, check for a value, and call methods from the assistance class to display the appropriate message.

Uploaded by

Dileep Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views12 pages

Web Dynpro Messages

This document provides steps to handle messages in a Web Dynpro application using an assistance class. It outlines creating a Web Dynpro component and assistance class, designing the UI layout with labels and input fields, binding attributes, and using the assistance class to display error or success messages depending on whether input is provided. The key steps are: 1) creating a Web Dynpro component and assistance class, 2) designing the UI layout and binding attributes, 3) writing a validation method to get the input, check for a value, and call methods from the assistance class to display the appropriate message.

Uploaded by

Dileep Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 12

Message Handling in Web Dynpro (Assistance Class)

By Karthick.R, Kaavian Systems

Step 1: Go to SE80 and create a web dynpro component ZWD_MSG_HANDLE

1.a) Select YES

1.b) Provide description and Press Enter

1.c)

Provide name package name and save it

Step 2 : Creating Assistance Class. 2.a) Double click on component name

2.b) Ensure Editing mode (Ctrl + F1)

2.c) Provide an assistance class name starts with Z and double click on it

2.d) Select Yes

2.e) Provide Package name

The following screen will appear

2.f) Select menu path Goto->Text Elements

2.g) Provide message texts, save(Ctrl + S) , activate(Ctrl+F3) and Go back(F3).

Step 3 : Double click on main view to create context attribute and to design layout

3.a)

Right Click the context to create an attribute

3.b)

Provide attribute name and data type

3.c)

Go to Layout tab

Creating Label Name

Creating Input Field

Click here to continue...

Message Handling in Web Dynpro (Assistance Class)


...Previous

Binding the context attribute value NAME to input field

Creating Push button and creating event Validate

Step 4 : Go to Method tab and double click on method ONACTIONVALIDATE

4.a) Select Code Wizard(Ctrl + F7)

Read the value of the context attribute NAME

The variable lv_name holds the input value

Declare a variable named msg which will hold message texts

Using code wizard (Ctrl + F7), Select radio button Generate Message and choose a method REPORT_ERROR_MESSAGE from the F4 help and press Enter

Delete the below selected lines

When user does not enter input value, Using instance object wd_assist, assign the error message text to variable msg and call the method 'report_message_error', Otherwise assign success message text to variable msg and call the method 'report_success'.

Activate the whole web dynpro component. Step 5 : Create web dynpro application, enter description and save it

Right click on created application and choose test

OUTPUT : When input field is empty

When input value is provided

You might also like