‎2008 Jul 14 4:06 PM
Hi all,
I use a report with a perform SEND. In this perform i use the FM SO_DOCUMENT_SEND_API1. This works, the email is send.
Now i want to call this perform from another Report (external perform) or rather from the HR-table t588z with Action 'F'.
The message 'Mail was sent occurs, but there is no item in TA SCOT and no mail is going out.
Has anyone experience ?
Thanks
Stefan
‎2008 Jul 14 4:11 PM
Have import parameter
commit_work = 'X'
in the function module call?
a®
‎2008 Jul 14 4:19 PM
Hi a®s,
see coding below:
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = document_data
put_in_outbox = 'X'
commit_work = 'X'
IMPORTING
sent_to_all = sent_to_all
TABLES
packing_list = packing_list
contents_txt = contents_txt
contents_hex = contents_hex
receivers = 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.
CASE sy-subrc.
WHEN '0'.
COMMIT WORK.
MESSAGE i000(zhr) WITH 'Mail wurde gesendet !'.
WHEN OTHERS.
ENDCASE.
‎2008 Jul 14 4:20 PM
Hi,
I doubt SAP will not allow the commit work in the same session while triggering the dynamic actions may be we need to submit the program containing the form so that this opens a seperate session....and performs the function as well
@ARS Sir:
please correct me if i was wrong as i had faced this problem when
i used HR infotype operation which hasn't allowed me to commit or rather helped me only when i wrote a submit..
Cheers,
Jacks
‎2008 Jul 14 5:42 PM
Stefan,
Try to change the function module call with an addition CALL FUNCTION func STARTING NEW TASK task . But i am not 100% sure about this.
After reading this documentation about dynamic actions
http://it.toolbox.com/wiki/index.php/Dynamic_Action
May be this will help you out,
a®
‎2008 Jul 15 8:34 AM
Thanks to all,
it works with
CALL FUNCTION func STARTING NEW TASK task.
Stefan
‎2008 Jul 14 5:32 PM
HI Stefan,
Try to replicate the mail code in a program and write the submit code in the form that you will place in the dynamic action table this will suffice requirement
or .
Use your main program ,declare a parameter under No display mode and pass this variable by submitting the program in your form that you will place in your dynamic action table.
Cheers,
Jacks...