2007 May 15 8:31 PM
Hi,
I have a requirement where i need to display several fields from marc.
However, the material number (MARA-MATNR) and the description (MAKT-MAKTX) also have to be shown.
How do i sync all 3 tables and populate the correct data? I know that they are all connected by MATNR.
I don't want to filter any data. All data from MARC should should show up, but with those fields filled
in as well, in reference to there specific record.
Hi,
I have a requirement where i need to display several fields from marc.
However, the material number (MARA-MATNR) and the description (MAKT-MAKTX) also have to be shown.
How do i sync all 3 tables and populate the correct data? I know that they are all connected by MATNR.
I don't want to filter any data. All data from MARC should should show up, but with those fields filled
in as well, in reference to there specific record.
2007 May 15 8:35 PM
Either you can use join on the three tables.
OR
Select all MATNR from MARA.
SELECT all MAKTX from MAKT for all entries in MARA.
SELECT fields from MARC for all entries in MARC..
Regards,
Amit
2007 May 15 8:56 PM
you could get matnr from marc itself. if no other field is required from mara, you could acheive this using marc and maktx.
select * from marc into corresponding fields of table t_marc.
if not t_marc[] is initial.
select matnr from mara into table t_mara for all entries in t_marc where
matnr = t_marc-matnr.
select matnr maktx from makt into table t_makt for all entries in t_mara where
matnr = t_mara-matnr.
endif.
loop at t_marc.
read table t_matnr with key matnr = t_marc-matnr.
if sy-subrc = 0.
move t_mara-field to t_marc-field.
endloop.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |