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: 

sqvi join of Mara and Marc with erroneous output

Former Member
0 Kudos
345

hello all

I have made a join between Mara and Marc in a SQVI query.

as input i select material according to material type, material group and plants.

output i want the material, the group and the maintenance view of material for each plant.

not all the plants have the same maintenance view but the query returns the material for each plant with wrong maintenance view!

what can it be?

5 REPLIES 5

Former Member
0 Kudos
123

what join parameter have you used? ?

Former Member
0 Kudos
123

are you talking about PSTAT field contents? If so, do you want the PSTAT from Marc (for each material/plant) or from MARA (for each material)? Or did you want VPSTA from MARA for each material? So far, you've not told us what you are really trying to achieve.

0 Kudos
123

i am trying to achieve the following:

material 12345 is in plants A, B, C

plant A has maintenance status KBVE

plant B has maintenance status BVE

plant C has maintenance status KVB

when I run the view, with the tables MARA and MARC joined by the material number, i requested the material filtering by material group, material type and maintenance view E.

i want the system to return material 12345 for plant A and B with the respective statuses and exclude C because it does not have the status E.

instead it returns material 12345 with plants A, B, C and all with maintenance status KBVE

is it clearer now?

also, what is the difference between mainenace status in MARA and in MARC?

0 Kudos
123

alisha, in the selection parameters check which table you have used for the maintenance status.. should be from MARC.

pass \*E* to this so that it picks values from marc table only when the field has a E in it.

0 Kudos
123

You can use table MSTA for the statuses already available for the material and MOFF for outstanding statuses.