Skip to Content
0
Former Member
Jan 04, 2008 at 06:06 PM

BAPI_MATERIAL_GETLIST not returning any data

74 Views

Hello,

I'm facing some problem in accessing data from BAPI_MATERIAL_GETLIST from backend ABAP system. JCO connection is set up correctly as I'm calling other BAPIs through this. The model calss has some other RFCs as well which are working correctly.

However, this particular RFC BAPI_MATERIAL_GETLIST is not returning the data which, I know is there for sure. Here is my model, View and Component controller's context structure and mapping.

Model:

Model has all the generated classes under Bapi_Material_Getlist_Input(10 classes including an instance of Bapi_Material_Getlist_Output) and Bapi_Material_Getlist_Output (9 Classes). Besides, model has all other relevant classes for data structures (9 classes).

Component Controller Context:

I've bound 3 classes(nodes) and one element of Bapi_Material_Getlist_Input to Component Controller Context. The bound classes are 'Materialshortdescel' (For material description), Matnrselection (For material Number input) and Matnrlist node (For returned materials) under Output Node. Besides, Maxrows element has also been bound.

Bapi_Material_Getlist_Input cardinality 0..1, Singleton true

Materialshortdescel cardinality 0..n, Singleton true

Matnrselection cardinality 0..n, Singleton true

Output cardinality 0..1, Singleton true

Matnrlist under 'Output' cardinality 0..n, Singleton true

ComponentController doInit()

wdContext.nodeBapi_Material_Getlist_Input().bind(new Bapi_Material_Getlist_Input());

Bapimatram bpm = new Bapimatram();

wdContext.nodeMatnrselection().bind(bpm);

Bapi_Material_Getlist_Output output = new Bapi_Material_Getlist_Output();

Bapimatlst bmlst = new Bapimatlst();

wdContext.nodeBapi_Material_Getlist_Input().nodeOutput().bind(output);

wdContext.nodeBapi_Material_Getlist_Input().nodeOutput().nodeMatnrlist().bind(bmlst);

  • ComponentController executeBapi_Material_Getlist_Input( )*

IWDMessageManager manager = wdComponentAPI.getMessageManager();

try

{

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

wdContext.nodeOutput().invalidate();

}

catch(WDDynamicRFCExecuteException e)

{

manager.reportException(e.getMessage(), false);

}

View Context:

View context is similar to Component Controller context.

View

onActionButton(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

wdThis.wdGetTestAppCompController().executeBapi_Material_Getlist_Input();

I'm passing data for material number only. MATNR_LOW = FT, Option = CP, Sign = I but no data is being returned to me. I fetch about 100 materials in ABAP system with same data.

Can someone point me to the possible omissions here? I'll be really greatful for any good leads.

Thanks.

Vishwas.