cancel
Showing results for 
Search instead for 
Did you mean: 

SUpply function in Web Dynpro ABAP

Former Member
0 Kudos

I have 2 views - an INPUTVIEW and a DISPLAYVIEW. I created 2 nodes in the component controller - INPUTNODE and TABLENODE. In the INPUTVIEW, I mapped INPUTNODE of the component controller and in the DISPLAYVIEW, I mapped both the nodes of the component controller. I need to enter a value in the first view and the corresponding result should be displayed in the second view. I wrote the code in the supply function of the TABLENODE of the component controller. When i enter a value for the first time, the result is being displayed fine in the 2nd view. But even if i go back and select another value in the INPUTNODE, the result is still the same. Only if i refresh the 1st view, the result is changing.

This is the code i wrote in the supply function of the TABLENODE of the component controller.

data: inputnode type ref to if_wd_context_node,

tablenode type ref to if_wd_context_node,

covalue type string,

itab_st type standard table of zstate.

inputnode = wd_context->get_child_node( name = 'INPUT_COUNTRY').

inputnode->get_attribute( exporting name = 'zzco' importing value = covalue ).

select * from zstate into table itab_st

where zzco = covalue.

tablenode = wd_context->get_child_node( name = 'DISPLAY_STATE' ).

tablenode->bind_elements( itab_St ).

Any ideas appreciated. Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

the supply method runs only when the node is invalid

this is the case when you start your application.

solution

1. You can make the node invalid with the method "INVALIDATE" in the method which is triggered by your back button.

2.Don't use the supply method use the method which belongs to the inbount-plug called handle......

3. You can change th lifetime in property of the view from

"framworkcontrolled" to "when visible"

Klaus

Message was edited by: Klaus Helfrich

Message was edited by: Klaus Helfrich

thomas_szcs
Active Contributor
0 Kudos

>1. You can make the node invalid with the

>method "INVALIDATE" in the method which is triggered by

>your back button.

>

>2.Don't use the supply method use the method which

>belongs to the inbount-plug called handle......

>

>3. You can change th lifetime in property

In your example, the best option would be imho (2) as by doing (1) you would invalidate the data even if the user does not display the table again and by doing (3) more things would have to be rebuild than necessary.

Best regards,

Thomas