cancel
Showing results for 
Search instead for 
Did you mean: 

Error While Deploying Webdynpro Application.

Former Member
0 Kudos

Dear Experts,

While deploying web dynpro application having webservice based Model, I am getting following errors-

<b>'SERVICEID' not defined for model class 'Request_ZHRESS_STATION_REQUISITION'</b>

I have checked model structure where I can see that this attribute "SERVICE ID" is there and properly configured with the Model. It's also generating with the autocompeletion facility while writing the code. This attribute is used to pass the parameter to Model for its execution.

Please Help! to resolev this problem as I am not able to proceed ahead in my project.

Thanks in advance!

Regards,

Roshan

Accepted Solutions (1)

Accepted Solutions (1)

former_member751941
Active Contributor
0 Kudos

Hi Roshan,

Reimport the bapi once again.

In the diagram view do the context mapping properly between

1> component controller and used model (Bapi Model)

2> views and component controller.

According to context structure.

-


Bapi_Employee_Getdata_Input

|--- Output

| -


Personal_Data(under Output node )

|--- Employee_Id

Take a method say “GetEmployeeDetailsByNo” inside component controller with parameter “empid” of type string.

Use this implementation.

public void GetEmployeeDetailsByNo( java.lang.String empid )

{

//@@begin GetEmployeeDetailsByNo()

IWDMessageManager msg = wdComponentAPI.getMessageManager();

try {

Bapi_Employee_Getdata_Input input = new Bapi_Employee_Getdata_Input();

input.setEmployee_Id(empid);

wdContext.nodeBapi_Employee_Getdata_Input().bind(input);

wdContext.currentBapi_Employee_Getdata_InputElement().modelObject().execute();

wdContext.nodePersonal_Data().invalidate();

} catch (Exception e) {

// TODO Auto-generated catch block

msg.reportSuccess(e.getMessage());

e.printStackTrace();

}

//@@end

}

Now go to the view and bind the Model node (Bapi_Employee_Getdata_Input

) in the view layout.

And inside “on action” event of “Search”button uses this code.

public void onActionGoEmpSearch(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionGoEmpSearch(ServerEvent)

wdThis.wdGetEmployeeCompController().GetEmployeeDetailsByNo(wdContext.currentBapi_Employee_Getdata_InputElement().getEmployee_Id());

//@@end

}

public void wdDoInit()

{

//@@begin wdDoInit()

Bapi_Employee_Getdata_Input bapiInput = new Bapi_Employee_Getdata_Input();

wdContext.nodeBapi_Employee_Getdata_Input().bind(bapiInput);

//@@end

}

Use the code according to your BAPI name.

Regards,

Mithu

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Roshan,

If u make any changes in webservice after importing the model in webdynpro,this type of error comes.Just check in wsnavigator,whether its showing that attribute or not?

If its available ,u have to reimport the model.U can check this blog for info related to reimporting webservice model.

<a href="/people/bertram.ganz/blog/2005/10/10/how-to-reimport-web-service-models-in-web-dynpro-for-java:///people/bertram.ganz/blog/2005/10/10/how-to-reimport-web-service-models-in-web-dynpro-for-java

regards

Sumit