Hello Rajan,
you want to attach email details under newly created service order right for this case there is one class CL_CRM_ERMS_UTILS in that there is a static method LINK_IR_EMAIL so use this method.
here email id should be your inbound email_id and lr_guid is your service order guid.
ex : call method cl_crm_erms_utils=>link_ir_email
exporting
email_id = lv_email " email guid
lr_guid = lv_guid " service order guid
ls_so = abap_true.
Thanks & Regards,
Srinivas.