how to get IDOC number from SalesOrder number ?

Question: I am a new Abaper.

now i have a SO number, and want to get related IDOC number
(type is ORDRSP , and the earliest one ).

from Which DDIC table can i find the relationship between so number and idoc number? or which FM/... can i use ?

and some Abap logic description with code example would be better for my understanding.

Thanks.

Answer:
from icon Services for object
Alain
_________________
Alain Benech
www.abh-conseil.com
Copyright ?2007 - 2008 www.jt77.com