SAP Inbox E-mail Display
Dear colleagues,
We have integrated SAP workflow with outlook. Once PO is created an e-mail is sent to approversu2019 outlook inbox. In order to do that we developed some html coding to view e-mailsu2019 properly, sent from SAP, in their outlook inbox. Usersu2019 sometimes want to approve workflow from their SAP inbox not from outlook mail. But at SAP inbox e-mailsu2019 have such symbols at the front and back of lines <XTR><TD width="100%" nowrap>.
Is it possible to hide these symbols at SAP inbox?
Thanks in advance.
Hi Sanju,
When work item is sent to usersu2019 SAP inbox, from there it is sent to usersu2019 outlook inbox, mail text appears with the following symbols;
<XTR><TD width="100%" nowrap> MEYA Sarf Emri No : 0000000859 </TD> </TR>
What I want is to remove those symbols, highlighted as bold, from SAP inbox.
Thanks
Similar Messages
-
Hello,
Could any body tell me how to attach a report output to a mail which need to be send to SAP Inbox.
The report is ALV report. Is there any Function Module to do so.
Regards,
Satyaemail to SAP Inbox
Send mail to User's SAP Inbox also
RECLIST-RECEIVER = IT_ZMMTACCUID-ACCTUSRID.
RECLIST-REC_TYPE = 'B'.
APPEND RECLIST.
CLEAR RECLIST.
SEND THE DOCUMENT BY CALLING THE SAPOFFICE API1 MODULE FOR SENDING
DOCUMENTS WITH ATTACHMENTS
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
IMPORTING
SENT_TO_ALL = SENT_TO_ALL
NEW_OBJECT_ID =
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = 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.
following options are available for field
RECLIST-REC_TYPE
Name
P Private distribution list
C Shared distribution list
O SAPoffice user
B SAP user
U Internet address
X X.400 address
R SAP user in another SAP System
A External address
F Fax number
D X.500 Address
L Telex number
H Organizational unit/position
J SAP object
G Organization object/ID
Regards
amole -
RE: Mail sent to SAP inbox-Urgent.
Hi,
I sent mail with attachment( internal table contents) to SAP inbox using the below codw.
DATA: l_text TYPE char255. " Text
*DATA: l_text(280) TYPE c. " Text
DATA: l_lines TYPE i,
l_size TYPE sood-objlen. " Size of Attachment
Mail related
DATA: i_content TYPE soli_tab, " Mail content
i_attach TYPE soli_tab. " Attachment
DATA: l_send_request TYPE REF TO cl_bcs, " E-Mail Send Request
l_document TYPE REF TO cl_document_bcs, " E-Mail Attachment
l_recipient TYPE REF TO if_recipient_bcs, " Distribution List
l_sender TYPE REF TO if_sender_bcs, " Address of Sender
l_uname TYPE salrtdrcpt, " Sender Name(SY-UNAME)
l_bcs_exception TYPE REF TO cx_document_bcs, " BCS Exception
l_addr_exception TYPE REF TO cx_address_bcs, " Address Exception
l_send_exception TYPE REF TO cx_send_req_bcs. " E-Mail sending Exception
DATA: l_recipient_soos TYPE soos1.
*data : p_uname TYPE ad_smtpadr .
FORM send_to_sap_mail .
Preparing body of the Mail
MOVE 'Pending Delivery Documents List' TO l_text.
APPEND l_text TO i_content.
Preparing contents of attachment with Change Log
PERFORM prepare_attachment.
Creates persistent send request
TRY.
l_send_request = cl_bcs=>create_persistent( ).
Creating Document
l_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = i_content[]
i_subject = 'Pending Delivery Documents' ).
DESCRIBE TABLE i_mara LINES l_lines.
DESCRIBE TABLE it_output LINES l_lines.
Size to multiplied by 2 for UNICODE enabled systems
l_size = l_lines * 2 * 255.
Adding Attachment
CALL METHOD l_document->add_attachment
EXPORTING
i_attachment_type = c_ext
i_attachment_size = l_size
i_attachment_subject = 'Pending Delivery Documents'
i_att_content_text = i_attach[].
Add document to send request
CALL METHOD l_send_request->set_document( l_document ).
Get Sender Object
l_uname = sy-uname.
l_sender = cl_sapuser_bcs=>create( l_uname ).
CALL METHOD l_send_request->set_sender
EXPORTING
i_sender = l_sender.
E-Mail
TRANSLATE p_uname TO UPPER CASE.
l_recipient_soos-recesc = 'B'.
l_recipient_soos-recnam = p_uname.
Preparing recepient from SAP Logon Name
CALL METHOD cl_send_request_bcs=>create_recipient_from_soos1
EXPORTING
i_soos1 = l_recipient_soos
RECEIVING
result = l_recipient.
Add Recipient
CALL METHOD l_send_request->add_recipient
EXPORTING
i_recipient = l_recipient
i_express = 'U'
i_copy = ' '
i_blind_copy = ' '
i_no_forward = ' '.
*Trigger E-Mail immediately
l_send_request->set_send_immediately( 'X' ).
CALL METHOD l_send_request->send( ).
COMMIT WORK.
CATCH cx_document_bcs INTO l_bcs_exception.
CATCH cx_send_req_bcs INTO l_send_exception.
CATCH cx_address_bcs INTO l_addr_exception.
ENDTRY.
Refresh it_output.
clear l_text.
clear I_content.
refresh I_attach.
ENDFORM. " Send_to_sap_mail
*& Form prepare_attachment
text
--> p1 text
<-- p2 text
FORM prepare_attachment .
FIELD-SYMBOLS: <lfs_table>, " Internal table structure
<lfs_con>. " Field Content
DATA: l_text TYPE char1024. " Text content for mail attachment
DATA: l_text(1280) TYPE c. " Text content for mail attachment
DATA: l_con(50) TYPE c. " Field Content in character format
Columns to be tab delimeted
LOOP AT it_output ASSIGNING <lfs_table>.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE <lfs_table>
TO <lfs_con>.
IF sy-subrc NE 0.
CONCATENATE c_cr l_text INTO l_text.
APPEND l_text TO i_attach.
EXIT.
ELSE.
CLEAR: l_con.
MOVE <lfs_con> TO l_con.
CONDENSE l_con.
IF sy-index = 1.
CLEAR: l_text.
MOVE l_con TO l_text.
ELSE.
CONCATENATE l_text l_con INTO l_text
SEPARATED BY c_tab.
ENDIF.
ENDIF.
ENDDO.
ENDLOOP.
ENDFORM. " prepare_attachment
Here my problem is in my internal table i have 30 columns and the row output length is more than 255 char,
and the SOLI structure fields defined as CHAR255, thats why when i am opening the sap mail attachment in Excel sheet, last three fields data is not displaying can any one please let me know the answer.loop at output_table.
concatenate g_string
filed1
filed2
CL_ABAP_CHAR_UTILITIES=>CR_LF
into g_string separted by
CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
endloop.
now pass the filled string to
CALL FUNCTION 'SCMS_STRING_TO_FTEXT'
EXPORTING
text = g_string
IMPORTING
LENGTH = LENGTH
TABLES
ftext_tab = obj_bin.
pass this objbin to SO_NEW_DOCUMENT_ATT_SEND_API1
now you will get the desired excel sheet.
NOte: dont put urgent in your subject.it is arule that people should not ans question which have urgent.
Edited by: S.r.v.r.Kumar on Jun 18, 2008 10:25 PM -
Hi,
Can one explain me How To send mail to SAP Inbox through externall mail id like abc( at )y a hoo.com to SAP inbox ETC,
IF POSSIBLE PLEASE EXPLAIN in detail. . .
THANKS & REGARDS
Priyanka M JainHi .
Try this it might help you
https://wiki.sdn.sap.com/wiki/display/Basis/SAP%20to%20send%20external%20mails
Re: Unable to send mails from SCOT -
Simple code to send ALV display as XLS attachment to SAP inbox
Hi All,
Simple code to send ALV display as XLS attachment to SAP inbox.
Also i need to send only 200 records per attachement. So in this case i need send multiple attachment per mail
Thanks,
LokeshThe following code is used to send the internal table which u pass fo the ALV display to be send as excel sheet attachment
Internal table is it_attach[]
ld_email = po_email.
ld_mtitle = 'Email From Z377_EMAIL_XLS'.
ld_format = 'XLS'.
ld_attdescription = 'filename'.
ld_attfilename = 'Allot'.
ld_sender_address = ' '.
ld_sender_address_type = ' '.
* Fill the document data.
w_doc_data-doc_size = 1.
* Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
* Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = it_attach[].
* Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE li_content LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
* Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
* Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
*IMPORTING
*sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = li_content
receivers = t_receivers
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. -
Small issue in sending mail to sap-inbox via classes
Hi All,
I am working in sending SAP mail to sap-inbox via classes..
Which i am able to work out..But got some minor struck off where when i am sending the mail from sap-report
it is sucesfully reaching the user ....
Issue is In the sap-inbox mail it is not only showing the
Created: Sender user name
it is also showing the Changed :Sender name only
How to restrict the changed should not display ...
Waiting for your response....
*Creates persistent send request
TRY.
L_SEND_REQUEST = CL_BCS=>CREATE_PERSISTENT( ).
* Creating Document
L_DOCUMENT_SAS = CL_DOCUMENT_BCS=>CREATE_DOCUMENT(
I_TYPE = 'HTM'
I_TEXT = I_CONTENT[]
I_SUBJECT = 'Automated HRIS (SAP) Report' ).
*PERFORM PREPARE_ATTACHMENT.
* Adding Attachment
CALL METHOD L_DOCUMENT_SAS->ADD_ATTACHMENT
EXPORTING
I_ATTACHMENT_TYPE = C_EXT
* I_ATTACHMENT_SIZE = L_SIZE
I_ATTACHMENT_SUBJECT = 'Hr Details r.xls'
I_ATT_CONTENT_HEX = L_XML_TABLE. "i_attach.
* I_ATT_CONTENT_TEXT = l_XML_TABLE.
Sas
Edited by: saslove sap on Oct 22, 2009 7:05 AM
Edited by: saslove sap on Oct 22, 2009 7:07 AMcontd...
* document to send request
CALL METHOD L_SEND_REQUEST->SET_DOCUMENT( L_DOCUMENT_SAS ).
DATA:LR_SENDER TYPE REF TO IF_SENDER_BCS,
LR_SEND TYPE REF TO CL_BCS.
* Preparing the sender object
* LR_SENDER = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS( sy-uname ).
DATA: L1_UNAME TYPE SY-UNAME.
L1_UNAME = SY-UNAME.
LR_SENDER = CL_SAPUSER_BCS=>CREATE( L1_UNAME ).
* Setting the sender
CALL METHOD L_SEND_REQUEST->SET_SENDER
EXPORTING
I_SENDER = LR_SENDER.
* E-Mail
LOOP AT P_EADDR.
TRANSLATE P_EADDR-LOW TO UPPER CASE.
L_RECIPIENT = CL_SAPUSER_BCS=>( P_EADDR-LOW ).
CALL METHOD L_SEND_REQUEST->ADD_RECIPIENT
EXPORTING
I_RECIPIENT = L_RECIPIENT
I_EXPRESS = 'X'
I_COPY = ' '
I_BLIND_COPY = ' '
I_NO_FORWARD = ' '.
IF SY-SUBRC EQ 0.
WRITE:/'** SUCCESS: Email Sent to', P_EADDR-LOW COLOR COL_NORMAL.
ELSE.
WRITE:/'** ERROR: Failed to send Email to',P_EADDR-LOW COLOR COL_NEGATIVE .
ENDIF.
ENDLOOP.
*Trigger E-Mail immediately
L_SEND_REQUEST->SET_SEND_IMMEDIATELY( ' ' ).
CALL METHOD L_SEND_REQUEST->SEND( ).
COMMIT WORK.
CATCH CX_DOCUMENT_BCS INTO L_BCS_EXCEPTION.
CATCH CX_SEND_REQ_BCS INTO L_SEND_EXCEPTION.
CATCH CX_ADDRESS_BCS INTO L_ADDR_EXCEPTION.
ENDTRY.
Edited by: saslove sap on Oct 22, 2009 9:02 AM -
Notification Mail in SAP Inbox is not going to External Mail.
Hi
Notification Mail (Simple Mail and not workitem) triggered from workflow are reaching the sap inbox. I need to send this to Outlook also.
In workflow I am using 'send mail' step to and uisng sap userid. With this the mail reaches SAP INbox.
But This doesnot flow to Outlook. Here i am only reffering to mail and not workitem.
I know we need to configure job (RSWUWFML2) to send workitems to outlook. but do we need to do the same for sending simple mail to outlook?
I noticed if we send mail using email id it is flowing to outlook but if the mail is sent using userid from workflow its not flowing.
Do i need to use some program to send notification from sap inbox to outlook.
I checked RSWUWFML2 but this has no option to send only mail and doesnot send the mail from sapinbox to outlook.
Any help clue appreciated.
Thanks.Hi,
As per my understanding... You would be using Mail step to send mail from your workflow, right?
If this is the case then in mail step-> recipient type would be "Organization Object"... so make it as "E-mail address" and and pass or bind mail id to it. Now you need to go to SOST and check that mail is displayed there or not...
and If your don't want to use Mail Step in your worklfow, then you can use Mail FM - SO_NEW_DOCUMENT_ATT_SEND_API1 to send the mail... Here you need to pass mail id and the text to it and you can see in SOST.
Hope it is helpful to you.
Thanks & Regards,
Mihir -
Mail to be sent from SAP inbox to user outlook
Dear All,
Any idea of sending the mails automatically present in SAP Inbox into user outlook inbox.
All at a time cannot schedule all the users.
Only once we can schedule.
Regards,
Anand.Hi,
refer http://wiki.sdn.sap.com/wiki/display/ABAP/SendSpoollistofbackgroundjobtoSAPinbox
Thanks,
Chandra -
Reply from the notifiaction mail (from outlook) to sap Inbox
HI
I have a requirement where in I am sending a notification mail to user saying Document verification is OPEN(pending) in your name.1s he finshes that task he will reply to the same mail saying ClLOSED.
Now can we get this mail reply to SAP Inbox of the reply receiver ?
And If yes How can we process that either by subject or body content to close that activity.
(We dont want to send workitem shortcut to the user,This will make us not to involve user into SAP S\W)Hi- you could refer below thread
http://forums.sdn.sap.com/thread.jspa?threadID=2132333
vinoth -
Issue in sending mail to SAP Inbox from Workflow
Hi All,
I need to send the mail to the creator of the document about the user decision. If i am executing the workflow through the event ( ouput type) , the workflow processing in SWIA is complete but the mail is not sent in the SAP Inbox. But If i try to manually execute the workflow, mail is sent to the SAP Inbox.
I've used WF_INITIAITOR in the Expression. I need to send the mail not to the approver but to the creator of the workflow.
Thanks,
NehaHi,
the event is also triggered from my Id but in that case I do not recieve any e-mail. None of the users recieve the e-mail in the SAP Inbox for the mail step after the decision.
In workflow Log the last step shows the details as
name of the manager and the workflow background for mail sent step as shown below
Sumit Vij Background work item created 10.01.2012 12:08:43
Sumit Vij Execution started automatically 10.01.2012 12:08:43
Workflow Hintergrund Work item processing complete 10.01.2012 12:08:44
Thanks -
Hi
I need to send the mail from the SAP Inbox (i.e. from Tcode SO01) to my personal mail account.
In Tcode SO01, I am creating a new message and under recipient I am providing my mail ID (for eg [email protected]), and I am selecting Recp. Type as Internet Mail.
I am checking the status in SOST, It is showing error messge 806 and 817.
So How to proceed future and is there any thing else to configure in my system.
If so, Please send me the relavant document which explains the step to step solution.
U can reach me at [email protected] or [email protected]
Thanks and Regards
Vijay Kumar VarmaHi Amit
As you told that some configuration should be wrong in SCOT. In my company, I need to take care of basis job also. So can u please help me out what should be configured in SCOT.
If any suitable document from yourside will be a great help for me.
Thanks and Regards
Vijay Kumar Varma -
Hi all,
I am using the following code to send the mail to SAP inbox,
DATA : it_reclist TYPE TABLE OF somlreci1,
wa_reclist TYPE somlreci1.
DATA : wa_docdata TYPE sodocchgi1.
DATA : it_message TYPE TABLE OF solisti1,
wa_message TYPE solisti1,
it_attach TYPE TABLE OF sopcklsti1.
LOOP AT it_super_uid INTO wa_super_uid.
wa_reclist-receiver = wa_super_uid-usid.
wa_reclist-rec_type = 'B'.
APPEND wa_reclist TO it_reclist.
ENDLOOP.
wa_docdata-obj_langu = sy-langu.
wa_docdata-obj_name = text-005.
wa_docdata-obj_descr = text-006.
wa_docdata-sensitivty = 'F'.
wa_message-line = text-007.
APPEND wa_message TO it_message.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_docdata
put_in_outbox = 'X'
COMMIT_WORK = ' '
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = it_attach
OBJECT_HEADER =
CONTENTS_BIN =
CONTENTS_TXT =
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
receivers = it_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.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF sy-subrc = 0.
MESSAGE text-008 TYPE 'S'.
ENDIF.
Still i am not able to send the mail , its giving me exception 5. Please let me know how could i modify the code.
Thanx,
Girish.HI,
The code below demonstrates how to send an SAP mail to a users inbox (SBWP)
: Report ZSAPTALK :
: Author SAPdev.co.uk :
: Description : :
: Send mail message to SAP mail inbox. :
: Please visit www.sapdev.co.uk for further info :
REPORT ZSAPMAIL NO STANDARD PAGE HEADING.
TABLES: DRAD,
QINF,
DRAW,
SOUC,
SOFD,
DRAP.
DATA: P_RETURN_CODE LIKE SY-SUBRC.
data: d_username LIKE DRAP-PRNAM.
mail declarations
DATA : BEGIN OF NEW_OBJECT_ID. " the newly created email object
INCLUDE STRUCTURE SOODK.
DATA : END OF NEW_OBJECT_ID.
DATA : BEGIN OF FOLDER_ID. " the folder id of the outbox
INCLUDE STRUCTURE SOODK.
DATA : END OF FOLDER_ID.
DATA : BEGIN OF REC_TAB OCCURS 5. " the table which will contain the
INCLUDE STRUCTURE SOOS1. " information on the destination
DATA : END OF REC_TAB.
DATA : BEGIN OF OBJECT_HD_CHANGE. " the table which contains the
INCLUDE STRUCTURE SOOD1. " info for the object we will be
DATA : END OF OBJECT_HD_CHANGE. " creating
DATA : OBJECT_TYPE LIKE SOOD-OBJTP. " the type of object
DATA : BEGIN OF OBJHEAD OCCURS 5. " the header of the object
INCLUDE STRUCTURE SOLI.
DATA : END OF OBJHEAD.
DATA : BEGIN OF OBJCONT OCCURS 0. " the contents of the object
INCLUDE STRUCTURE SOLI. " i.e. the text etc
DATA : END OF OBJCONT.
DATA : BEGIN OF OBJPARA OCCURS 5. " formatting options
INCLUDE STRUCTURE SELC.
DATA : END OF OBJPARA.
DATA : BEGIN OF OBJPARB OCCURS 5. " formatting options
INCLUDE STRUCTURE SOOP1.
DATA : END OF OBJPARB.
DATA : BEGIN OF T_MAIL_TEXT OCCURS 0, "Message table for messages to
STRING(255), "user via mailbox
END OF T_MAIL_TEXT.
Parameter: p_uname like sy-uname.
**START-OF-SELECTION
START-OF-SELECTION.
d_username = p_uname.
PERFORM POPULATE_EMAIL_TEXT.
PERFORM SETUP_TRX_AND_RTX_MAILBOXES USING P_RETURN_CODE.
PERFORM CREATE_AND_SEND_MAIL_OBJECT.
FORM POPULATE_EMAIL_TEXT *
Inserts text for email message *
FORM POPULATE_EMAIL_TEXT.
CLEAR T_MAIL_TEXT-STRING. "puts a blank line in
APPEND T_MAIL_TEXT.
APPEND T_MAIL_TEXT.
adds failed list on to end of success list.
T_MAIL_TEXT-STRING = 'Test email message line 1'.
APPEND T_MAIL_TEXT.
T_MAIL_TEXT-STRING = 'Test email message line 1'.
APPEND T_MAIL_TEXT.
CLEAR T_MAIL_TEXT-STRING. "puts a blank line in
APPEND T_MAIL_TEXT.
T_MAIL_TEXT-STRING = 'Header1 Header2 Header3'.
APPEND T_MAIL_TEXT.
T_MAIL_TEXT-STRING = '----
APPEND T_MAIL_TEXT.
ENDFORM.
*& Form SETUP_TRX_&_RTX_MAILBOXES
Ensure that the mailboxes of the sender (INTMGR) are set up OK
FORM SETUP_TRX_AND_RTX_MAILBOXES USING P_RETURN_CODE.
get the user no of the sender in order to add the mail to the
user name's outbox for future reference
SELECT SINGLE * FROM SOUC
WHERE SAPNAM = SY-UNAME. "SAP name of a SAPoffice user
IF SY-SUBRC NE 0.
"Error finding the SAPoffice user info for the user
MESSAGE E064(ZR53) WITH SY-UNAME.
P_RETURN_CODE = 1.
EXIT.
ENDIF.
*Get the outbox No for the sender from the user No where the folder
" type is an outbox
SELECT * FROM SOFD WHERE OWNTP = SOUC-USRTP "Owner type from ID
AND OWNYR = SOUC-USRYR "Owner year from the ID
AND OWNNO = SOUC-USRNO "Owner number from the I
AND FOLRG = 'O'."Output box
ENDSELECT.
IF SY-SUBRC NE 0.
" Error getting folder information for the user
MESSAGE E065(ZR53) WITH SY-UNAME.
P_RETURN_CODE = 1.
EXIT.
ENDIF.
ENDFORM. " SETUP_TRX_&_RTX_MAILBOXES
*& Form CREATE_AND_SEND_MAIL_OBJECT
FORM CREATE_AND_SEND_MAIL_OBJECT.
FOLDER_ID-OBJTP = SOFD-FOLTP. " the folder type ( usually FOL )
FOLDER_ID-OBJYR = SOFD-FOLYR. " the folder year ( usually 22 )
FOLDER_ID-OBJNO = SOFD-FOLNO. " the folder no.
OBJECT_TYPE = 'RAW'. " the type of object being added
build up the object information for creating the object
OBJECT_HD_CHANGE-OBJLA = SY-LANGU. " the language of the email
OBJECT_HD_CHANGE-OBJNAM = 'PS to DM Interface'. " the object name
mail subject 'Mass Linking of QA, pass/fail'
MOVE TEXT-002 TO OBJECT_HD_CHANGE-OBJDES.
OBJECT_HD_CHANGE-DLDAT = SY-DATUM. " the date of the email
OBJECT_HD_CHANGE-DLTIM = SY-UZEIT. " the time of the email
OBJECT_HD_CHANGE-OBJPRI = '1'. " the priority ( highest )
OBJECT_HD_CHANGE-OBJSNS = 'F'. " the object sensitivity
F is functional, C - company sensitive
object_hd_change-skips = ' '. " Skip first screen
object_hd_change-acnam = 'SM35'. " Batch imput transaction
object_hd_change-vmtyp = 'T'. " Transaction type
add the text lines into the contents of the email
CLEAR OBJCONT.
REFRESH OBJCONT.
free objcont. " added this to delete the mail contents records
LOOP AT T_MAIL_TEXT.
OBJCONT-LINE = T_MAIL_TEXT-STRING.
APPEND OBJCONT.
ENDLOOP.
CLEAR OBJCONT.
build up the table of receivers for the email
REC_TAB-RCDAT = SY-DATUM. " the date to send the email
REC_TAB-RCTIM = SY-UZEIT. " the time to send the email
the SAP username of the person who will receive the email
REC_TAB-RECNAM = D_USERNAME.
the user type of the person who will send the email ( USR )
REC_TAB-SNDTP = SOUC-USRTP.
the user year of the person who will send the email ( 22 )
REC_TAB-SNDYR = SOUC-USRYR.
the user number of the person who will send the email
REC_TAB-SNDNO = SOUC-USRNO.
the sap username of the person who will send the email
REC_TAB-SNDNAM = SY-UNAME.
get the user info for the receiver of the document
SELECT SINGLE * FROM SOUC WHERE SAPNAM = D_USERNAME.
IF SY-SUBRC NE 0.
WRITE : / TEXT-001, D_USERNAME. "usnam.
EXIT.
ENDIF.
the user number of the person who will receive the email ( USR )
REC_TAB-RECNO = SOUC-USRNO.
the user type of the person who will receive the email ( USR )
REC_TAB-RECTP = SOUC-USRTP.
the user year of the person who will receive the email ( USR )
REC_TAB-RECYR = SOUC-USRYR.
the priority of the email ( highest )
REC_TAB-SNDPRI = '1'.
check for delivery on the email
REC_TAB-DELIVER = 'X'.
send express so recipient knows there is a problem
REC_TAB-SNDEX = 'X'.
check for a return receipt
REC_TAB-READ = 'X'.
the sap username of the person receiving the email
REC_TAB-ADR_NAME = D_USERNAME. "usnam.
add this receiver to the internal table
APPEND REC_TAB.
CLEAR REC_TAB.
call the function to create the object in the outbox of the sender
CALL FUNCTION 'SO_OBJECT_INSERT'
EXPORTING
FOLDER_ID = FOLDER_ID
OBJECT_HD_CHANGE = OBJECT_HD_CHANGE
OBJECT_TYPE = OBJECT_TYPE
OWNER = SY-UNAME
IMPORTING
OBJECT_ID = NEW_OBJECT_ID
TABLES
OBJCONT = OBJCONT
OBJHEAD = OBJHEAD
OBJPARA = OBJPARA
OBJPARB = OBJPARB
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
DL_NAME_EXIST = 4
FOLDER_NOT_EXIST = 5
FOLDER_NO_AUTHORIZATION = 6
OBJECT_TYPE_NOT_EXIST = 7
OPERATION_NO_AUTHORIZATION = 8
OWNER_NOT_EXIST = 9
PARAMETER_ERROR = 10
SUBSTITUTE_NOT_ACTIVE = 11
SUBSTITUTE_NOT_DEFINED = 12
SYSTEM_FAILURE = 13
X_ERROR = 14
OTHERS = 15.
IF SY-SUBRC NE 0.
MESSAGE A063(ZR53) WITH SY-SUBRC.
EXIT.
ENDIF.
call the function to send the already created email to the receivers
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
FOLDER_ID = FOLDER_ID
OBJECT_ID = NEW_OBJECT_ID
OUTBOX_FLAG = 'X'
OWNER = SY-UNAME
TABLES
RECEIVERS = REC_TAB
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
FOLDER_NOT_EXIST = 4
FOLDER_NO_AUTHORIZATION = 5
FORWARDER_NOT_EXIST = 6
NOTE_NOT_EXIST = 7
OBJECT_NOT_EXIST = 8
OBJECT_NOT_SENT = 9
OBJECT_NO_AUTHORIZATION = 10
OBJECT_TYPE_NOT_EXIST = 11
OPERATION_NO_AUTHORIZATION = 12
OWNER_NOT_EXIST = 13
PARAMETER_ERROR = 14
SUBSTITUTE_NOT_ACTIVE = 15
SUBSTITUTE_NOT_DEFINED = 16
SYSTEM_FAILURE = 17
TOO_MUCH_RECEIVERS = 18
USER_NOT_EXIST = 19
X_ERROR = 20
OTHERS = 21.
IF SY-SUBRC EQ 0.
MESSAGE I035(ZR53) WITH NEW_OBJECT_ID D_USERNAME. "usnam.
ELSE.
MESSAGE I036(ZR53) WITH D_USERNAME." sy-subrc.
ENDIF.
ENDFORM. " CREATE_AND_SEND_MAIL_OBJECT
Hope this helps.
Reward if helpful.
Regards,
Sipra -
Problem in Triggering the Mail to SAP Inbox
Dear Experts,
I have a problem for triggering the Mail option to SAP Inbox.
We created a Job assigning the program RSEIDOCA,RSWUWFML2 by creating a variant for those programs. We are scheduling the job, It is showing as
24.11.2010 12:43:46 Job started 00 516 S
24.11.2010 12:43:46 Step 001 started (program RSEIDOCA, variant ZRSEIDOCA, user ID__ ) 00 550 S
24.11.2010 12:43:48 Error situation found by evaluation E0 596 S
24.11.2010 12:43:48 Step 002 started (program RSWUWFML2, variant ZRSWUWFML2, user ID__) 00 550 S
24.11.2010 12:43:49 Job finished 00 517 S
But while checking in SOST, we are unable to see those mails. eventhough the user is unable to get those mail in SAP INBOX.
I think, is there any authorization problem while triggering the mail for that particular user id.. Please tell me the solution, this is very high requirement for me.
Thanks in Advance.
Regards,
SriniHi Chandra,
Thanks for your reply. Actually i am not workflow consultant, thats why i asking this question. Where to assign the Receipient Type and Recipient Notification.
you give Recipient Type as position and Recipient of Notification must be position of the reciepient,
Regards,
Srini -
Sending mail to SAP Inbox thru actions
Hi Friends,
I am having a requirement as below:
Need to send one mail to SAP Inbox to the BP in one specific partner functions in an activity based upon the below conditions:
1) Status of the transaction is open
2) The Todays' Date -Created date =45
I believe this can be done using actions. Please let me know if this is possible. If yes let me know the simplest way and if know let me know the alternative way.
Thanks,
Jaihi
yes you can do this using actions
just create your action profiel and there you give processing type as smartforms
and then select your parameters\
there are some standard actions available in the system for that you can refer to them
then you inside the conditions give your conditions
attach your action profile to your transaction and then you have what u wanted
alternate way to achieve this is using FMs or workflows
best regards
ashish -
How to read a mail from sap inbox thru abap code?
how to read a mail from sap INBOX thru abap code? can anyone tell me the technical approach? I NEED TO READ A MAIL and then need to pass the parameters to a bapi.
Message was edited by:
shahid mohammed syedHi SSM,
Did you manage to have your program working? I also have same requirement. I tried standard FM and BAPI but I always encounter authorization error when I tried accessing other user's mail. Thanks.
Regards,
Ryan
Maybe you are looking for
-
Hi, I want to update a jar file but everything I do ends in "Missing version field in response from server when accessing resource". Do I need a version.xml? If I need this how should it looks like? Could someone write an example for that mission? Re
-
Kernel Panic, help please
Well, I guess I have been rudely introduced to what the Mac community calls a "kernel panic". In Windows I would have called it a system crash. Every morning for the last 7 to 9 days, at trying to wake up my computer in the morning from sleep mode ov
-
Open folder from flash .exe
hi i have new task this contain two part first is in flash when finshed it user can click btn that open folder that in same domain of flash i know that flash must save as .exe to act with window but i don't know what is code that open external window
-
Cannot install sl due to time machine
i am getting an error message that says i cannot install sl due to time machine being used as the backup, despite my turning off time machine...ideas?
-
Belgian azerty keyb - superscript 2 - HOWTO?
Hi everyone, Just recently joined the Mac world. I'm a mixed user of linux, mac and windows (compatibility issues)systems. Not afraid to make use of terminal / command line. I've done quite some searching on how to get e.g. superscript 2. The only wa