cancel
Showing results for 
Search instead for 
Did you mean: 

Data getting populated

Former Member
0 Kudos

Hello experts,

I am using two views namely EMP_MASTER and EMP_DETAILS. In first view i am getting the details of employee from dbase table ZTMASTER_VVR, in the first view EMP_MASTER i have set a button CREATE. So once i press this create button it should navigate to the second view and this second view is to enter the details of new employee. So once i go to the second view my fields already getting populated with first record of dbase table ZTMASTER_VVR. I dont want to get my fields populated with some record because i am using this view to store new employee details that means user has to fill in the blank fields. I am using the same node in both contexts in both the views.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

For first view display, I think you are using a node with cardinality(0:n) as it is a table display.

Now for the second view have another node with cardinality 1:1 as only one newly created record has to be inserted into

the Master table.

Thanks,

Shailaja Ainala.

Former Member
0 Kudos

Hi shaiaja,

Thank you very much for your solution, i changed the cardinality of second node as 1:n now its working fine

Former Member
0 Kudos

Hello friend,

i think the second view fields are also populated at the first time because you have used the same node in both the view, also you have said that for the first view you are populating the values from the ZTMASTER_VVR table. So you must have used the binding property which brings the value at the second view.

Now what you can do is use a separate node or you can clear the values of the fields at WDDOBEFOREACTION method or WDDOINIT method or at the button action. I think this helps you to resolve your problem.

If you have still issues revert back to me.

Thanks,

Sri Hari.

Former Member
0 Kudos

Hi Hari,

Thank you very much for your solution. now i am solved problem but you also said we can clear the node in WDDOBEFOREACTION method so can you please tell what kind of statement we have to write for clearing the node.

Former Member
0 Kudos

Hi Hari,

How to clear the values of field in WDDOBEFOREACTION or in WDDOINIT..

Former Member
0 Kudos

You can use set attributes as NULL related methods of context node interface...

Former Member
0 Kudos

You can use Set value option.

Use Web Dynpro Code Wizard select SET option & pass Attribute from context..

  • set single attribute

lo_el_context->set_attribute(

name = `DATASOURCE`

value = lv_datasource ).

Former Member
0 Kudos

Hi,

I didnt understand what you are saying. I want to clear the values in the fields which i entered previously. For eg: When i am going to create the employee details in a create view after saving it and going back to the previous view and again going to the create view i could able to see the previous record wich i enetered, i want to clear the fields as soon as i come out from that view.

Former Member
0 Kudos

HI,

IF_WD_CONTEXT_NODe either use the INVALIDATE method for clearing or SET ATTRIBUTES AS NULL method in the same to achiev ethe same.