cancel
Showing results for 
Search instead for 
Did you mean: 

Error in Adaptive RFC

Former Member
0 Kudos

Hi Experts

Some time ago, when i used NW EHP SP01, i developed an application using Adaptive RFC in Web Dynpro.

I call RFC BAPI_REQUISITIO_CREATE from ECC.

Now i have instaled NW EHP SP04, and when i tried to used this application i have this error:

java.lang.NullPointerException: while trying to invoke the method com.sap.mw.jco.IMetaData.getFieldCount() of an object loaded from local variable 'metadata' 
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModelClass.createNewBaseTypeDescriptor(AiiModelClass.java:181) 
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModelClass.descriptor(AiiModelClass.java:149) 
at teclogica.com.br.purchase_request.purchasemodel.Bapi_Requisition_Create_Input.<init>(Bapi_Requisition_Create_Input.java:54) 
at teclogica.com.br.purchase_request.purchaserequestapp.PurchaseRequestApp.wdDoInit(PurchaseRequestApp.java:140) 
at teclogica.com.br.purchase_request.purchaserequestapp.wdp.InternalPurchaseRequestApp.wdDoInit(InternalPurchaseRequestApp.java:349) 
at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:160) 
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:227) 
at com.sap.tc.webdynpro.progmodel.components.Component.initController(Component.java:254)
...

This happen in the method wdDoInti of component controller when i create the Model:

Bapi_Requisition_Create_Input createRequisitionInput = new Bapi_Requisition_Create_Input();

I tried to reimport the model, but didn't work.

The RFC Destinations are created and working.

Someone could help me, please?

Regards

Marcos Brandao

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Marcos,

I would rather say first check the status of JCOs. Then delete the model node from context and even from DC. Now freshly import the model, create a model node in context and then bind it to the input structure of the BAPI before you call the code.

Even in the code, check if you bind the instance of input structure of the BAPI to the model node in conext before you execute the model instance.

Regards,

Tushar S

Answers (2)

Answers (2)

former_member214651
Active Contributor
0 Kudos

Hi Marcos,

After creating the instance of the RFC, have u binded the object to the Node?

wdContext.nodeBapi_Requisition_Create_Input().bind(createRequisition);

Regards,

Poojith MV

p330068
Active Contributor
0 Kudos

Hi Marcos,

Please check the JCO Destination and update the SLD if required.

Also it might happen, ig this RFC structure has changed in backend system.

Hope it helps

Regards

Arun