cancel
Showing results for 
Search instead for 
Did you mean: 

After RFC Call :- Close Connection.

Former Member
0 Kudos

Hi All,

My application has got two views..Both Views does call the R/3 for displaying the data. From first view when user clicks on a button, the second view will get displayed with the respective data.

Second view has got a back button. On click of this button, the First view gets displayed.. Here am using plugs...

The problem is after going back to the first view, when the user selects any other values and click on the button(First View), the second view contains the values which are pertaining to the initial transaction.Not the second operation.

Any inputs are welcome..

Thanks

SU

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

1. Incase the UIs in the second view are bound to the model nodes then you are not passing the value from first to the second view correctly based on the value chosen.

2. Incase you are using Value nodes ( bound to the UIs in the second view) and you are copying data from the model node to the value node in the second view; then check to see if you have not written that piece of code in the init of either the View or the controller. Cos wen u go back those hook methods r not called again. ( U r using plugs, then use the handler to initialise your views).

regards

LNV

Former Member
0 Kudos

Thanks for the reply.. The data is displayed in a tabular format.

I have done the binding properly with the output table,which is getting generated.

Is there any way by which we can make the output element of the model CLEAR/REFRESH when the control goes to the First view on click of the Back button....

Thanks

SU

Former Member
0 Kudos

hi

If while navigating from the first view to the second view you are calling the RFC then there is no need to refresh as it is done by default. I still suspect the values you are passing to the RFC. Please use the debugger and you will be able to solve this.

As told in the previous reply invalidate is the way to clear or flush but that may not be needed.

regards

LNV

Answers (4)

Answers (4)

Murali_Shanmu
Active Contributor
0 Kudos

Hi,

Close all RFC connections using the Method - disconnectIfAlive of the Model Object.

It worked for me...

Regards,

Murali.

former_member751941
Active Contributor
0 Kudos

Hi,

After executing BAPI use the code to disconnect the model instance.

finally

{

<Put Model Name> crtModel = (<Put Model Name>)WDModelFactory.getModelInstance(<Put Model Name>.class);

crtModel.disconnectIfAlive();

}

Regards,

Mithu

Former Member
0 Kudos

Hi,

Let me know detail about your problem.

U have one RFC and out data to be passing to first and second view or u have two rfcs one out for first View and another rfcs for second out second view?

Is this is correct or any thing else write your scenario clearly once again and your output formats(table) also.

Thanks,

Lohi.

Former Member
0 Kudos

Hi SAP User ,

inavalidate the context node of table first view table in the on action back of the second view

something like this

wdcontext.node<name of table node>().invalidate().

so that it will refresh the table and get the current data.

i hope this will help you.

venkat