‎2008 Oct 27 12:38 AM
Hi Gurus,
I got an strange requirement it is to fetch data from 2 internal table from the same field name but the values should not be same.can any one tell me some logic for this? eg: fetch matnr from mara and mard into an internal table but the final result in the internal table should be values which are not common in both the tables.
Ragards,
Ravi
‎2008 Oct 27 1:29 AM
how can mara and mard will differe in entries. if there is a entry in MARD there should be an entry in MARA since it is master table. so in this case you can do some thing like this.
first get the data from both the tables..
loop at it_mara.
read table it_mard.
if sy-subrc ne 0.
"find the material which is not there in MARD and only in MARA
"append the matnr to another table
endif.
endloop.may be you have taken a wrong example to describe.
‎2008 Oct 27 1:29 AM
how can mara and mard will differe in entries. if there is a entry in MARD there should be an entry in MARA since it is master table. so in this case you can do some thing like this.
first get the data from both the tables..
loop at it_mara.
read table it_mard.
if sy-subrc ne 0.
"find the material which is not there in MARD and only in MARA
"append the matnr to another table
endif.
endloop.may be you have taken a wrong example to describe.