cancel
Showing results for 
Search instead for 
Did you mean: 

problem with BAPI

Former Member
0 Kudos

Hi,

I'm working with a BAPI that actually runs on R3.

I've created a WDP application and checked everything over 3 times. But it won't display anything. Is there a problem with my controller's code ?

public void wdDoInit()

{

Bapi_Input input 0 = new Bapi_Input();

wdContext.nodeBapi_Input().bind(input0);

input0.setP1("xxx");

input0.setP2("yyy);

input0.setP3("zzz");

try {

ZwdContext.currentBapi_InputElement().modelObject().execute

}

catch (Exception ex)

{ ex.printStackTrace();

}

wdContext.nodeOutput().invalidate();

}

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Philippe,

Try to invalidate the context node with the result of the BAPI in order to refresh to model content. This is a usually mistake.

Answers (6)

Answers (6)

Former Member
0 Kudos

There was actually a problem with the BAPI, not with the coding..

Thanks to all of you

Former Member
0 Kudos

Hi Philippe,

To convert your string to uppercase, simply use the method toUpperCase():


String myString = "hello";
myString = myString.toUpperCase();

Regards,

Nicolas

Former Member
0 Kudos

Hi,

The code looks fine. May be u can run the Bapi with these inputs from R3 side and check. If it runs, then copy the inputs to webdynpro. In case of any preceding zero in inputs, make sure u have all of them.

Regards,

Harini S

Former Member
0 Kudos

Hi Phileppe

Points to consider here

1) As there is no error,that means that it is connecting to the Back End

2) So the problem might be with the input parameters which you are passing

3) Data which you are sending is CASE SENSITIVE

4) So Try to convert the strings into UpperCase

5) One more thing is you are using Input node,which is used to display the data from BAPI, use Output node to insert data into BAPI

these are just points to observe in your scenario , not solution.hope you get what i am trying to explain

Regards

Chaitanya.A

Former Member
0 Kudos

Thanks Chaitanya

I don't understand, my entries are already in UPPERCASE... or at least I think I do...

Otherwise, How do I convert the strings to uppercase ?

Message was edited by:

Philippe Delalande

Message was edited by:

Philippe Delalande

Former Member
0 Kudos

public void wdDoInit()

{

Bapi_Input input 0 = new Bapi_Input();

wdContext.nodeBapi_Input().bind(input0);

input0.setP1("xxx");

input0.setP2("yyy);

input0.setP3("zzz");

try {

ZwdContext.currentBapi_InputElement().modelObject().execute();

wdContext.nodeOutput().invalidate();

int size = wdcontext.node<outputdisplaynode>().size();

if(size==0)

{

display exp;

}

find the size u will get the size of node means theFNM s executing otherwise not check with FNM has Authentication.

}

catch (Exception ex)

{ ex.printStackTrace();

}

}

Thanks

Lohi.

Former Member
0 Kudos

how do I do that ? (sorry about my newness to WDP !)

Former Member
0 Kudos

Hi! Philippe,

there a very good example available on SDN for "How to access an ABAP function from a WB app.".Please go through that example first.Here you will get step by step process for this:--

URL is:--

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#15">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#15</a>

regards,

Mithileshwar

Former Member
0 Kudos

Thank you Mithileshwar,

I have this tutorial and the fact is it's what I did (i did it with another BAPI next to it and it works ! But not here)

It also runs perfectly well on R3...

i'm trying other tracks proposed here (thanks to all of you!)