Skip to Content
Former Member
Jun 18, 2009 at 03:42 PM

problem with bapi's table parameter


Hi all,

I trying to write a simple webdynpro based app that makes use of BAPI_GOODSMVT_CREATE. The Input parameter will be entered on the screen and these will populate the IMPORT and Table parameters of the BAPI call.

All data binding between the UI and view context as well as the context mapping between the view controller and the component have been done.

//inside mycomponent
//@@begin wdDoInit()
    //Create Bapi_Goodsmvt_Create_Input object and bind it to context node
    bapiGoodsMvt = new Bapi_Goodsmvt_Create_Input();
    //Get a reference to the Message Manager
    msgMgr = wdThis.wdGetAPI().getMessageManager();
    //Create new elements for IMPORTING/TABLES parameters nodes
    bapiGoodsMvt.setGoodsmvt_Code(new Bapi2017_Gm_Code());
    bapiGoodsMvt.setGoodsmvt_Header(new Bapi2017_Gm_Head_01());
    bapiGoodsMvt.setGoodsmvt_Item(new Bapi2017_Gm_Item_Create()); //this does not compile

The error that i get is: The method setGoodsmvt_Item(AbstractList) in the type Bapi_Goodsmvt_Create_Input is not applicable for the arguments (Bapi2017_Gm_Item_Create).

The definition of the setGoodmvt_item method takes an AbstractList and i'm not sure how i can give it one since it's 'abstract' and thus cannot be instantiated.

public void setGoodsmvt_Item( list) {
    setRelatedModelObjects("Goodsmvt_Item", list);

Any help is appreciated. An example of a bapi call that requires table parameters would be welcomed as well.

Edited by: MonkD on Jun 18, 2009 5:42 PM

Edited by: MonkD on Jun 18, 2009 5:52 PM