How to fetch attachments in workflows to Outlook
Dear colleagues,
We have purchase requisition (PR) workflow in use and integration between SAP and Outlook; workflows are approved via Outlook or Blackberry.
Now there is such a requirement that when a document is linked to PR by using service object in PR I need to fetch this document as an attachment of Outlook mail. Before adding document(s) to PR(s), initially we create document info record (DIR) using SAP EDMS and link DIR with PR.
I know that data about documents are stored in tables DR* and original path of a document is stored in table DRAW- FILEP.
Any suggestion would be appreciated
Kind regards
Melih
HI Melih,
Check table DRAW-FILEP is there any like between PR and attachement .
if you get the link between PR and attachemt by using below function module you can send the mail with PR detarls and as well attachement aslo .
you have to develop one custom function module in this function module you have to write all this logic
step-1
create one custom function module input paremeteri is PR
step-2
create a custom method then call this custom Function module in that method
step-3
create one back ground activiy task with this method .
here is the sample code for custom fm
FUNCTION ZSEND_MAIL.
""Local Interface:
*" IMPORTING
*" REFERENCE(SUBJECT) TYPE CHAR50
*" TABLES
*" TO_LIST STRUCTURE ZMAIL_ADDRESS
*" CC_LIST STRUCTURE ZMAIL_ADDRESS OPTIONAL
*" BODY STRUCTURE SOLI
*" EXCEPTIONS
*" NO_DATA
DATA: wa_docdata TYPE sodocchgi1. " Document data
DATA: t_objpack TYPE STANDARD TABLE OF sopcklsti1. " Packing list
DATA: wa_objpack TYPE sopcklsti1. " Packing list
DATA: w_tab_lines TYPE i.
DATA: t_objtxt TYPE STANDARD TABLE OF solisti1. " Message body
DATA: t_objhead TYPE STANDARD TABLE OF solisti1. " Header
DATA: i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE. " Receipient list
DATA : it_mailtext LIKE soli OCCURS 0 WITH HEADER LINE.
CLEAR wa_docdata.
wa_docdata-obj_name = 'MAIL'.
wa_docdata-obj_descr = subject.
wa_docdata-obj_langu = sy-langu.
MOVE sy-datum TO i_receivers-rcdat .
MOVE sy-uzeit TO i_receivers-rctim.
MOVE '1' TO i_receivers-sndpri.
MOVE 'X' TO i_receivers-sndex.
MOVE 'U-' TO i_receivers-recnam.
MOVE 'U' TO i_receivers-recesc.
MOVE 'INT' TO i_receivers-sndart.
*Build Receivers list
CLEAR i_receivers.
i_receivers-rec_type = 'U'.
Send Mail To
LOOP AT to_list.
CLEAR i_receivers-receiver.
i_receivers-receiver = to_list-mail_id.
APPEND i_receivers.
ENDLOOP.
Build CC List
LOOP AT cc_list.
i_receivers-receiver = cc_list-mail_id.
i_receivers-copy = 'X'.
APPEND i_receivers.
ENDLOOP.
LOOP AT body.
IF body-line IS INITIAL.
CONTINUE.
ENDIF.
it_mailtext-line = body-line.
APPEND it_mailtext.
CLEAR body.
ENDLOOP.
t_objtxt[] = it_mailtext[].
t_objhead[] = it_mailtext[].
Document data
DESCRIBE TABLE t_objtxt LINES w_tab_lines.
Packing data
CLEAR wa_objpack-transf_bin.
wa_objpack-head_start = 1.
wa_objpack-head_num = 0.
wa_objpack-body_start = 1.
wa_objpack-body_num = w_tab_lines.
wa_objpack-doc_type = 'HTML' . "'RAW'. " .
APPEND wa_objpack TO t_objpack.
CLEAR wa_objpack.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_docdata
commit_work = 'X'
TABLES
packing_list = t_objpack
object_header = t_objhead
contents_txt = t_objtxt
receivers = i_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.
ENDFUNCTION.
Regards
RameshG
Edited by: RameshG on Nov 5, 2010 1:18 AM
Similar Messages
-
How to fetch Errors in Workflow E-Mail
Hi All :-)
Just a short Question.
We´re using OWB 10.1.0.4.0 and Workflow 2.6.x.
Now i try to use the E-Meil Activity in a Workflow.
Everything works fine, Mails delivered correct.
So far so good...
Now i want to fetch the evantually appearing Errors in the E-Mail Message-Body.
I´ve still reag something in a Blog about using a Self made Procedure....
Does anybody know what´s simply the best Way to fetch the Errors?
Stii, in the Oracle Technologie Network Documetations i couldn´t found something
concretely.
Thanks in Advance
LoneHi All :-)
Just a short Question.
We´re using OWB 10.1.0.4.0 and Workflow 2.6.x.
Now i try to use the E-Meil Activity in a Workflow.
Everything works fine, Mails delivered correct.
So far so good...
Now i want to fetch the evantually appearing Errors in the E-Mail Message-Body.
I´ve still reag something in a Blog about using a Self made Procedure....
Does anybody know what´s simply the best Way to fetch the Errors?
Stii, in the Oracle Technologie Network Documetations i couldn´t found something
concretely.
Thanks in Advance
Lone -
How to send attachments in workflow
hi friends,
i want to create a workflow which sends the purchase order as email
to the vendor, i dont know how to attach the purchase order while making workflow, is there any way to import the purchase order into the workflow
and then attach it to the vendor mail, plz send me a solution.
thanks in advance,
plz help me.Hello,
Why don't you use the standard processing for PO output, there is a standard way to send po by mail as attachment.
Anyway if you need to link it with a workflow, you cannot use the "send mail" task from workflow builder. This kind of operation just can send notification withount attachment.
To send the po as attachment, you need to create your own task and method in a BOR object. I suggest you to start from the standard prosessing (CL_PD_PO_PROCESSING_BBP, method PROCESS_BBP_PO_MAI).
rgds,
Pierre -
How Can I set up email using outlook settings?
Hi All:
Can I set up my Touch to fetch my email from my outlook account? can't figure out how to do it!!
Thanks!!Hi anilajavaid,
iCloud only works with IMAP accounts. POP accounts won't work with iCloud.
Sorry,
GB -
How to get ProcessInstanceId after Workflow KickOff. Am able to get the InvocationId
How to get ProcessInstanceId after Workflow KickOff. Am able to get the InvocationId.
This is the Snippet :
InvocationResponse response = myServiceClient.invoke(request);
invocationId = response.getInvocationId();
System.out.println("ClientParams="+response.getClientParameters());
System.out.println("OutputParams="+response.getOutputParameters());
System.out.println("invocationId="+invocationId);
JobManager jobManager = new JobManager(myFactory);
JobStatus jobStatus = null;
JobId myJobId = new JobId(invocationId);
jobStatus = jobManager.getStatus(myJobId);
System.out.println("Job Status: " + jobStatus.getStatusCode());
if (jobStatus.getStatusCode()==JobStatus.JOB_STATUS_COMPLETED)
System.out.println("INVOCATION COMPLETED SUCCESSFULLY!");
InvocationResponse jobResponse = jobManager.getResponse(myJobId);
jobManager.terminateJob(myJobId);
jobResponse.getInvocationId();
Process id need to be fetched after Workflow Kickoff
Can anyone please help me..?There are 5 process level variables that get populated when you invoke a process. They are
/process_data/create_time
/process_data/creator_id
/process_data/id
/process_data/status
/process_data/update_time
Within the xPath builder you can differentiate them from other process variable because they are italicized.
Now you can create your own process variable - let's say called pid - and have it contain the process id which is stored in /process_data/id.
The xPath would look something like
/process_data/@pid = /process_data/@id
If the pid variable is marked as an 'output' variable, then it will be returned as part of the InvocationResponse.
Jasmin -
How to display attachments as a field and not in message body
I'd like to attach files in Apple Mail through the use of an attachments field (a la Outlook/Entourage) rather than it being shown as an icon in the message body, but I can't seem to find out how to do it.
I'm pretty sure it can be done as it's displayed in Lokisoft's 'Without Attachment Tamer screenshot' (top left image) http://lokiware.info/Attachment-Tamer .
Any bright ideas? Nothing in the GUI seems to help and Apple Tech Support won't divulge a terminal command I can use to expose the attachments field.Right click the department name column and go to format field and select supress if duplicate...this will remove duplicates
to get it displayed in each page
create a formula say F1 and place the column inside the formula
and conditionally supress for each page
This may help
Thanks,
Ganesh -
Reg. Mail sending from Workflow to Outlook
Dear Experts
I am new to workflow. In our concern, we want to send mails from workflow to Outlook. How to configure
it. Pls help giving steps
Even many posts are there,i cann't understand easyly.
Thanks
Rajakumar.kHi Rajakumar,
You have to do some settings in SCOT and if required run the Program RSWUWFWL2 if you need to send your workitem to outlook.
Go through workflow for dummies by swapna modi.
/people/sapna.modi/blog/2007/02/19/workflows-for-dummies--introductionpart-i
Regards,
Dheepak -
Mail from Workflow to Outlook: Incorrect Subject
Hello,
I have the problem, that if I send Mails from a sap workflow to outlook for certain notifications
the subject of the mail is not correct. The subject contains the description of the workflow task
and not the workitem text. For all other notifications the subject is correct. The notifications,
for which subject is not correct, were created by a function module. The mail body is in all cases correct.
Any ideas??
Regards,
MarioHi Mario,
Check the FM you are using. If it is SO_NEW_DOCUMENT_SEND_API1, check if you are passing the subject line correctly or not by debugging the FM.
Also state what exactly is the difference between the subject passed and what is recieved in the mail i.e. how is it incorrect.
Regards,
Saumya -
Emails are receiving as splitted attachments from mac to outlook
emails are receiving as splitted attachments from mac to outlook.
If i send to any of other outlook users, whole email body will split and receiving as attachment, like ATT00001.htm. but all other recipients thinks that it is empty email.
If i remove any attachment from the same email, it will receive properly. the problem is happened only we attaching any documents with the email, it will split the mail body into two three attacment and will attach with original document.Send a test e-mail to yourself and see if it appears normal. The problem may be Outlook, not Mail. Once you send the e-mail, you have no control over how the received e-mail is displayed in another e-mail program.
-
How to bring attachments to top of email
Hi,
On my iPhone 5 iOS 8.1.3; I always see the attachments at the bottom of email.
it is bit annoying to scroll down every time see the attachments.
most of the time there is a chain of mail and we need to scroll all those mail till end to see the attachment for current email.
Is there any way to bring the attachments always to be at top of email?
Or is there any shortcut to reach directly to the bottom of email.
Thank you so much ...No, there is no configuration setting for that. The only mail app that I am aware of that provides more flexibility in how attachments are presented is Outlook (a new app from Microsoft, and not to be confused with OWA). It does have limitations on what mail services it supports, but handles most of the usual suspects like Gmail and Yahoo, as well as Exchange and Outlook.com. It is possible that there are others that would serve your needs. would be worth a look in the app store.
-
How to fetch file from app. server without complete filename?
Hi,
In my report I have to read data from txt file on application server.
My file name on App. server conatain system id and date and time stam.
my file path :- /User/IDD/S10009112007101525
here,'User' is dirctory
'IDD' is folder in directory
'S100' is system id
'09112007' is date
'101525' is time in hour,miniute,second format.
From my program I can only pass directory , Folder name,System Id,Date only. I don't have time value in my program.
So please tell me how to fetch files without having time stamp value from app. server.
Plz send me exact code.It's urgent.
Message was edited by:
Manisha Kadam
Title was edited by:
Alvaro Tejada GalindoDo you want to return the file to the user on click of button or something?
Then, use web_show_document with http link which you are speaking about.
Else download the file to client using Webutil. -
How do I share a color-coded Outlook calendar with others in my office that they can see the colors too?
Hi,
How do you color code the calendar items? From conditional formatting or from categories?
Please make sure the user has been given reviewer or higher calendar permission to view items colors in Outlook. About how to share calendar in Outlook, please refer to:
http://office.microsoft.com/en-001/outlook-help/share-an-outlook-calendar-with-other-people-HA010354420.aspx
Regards,
Winnie Liang
TechNet Community Support -
How to sync iPhone/iPad contacts TO Outlook?
I am confused by the cavalier way the term "sync" is bandied about in the MS Outlook/Apple iTunes context.
I want to make my Outlook contacts look just like my iPhone contacts. I.e., after a sync, I don't want any contact info in one device that's not in the other.
In the past, "sync" has meant to me "make them both the same." But the mechanism whereby that occurs is not obvious in the context of iTunes and MS Office. For instance, when iTunes is syncing, what happens if a contact's name is in both the PC and iPhone, but the email addresses are different? Am I offered the opportunity to make a choice? What happens if Outlook contains an entry that's not on the phone? Will it end up on the iPhone? What happens if a contact is in the phone, but not in Outlook - will it get created in Outlook?
I consider my phone the primary device for accumulating contact information. As a consequence, my Outlook contacts are woefully out of date vis-a-vis my iPhone's. But I am sore afraid to engage the iTunes syncing, lest it somehow decide that what I want to do is replace the contacts on my iPhone with those from Outlook. I've seen too many comments elsewhere about contacts being lost wholesale, or duplicated wholesale.
Is there any definitive source for further detailed information on this subject?
IOS 7.1.2
Windows 7
MS Office 2013Here is the way about how to transfer contacts from iPhone to Outlook:
Step 1: Connect the iPhone to the computer using the supplied USB cable and launch the iTunes application. iTunes displays your iPhone on the left panel under "Devices".
Step 2: Click your iPhone on the iTunes panel and click the "Info" tab. Click "Sync contacts with" and select "Outlook."
Step 3: Select "All Contacts" if you want to sync all the contacts from your iPhone to Outlook. If you want to select specific contacts, click "Selected groups" and place a check on the contacts you want to sync to Outlook.
Step 4: Click "Apply" to sync your iPhone contacts to Outlook. Click the "Eject" button on the right panel and disconnect your phone from the computer. Close iTunes.
Step 5: Launch Outlook and click the "Contacts" tab. You should see the imported iPhone contacts. -
How to fetch year till date value for earning for current ,last and year
hi,
how to fetch year till date value for earning for current ,last and year before that from payroll result
plz reply soon,
pratyushDear Pratyush,
Pick this from CRT.
Use LDB PNPCE & Fire event GET PAYROLL &
then you can pick from CRT.
Hope this helps.
Kindly reward in case useful.
Regards & Thanks,
Darshan Mulmule -
How to fetch accounting document number from known material document number
Hi,
Using MIGO transaction, by giving mblnr(material document number) as input, I get accounting document number by clicking FI document.I have to add this accounting document number in my report for corresponding known mblnr(material document number) values.
My question is how to fetch the accounting document number present in MIGO to add in my report program.
I used the xblnr(Reference Document Number) which is present both in mkpf and bkpf tables to fetch values.
I extracted xblnr values with known mblnr values from mkpf (Header: Material Document table).
and then extracted belnr(accounting document number) from bkpf (Accounting Document Header table) by using xblnr values.
But the query is running for a long time.
Is there any other method to extract the values in a simpler way.
Kindly advise.
Thanks and Regards,
SanjeevI had the values of xblnr and some other fields such as mblnr, budat etc in wi_item table.
I created a new internal table i_xblnr and got down those values.
And then created a new internal table i_belnr and tried to get values of belnr in it.
The code I wrote is given below:
IF not wi_item[] is initial.
loop at wi_item.
at new xblnr.
ws_xblnr-xblnr = wi_item-xblnr.
append ws_xblnr to i_xblnr.
endat.
endloop.
select belnr xblnr from bkpf into table i_belnr for all entries in i_xblnr where xblnr = i_xblnr-xblnr.
ENDIF.
Kindly look after it.Thank you.
Regards,
Sanjeev
Maybe you are looking for
-
Windows 7 error code 0x80070017
Trying to install Windows 7 on my 2011 MacPro using Boot Camp Assistant. Using a download purchase of Windows 7 Pro burned onto a DVD. Installer runs but eventually stops on an incomplete Step 2 (Expanding files I think) with Error Code 0x80070017. P
-
Loading transaction data from flat file to SNP order series objects
Hi, I am an BW developer and i need to provide data to my SNP team. Can you please let me know more about <b>loading transaction data (sales order, purchase order, etc.,) from external systems into order based SNP objects/structure</b>. there is a 3r
-
I'm a longtime mac user, former UNIX sys-admin so I know this isn't user error. The iTunes album cover screen saver is broken on my machine - now after updating to 10.4.11 the album covers have a pinkish sheen that look like somebody spray painted my
-
Can't open some .AVI - How to convert .AVI to .MOV?
Hello I've got a bunch of AVI clips that I need to convert to .MOV for film scoring purposes in Digital Performer 5. QTPro won't open these AVIs, how can I still convert them to MOV? Is there any way? Thanks Chris
-
Get count per each group using t-sql
Hi All, I have a table with 5 columns and my source data looks like this... ID Doctor NurseType VisitID Date 1 Sam Main-Nurse 10 09/23/2013 1 Tom Sub-Nurse 10 09/23/2013 1