cancel
Showing results for 
Search instead for 
Did you mean: 

Pblm while Passing Data in FUNCTIONAL MODULE(Bapi_Material_SaveData)

Former Member
0 Kudos

Hi,

I am new To Bapis Modules. I have Developed a WebDynPro(Java) To Create a Master Table in R/3.I used BAPI_MATERIAL_SAVEDATA To create a Material. While Running This Appln Its Giving a Return Msg Like "No description transferred" as an Error Message.

The code is:

public void wdDoInit()

{

Bapi_Material_Savedata_Input input = new Bapi_Material_Savedata_Input();

wdContext.nodeBapi_Material_Savedata_Input().bind(input);

input.setHeaddata(new Bapimathead());

input.setClientdata(new Bapi_Mara());

input.setClientdatax(new Bapi_Marax());

wdContext.nodeBapi_Material_Savedata_Input().nodeMaterialdescription().bind(new Bapi_Makt());

wdContext.nodeBapi_Material_Savedata_Input().nodeUnitsofmeasure().bind(new Bapi_Marm());

}

I thing pblm might b in the Code.Iam doubting the code for Binding Material Description...Hw to solve this ?.Plz Help me out..(Urgent Issue!!!)..

Regards,

Ramganesh.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Try This

public void wdDoInit()

{

Bapi_Material_Savedata_Input input = new Bapi_Material_Savedata_Input();

wdContext.nodeBapi_Material_Savedata_Input().bind(input);

//Bapimathead is not optional you have to give value forthis

Bapimathead headdata=new Bapimathead();

headdata.setMATERIAL("Material");

headdata.setMATERIAL_EXTERNAL("MaterialExternal");

:

:

input.setHeaddata(headdata);

//TODO: Same as following Structure

//You can try as same code

input.setClientdata(new Bapi_Mara());

input.setClientdatax(new Bapi_Marax());

wdContext.nodeBapi_Material_Savedata_Input().nodeMaterialdescription().bind(new Bapi_Makt());

wdContext.nodeBapi_Material_Savedata_Input().nodeUnitsofmeasure().bind(new Bapi_Marm());

//Execute the Bapi

wdContext.currentBapi_Material_Savedata_Input().modelObject().execute();

}

Kind Regards

Mukesh

Answers (1)

Answers (1)

Former Member
0 Kudos

you need an execute method. Like this:

wdContext.current[modelnode]().modelObject().execute();