Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem with material price

Former Member
0 Likes
1,347

Hi,

I have used bapi BAPI_MATERIAL_GET_DETAIL,then i am getting material price as "0".But when i use a bapi BAPI_SALESORDER_CREATEFROMDAT2 for all the materials it is calculating the price and it is even displaying the unit price of that material.whether i am using the wrong bapi to get material detail or any problem.pls send me the related information regarding that.

Regards,

Kiran.

Hi,

I have used bapi BAPI_MATERIAL_GET_DETAIL,then i am getting material price as "0".But when i use a bapi BAPI_SALESORDER_CREATEFROMDAT2 for all the materials it is calculating the price and it is even displaying the unit price of that material.whether i am using the wrong bapi to get material detail or any problem.pls send me the related information regarding that.

Regards,

Kiran.

9 REPLIES 9
Read only

Former Member
0 Likes
1,187

Hi,

Are you passing the values to VALUATIONAREA and VALUATIONTYPE? Unless you do that PRICE will not be calculated. You should get the values for these from your functional person.

Regards,

Ravi

Note : Please mark the helpful answers

Read only

0 Likes
1,187

HI,

My problem is i could not get the material price when i run BAPI_MATERIAL_GET_DETAIL. But in BAPI_SALESORDER_CREATEFROMDAT2, I can get NetValue

Regards

Guru

Read only

0 Likes
1,187

Hi,

The SALES ORDER BAPI internall might be passing the valuation data to the MATERIAL BAPI. But when you are calling the same you might not be passing the same.

Regards,

Ravi

Note :Please mark all the helpful answers

Read only

0 Likes
1,187

hi ravi

can u please tell me how see material price in sapgui.

and give me the importparameters

regards

Guru

Read only

Former Member
0 Likes
1,187

Which export parameter are you looking at?

Did you see whatis there in MATERIALVALUATIONDATA-STD_PRICE??

Regards,

Ravi

See sample code:

CALL FUNCTION 'BAPI_MATERIAL_GET_DETAIL'

EXPORTING

MATERIAL = ls_matnrlist-MATERIAL

PLANT = '1000'

VALUATIONAREA = '1000'

  • VALUATIONTYPE =

IMPORTING

MATERIAL_GENERAL_DATA = ls_generaldata

  • RETURN =

  • MATERIALPLANTDATA =

MATERIALVALUATIONDATA = ls_MATERIALVALUATIONDATA.

move ls_matnrlist-MATERIAL to ls_MATDATA-MATERIAL.

move ls_generaldata-MATL_DESC to ls_MATDATA-MATL_DESC.

move ls_generaldata-BASE_UOM to ls_MATDATA-BASE_UOM.

move ls_MATERIALVALUATIONDATA-MOVING_PR to ls_MATDATA-MOVING_PR.

append ls_matdata to lt_matdata.

Read only

Former Member
0 Likes
1,187

Hi,

check the following threads.

this might be of some help.

Regards,

Aswin

Read only

Former Member
0 Likes
1,187
Read only

Former Member
0 Likes
1,187

Hi Bhogi.

i did it on this way and it works correct!

*

REPORT ZTEST.

*

data: itab like BAPIMATDOBEW.

data: rt like BAPIRETURN.

*

CALL FUNCTION 'BAPI_MATERIAL_GET_DETAIL'

EXPORTING

MATERIAL = '000000000000500000'

PLANT = '2000'

VALUATIONAREA = '2000'

VALUATIONTYPE = 'EIGEN'

IMPORTING

  • MATERIAL_GENERAL_DATA =

RETURN = rt

  • MATERIALPLANTDATA =

MATERIALVALUATIONDATA = itab.

*

Itab has the right values. Do you use the right VALUATIONTYPE. Sometimes it will be different. Look

at MBEW and find the right one.

Hope i can help you.

Regards, Dieter

Read only

Former Member
0 Likes
1,187

Did u try using FM MBEW_ARRAY_READ_MATNR_ALL.

Pass material number in the table IPRE03 and it will give u all the MBEW records.