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

Material Valuation

Former Member
0 Likes
1,783

Hello,

I have been trying to extract material valuation data using the: BAPI_MATERIAL_GET_DETAIL and accessing the MATERIALVALUATIONDATA structure. However I always get 0 for all fields with NCO or JCO. I have tested the function in SAP and I am getting the same results. However If I check through the SAPGUI (MM03) : Accounting 1, these fields for Material Valuation contain values.

What am I doing wrong? Or is there another way to get this information, another BAPI for instance.

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,600

Hi,

To get the valuation data using this BAPI, you need to enter the valuation area field. It will show the valuation data only for specific valuation area. When you go to MM03, enter the material number and select accouting view then SAP must be giving you a pop up to enter the plant. Table "T001W" contains the cross reference between Plant and valuation area. So you need to first get the value of valuation area from this table for a plant and then enter the same in BAPI.

select * from t001 where werks = <Plant>.

Call Function BAPI_MATERIAL_GET_DETAIL

Exporting

MATERIAL = <Material>

VALUATIONAREA = T001W-BWKEY

Importing

........

5 REPLIES 5
Read only

Former Member
0 Likes
1,601

Hi,

To get the valuation data using this BAPI, you need to enter the valuation area field. It will show the valuation data only for specific valuation area. When you go to MM03, enter the material number and select accouting view then SAP must be giving you a pop up to enter the plant. Table "T001W" contains the cross reference between Plant and valuation area. So you need to first get the value of valuation area from this table for a plant and then enter the same in BAPI.

select * from t001 where werks = <Plant>.

Call Function BAPI_MATERIAL_GET_DETAIL

Exporting

MATERIAL = <Material>

VALUATIONAREA = T001W-BWKEY

Importing

........

Read only

0 Likes
1,600

Thanks

Himanshu

I will try your suggesting and let you know. It sounds promising

Regards

kevlangdo

Read only

0 Likes
1,600

Thanks for the Valuation area info. That helped a lot however I also needed to included leading zeros in the material field since this field has 18 char and my material code has only 6, so when I added 12 leading zeros, I began receiving my data. Weird.

Read only

madhu_vadlamani
Active Contributor
0 Likes
1,600

Hi Kelvngdo,

Make a wrapper RFC and pass the valuation area and get the data in BAPI_MATERIAL_GET_DETAIL.

Regards,

Madhu.

Read only

0 Likes
1,600

Thanks for the info

madhurao123

I will try your suggestion. However, I have been having problems creating functions in dev env. I keep getting "not authorized to make changes (s_develop). However basis says that I have full access

Thanks for your help

kevlangdo