Application Development 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: 

Fetch from MBEW table

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

7 REPLIES 7

kesavadas_thekkillath
Active Contributor
0 Kudos

Donot relate MSEG with MBEW ?

Whats your requirement ?

Former Member
0 Kudos

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

0 Kudos

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...

0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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