2007 Jul 18 4:33 PM
Hi,
Where can we find the substitution material for the selected material?
kishi.
2007 Jul 18 4:50 PM
You can get is like this.
data: v_matnr type mara-matnr,
v_matwa type kotd001-matwa.
select single matwa into v_matwa
from kotd001
inner join kondd
on kotd001~knumh = kondd~knumh
inner join makt
on kondd~smatn = makt~matnr
where kotd001~kappl = 'V'
and kotd001~kschl = 'A001'
and kotd001~datbi = '99991231'
and kondd~smatn = v_matnr "<- Fill with you material
and makt~spras = sy-langu.
write:/ v_matwa.
Regards,
Rich Heilman
You can get is like this.
data: v_matnr type mara-matnr,
v_matwa type kotd001-matwa.
select single matwa into v_matwa
from kotd001
inner join kondd
on kotd001~knumh = kondd~knumh
inner join makt
on kondd~smatn = makt~matnr
where kotd001~kappl = 'V'
and kotd001~kschl = 'A001'
and kotd001~datbi = '99991231'
and kondd~smatn = v_matnr "<- Fill with you material
and makt~spras = sy-langu.
write:/ v_matwa.
Regards,
Rich Heilman
2007 Jul 18 4:40 PM
When a material is substituted/determined using material determination method, the original material is stored by the system in the Material entered field MATWA in VBAP table.
You can query on VBAP and check if material entered MATWA is not equal to material number MATNR. Also check if the reason code for material susbstitution field SUGRD is non blank.
The quantity of course you can get from VBAP table.
See if this helps you,
Regards
Vasanth
2007 Jul 18 4:50 PM
You can get is like this.
data: v_matnr type mara-matnr,
v_matwa type kotd001-matwa.
select single matwa into v_matwa
from kotd001
inner join kondd
on kotd001~knumh = kondd~knumh
inner join makt
on kondd~smatn = makt~matnr
where kotd001~kappl = 'V'
and kotd001~kschl = 'A001'
and kotd001~datbi = '99991231'
and kondd~smatn = v_matnr "<- Fill with you material
and makt~spras = sy-langu.
write:/ v_matwa.
Regards,
Rich Heilman
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |