Error during sending an email
Hi,
For test purposes we had planned to use google smtp server for sending emails,
For that we had used google's smtp settings
like
smtpserver ==>smtp.google.com
smtuserid ==> mygmailid
smtppassword ==>mygmail password
But google had additionally provided some settings like
1.Use Authentication: Yes
2.Use Secure Connection: Yes (this can be TLS or SSL depending on your mail client)
3.Port: 465 or 587
In ccb i cant find any place to enter the above 3 settings
1.Cant i use google's smtp server for sending emails through ccb?
2.Is smtp outgoing server port not necessary for ccb application to send an email
3.what port does ccb uses?
4.where can i change the default port?
plz help guys.
Edited by: shanker on Mar 29, 2011 3:39 AM
Hi Rajesh,
As I had replied to you in other post. Create Synchronous Service Interfaces.
And for the response Message Type you use MailReceipt structure. You can get this structure from the Mail Package xsd.
Download this MailPackage xsd from the sap note: 748024
Regards,
Aravind
Similar Messages
-
Error while sending the email notifcation
Hi All
I am getting this error while sending the email notifcation.If any one of you have any idea regarding this please suggest
[2012-09-12T03:55:41.288-10:00] [soa_server1] [ERROR] [SDP-26102] [oracle.sdp.messaging.driver.email] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: OracleSystemUser] [ecid: f5c1f5acbf0bb7a6:22e05768:139ba096e4d:-8000-00000000000006ef,0] [APP: usermessagingdriver-email] Error while writing e-mail message content.[[
java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
at java.util.Vector.elementAt(Vector.java:427)
at javax.mail.Multipart.getBodyPart(Multipart.java:157)
at javax.mail.internet.MimeMultipart.getBodyPart(MimeMultipart.java:256)
at oracle.sdpinternal.messaging.driver.email.EmailDriver.getHeaderEncoding(EmailDriver.java:1079)
at oracle.sdpinternal.messaging.driver.email.EmailDriver.send(EmailDriver.java:670)
at oracle.sdpinternal.messaging.driver.email.EmailManagedConnection.send(EmailManagedConnection.java:50)
at oracle.sdpinternal.messaging.driver.DriverConnectionImpl.send(DriverConnectionImpl.java:41)
at oracle.sdpinternal.messaging.dispatcher.DriverDispatcherBean.onMessage(DriverDispatcherBean.java:296)
at sun.reflect.GeneratedMethodAccessor2553.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy346.onMessage(Unknown Source)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:574)
at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:477)
at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:379)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4659)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:4345)
at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3821)
at weblogic.jms.client.JMSSession.access$000(JMSSession.java:115)
at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5170)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
[2012-09-12T03:55:41.331-10:00] [soa_server1] [WARNING] [SDP-25107] [oracle.sdp.messaging.engine.store] [tid: [ACTIVE].ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: OracleSystemUser] [ecid: f5c1f5acbf0bb7a6:22e05768:139ba096e4d:-8000-00000000000006ef,0] [APP: usermessagingserver] Message ID bac38bd50a1f32a129c5c739335a7855 in Status object does not match previously recorded Message ID b7e259a30a1f32a12c981a3ffd343f6d.
[2012-09-12T03:55:41.362-10:00] [soa_server1] [ERROR] [] [oracle.soa.services.notification] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@3066bad4] [userId: <anonymous>] [ecid: 0000Jau4qHj9Lex_w9w0yW1GK6Rn000003,1:32530] [APP: soa-infra] <.> Error status received from UMS.[[
Status detail :
Status type : DELIVERY_TO_GATEWAY:FAILURE,
Status Content : Failed to set message headers: java.lang.ArrayIndexOutOfBoundsException: 0 >= 0,
Addressed to : EMAIL:[email protected],
UMS Driver : Farm_base_domain/base_domain/soa_server1/usermessagingdriver-email:oracle_sdpmessagingdriver_email#Email-Driver,
UMS Message Id : b7e259a30a1f32a12c981a3ffd343f6d,
Gateway message Id : ,
Status Received at : Wed Sep 12 03:55:41 HST 2012.
Check status details and fix the underlying reason, which caused error.
[2012-09-12T03:55:51.492-10:00] [soa_server1] [WARNING] [] [oracle.soa.services.notification] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@3066bad4] [userId: <anonymous>] [ecid: 0000Jau4qHj9Lex_w9w0yW1GK6Rn000003,1:32530] [APP: soa-infra] <.> Could not find notification record corresponding to failed notification : (Channel message id) : b7e259a30a1f32a12c981a3ffd343f6d[[
Hence it will not be retried.
Possible cause could be purging of notification data after sending out notification, but before receiving status.
]]Are you using your email address to send the email notifications if it Is not configured with AD? Have you populated the mail attribute in weblogic console-->realms-->my realms-->users
In addition are you sure you have configured the 'Email Driver Properties' correctly in EM ?? have you specified the Notification Mode to Email ?
Please make sure that the outgoing mail server and port along with the username and password are correct.
Also validate the workflow settings in your EM?
In addition, please validate that when you logon to BPM worklist using the admin account and click on the name for e.g. weblogic, you see the email attribute populated properly.
Thanks
ACM -
HTTP response code 500 : Error during Sender Agreement Determination
I am trying a simple file to file scenario and messages are not being received in Integration Server.
Through communication channel monitoring, i have received the below error message.
Error Transmitting the message to
endpoint http://<hostname>:50000/sap/xi/engine?type=entry using
connection File_http://sap.com/xi/XI/System failed, due
to:
com.sap.engine.interfaces.messaging.api.exception.MessagingException:
Received HTTP response code 500 : Error during Sender
Agreement Determination.
Can you please help
Regards
HarishHi Harish,
http://<hostname>:50000/sap/xi/engine?type=entry
it should be http://<hostname>:8000/sap/xi/engine?type=entry not 50000 as port It should be your HTTP port...please .make the changes !!
In SXMB_ADM transaction under Integration engine configuration please change the settings to http://<hostname>:8000/sap/xi/engine?type=entry
make sure with your basis team that ur http port is 8000 or 8001 ..as per that make the necessary changes..
Regards, -
Error during sending sales idoc
hi all,
i m getting error during sending idoc for sales.................
Error:Check value field assignment for Condition PN10.....
How to solve this...?
Regards,
Imranfriends.......argent.......
-
Error - Problem sending invitation email
Hi
I am trying to invite a admin user, but i never get an email from BC
This i the error when im resend invitation email :
Error - Problem sending invitation email
Thanks
FinnI am having a similar issue - the email appears to have been created but the activation email was never sent... now we can not remove the busted one or create a log in in a client! - how to repair?
-
No Objects Found error during Sender agreement in ID
I created all objects, activated in IR and refreshed Cache with SXI_Cache.
Created Scenario in ID.
During Sender agreement creation, I gave Sender Service ( Which doesn't have to be in SLD ). Then Iam trying to pick Interface from drop down. Surprisinglt I cant see any object instead it throws error "No Objects Found" .
What should I do to see the Interfaces from Design?. Any suggestion here ?
Iam doing File to File scenario with Business Service.
ThanksS T,
from what you've said, you're using Business Services and not Business Systems.
Business Services are simpler (in the sense that you don't need to refer them in SLD and all), but the catch is that they don't have some useful stuff that Business Systems have.
One of these is that, for Business Systems, all the interfaces that are in SWCVs which belong to that BSy are automatically considered as valid interfaces for that BSy.
As for Business Services, you have to define all the interfaces that you want in the BSe, one by one. The good news is that you can use the Message Interfaces of any SWCV of Integration Repository, without having to specifically add the SWCV to the BSe (which can be a pain in the @$$ some times...).
To see and/or include message interfaces for a Business Service, just double click on it on Scenario or Objects tabs of Integration Directory.
Regards,
Henrique. -
Error while sending PO email as PO is in smartform
As my PO is in smartform so when I am sendin the email of PO using SAP standard Program 'SAPFM06P', FORM routine ENTRY_NEU' the processing routines,system is giving the error to open PO form.
So is there any way to send the email of smartform.
Thanks in advanceHi
I think some basis related configuartions to be done
Try like this and inform me
A cyclic job runs, which processes the messages seen in the SOST queue.
Are you sure it's not the frequency of the cyclic job, rather than the
number of messages in the queue, that you are observing? In messages
that are queued and before the cyclic job runs, "wait for comm. service"
is the normal status.
If you mean that there are always 4 items queued in SOST regardless of
the cyclic send job, then I have no ideas. I would have thought there
was no way to do that.
when the send job runs it just never
picks them up & sends them, while it picks up many others. The send job
is somehow blind to these; no error message occurs. In this case, I
'delete' them from the queue (in SOST) and then 'undelete' (drop down
menu -> /Go to /Deleted Items) them and then re-queue them. THEN they
actually get picked up & sent when the next cyclic send job executes.
Regards
Pavan -
PSE 8 No Email Program Error When Sending an Email
Hi Everyone,
I have a student who has a pretty new computer running Win 7 with PSE 8. She has set up her email sharing with Adobe Services and has received/entered the verification code. However, when trying to send an email, she gets the following error message as soon as she hits Send.
"There is no e-mail program associated to perform the requested action. Please install an email program or, if one is already installed, create an association in the Default Programs control panel."
Running PSE 8 as an administrator does not correct the problem. I thought that when you are using Adobe Email Service, you did not need an email program, like OL or Microsoft Mail. ??
TIA Don S.No, I never did get an answer.
To be honest I cannot remember if my student resolved their problem. I have never had that specific error message, and the last time I checked PSE 8 was emailing fine. HOWEVER, just yesterday, the only way I could send email from within PSE 7 was to not include any names from the PSE Contact list. This always caused PSE 7 to crash for both OL and Adobe Email Service, Photo Mail or Attachments. I have not checked PSE 8 yet.
I found out about the PSE 7 problem from a friend using OL. For her, it was working but all of a sudden, began to crash PSE 7.
Does anyone know if PSE 7/8 connects with Adobe while emailing, even if OL is used as the email client?
Don S. -
Help to resolve error in sending database email from SQL Server 2012.
Please help to resolve error in sending email from SQL Server 2012.
SQL Instance Version:
Microsoft SQL Server 2012 (SP1) - 11.0.3449.0 (X64)
Jun 29 2014 23:15:18
Copyright (c) Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 <X64> (Build 9600: )
Error Message: Error MeThe mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2015-01-15T19:48:25). Exception Message:
Cannot send mails to mail server. (The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.1 Client was not authenticated).)The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.1
Client was not authenticated).
I think the error message is pretty clear, you have to setup authentication for the SMTP connection in Database Mail, see
Database Mail Configuration Objects
Olaf Helper
[ Blog] [ Xing] [ MVP] -
Getting errors when sending an Email with DI
Hi there,
I'm trying to send an email using DI and getting this error if I use smtp_to:
'Cannot find the full path for file <C:/Program Files/Business Objects/BusinessObjects Data Services/bin/smtp>, due to error'
and if I use mail_to:
'There was no default login, and the user failed to log in successfully when the login dialog box was displayed. No message was'
Can someone help and tell me what am i doing wrong, or am I missing configurations.
Your help is very much appreciated.
Gsecure
Edited by: gsecure on Mar 18, 2010 10:53 AM
Edited by: gsecure on Mar 18, 2010 10:53 AMHi everyone,
I installed DI 3.2 which solved the problem, I think my 3.1 was not installed correctly.
thank you.
Edited by: gsecure on Apr 16, 2010 8:54 AM -
Getting errors when sending/receiving email
Hi there I have only just updated to Windows 10 from 8.1 nd am able to receive mails On outlook 2013 but continually get the following error message
Task '[email protected] - Sending' reported error (0x800CCC13) : 'Cannot connect to the network. Verify your network connection or modem.' I have tried everything but cant get it fixed can someone help Thanks BryanSame thing here Fresh install of windows 10 and Outlook 2013 Receiving emails but getting the same error message when sending and emails stuck in Outbox. Tried all available options in account settings but it doesnt make any difference. Strangley enough though when initially setting up the mail account it sends its test email no problems. Installed Outlook 2010 to see if there was any difference but the same thing happens.
-
SMTP error when sending multiple emails (hammering)
Dear Sirs,
I have a problem.
When I send many emails to many different addresses very fast (newsletter) after the 8th or 9th email the SMTP server blocks the sending.
I think that because tere is not a pause between the messages Mail hammers the SMTP server that stop working for 5 minutes to prevent "hackers" attaks.
Is there a way to set a pause between the messages in the outbox?
Thank you very much.
Dr. Bernardo BarberaniIf you are using SBC Yahoo by chance see this link http://discussions.apple.com/thread.jspa?threadID=1444416&tstart=0.
-
Error in sending Notification email with Embedded CLOB message in the body
Hi,
Workflow version is : 2.6.3.5
Apps Version is 11.5.10.1
Oracle Database 9.2.0.5.0
I am embedding a CLOB message document attribute to my Notification
Message Body.
Everything works fine when I check my notifications in the "workflow worklist"
i.e. Oracle Apps. <Notifications> tab.
but the emails are not going to the users and below message is displayed in the
status monitor. (eventhough it displays below error - I can able to respond the notifications using the worklist and can able to COMPLETE the workflow process
successfully)
Please help me to resolve the below error, so that the Same notification which I am able to see using the workflow worklist should be sent to the user in email as embedded text.
NOTE: there is no problem with the Package XXDB_OKC_CONTRACTS_WF_PKG, as it is not changed and I even verified it before and after this error that this package is indeed in VALID status.
Workflow Errors: XXDBCAPR, SDA-10314
Failed Activity Send Approve_Reject Responce Notification
Activity Type Notice
Error Name WF_ERROR
Error Message [WF_ERROR] ERROR_MESSAGE=3835: Error '-20002 - ORA-20002: 2018: Unable to generate the notification XML. Caused by: 2020: Error when getting notification content. Caused by: ORA-04061: existing state of has been invalidated ORA-04061: existing state of package "APPS_FND.XXDB_OKC_CONTRACTS_WF_PKG" has been invalidated ORA-04065: not executed, altered or dropped package "APPS_FND.XXDB_OKC_CONTRACTS_WF_PKG" ORA-06508: PL/SQL: could not find program unit being called Wf_Notification.GetAttrClob(18841, MESSAGE_BODY, text/html) Wf_Notification.oldGetAttrC' encountered during execution of Generate function 'WF_XML.Generate' for event 'oracle.apps.wf.notification.send'. ERROR_STACK= WF_MAIL.GetLOBMessage3(18841, WFMAILER, 2020: Error when getting notification content. Caused by: ORA-04061: existing state of has been invalidated ORA-04061: existing state of package "APPS_FND.XXDB_OKC_CONTRACTS_WF_PKG" has been invalidated ORA-04065: not executed, altered or dropped package "APPS_FND.XXDB_OKC_CONTRACTS_WF_PKG" ORA-06508: PL/SQL: could not find program unit being called Wf_Notification.GetAttrClob(18841, MESSAGE_BODY, text/html) Wf_Notification.oldGetAttrClob(18841, MESSAGE_BODY, text/html) WF_NOTIFICATION.GetFullBody(nid => 18841, disptype => text/html) WF_MAIL.GetLOBMessage3(nid => 18841, r_ntf_pref => MAILHTML), Step -> Getting text/html body) WF_XML.GenerateDoc(oracle.apps.wf.notification.send, 18841) WF_XML.Generate(oracle.apps.wf.notification.send, 18841) WF_XML.Generate(oracle.apps.wf.notification.send, 18841) Wf_Event.setMessage(oracle.apps.wf.notification.send, 18841, WF_XML.Generate) Wf_Event.dispatch_internal()
Error Stack
thanks,
Shashi
NOTE: there is no problem with the Package XXDB_OKC_CONTRACTS_WF_PKG, as it is not changed and I even verified it before and after this error that this package is indeed in VALID status.Hi,
Below solution worked for us :
Whenever the document message related procedure is modified and compiled we need to STOP and START all the workflow related services,
Homepage -> Workflow Manager -> Service Components => STOP all Services => Start All Services
NOTE: Even when we bounced the database, application server the error is still occuring, only when we STOP and START the services whenever we compiled the document message procedures then the emails are getting processed.
The Metalink Forum note 588112.992 (ORA-04061: existing state of has been invalidated ORA-04061: existing state of package) is helpful in getting the solution Below is a snippet of the same :
From: David Hsu 01-Aug-05 20:06
Subject: Re : ORA-04061: existing state of has been invalidated ORA-04061:
existing state of package
Loren,
we had a similar ORA-04061 error when we tried to compile a Workflow package
after we modified it with new attributes. What we were told was that some
workflow process or listener is still "thinking" the package is invalid even
though it is valid. Whenever packages referred by the workflow process is
changed, the Agent listeners and mailer must be bounced. Worst case scenario
if the error still persist is that the database may have to be bounced as
well.
Please try bouncing the Agent listeners or, if it possible, bounce the
database and see if you are still getting the error after that.
The listeners that you need to bounce are all the listeners that you have
enabled under OAM > Workflow Manager > Service Components,
including the Workflow Notification Mailer.
Hope this helps thanks,
Shashi -
CLOB: Error in sending Notification email with Embedded message in the body
Hi,
Oracle Database 9.2.0.5.0
Workflow version is : 2.6.3.5
Apps Version is 11.5.10.1
I am embedding a CLOB message document attribute to my Notification
Message Body.
Everything works fine when I check my notifications in the "workflow worklist"
i.e. Oracle Apps. <Notifications> tab.
but the emails are not going to the users and below message is displayed in the
status monitor. (eventhough it displays below error - I can able to respond the notifications using the worklist and can able to COMPLETE the workflow process
successfully)
Please help me to resolve the below error, so that the Same notification which I am able to see using the workflow worklist should be sent to the user in email as embedded text.
NOTE: there is no problem with the Package XXDB_OKC_CONTRACTS_WF_PKG, as it is not changed and I even verified it before and after this error that this package is indeed in VALID status.
Workflow Errors: XXDBCAPR, SDA-10314
Failed Activity Send Approve_Reject Responce Notification
Activity Type Notice
Error Name WF_ERROR
Error Message [WF_ERROR] ERROR_MESSAGE=3835: Error '-20002 - ORA-20002: 2018: Unable to generate the notification XML. Caused by: 2020: Error when getting notification content. Caused by: ORA-04061: existing state of has been invalidated ORA-04061: existing state of package "APPS_FND.XXDB_OKC_CONTRACTS_WF_PKG" has been invalidated ORA-04065: not executed, altered or dropped package "APPS_FND.XXDB_OKC_CONTRACTS_WF_PKG" ORA-06508: PL/SQL: could not find program unit being called Wf_Notification.GetAttrClob(18841, MESSAGE_BODY, text/html) Wf_Notification.oldGetAttrC' encountered during execution of Generate function 'WF_XML.Generate' for event 'oracle.apps.wf.notification.send'. ERROR_STACK= WF_MAIL.GetLOBMessage3(18841, WFMAILER, 2020: Error when getting notification content. Caused by: ORA-04061: existing state of has been invalidated ORA-04061: existing state of package "APPS_FND.XXDB_OKC_CONTRACTS_WF_PKG" has been invalidated ORA-04065: not executed, altered or dropped package "APPS_FND.XXDB_OKC_CONTRACTS_WF_PKG" ORA-06508: PL/SQL: could not find program unit being called Wf_Notification.GetAttrClob(18841, MESSAGE_BODY, text/html) Wf_Notification.oldGetAttrClob(18841, MESSAGE_BODY, text/html) WF_NOTIFICATION.GetFullBody(nid => 18841, disptype => text/html) WF_MAIL.GetLOBMessage3(nid => 18841, r_ntf_pref => MAILHTML), Step -> Getting text/html body) WF_XML.GenerateDoc(oracle.apps.wf.notification.send, 18841) WF_XML.Generate(oracle.apps.wf.notification.send, 18841) WF_XML.Generate(oracle.apps.wf.notification.send, 18841) Wf_Event.setMessage(oracle.apps.wf.notification.send, 18841, WF_XML.Generate) Wf_Event.dispatch_internal()
Error Stack
thanks,
Shashi
NOTE: there is no problem with the Package XXDB_OKC_CONTRACTS_WF_PKG, as it is not changed and I even verified it before and after this error that this package is indeed in VALID status.Hi,
Below solution worked for us :
Whenever the document message related procedure is modified and compiled we need to STOP and START all the workflow related services,
Homepage -> Workflow Manager -> Service Components => STOP all Services => Start All Services
NOTE: Even when we bounced the database, application server the error is still occuring, only when we STOP and START the services whenever we compiled the document message procedures then the emails are getting processed.
Metalink Forum note 588112.992 (ORA-04061: existing state of has been invalidated ORA-04061: existing state of package) is helpful in getting the solution Below is a snippet of the same :
From: David Hsu 01-Aug-05 20:06
Subject: Re : ORA-04061: existing state of has been invalidated ORA-04061:
existing state of package
Loren,
we had a similar ORA-04061 error when we tried to compile a Workflow package
after we modified it with new attributes. What we were told was that some
workflow process or listener is still "thinking" the package is invalid even
though it is valid. Whenever packages referred by the workflow process is
changed, the Agent listeners and mailer must be bounced. Worst case scenario
if the error still persist is that the database may have to be bounced as
well.
Please try bouncing the Agent listeners or, if it possible, bounce the
database and see if you are still getting the error after that.
The listeners that you need to bounce are all the listeners that you have
enabled under OAM > Workflow Manager > Service Components,
including the Workflow Notification Mailer.
Hope this helps thanks,
Shashi -
Error while sending by email a PDF from SMARTFORM
Hi all.
Wer'e upgrading to EP4 and I can send smartform PDF by email but get an error message while trying to open it.
*FORM convert_otf_2_pdf.
call function 'CONVERT_OTF_2_PDF'
importing
bin_filesize = lv_len_in
tables
otf = gs_return-otfdata[]
doctab_archive = it_docs[]
lines = lt_tline[]
exceptions
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
others = 3.
if sy-subrc ne 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
*then to send it as Email attachemnt we need to format the PDF data
call function 'SX_TABLE_LINE_WIDTH_CHANGE'
exporting
line_width_dst = '255'
tables
content_in = lt_tline
content_out = lt_objbin
exceptions
err_line_width_src_too_long = 1
err_line_width_dst_too_long = 2
err_conv_failed = 3
others = 4.
clear ls_solisti.
ls_solisti = 'Payment Notification'.
append ls_solisti to lt_objtxt.
DESCRIBE TABLE lt_objtxt LINES lv_lines.
READ TABLE lt_objtxt INDEX lv_lines.
ls_doc_chg-obj_name = 'Payment Notification'.
ls_doc_chg-expiry_dat = sy-datum + 10.
ls_doc_chg-obj_descr = 'Payment Notification'.
ls_doc_chg-sensitivty = 'F'.
ls_doc_chg-doc_size = 255.
ls_objpack-head_start = 1.
ls_objpack-head_num = 0.
ls_objpack-body_start = 1.
ls_objpack-body_num = 1. "lv_lines.
ls_objpack-doc_type = 'RAW'.
append ls_objpack to lt_objpack.
(pdf-Attachment)
ls_objpack-transf_bin = 'X'.
ls_objpack-head_start = 1.
ls_objpack-head_num = 0.
ls_objpack-body_start = 1.
describe table lt_objbin lines lv_lines.
"READ TABLE lt_objbin INDEX lv_lines.
ls_objpack-doc_size = lv_lines * 255 .
ls_objpack-body_num = lv_lines.
ls_objpack-doc_type = 'PDF'.
ls_objpack-obj_name = 'NOTIF'.
ls_objpack-obj_descr = 'Payment Notif.'.
append ls_objpack to lt_objpack.
clear lt_dli[].
lv_name = p_list.
call function 'SO_DLI_READ_API1'
exporting
dli_name = lv_name
dli_id = '000000000001'
shared_dli = 'X'
tables
dli_entries = lt_dli
exceptions
dli_not_exist = 1
operation_no_authorization = 2
parameter_error = 3
x_error = 4
others = 5.
if sy-subrc eq 0 and
lt_dli[] is not initial.
clear ls_reclist.
ls_reclist-receiver = p_list.
ls_reclist-rec_type = 'C'.
append ls_reclist to lt_reclist.
endif.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
document_data = ls_doc_chg
put_in_outbox = ''
tables
packing_list = lt_objpack
object_header = ls_objhead
contents_bin = lt_objbin
contents_txt = lt_objtxt
receivers = lt_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.
What's wrong ??
Thanks all,
RebekaHello,
Try below code
LOOP AT gt_check_data INTO gw_inc_payment.
CLEAR wa_pa0105.
READ TABLE gt_pa0105 INTO wa_pa0105
WITH KEY pernr = gw_inc_payment-pernr.
IF sy-subrc = 0. ELSE. CONDENSE wa_pa0105-usrid_long NO-GAPS.
TRANSLATE wa_pa0105-usrid_long TO LOWER CASE.
ENDIF.
CALL FUNCTION 'ZHR_ITA_MAIL_PDF'
EXPORTING
im_incentive = gw_ita_inc
im_flag = 'X'
IMPORTING
ls_job_output_info = ls_op_info
EXCEPTIONS
cntl_error_ctrl = 1
cntl_error_cont = 2
cntl_error_load = 3
cntl_error_show = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE text-024 TYPE 'E'.
ELSE.
CLEAR gt_tline[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = g_pdfsize
TABLES
otf = ls_op_info-otfdata
lines = gt_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
IF sy-subrc <> 0.
IF gt_tline IS INITIAL.
MESSAGE text-023 TYPE 'E'.
ENDIF.
ELSE.
Data handling with required length
LOOP AT gt_tline INTO gw_tline.
lv_pos = 255 - lv_len.
IF lv_pos > 134. "length of pdf_table
lv_pos = 134.
ENDIF.
gw_objbin+lv_len = gw_tline(lv_pos).
lv_len = lv_len + lv_pos.
IF lv_len = 255. "length of out (contents_bin)
APPEND gw_objbin TO gt_objbin.
CLEAR: gw_objbin, lv_len.
IF lv_pos < 134.
gw_objbin = gw_tline+lv_pos.
lv_len = 134 - lv_pos.
ENDIF.
ENDIF.
ENDLOOP.
IF lv_len > 0.
APPEND gw_objbin TO gt_objbin.
ENDIF.
CLEAR gw_objbin.
Mail process with the PDF attachment
PERFORM mail_process_attach USING wa_pa0105-usrid_long.
ENDIF.
ENDIF.
ENDLOOP.
FORM mail_process_attach USING lv_receive TYPE comm_id_long.
**//--- For Sending eMail
DATA : it_packing_list TYPE TABLE OF sopcklsti1,
wa_packing_list TYPE sopcklsti1,
it_receivers TYPE TABLE OF somlreci1,
wa_receivers TYPE somlreci1,
it_message TYPE TABLE OF solisti1,
wa_message TYPE solisti1,
it_line TYPE STANDARD TABLE OF tline,
wa_line TYPE tline,
it_attachment TYPE TABLE OF solisti1,
wa_attachment TYPE solisti1,
wa_doc_data TYPE sodocchgi1,
lv_cnt TYPE i,
lv_tablines TYPE i,
lv_subject TYPE so_obj_des,
lv_incref TYPE string.
*--Populating Mail Recepients
wa_receivers-rec_type = 'U'.
wa_receivers-com_type = 'INT'.
wa_receivers-notif_del = 'X'.
wa_receivers-notif_ndel = 'X'.
wa_receivers-express = 'X'.
assgining a receiver's mail id
wa_receivers-receiver = lv_receive.
APPEND wa_receivers TO it_receivers.
CLEAR wa_receivers.
*--Populating the body
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'ST'
language = sy-langu
name = gc_so10_name
object = 'TEXT'
TABLES
lines = it_line
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc = 0.
LOOP AT it_line INTO wa_line.
wa_message-line = wa_line-tdline.
APPEND wa_message TO it_message.
CLEAR : wa_line, wa_message.
ENDLOOP.
ENDIF.
*//--- Populate the subject/generic message attributes
wa_doc_data-obj_langu = sy-langu.
READ TABLE it_attachment INTO wa_attachment INDEX lv_cnt.
wa_doc_data-doc_size = ( lv_cnt - 1 ) * 255 + STRLEN( wa_attachment ).
wa_doc_data-obj_name = 'SAPRPT'.
*//--- Subject Begin
CLEAR : lv_subject.
lv_subject = gw_inc_payment-pernr.
SHIFT lv_subject LEFT DELETING LEADING '0'.
CONCATENATE text-009 '(' lv_subject ')'
INTO wa_doc_data-obj_descr
SEPARATED BY space.
*//--- Subject End
wa_doc_data-sensitivty = 'F'.
*--Describe the body of the message
CLEAR : wa_packing_list, it_packing_list[].
wa_packing_list-transf_bin = space.
wa_packing_list-head_start = 1.
wa_packing_list-head_num = 0.
wa_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES wa_packing_list-body_num.
wa_packing_list-doc_type = 'RAW'.
APPEND wa_packing_list TO it_packing_list.
Filling the attachment table
DESCRIBE TABLE gt_objbin LINES lv_tablines.
wa_packing_list-transf_bin = 'X'.
wa_packing_list-head_start = 1.
wa_packing_list-head_num = 0.
wa_packing_list-body_start = 1.
wa_packing_list-body_num = lv_tablines.
wa_packing_list-doc_type = 'PDF'.
wa_packing_list-obj_name = 'ATTACHMENT'(a01).
*//--- Attachment File Name - Begin
CLEAR : lv_subject.
lv_subject = gw_inc_payment-pernr.
lv_incref = gw_inc_payment-incref.
SHIFT lv_subject LEFT DELETING LEADING '0'.
SHIFT lv_incref LEFT DELETING LEADING '0'.
CONCATENATE text-011
lv_subject
gw_inc_payment-itafy
lv_incref
INTO wa_packing_list-obj_descr
SEPARATED BY '_'.
*//--- Attachment File Name - End
wa_packing_list-doc_size = lv_tablines * 255.
APPEND wa_packing_list TO it_packing_list.
CLEAR wa_packing_list.
calling the function module to send the mail
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = wa_doc_data
put_in_outbox = 'X'
sender_address = gc_sender
sender_address_type = 'INT'
commit_work = 'X'
TABLES
packing_list = it_packing_list
contents_bin = gt_objbin[]
contents_txt = it_message
receivers = it_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.
IF sy-subrc <> 0.
gw_inc_payment-zmail = '0'.
gw_inc_payment-mail_status = text-022.
gw_ita_inc-zmail = '0'.
MODIFY gt_inc_payment FROM gw_inc_payment
TRANSPORTING zmail WHERE incref = gw_inc_payment-incref
AND pernr = gw_inc_payment-pernr.
MODIFY zhr_ita_inc_payk FROM gw_ita_inc.
MESSAGE text-013 TYPE 'E'.
CLEAR gw_ita_inc.
ELSE.
gw_inc_payment-zmail = '1'.
gw_inc_payment-mail_status = text-021.
gw_ita_inc-zmail = '1'.
MODIFY gt_inc_payment FROM gw_inc_payment
TRANSPORTING zmail mail_status
WHERE incref = gw_inc_payment-incref AND
pernr = gw_inc_payment-pernr.
IF sy-subrc = 0.
MODIFY zhr_ita_inc_payk FROM gw_ita_inc.
IF sy-subrc = 0.
MESSAGE text-012 TYPE 'S'.
ENDIF.
ENDIF.
CLEAR gw_ita_inc.
ENDIF.
CLEAR : it_packing_list,
gt_objbin[],
it_message[],
it_receivers[],
wa_doc_data.
ENDFORM. " MAIL_PROCESS_ATTACH
regards
Maybe you are looking for
-
How to add a digital signature in xml publisher report
The problem is: There is a existing pick slip report.This is a xml publisher report and the data source is RDF. We have to add digital signature there. Now this signature is stored in a table with type Long Raw and format BMP. XML Publisher do not su
-
WEP encryption failure on D-Link 614+ wireless router after 1.1.1 update
My iPhone was connecting to the Internet via WiFi with a D-Link 614+ wireless router, and with 128-bit WEP encryption on, before I updated the iPhone to 1.1.1. Since that update, connectivity through the D-Link router requires that WEP be disabled. A
-
Hi I am invoking a Java Webservice deployed on a Apache Axis server using a SOAP Adapter Receiver and a HTTP sender for sending the request message(thro a HTTP client).In the pipeline while retrieving the Response I get a Error message "NO_MAPPINGPRO
-
Nokia E51 problem in the recorder or push to talk ...
sometimes the recorder button (on left side) works and sometimes it doesnt.does any body have this problem?
-
HT1296 window 7 will not recognize my ipod touch
Am I supposed to use a fix for microsoft , if so where is it ?