cancel
Showing results for 
Search instead for 
Did you mean: 

Adaptive RFC import

Former Member
0 Kudos

Hi ,

I am importing certain ZBAPI's using an adaptive RFC model . I am able to import the model and have done all the bindings and context mapping as well.

When i try to instantiate the bapi , it is giving me a null pointer exception. That is suppose i have a zbapi called "zbapi_get_order"

then i am trying to instantiate the BAPI as foloows:

zbapi_get_order order = new zbapi_get_order().

This statement alone is throwing a null pointer exception.

Kindly let me know the solution to the problem.

Regards,

Madhu.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Right now your module in ABAP is only a Functional Module.

You have to mark it as "Remote Enabled" in order to access it remotely, only then it will become a Remote Function Module.

Follow the steps suggested by Poojith.

Answers (3)

Answers (3)

p330068
Active Contributor
0 Kudos

Hi Madhu,

Please check the model class under Models >> <Your Model name>

it should be like below to create object for the model object. I think you missed _input.

zbapi_get_order_input order = null;

order = new zbapi_get_order_input().

OR

order = new zbapi_get_order_input(WDModelScopeType.APPLICATION_SCOPE).

wdContext.nodeZbapi_get_order_input().bind(order);

Hope it will helps

Regards

Arun

Former Member
0 Kudos

HI All,

Thanks for your replies.

@Tom Cole : the bapi that I have mentiopned is just an example and no such BAPI actually exisits.

@Arun : I have tried exactly the way you have mentioned. "_input" is also present.

Is there anything wrong with the BAPI? I tried to create a model object by importing SAP_WAPI_CREATE_WORKLIST and it works fine. The prob is only with this BAPI i guess.

Please let me know the solution.

Regards,

Madhu.

former_member214651
Active Contributor
0 Kudos

Hi Madhu,

Check if the ZRFC is remote enabled?

1. Use SE37 transaction in ECC.

2. Enter the name of the RFC.

3. Click on "Display"

4. click on "Attributes" tab.

5. Processing Type should be "Remote Enabled Module"

Regards,

Poojith MV

Former Member
0 Kudos

The names are case sensitive and I have never seen one come over in all lower case. Have you tried using Zbapi_Get_Order?

Not sure if you're aware, but there is a CRTL-O function that may help you. If you type zbapi_get_order and then press CTRL-O it should attempt to locate an class/method, etc with that signature and replace it (if it finds one match) or list them (if it finds many).

My guess is this is just a case sensitive issue.

Former Member
0 Kudos

Hello,

please post stacktrace and version number of WD-RUNTIME package.

Regards