02-20-2006 12:16 PM
Hi,
I like to send a SAPMail with FU SO_NEW_DOCUMENT_SEND_API1.
This works fine for me. But now I need also a link to a Transaction in this Mail.
I found the PROC_TYPE param, but I does not work!
It should be something like this
PROC_TYPE = 'T'
PROC_NAME = 'CO01'
Can someone please help.
Is it also possible to pass some inital values to this transaction?
Peter
02-21-2006 10:04 AM
Hi Peter,
I did not use the PROC_TYPE parameter so far but reading the FU documentation there are some more (table-) parameters which you can fill in to pass values to your transaction:
OBJECT_PARA can hold SET/GET parameters
OBJECT_PARB can hold some data to pass them to the global memory.
Perhaps somebody else can comment on the failing execution of your passed transaction code. I assume, however, that you or the receiver of your mail has got the needed authorization to execute this transaction? Furthermore I assume that you specified a SAP user as receiver.
HTH,
Michael
02-24-2006 12:30 PM
Hi Peter,
actually I had to do the same now and tried to use your mentioned FM.
After some reading of the documentation I finally managed to get this running.
Just a code snippet from my test ABAP:
MOVE sy-uname TO reclist-receiver.
MOVE 'B' TO reclist-rec_type.
APPEND reclist.
DATA:
objpara TYPE STANDARD TABLE OF soparai1 WITH HEADER LINE
.
doc_chng-proc_type = 'T'.
doc_chng-proc_name = 'IW53'.
doc_chng-skip_scren = 'X'.
objpara-name = 'IQM'.
objpara-low = '20000063'.
APPEND objpara.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
put_in_outbox = 'X'
TABLES
packing_list = objpack
object_header = objhead
contents_bin = html_tab
contents_txt = objtxt
receivers = reclist
object_para = objpara
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.
I did not include all the coding necessary for sending and building the attachment. However, when receiving this mail inside the Business Workplace I can use the context menu of this mail and select 'Execute'.
Right after this the transaction 'IW53' is called and I find myself inside the document '20000063'.
That's all. Now I'm trying to find how I can create a link inside the text to let the receiver simply click on it to jump into the transaction.
HTH,
Michael
Message was edited by: Michael Fritz
Message was edited by: Michael Fritz
02-27-2006 1:36 PM
Hi Michael,
thanks for your message, the main clue was for me
<i>[...]
However, when receiving this mail inside the Business Workplace I can use the context menu of this mail and select 'Execute'.
[...]</i>
I have expected a link in the mail-body
But the params do not work for me. Do you realy use the 'T'-param and not the 'U'?
02-27-2006 2:02 PM
Hi Peter,
PROC_TYPE has to be 'T'.
look at report : RSRRRS01 for any info.
Thanks,
GSR.
02-27-2006 2:06 PM
Peter,
> I have expected a link in the mail-body
Yes, me too, however AFAIK you must use the context menu of the mail message and click at 'Execute'. Perhaps sbdy else has got a hint for us?
> But the params do not work for me. Do you realy use
> the 'T'-param and not the 'U'?
Yes, I did it as shown in my small example coding.
Michael