on 06-24-2010 10:54 AM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
please post stacktrace and version number of WD-RUNTIME package.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.