How you will send mail from one SAP system to other SAP
system?
Answer / pramod
Please go through the sample code to Send mail
*********
*Data of an object which can be changed
DATA : doc_chng LIKE sodocchgi1.
*SAPoffice: Single List with Column Length 255
DATA : objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
*SAPoffice: Description of Imported Object Components
DATA : objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
*SAPoffice: Structure of the API Recipient List
DATA : reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE.
FORM errors_send_mail .
* Creation of the document to be sent
doc_chng-obj_name = 'Log report For Historical Balance
Conversation'
.
CONCATENATE 'Log for ' sy-repid INTO doc_chng-obj_descr
SEPARATED BY space.
LOOP AT it_error. "HERE TYPE = 'A' OR TYPE = 'E'.
objtxt = it_error-message.
APPEND objtxt.
CLEAR: objtxt.
ENDLOOP.
LOOP AT it_message.
AT FIRST .
WRITE : / 'List of documents created :'.
SKIP 1.
ENDAT.
WRITE : / it_message-message.
objtxt = it_message-message.
APPEND objtxt.
CLEAR: objtxt.
ENDLOOP.
* Creation of the entry for the compressed document
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 1.
objpack-body_num = 9.
objpack-doc_type = 'RAW'.
objpack-obj_name = 'DATA'.
objpack-doc_size = 10 * 255.
objpack-obj_langu = 'EN'.
APPEND objpack.
CLEAR objpack.
CLEAR objpack-transf_bin.
objpack-head_start = 0.
objpack-head_num = 0.
objpack-body_start = 10.
objpack-body_num = tab_lines.
objpack-doc_type = 'DAT'.
objpack-obj_name = 'DATA'.
objpack-doc_size = tab_lines * 255.
objpack-obj_langu = 'EN'.
APPEND objpack.
CLEAR objpack.
* Completing the recipient list
* RECLIST-RECEIVER = 'Michael.mccullough@ge.com'.
reclist-receiver = 'Tiffany.Boyle@ge.com'.
reclist-rec_type = 'U'.
APPEND reclist.
CLEAR reclist.
reclist-receiver = 'Kalpana.tyagi2@ge.com'.
reclist-rec_type = 'U'.
APPEND reclist.
CLEAR reclist.
* Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = objpack
contents_txt = objtxt
contents_bin = objbin
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
IF sy-subrc = 0.
SUBMIT rsconn01 WITH mode = 'INT' AND RETURN.
ENDIF.
Is This Answer Correct ? | 4 Yes | 3 No |
What is cardinality?
can u create internal table dynamically ? how?
4 Answers Bristle Cone, Cap Gemini, HP, IBM, MetaMorph, Satyam, Wipro,
what are the two methods of modifying sap standard tables? : abap data dictionary
If suppose There are 10 records in flat file then how many times BDC_open_group, BDC_INSERT, BDC_CLOSE_group executed?
What is view? Different types of view.
Pls someone answer me this, Can we acheive everything using OOPs? If not? What cant be acheived? Have you encountered any scenario liike, you cannot acheive it using Function modules & can be acheived using Oops? What is the advantage of BADI over UserExit? Difference between BAPI and RFC? Thanks in advance.
31)Explain the User master setting for date and Time formats?
What is report category and for what purpose do we use report category
1.search help is there for table or structure or both? 2.in structure there is no technical attribute, then how will u call data elements/fields into the structure? 3. i want to add/write some code in sap standard program in function module related in badi,then how will u write your code in sap standard Fm in badi? 4.what is kapler badi? 5.what is the use of log text in table technical attributes while creating table? 6.what are the fields i have to take to releae/creat a PO from Pur req? 7. if i have already release po as per the Pur req and vendor supplied the material,then again i want same 100 material,then wt will u do? are u release po again? what are steps u follow for this situation?
Hi To all ABAP Gurus Is there any other way to create data elements apart from se11 tocde as we dont use the se11 in real time generally this question is asked in enteg infotech
In Background Report,how to handle errors?
6 Answers Cap Gemini, Raj Construction,
Why cant we use Normal function module for data transfer?