cancel
Showing results for 
Search instead for 
Did you mean: 

Error in Adaptive RFC 2 Model

Former Member
0 Kudos

Hi Expert,

I am developing one webdynpro application in CE 7.1.1 (EHP1).

Created Model and import RFC to model.

I am trying to execute RFC from controller like :

Doc_Allocation nw_Model=new Doc_Allocation();

lock_Input=new Z_Apip_Enqueue_Dequeue_Barcode_Input(nw_Model);

lock_Input.setIv_Flag("4");

lock_Input.setIv_Userid(tl_User.getUniqueName());

lock_Input.setIv_Barcodeid(barcodeid); wdContext.nodeZ_Apip_Enqueue_Dequeue_Barcode_Input().bind(lock_Input); wdContext.currentZ_Apip_Enqueue_Dequeue_Barcode_InputElement().modelObject().execute();

I am getting error for execute method. There is no mehtod to execute RFC.

wdContext.currentZ_Apip_Enqueue_Dequeue_Barcode_InputElement().modelObject().execute();

How to execute RFC without execute method. Please any one provide sample code to execute RFC

This same code is working for Adaptive RFC Model(But this is deprecated in EHP1). I am trying to migrate same application in EHP1.

Regards,

Satya.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Satya,

delete the binding b/w model n controller.

now go to data model view of component. nw right click on conroller.

select apply template-> service controller -. map all fields.

do finish..it will automaticlly generate excecute methode for BAPI.

pls delete previous exceute methode before doin above steps..n do comment old code in controller related to old excecute methode.

hpe it hlps

Regards

Khushboo

Former Member
0 Kudos

Hi,

From the error log, it looks like the migration has not been completely successful.

The dependent ARFC2 model type jars have not been added.

I feel you have to add these jars manually to your Web Dynpro project metamodel.

You can do so by right clicking on the project -> Properties -> Metamodel (search for the arfc2 jars & add them).

Kind Regards,

Nitin

Former Member
0 Kudos
former_member192434
Active Contributor
0 Kudos

Hi

Try restart your NWDS, if problem still occure then model is not being properly created, delete it and create a new model .

thanks

Former Member
0 Kudos

Hi,

Following is the sample code to execute a Adaptive RFC2 Model in CE EHP1


Model1 model1Model = new Model1();
    Bapi_Salesorder_Getlist_Input bapi_Salesorder_Getlist_Input = new Bapi_Salesorder_Getlist_Input(model1Model);
    bapi_Salesorder_Getlist_Input.setCustomer_Number("BOSCH01");
    bapi_Salesorder_Getlist_Input.setSales_Organization("0001");
    wdContext.nodeBapi_Salesorder_Getlist_Input().bind(bapi_Salesorder_Getlist_Input);
    wdContext.currentBapi_Salesorder_Getlist_InputElement().modelObject().execute();

If you still have issues to write code try using the service controller (Apply template)

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Ayyapparaj,

Thanks for replying...

If i create new application in EHP1 IDE it is working fine.. no problem...

But I am trying to migrate applications which are developed in CE 7.1 SP5 to EHP1, i am getting this type of errors. In ".wdmodel" file of model it is showing Adaptive RFC2, but i am getting error in code(for execute()).

<Core.Reference package="com.sap.tc.cm.arfc2.modeltype" name="AdaptiveRFC2" type="ModelType" path="ModelSettingDefinition:connectionScope"/>

in Error Log of webdynpro application :

com.sap.tc.cm.arfc2.gci.ARFC2TypedModelClass cannot be resolved to a type

How to resolve this problem..

Regards,

Satya

Edited by: Satya on Dec 19, 2008 4:57 PM

Former Member
0 Kudos

Hi,

One the migration is done. do a repair project structure and class path.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Ayyapparaj,

After doing repair also same error it showing. Any other jar's i need to include.

Have you ever tried this migration. (migrating from CE7.1 SP5 to EHP1).

Regards,

Satya.

Edited by: Satya on Dec 19, 2008 5:43 PM

Former Member
0 Kudos

Hi All,

Any inputs ........ Any Solution.......

Regards,

Satya.

Edited by: Satya on Jan 7, 2009 3:02 PM

Former Member
0 Kudos

Hi Satya,

Are you sure the method is deprecated?

As far as I know, it is not deprecated... we use the same modelObject().execute() method in CE Ehp1.

I hope you are Creating a Web Dynpro Application using the 'Adaptive RFC2 Model' only. 'Adaptive RFC model' of earlier versions seems to be deprecated in CE.

Regards,

Anagha

Edited by: Anagha Jawalekar on Dec 19, 2008 3:24 PM