2007 Dec 04 6:42 AM
i am using follwoing fields for getting materials combination of plant and distribution channels..
MVKE - Matnr,VKORG,VTWEG
MARC - MATNR,WERKS
how to write code for getting materials mixing of plant and distribution channels.
i am using follwoing fields for getting materials combination of plant and distribution channels..
MVKE - Matnr,VKORG,VTWEG
MARC - MATNR,WERKS
how to write code for getting materials mixing of plant and distribution channels.
2007 Dec 04 6:46 AM
Hey MVKE is having plant information also.
Check the filed DWERK. depending on that u can get data.
hey DWERK seems to fail in some conditions. So do one thing.
Get materials from MARC.
Next get data from MVKE using for all entries on MATNR from MARC table.
you will get the combinations.
in this case you will miss entries for which no plant data is there but sales data is available. That is Materials with sales view and no plant view.
if you want that also.. then check for other alternatives.
Message was edited by:
Jyothi
2007 Dec 04 3:56 PM
select matnr werks from marc
into table itab
where matnr in s_matnr and
werks in s_werks.
select matnr vkorg vtweg
from mvke
into table itab2
for all entries in itab
where matnr = itab-matnr.
please reward if useful.
Thanks,
Naveena.
2007 Dec 04 8:30 PM
Check this code:
TABLES: mara.
TYPES: BEGIN OF ty_mvke_marc,
matnr TYPE mvke-matnr,
vkorg TYPE mvke-vkorg,
vtweg TYPE mvke-vtweg,
werks TYPE marc-werks,
END OF ty_mvke_marc.
DATA: gt_mvke_marc TYPE TABLE OF ty_mvke_marc.
SELECT-OPTIONS: s_matnr FOR mara-matnr.
SELECT mvke~matnr vkorg vtweg werks
FROM mvke INNER JOIN marc
ON mvkematnr = marcmatnr
INTO TABLE gt_mvke_marc
WHERE mvke~matnr IN s_matnr.
which gives the input of Sales area(Sales org. and Dist. Channel) and its plant data.
2007 Dec 05 3:43 AM
using join concept u can collect all the fields from different tables.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |