‎2011 Nov 23 3:35 PM
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
‎2011 Nov 23 10:39 PM
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
........
‎2011 Nov 23 10:39 PM
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
........
‎2011 Nov 24 3:34 PM
Thanks
Himanshu
I will try your suggesting and let you know. It sounds promising
Regards
kevlangdo
‎2011 Nov 24 8:17 PM
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.
‎2011 Nov 24 4:28 AM
Hi Kelvngdo,
Make a wrapper RFC and pass the valuation area and get the data in BAPI_MATERIAL_GET_DETAIL.
Regards,
Madhu.
‎2011 Nov 24 3:36 PM
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