cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Getting the Data from BAPI_GOODSMVT_GETITEMS in Web Dynpro

Adi_Bathineni
Participant
0 Kudos

Hi Guru's,

I'm using the BAPI, BAPI_GOODSMVT_GETITEMS to get the list of Materials in WEB Dynpro.

for this i 'm passing the following parameters.

Material ,Plant , Movement Type and Special Stock parameters.

When i passed the same parameters in the R/3 Server, i'm getting the data. In webdynpro i'm not getting the data.

Please give me the solution

Here is the code i've written in the view level to pass parameters.

Bapi_Goodsmvt_Getitems_Input input = new Bapi_Goodsmvt_Getitems_Input();

wdContext.nodeBapi_Goodsmvt_Getitems_Input().bind(input);

Bapi2017_Gm_Material_Ra input1 = new Bapi2017_Gm_Material_Ra();

wdContext.nodeBapi2017_Gm_Material_Ra().bind(input1);

Bapi2017_Gm_Move_Type_Ra input2 = new Bapi2017_Gm_Move_Type_Ra();

wdContext.nodeBapi2017_Gm_Move_Type_Ra().bind(input2);

Bapi2017_Gm_Plant_Ra input3 = new Bapi2017_Gm_Plant_Ra();

wdContext.nodeBapi2017_Gm_Plant_Ra().bind(input3);

Bapi2017_Gm_Spec_Stock_Ra input4 = new Bapi2017_Gm_Spec_Stock_Ra();

wdContext.nodeBapi2017_Gm_Spec_Stock_Ra().bind(input4);

wdContext.nodeBapi2017_Gm_Material_Ra().currentBapi2017_Gm_Material_RaElement().setSign("I");

wdContext.nodeBapi2017_Gm_Material_Ra().currentBapi2017_Gm_Material_RaElement().setOption("EQ");

wdContext.nodeBapi2017_Gm_Material_Ra().currentBapi2017_Gm_Material_RaElement().setLow("1857");

wdContext.nodeBapi2017_Gm_Plant_Ra().currentBapi2017_Gm_Plant_RaElement().setSign("I");

wdContext.nodeBapi2017_Gm_Plant_Ra().currentBapi2017_Gm_Plant_RaElement().setOption("EQ");

wdContext.nodeBapi2017_Gm_Plant_Ra().currentBapi2017_Gm_Plant_RaElement().setLow("M110");

wdContext.nodeBapi2017_Gm_Move_Type_Ra().currentBapi2017_Gm_Move_Type_RaElement().setSign("I");

wdContext.nodeBapi2017_Gm_Move_Type_Ra().currentBapi2017_Gm_Move_Type_RaElement().setOption("EQ");

wdContext.nodeBapi2017_Gm_Move_Type_Ra().currentBapi2017_Gm_Move_Type_RaElement().setLow("309");

wdContext.nodeBapi2017_Gm_Spec_Stock_Ra().currentBapi2017_Gm_Spec_Stock_RaElement().setSign("I");

wdContext.nodeBapi2017_Gm_Spec_Stock_Ra().currentBapi2017_Gm_Spec_Stock_RaElement().setOption("EQ");

wdContext.nodeBapi2017_Gm_Spec_Stock_Ra().currentBapi2017_Gm_Spec_Stock_RaElement().setLow("W");

//

wdThis.wdGetWdsdgoodsmvmtcustController().execute_BAPI_GOODSMOVEMENT_GETITEMS();

Please correct me if i'm wrong in coding.

Thanks & Regards,

Adi

Accepted Solutions (0)

Answers (4)

Answers (4)

Adi_Bathineni
Participant
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Adi,

can you just try binding this way,

wdContext.nodeBapi_Goodsmvt_Getitems_Input().bind(new Bapi_Goodsmvt_Getitems_Input());

might work!

Former Member
0 Kudos

Hi ,

You have done one mistake while setting the input parameters for BAPI..Do the following steps for setting input to BAPI

Bapi_Goodsmvt_Getitems_Input input = new Bapi_Goodsmvt_Getitems_Input();

wdContext.nodeBapi_Goodsmvt_Getitems_Input().bind(input);

Bapi2017_Gm_Material_Ra input1 = new Bapi2017_Gm_Material_Ra();

wdContext.nodeBapi2017_Gm_Material_Ra().bind(input1);

Bapi2017_Gm_Move_Type_Ra input2 = new Bapi2017_Gm_Move_Type_Ra();

wdContext.nodeBapi2017_Gm_Move_Type_Ra().bind(input2);

Bapi2017_Gm_Plant_Ra input3 = new Bapi2017_Gm_Plant_Ra();

wdContext.nodeBapi2017_Gm_Plant_Ra().bind(input3);

Bapi2017_Gm_Spec_Stock_Ra input4 = new Bapi2017_Gm_Spec_Stock_Ra();

wdContext.nodeBapi2017_Gm_Spec_Stock_Ra().bind(input4);

input1.setSign("I");

input1.setOption("EQ");

input1.setLow("1857");

input2.setSign("I");

input2.setOption("EQ");

input2.setLow("M110");

input3.setSign("I");

input3.setOption("EQ");

input3.setLow("309");

input4.setSign("I");

input4.setOption("EQ");

input4.setLow("W");

//

wdThis.wdGetWdsdgoodsmvmtcustController().execute_BAPI_GOODSMOVEMENT_GETITEMS();

Finally inavidate your output node like

wdContext.node<output node name>.invalidate();

also put your code inside try catch to display any exception if any

Regards,

Amit Bagati

Adi_Bathineni
Participant
0 Kudos

HI,

Thanks for your reply.

I've tried the same.

But still i'm not getting the data.

Regards,

Adi.

Former Member
0 Kudos

Try invalidating output node

Regards,

Gopal