09-20-2006 3:12 PM
Hi All,
Can any body tell me what's the difference between the above delarations:
v_matnr like mara-matnr,
v_matnr type mara-matnr.
since both will accept.
Thanks&Regards
Mahesh
09-20-2006 3:15 PM
09-20-2006 3:20 PM
Hi Ravikanth,
SAP help does not give the difference between those 2 types of the declaration.
Thanks&Regards
Mahesh
09-20-2006 3:20 PM
hi,
<b>v_matnr like mara-matnr</b> in this u r creating a dataobject with reference to dataelement.
<b>v_matnr type mara-matnr</b> in this u r creating a dataobject with reference to domain.
since domain and dataelement are both same for material number MATNR, u can use both in this case.
09-20-2006 3:34 PM
I would suggest you check here /people/marilyn.pratt/blog/2005/11/09/why-don146t-they-accept-my-code-samples
Hope this helps.
09-20-2006 3:36 PM
i dont think ther is any difference between the two,..
when u say mara-matnr, it is refering to the matnr FIELD in the mara table ( not a data element or a domain as i feel )... now this field is linked to both the data element as weel as the domain...hence i dont c any diff..
just that like is normally used to refer to data objects n type to data types..
here the field is acting as an object as well as the type...
pl let me know if my understanding is wrong...