cancel
Showing results for 
Search instead for 
Did you mean: 

WebDynpro Issue

Former Member
0 Kudos

Hi,

I have a WebDynpro Java application having only one BAPI used and working fine. Now I want to add one more bapi to the existing model and then call that perticular bapi and pull the data to a table.

I reimported my model and got the bapi and mapped the context accordingly. How can i call that perticular bapi now. I created a method in Component controler which is having the following statement and then calling that method in View controler. I am getting the nullpointer exeception. There is no import variables for the bapi.

wdContext.currentZfunmoduletest_InputElement().modelObject().execute();

Help in this case please

thanks

suresh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi suresh,

Did you bind the input element?

Regards,

P.Manivannan

Former Member
0 Kudos

Hi manivannan palanisamy ,

I don't have any input fields for that bapi's. It is just for pulling the data and displaying in a table. However i bind the the table to the context already for displaying.

Thanks in advance

suresh

Former Member
0 Kudos

Hi Suresh,

Check your node cardinality??

Regards,

P.Manivannan.

Former Member
0 Kudos

Hi,

cardinality is 0:N . I think that is not a problem.

thanks in advace

Suresh

PradeepBondla
Active Contributor
0 Kudos

Did you inititialize the second bapi in doInit() method as you did for first one?

PradeeP

Answers (3)

Answers (3)

former_member189631
Active Contributor
0 Kudos

Suresh,

You have to write the code to bind / execute for you second BAPI as you did for the Firstone.

otherwise use applytemplate.

Ramganesan Karuppaiyah

Former Member
0 Kudos

Hi Suresh,

If you have two BAPIs , then better thing is having two different models.

Try with this code in your execute BAPI method.

Zfunmoduletest_Input input = new Zfunmoduletest_Input();

wdContext.nodeZfunmoduletest_Input().bind(input);

try{

wdContext.currentZfunmoduletest_InputElement().modelObject().execute();

}

catch(Exception e) {

wdComponentAPI.getMessageManager().reportException(

e.getMessage(),fasle);

}

wdContext.nodeOutput().invalidate();

regards,

Tulasi

former_member201361
Active Contributor
0 Kudos

hi,

in the method u have initialize the model again and execute the model bind the node to the table so that those datas will be displayed in the table .

if u are binding the value node to the table then copy the data from the model node to the value node .

call the method from the view controller .

if possible paste the error stacktrace for better answers

Thanks and Regards