cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI call does not return any values

Former Member
0 Kudos

Hi,

I am working on Netweaver 7.2.

I imported a BAPI model: BAPI_MATERIAL_GETLIST.

I imported the model node in my context node:

Bapi_Material_Getlist_Input node in which I have the Materialshortdescsel node, Maxrowd value and the Output node in which I have the Matnrlist for results.

The following code is used in the wdDoInit of the component controller:

Bapi_Material_Getlist_Input input = new Bapi_Material_Getlist_Input();
wdContext.nodeBapi_Material_Getlist_Input().bind(input);
wdContext.nodeBapi_Material_Getlist_Input().currentBapi_Material_Getlist_InputElement().setMaxrows(0);

Bapimatras bps = new Bapimatras();
wdContext.currentBapi_Material_Getlist_InputElement().modelObject()
.addMaterialshortdescsel(bps);

I use the following code to execute the BAPI:

wdContext.currentBapi_Material_Getlist_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();

I have checked in ST05 and the BAPI is called from the application. But I never get any values. As on the ECC side, when I test it, I get 16 values.

What is wrong with the code above ?

Thanks in advance for your help.

Thibault

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear Thibault,

When you import a BAPI / RFC, you get one node, Output. What I can see is that you are not using the Output node. You must use the output node's child node, which the the ones, which give the output.

Please try by using the output node, that should help. revert in case of issues.

Cheers!!!

Umang

Former Member
0 Kudos

The technical implementation of my source code was right. The problem was on the JCO user language. It was set on EN, and the data I am looking for is in French. So it is right that I could not retreive anything since there is no data in English.

Former Member
0 Kudos

Hi

What are the import parameters are expecting FM?

Are you passing correct Import parameters? While executing from backend working means it is issue with your code.

Try to check import parameters , if it is required add prefix 0 (zero's ) to import parameters.

BR

SS