cancel
Showing results for 
Search instead for 
Did you mean: 

Doubts in WebDynpro Programming

Former Member
0 Kudos

Hi Experts ,

I am new to WebDynpro programming here are my doubts, please rectify me if there are any wrongs also...

1. Where TextViews are used ?

2.Where to declare message class globally so that we can use multiple times in different methods?

3.How to clear the input boxes ,what is the method that clears all the UI Input boxes so that user enters another records w/o refreshing page .

4. where are the validations are need to be written, EX :- Kunnr is the input box, i need to check whether the customer exits or not ....

5. If we want to check whether the customer exits or not for customer input box , what to do ....whether we need to write select query to check , because i am designing 20 diff fields from 9 tables

6.where transparent UI container is used ,please explain with a scenario

7.what are the types of alignments

8. Where we have to declare message class so it will be used globally ...

Edited by: Vikranth on Feb 7, 2008 1:29 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi vikranth........

1) text views can be used to display texts and not for any writings...

3) input boxes can be cleared by setting null value to the attribute to which it is bound.

4)you can use the class cl_wd_dynamic_tool=>check_mandatory_attributes to check for the mandatory fields.... you can write it in the onaction method or modify view.

5)you should write select querys...

---regards,

alex b justin

Former Member
0 Kudos

Hi Alex,

I developed screen for inserting data into DB tables .

My doubt is how to clear the fields after user entered data,

after he has to enter another data what should do ??

Answers (2)

Answers (2)

Former Member
0 Kudos

In your action methods add the following statements:

1) Define the variable node, and element of structure

data:

Node type ref to If_Wd_Context_Node,

Stru_element type If_<view name>=>Elements_List .

  • navigate from <CONTEXT> to <Node> via lead selection

Node = wd_Context->get_Child_Node( Name = IF_MAIN=>wdctx_<view name> ).

2) Create a new element with some default values or just set null

Stru_element = WD_Context->CREATE_ELEMENT(...)

3) Set the created element to be selected

WD_context->SET_LEAD_SELECTION(Stru_element)

By the above steps the node will have all the new created elements corresponding to database table records. If you only want one element is activated you can just bind the new element to node in the step 2) by:

WD_Context->bind_Element(stru_element).

former_member182190
Active Participant
0 Kudos

Hi,

You can use the invalidate node method after inserting data into the database so as

to clear the data on the screen.

lo_node->invalidate( ).

Hope this solves your problem.

Regards,

Ismail.

Former Member
0 Kudos

Hi Ismail,

Can u explain more breifly about invalidate method , My scenario is i need to update details from the webdynpro form to the DB tables , for this i designed a buton , after clicking this Save button data is getting in DB, but the entered data is still in the input boxes, i need to put a clear button to clear fields that have entered, now can i put this invalidate method in this clear button ....

former_member182190
Active Participant
0 Kudos

Hi Vikranth,

Yes you are correct..

Call the invalidate method in the action of your clear button.

Regards,

Ismail.