Skip to Content
author's profile photo Former Member
Former Member

BAPI returning null values in output structure

Hi Gurus,

I am facing a big show stopper issue from the BAPI (Customized) side in my development. I am passing all the parameters required to execute BAPI from front end but unable to get values in output structure.

I kept debugger for that particular BAPI and when I executed the particular action from front end and debugged the whole ABAP code I came to know that in output structure values are coming (In debug screen). But as soon as I pressed F8 and came back to my front end screen I got no values in output structure. I tried printing size of the model output node and it got size = 0 .

Just to brief the history of the BAPI: Its a BAPI to get duplicate records of customer and vendor address. One year back same BAPI was used in a different application and still working fine and returning all expected results.

I have a question here - Is it possible that this problem is getting caused as in past one year this code got changed so many times?

Or is there some configuration level issue?

Please help me in this as I am in phase of completing my development but got stuck coz of this issue.



Add comment
10|10000 characters needed characters exceeded

3 Answers

  • Best Answer
    Posted on Apr 29, 2013 at 10:51 AM

    Hi Akanksha,

    The solution is simple. I believe you have forgot to do the binding operation.

    Just look if there is any code written something like this.

    wdContext.node<Model Request Node Name>().bind(<Model execution Object Name>);

    This particular statement binds the node to the response which is coming back.

    The above code should be before the following code.

    <Model execution Object Name>.execute();



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Akanksha,

      This happened because the BAPI must have been changed after you imported the BAPI in your NWDS. A cache is maintained in the SAP Java Stack server which is not updated when changes are made in the BAPI in ABAP stack or even if BAPI is reimported in the NWDS.

      The way out as you rightly figured out is by invalidating the metadata cache after which a new cache is formed or by restarting the SAP server which would implicitly invalidate the metadata cache.

      If you are working in an environment where BAPI developments are going in parallel with WDJ development, sometimes even invalidating the metadata cache does not help. In such cases, a server restart only works.


      -Amol Gupta

  • Posted on May 03, 2013 at 10:56 AM

    I suspect the 'Output' node that is bounded to the view context. If you are getting values in debugging, check for the output node and binding for that.

    - nikhil

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on May 03, 2013 at 12:08 PM

    Hi Akanksha,

    If it is working on the ECC, and not working in your WebDynpro Java Application, the cause must be a coding problem. Study the code thoroughly and you should be able to overcome it.

    - Check your code thouroughly

    - Check context mappings

    - Check context binding with UI elements

    - Restart NWDS

    - Restart Server



    Add comment
    10|10000 characters needed characters exceeded