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

MM Views

Former Member
0 Likes
2,077

Hi,

I am trying to validate which views have been created for a material depending on which plant it belongs to.

Is there a function or bapi that does that? Because I have seen in some other topics that we have to use table MARA and MARC, however some views are not present in table MARC that are present in MARA.

Thanks!

Hi,

I am trying to validate which views have been created for a material depending on which plant it belongs to.

Is there a function or bapi that does that? Because I have seen in some other topics that we have to use table MARA and MARC, however some views are not present in table MARC that are present in MARA.

Thanks!

12 REPLIES 12
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,877

I think you want to check the maintenance status fields of MARA and MARC.

MARA-VPSTA

MARA-PSTAT

MARC-PSTAT

<i>Maintenance status

Use

The maintenance status records:

Which user departments may maintain a material master record of a particular material type

Which user departments have already maintained the material master record at a particular hierarchy level

The overall maintenance status is made up of the individual maintenance statuses. The individual maintenance statuses have the following meaning:

User department Maintenance status

Work scheduling A

Accounting B

Classification C

MRP D

Purchasing E

Production resources/tools F

Costing G

Basic data K

Storage L

Forecasting P

Quality management Q

Warehouse management S

Sales V

Plant stocks X

Storage location stocks Z</i>

REgards,

Rich Heilman

Read only

0 Likes
1,877

Hi Rich,

May I know where & how u get these info

Work scheduling A

Accounting B

Classification C

...

which table & how u know this table have this info? by experience.

Thanks. abap newbie here

Thanks,

Charles

Read only

0 Likes
1,877

Hi Rich,

if we have two views Costing 1 and Costing 2, then G will be present in the table MSTA.

How can we know whether Costing1 is present or Costing2 is present

Thanks in advance

Read only

Former Member
0 Likes
1,877

HI,

Use this FM

SELECTION_VIEWS_FIND to know views assigned to

material.

Regards

Amole

Read only

Former Member
0 Likes
1,877

Hi,

MSTA and MOFF are the tables that you need.

MSTA contains already created views for a Material.

MOFF contains outstanding views (the views that are allowed and not yet created).

You can use function modules MSTA_GENERIC_READ_WITH_MATNR

and MOFF_GENERIC_READ_WITH_MATNR

OR

direct select statements on the above tables..

Hope this helps..

Sri

Message was edited by: Srikanth Pinnamaneni

Read only

0 Likes
1,877

Hi,

thanx for the responses but how do i check that for this type of plant I have Views 'ABCD' for example?

Read only

0 Likes
1,877

Hi Mel,

1. I think for that purpose, (plant wise view)

we should do a count(*)

in that TABLE

for that particular PLANT.

2. If no record, than no view.

3. eg. MARC

regards,

amit m.

Message was edited by: Amit Mittal

Read only

0 Likes
1,877

Hi,

Im looking at the table MSTA, it seems to be more "accurate" than table MARC.

Any help?!!

Thanks

Read only

0 Likes
1,877

Hi again,

1. U are perfectly right !

regards,

amit m.

Read only

0 Likes
1,877

Hi again,

how go i go through table MSTA to find out if i have views A B C and D for example?

Read only

0 Likes
1,877

Hi again,

1. One important field in that table is STATM

which contains the view (code of it)

A Work scheduling

B Accounting

C Classification

D MRP

E Purchasing

F Production resources/tools

G Costing

K Basic data

L Storage

P Forecasting

Q Quality management

S Warehouse management

V Sales

X Plant stocks

Z Storage location stocks

2. It also has WERKS field

Werks is applicable to some views

and not to some (eg. basic view)

so u can check the above TWO fields combination

for findingout if view is there or not

for that particular plant.

3. Apart from Plant, there are other fields

LGORT

LGNUM

LGTYP

VKORG

VTWEG

BWKEY

BWTAR

which are specific to some view.

U can use them for other views, If required.

regards,

amit m.

Message was edited by: Amit Mittal

Read only

0 Likes
1,877

Hi,

the thing is i dont want to go through too many conditions. If this plant is equal to this and this view equal to that...it would make too many IFs.