‎2009 Jun 19 1:19 PM
Hi,
i am trying to send an output using VF01.
it is failing with subrc = 2.
DOCUMENT_NOT_SENT.
please suggest me for further process.
thanks
vinod
‎2009 Jun 19 1:21 PM
Hi,
Please check if you are sending the following:
CLEAR: gs_packing_list,
gs_reclist.
REFRESH: gt_packing_list[],
gt_reclist[].
* Fill the document data.
DESCRIBE TABLE gt_message LINES gv_cnt.
READ TABLE gt_message INTO gs_message
INDEX gv_cnt.
gs_doc_chng-doc_size = ( gv_cnt - 1 ) * 255 + STRLEN( gs_message ).
gs_doc_chng-obj_langu = sy-langu.
gs_doc_chng-obj_name = 'CONJOB'.
gs_doc_chng-obj_descr = text-017.
gs_doc_chng-sensitivty = 'F'.
* Fill the receiver list
gs_reclist-rec_date = sy-datum.
gs_reclist-rec_type = 'U' . " For Internet Address
gs_reclist-com_type = 'INT'.
gs_reclist-notif_ndel = c_x.
gs_reclist-receiver = p_email. "Email addr of Recip
APPEND gs_reclist TO gt_reclist.
CLEAR gs_reclist.
gs_packing_list-transf_bin = space.
gs_packing_list-head_start = 1.
gs_packing_list-head_num = 0.
gs_packing_list-body_start = 1.
DESCRIBE TABLE gt_message LINES gs_packing_list-body_num.
gs_packing_list-doc_type = 'RAW'.
APPEND gs_packing_list TO gt_packing_list.
gs_packing_list-transf_bin = c_x.
gs_packing_list-head_start = 1.
gs_packing_list-head_num = 0.
gs_packing_list-body_start = 1.
DESCRIBE TABLE pt_attachment LINES gs_packing_list-body_num.
gs_packing_list-doc_type = 'RAW'.
gs_packing_list-obj_descr = gv_atch_name.
gs_packing_list-obj_name = gv_atch_name.
gs_packing_list-doc_size = gs_packing_list-body_num * 255.
APPEND gs_packing_list TO gt_packing_list.
* Send the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = gs_doc_chng
put_in_outbox = c_x
TABLES
packing_list = gt_packing_list
contents_txt = gt_message
contents_bin = pt_attachment
receivers = gt_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
‎2009 Jun 19 1:28 PM
Hi sneha,
thanks for your quick responce.
i am passing all as you posted and you forgot to use COMMIT_WORK.
i am using the same.
my problem is this is an upgrade from ERP5.0 to ECC6.
in ERP5.0 it is working fine but in ECC6.0 the error was coming.
thanks
vinod
‎2009 Jun 19 1:39 PM
‎2009 Jun 19 1:41 PM
Hi Rajashekar,
i have checked and receivers are present.
thanks
vinod
‎2009 Jun 19 1:52 PM
Hi,
What is the return code you receive after execution function module? In case it is 0 then check if mail is available in SCOT or SOST transaction.
KR Jaideep,
‎2009 Jun 19 1:58 PM
‎2009 Jun 19 2:05 PM
Hi,
Check if the number range is created in ECC6.0 for object SO_OBJ_.
KR Jaideep,
‎2009 Jun 19 2:13 PM
Jaideep,
can you tell me what is this number range, where will this get created, how to check this.
please suggest.
thanks
Vinod
‎2009 Jun 19 3:14 PM
Hi,
You can maintain number range using following path:
Tools-> ABAP/4 Workbench -> Development -> Other Tools -> Number ranges
Enter object name one by one of the following:
SO_OBJ_&FX
SO_OBJ_&ML
SO_OBJ_&UX
SO_OBJ_ADR
SO_OBJ_ALI
SO_OBJ_BIN
SO_OBJ_DLI
SO_OBJ_EXT
SO_OBJ_FAX
SO_OBJ_FOL
SO_OBJ_GRA
SO_OBJ_MSG
SO_OBJ_OBJ
SO_OBJ_OTF
SO_OBJ_RAW
SO_OBJ_RCP
SO_OBJ_SCR
SO_OBJ_USR
SO_OBJ_WFL
SO_OBJ_XXL
KR Jaideep,
‎2009 Jun 19 3:19 PM
Hi Vinod,
Check the below type of Receivers are valid.
check what type of receiver you are sending...
Type of RECEIVER entry.
The following values are permitted:
ADR_TYPE...
'B' : SAP user name
' ' : SAPoffice name
'C' : Shared distribution list
'F' : Fax number
'U' : Internet address
'R ' : Remote SAP name
'X' : X.400 address
and also chcek.........
Communication method used to send the document. This field is only relevant if the recipient is an address number, that is, if the document is sent externally via address management. If the field is empty, the standard communication type specified in address management is used.
The following values are permitted:
COM_TYPE......
'INT' : Send via Internet
'FAX' : Send as a fax
'X40' : Send via X.400
'RML' : Send in another SAP system
Prabhu
‎2009 Sep 15 12:50 PM
Hi vinod,
I am also facing the same problem with return code 2 ,Please provide the solution if u had already done.
Regards,
Bharat Kumar