cancel
Showing results for 
Search instead for 
Did you mean: 

Model Problem In webdynpro java

Former Member
0 Kudos

Hi all,

I am facing a differnent problem with model classes in my webdynpro application.

I have a componenet where in i am using standard BAPIs.The problem here is i am getting the latest data from the bapi only when the application is loded first.

If i add a new record and want to know the size of output node it is not giving the latest one.It is showing the size it has when the application is loded,But in the backend it is getting updated everytime.

What might me the problem for this??Is it that the model proxy classes that are loded when the application is loded is not getting refreshed??

Edited by: chandrashekar chandrashekar on Dec 10, 2008 7:30 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

As per my understanding,Here your executing the model for loading the data and after that your updating the record in backend.

After that your not executing the model .Lets try placing the same execute code in doModifyView() methid of view

Regards,

Goriga

Former Member
0 Kudos

Hi,

Just now i tried it by placing in the wdModifyView().

It is giving the same result

Regards

Padma N

Former Member
0 Kudos

Hi,

Execute Your Function Module Again.

Regards

Raghu

Former Member
0 Kudos

Hi,

I executed the function module again..it is showing the size as earlier..not the updated one

Former Member
0 Kudos

Hi,

Where are you executing your function module?

Regards

Raghu

Former Member
0 Kudos

Hi,

once verify the client which you executing the rfc ecc side and webdynpro is same ?

Regards,

ramesh

Former Member
0 Kudos

Hi,

If that is not same then it should not give me the correct output at any point of time.It is showing me the correct size of the output node when i am restarting the application.

IF i am in the application menas after 1 or 2 transactions it is not giving me the correct size of the output node

former_member201361
Active Contributor
0 Kudos

hi,

where are u executing the model , whether in the component controller Doinit or in the View .

Thanks and regards

Former Member
0 Kudos

Hi,

please post the code of the execute method of the rfc in component controller ?

i hope you invalidating the output node in that method.

Regards,

ramesh

Former Member
0 Kudos

Hi,

I am executing the function module in the view onAction method(). not in the componenet Controller wdDoInit method.

Former Member
0 Kudos

Hi,

to execute function module you calling a method ?

so please post the code in that method ?

Regards,

ramesh

Former Member
0 Kudos

Hi,

This is the code i am using...

My problem in brief is if i try to add a record it is getting updated in SAP but if i try to display the output node it is giving the size it has when the application is loded.

If i restart the application it is giving the updated sise of the output node

Bapi_Class_Getdetail_Input inputGetDetail = null;
 inputGetDetail = new Bapi_Class_Getdetail_Input();
 wdContext.nodeBapi_Class_Getdetail_Input().bind(inputGetDetail);

 inputGetDetail.setClassnum(className);
 inputGetDetail.setClasstype("300");
	

	try
	{
		executeBapi_Class_GetDetail();
		
	}
	catch(WDDynamicRFCExecuteException ex)
	{
		return false;
	}



executeBapi_Class_GetDetail()
{

try
{
wdContext.currentBapi_Class_Getdetail_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
}
catch(WDDynamicRFCExecuteException ex)
{
	ex.printStackTrace();
}
}

Former Member
0 Kudos

Hi,

wdContext.nodeOutput().invalidate();

check once the bapi ouput node name is "Output" if different please change in that statement.

to reflect the changes in ecc side you need to call the bapi again .

Rregards,

ramesh

Former Member
0 Kudos

Hi,

I checked it..The output node name is Output only.

wdContext.nodeOutput().invalidate();

The above statement is correct.Then what might be the problem..