07-01-2010 4:49 PM
Hi,
I have a situation where I need to fetch some records form MSEG table and for each record fetched I need to get the Standard Price(STPRS) from MBEW table.
But for fetching a unique record from MBEW table, I need to fetch based on its primary keys - MATNR, BWKEY, BWTAR.
What values should I pass for BWKEY and BWTAR for fetching a unique record?
I searched in SDN and found that BWKEY can have values Plant or Company Code. But I'm not sure when I should populate it with Plant and when I should populate it with company code.
Thanks in advance.
Sreeraj Pulickal
07-02-2010 9:34 AM
Hi Vinod,
Thanks for the information.
How can we know whether a split evaluation is applicable?
Also when are we suppose to pass Company Code to BWKEY?
Regards,
Sreeraj
07-01-2010 5:38 PM
07-01-2010 5:55 PM
Hi Keshav,
My requirement is to fetch unique record from MBEW table. But this table has MATNR, BWKEY, and BWTAR as key fields.
Please let me know what values I should pass for BWKEY and BWTAR.
Thanks,
Sreeraj
Edited by: Sreeraj Pulickal on Jul 1, 2010 6:55 PM
07-01-2010 6:38 PM
What's in the table rows as it exists? Probably Plant, right? Should be easy to figure out what your data values need to be to read MBEW...
07-02-2010 6:18 AM
Hi,
Pass Plant code in MBEW-BWKEY. Value in field BWTAR is based on the valuation category (Whether split valuation is applicable or not), BWTAR will not hold any value is there is no split valuation.
Regards
Vinod
07-02-2010 9:34 AM
Hi Vinod,
Thanks for the information.
How can we know whether a split evaluation is applicable?
Also when are we suppose to pass Company Code to BWKEY?
Regards,
Sreeraj
07-02-2010 9:40 AM
Hi,
See the SAP documentation of BWKEY. It clearly specifies when to pass Company Code
Valuation area
Organizational level at which the material is valuated. A valuation area
can be one of the following:
o Plant
o All plants belonging to a company code, in which case the valuation
area is the company code
Edit :
Regarding valuation type, you can get the valuation category(BWTTY) from MARC by passing Material Number and Plant.
Get tye valuation Type from Table T149C by passing BWTTY as input parameter.
Regards
Vinod
Edited by: Vinod Kumar on Jul 2, 2010 2:15 PM
07-02-2010 12:28 PM
Thanks Vinod. That was really helpful and it solved my problem.
Also, I found that we have to set the valuation level in SPRO in the following path. This would determine whether to use Plant or Company Code.
SPRO -> Enterprise Structure -> Definition -> Logistics-General -> Define Valuation Level
Regards,
Sreeraj