cancel
Showing results for 
Search instead for 
Did you mean: 

Binding model to node controller problem

Former Member
0 Kudos

Hi All,

I am having problem to bind model to node. Here is the code I am writing. My objective is use same Bapi_User_Get_Detail from different systems like BW and APO and display results in table . This is the code I wrote in init() method of controller.

Bapi_User_Get_Detail_Input input = new Bapi_User_Get_Detail_Input();

String usrid=wdContext.currentBapi_User_Get_Detail_Input_IASElement().getUsername();

wdContext.nodeBapi_User_Get_Detail_Input_IAS().bind(input);

input.setUsername(usrid);

Bapi_User_Get_Detail_Input input_IES = new Bapi_User_Get_Detail_Input();

wdContext.nodeBapi_User_Get_Detail_Input_IES().bind(input_IES); /** bind Error

input_IES.setUsername(usrid);

First part of code worked well but second part is giving me error saying method bind() is not applicable for arguments. I appreciate if some one can give me code help. Its quite urgent for me. I promise to ward points for right solution.

Thank you,

Regards

Maruthi

chandra-s@mailcity.com

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Maruthi,

Bapi_User_Get_Detail_Input input_IES = new Bapi_User_Get_Detail_Input();

wdContext.nodeBapi_User_Get_Detail_Input_IES().bind(input_IES); /** bind Error

Instead of above 2 lines try giving the following line, ie., while binding give the Package name also.

<b>wdContext.nodeBapi_User_Get_Detail_Input_IES().bind(<u>new </u>com.sap.Bapi_User_Get_Detail_Input_IES());

</b>

Where <b>com.sap</b> is your model package name, here you specify your model package name.

Regards,

Jhansi

Former Member
0 Kudos

Hi Jhansi,

Thank you for your help. your idea really worked. It was bit tricky and I have used the following code.

com.ies.Bapi_User_Get_Detail_Input input_IES = new com.ies.Bapi_User_Get_Detail_Input();

wdContext.nodeBapi_User_Get_Detail_Input_IES().bind(input_IES);

input_IES.setUsername(usrid);

I am awarding you full points.

Regards,

Maruti

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,,

try this

change the FNmodule class_Input at the time of modelbinding.

Bapi_User_Get_Detail_Input and second one Bapi_User_Get_Detail_Input1.

I think it might helps you.

Other wise chage ur Back end FNmodlue name.

Thanks,

Lohi.

former_member182372
Active Contributor
0 Kudos

Hi,

What is the error? And what is your WD project structure? Models, model

classes, controllers, etc.

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi Maksim,

Thank you for your reply. Hope the following informating can help to identify the problem...

The fllowing is the context maintained in Component Contrller

-


Context

Bapi_User_Get_Detail_Input_IAS -


Model Node

Output -


Model Node

Activitygroups -


Model Node

Agr_Name -


Model Attribute

Agr_Text -


Model Attribute

From_Dat -


Model Attribute

Org_Flag -


Model Attribute

To_Dat -


Model Attribute

Username -


Model Attribute

Bapi_User_Get_Detail_Input_IES -


Model Node

Output_IES -


Model Node

Activitygroups_IES -


Model Node

Agr_Name -


Model Attribute

Agr_Text -


Model Attribute

From_Dat -


Model Attribute

Org_Flag -


Model Attribute

To_Dat -


Model Attribute

Username -


Model Attribute

Note : I have used flight example from tutorial. My obejective is to display date in two tables in a single view. That is data retrived from IAS R3 system in one table and data retrived from IES in another table. Infact I use 'Bapi_User_Get_Detail' to retrive data.

I am struck in binging model to the node. The structure of the project is

I have one model defined and the component is using that model.The model is using 'Bapi_User_Get_Detail'. I have two vies defined.

First view allows userid to enter and click button provided and navigate to next view

Second view is to display data in a two tables. one table should contain data from IAS system .It should be from Activitygroups node and second table should display Activitygroups_IES node data.

Thank you again and hope to here from you soon.

Regards,

Maruthi

Former Member
0 Kudos

Hi Maksim,

Thank you for your reply. Hope the following informating can help to identify the problem.This is how the Controller context looks like..

The fllowing is the context maintained in Component Contrller

-


Context

Bapi_User_Get_Detail_Input_IAS

Output

Activitygroups

Agr_Name

Agr_Text

From_Dat

Org_Flag

To_Dat

Username

Bapi_User_Get_Detail_Input_IES

Output_IES

Activitygroups_IES

Agr_Name

Agr_Text

From_Dat

Org_Flag

To_Dat

Username

Note : I have used flight example from tutorial. My obejective is to display date in two tables in a single view. That is data retrived from IAS R3 system in one table and data retrived from IES in another table. Infact I use 'Bapi_User_Get_Detail' to retrive data.

I am struck in binging model to the node. The structure of the project is

I have one model defined and the component is using that model.The model is using 'Bapi_User_Get_Detail'. I have two vies defined.

First view allows userid to enter and click button provided and navigate to next view

Second view is to display data in a two tables. one table should contain data from IAS system .It should be from Activitygroups node and second table should display Activitygroups_IES node data.

Thank you again and hope to here from you soon.

Regards,

Maruthi

Former Member
0 Kudos

Maruti,

Make sure that you have defined correct modelClass for every *_IES node (including Bapi_User_Get_Detail_Input_IES) on Context tab.

Sounds like either class is wrong or class is missing in node definition.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net