Error 500 in Email body sent by BPM Task
Hi All,
We are sending an email notification with task payload whenever a task is created by configuring Notification properties associated with a task in BPM 11g.
The emails are going fine for individual emails but when we are sending the email to a DL (Group emails) an Error 500--Internal Server
is coming in email body.. the task payload is not rendered.
What may be the reason and what is the solution?
Warm Regards,
Sam
Hi,
Please use the follwoing FM in a task-mehtod to send mail.
CONCATENATE '<A HREF=' lv_link '>'
INTO ls_text.
APPEND ls_text TO lt_text.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = ls_document_data
document_type = 'HTM'
put_in_outbox = 'X'
commit_work = 'X'
TABLES
object_content = lt_text
receivers = lt_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.
Where lv_link is the varibale wihich holds thlink more than 132 charecters.
Thanks and regards,
SNJY
Similar Messages
-
Error 500 calling an ES from a BPM
Hi experts,
I have a BPM in XI that calls an ES many times. The standard ESs called are the Create Project Create Network an Create Activity. The BPM calls first of all the create project, then calls the create network, once for each network realted to the main project and then calls the create activity once for each activity realated to each network.
The BPM works fine for few networks and activities, but when calling many networks and activities it returns an error 500 of conection. It will be because the project object gets blocked when its called many times in a little period of time. I think it's not due to the XML or related because if I do the same process but with a wait step between each send it works fine. Do you know how can avoid this problem?
Regards
Gonzaloou are working with XI 3.0 or 7.0. If you have one XI installation across different network domains, host names may not be resolvable across network domains depending on your network setup. For the XI inter-component communication, URLs registered in the System Landscape Directory (SLD) are used.
XI Tools, Integration Engine and XI Adapter Engine register their URLs in the SLD in different ways:
XI Tools: Hostname and port used by the Tools (RWB, Integration Builder -Repository and -Directory) are stored in the Exchange Profile. During J2EE system restart they get self registered in the SLD using the values defined there.
XI Adapter Engine: In case of the XI Adapter Engine, these URLs are automatically entered to the SLD as part of the Adapter Framework self registration process. Host and port are taken from the J2EE server.
In most cases the host name in these URLs is not fully qualified whereas in cross-domain scenarios fully qualified host names are required.
Solution
The problem can be solved in most cases by forcing the XI self-registration to use fully qualified host names.
For XI Integration Builder, Integration Engine and Runtime Workbench, you accomplish this by entering fully qualified host names in the XI Exchange Profile, then initiating a new self-registration (restarting the J2EE engine).
For the Adapter Engine, the approach is different: Change the properties "SLD.selfregistration.httpPort", "SLD.selfregistration.httpsPort" and "SLD.selfregistration.hostName" of the J2EE service SAP XI AF CPA Cache. Enter the fully qualified host name under which the Adapter Engine can be reached from all relevant network domains. Do this in the Visual Administrator of the J2EE Engine. Then restart the applications "com.sap.aii.af.cpa.app" and "com.sap aii.af.app", or restart the complete J2EE engine. This triggers a new Adapter Engine self-registration.
Go in the Integration Server (IS) to transaction "SXI_CACHE -> Goto -> Adapter-Engine-Cache" and delete the old Adapter Engine cache entries. After that the cache is refreshed from SLD as soon as a new message in sent to the respective Adapter Engine.
Check: After restart, navigate in SLD through "Content Maintenance -> XIAdapter Framework" to your Adapter Engine. As part of the "associated instances" you find e.g. at "XI Adapter Service XIRA -> Associated Instances -> Port for XIRA of af.<SID>.<hostname>" the new URL with the fully qualified host name.
regards
chandra -
Error when assigning Web Dynpro UI to BPM task
Hi all,
I have created a simple Web Dynpro application that consumes a web service. The WD works fine when executed standalone and is fully prepared to be used in BPM (ie has Complete event and so on). When I try to add the UI to a BPM task I can't see it under supported components and if I choose to see all components I get the error:
Selected component is not supported. One of the ports has unsupported data.
Does anyone recognize this?
I'm using CE 7.2.
Regards
/OskarHi Oskar,
Seems that one of the datatypes that you are using is not supported. Make sure that you are using Data Types supported by WS.
Cheers,
Arafat -
Error while opening Excel file sent through attachment in email in sap
Hi All,
I have implemented sending email with excel attachment in SAP.
Email is sent successfully with attachment but when i tried to open it i get first error dialog like " file is not in recognizable format" but after that if i click ok then file gets opened correctly.
Can you please sort this out.
Thanks in advance.
regards
AshutoshGo to the following link you will get solutions:
ABAP BASIC -
Text message to email sent as attachment instead of in email body
I used to have this problem before with my iPhone 4, but it seemed to go away. Now, with the lates OS update it's back again. When I send a text message to my wife's Gmail it arrives as a text file attachment to the email instead of just normal text in the email body.
I use Verizon, and the source of the email is @vzwpix.com. I know that there is also @vtext.com, but in the past it hasn't mattered which one was used.
Any ideas?If you try reading other posts here about attachments and such you may get a hint. It sounds like all email programs would work fine if people just sent plain text. Problems arise when we use RTF (rich text format) and HTML. Possibly the original email you received had formatted text. My guess is that if you forced that text into plain text then it would be readable by all. This is the reason that only some people have trouble with the forwarded text. It depends on their email client or even on settings of that client.
Good luck. -
ERROR 500 INTERNAL SERVER MY ipad mini is new and I cant search with my browser or open email properly can someone please help
Hi ..
Reset the device:
Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
If that doesn't help, tap Settings > General > Reset > Reset All Settings
If that doesn't help, tap Settings > General > Reset > Reset Network Settings
You will have to re enter your Wi-Fi password.
If nothing above has helped, try here > iOS: Troubleshooting Wi-Fi networks and connections -
Hi, when I go to "select files to send" and click on "sent files" I get: "Internal Server Error (500) Your request could not be completed due to an internal server error". This never happened b4. I tried rebooting and that didn't work. Any help would be appreciated. Thanks.
Hi ,
Thank you for your question.
This error was caused by the incorrect site binding, I will give a reference of my test Lab. We add two A records in DNS which the FQDN of CAS and Mailbox could resolve IP address.;
Default Web Site:
Exchange Back End:
Then IIS must be restarted.
If there are any questions regarding this issue, please be free to let me know.
Best Regard,
Jim -
Error in Event Viewer everytime a email is sent with a attactmant
Hi All,
I'm having a problem with my exchange server every time a email gets sent with a attachment under the size of 20MB it bounces back and when it bounces back I get this in the event viewer,
Cmdlet failed. Cmdlet Get-User, parameters {Identity=NT AUTHORITY\SYSTEM}.
I've checked all the setting and they are as they was set up in the first place nothing has changed.
Hope you get back soon
Regards
Matthew Carney
Regards Matthew CarneyHi Belinda,
these are emails going outbound, this is the error we get when the email gets bounced back to us -
mx.google.com rejected your message to the following e-mail addresses:
*the email address*
mx.google.com gave this error: This message was blocked because its content presents a potential security issue. Please visit
http://support.google.com/mail/bin/answe r.py?answer=6590 to review our message content and attachment content guidelines. iy12si4764635wic.81 - gsmtp
Your message wasn't delivered because the recipient's e-mail provider rejected it.
Diagnostic information for administrators:
Generating server: ADMINSERVER.adminserv.local
mx.google.com #552-5.7.0 This message was blocked because its content presents a potential 552-5.7.0 security issue. Please visit
http://support.google.com/mail/bin/answe 552-5.7.0 r.py?answer=6590 to review our message content and attachment content 552 5.7.0 guidelines. iy12si4764635wic.81 - gsmtp ##
I am the network admin and the IT manager, this has confused me a bit because all the settings are as they were when I set it up and its only been like this that past month, the logs are full up with errors for this problem.
We can sent attachments internal fine and the fine i tried to sent in the email above was 15MB
Its not just google that we get bounced on its every email going outbound.
Regards Matthew Carney -
Internal error 500.0 when trying access my email via owa
Hello,
i am get following error when try to access email through OWA
Http Error 500.0-internal error
module "Exppw" could not be found.
this mesaage appear after unistall IIS and reinstall becuse i have problem initialization failed after
fix initilization failed OWA not working.
thanksHi activenew
Thank you for your question.
“440 login timeout” was caused by some reasons, for example permission, authentication and so on.
You can refer to the following link to rebuild virtual directory:
http://technet.microsoft.com/en-us/library/dd789741(v=exchg.80).aspx
http://support2.microsoft.com/default.aspx?scid=kb;EN-US;941201
If there are any questions, please let me know.
Best Regard,
Jim -
ePrint Error The email was sent to multiple printers or recipients, (It was not)
Using new HP Photosmart 5510
Vista 32 bitYou can get this error is you have more than the printer email in the "To" field or any entries in the "CC" field of the email. If that is not the case, you can try these troubleshooting steps:
http://h30434.www3.hp.com/t5/ePrint-Print-Apps-Mobile/ePrint-Apps-Connectivity-Troubleshooting-Pleas...d=reg_r1002_usen
I am an HP employee -
The problem is detailed above.Emails are sent ok.
ThanksThat issue can be caused by corrupted cookies.
Clear the cache and the cookies from sites that cause problems.
"Clear the Cache":
* Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
"Remove Cookies" from sites causing problems:
* Tools > Options > Privacy > Cookies: "Show Cookies"
* http://kb.mozillazine.org/Cookies
* http://kb.mozillazine.org/The_page_is_not_redirecting_properly -
Fetching Dynamic email address from the HTML content sent in the email body
Hi All,
I have a scenario where in i have to send an html content via an email body . while doing so , i need to fetch the email address from the html content and send a mail to the specified email adrress in the html content .
How to fetch the email address from the html content.
Regards
Vinay P.Hi ,
Dynamic configuration means ...do i need to come up with a mapping which contains the To,From,Subject fields & all...so that when i click on the mail package in mail adapter ...this "To" email id will be fetched dynamically
Regards
Vinay P -
Email body content is being sent as an attachment in workflow
Dear all,
In SBWP when i send mails recipents reciving mails as attachment but i need same as email body content.
pls suggest me..
Regards.
Rahul.GIn send mail task..how did you write the container values?
-
Error while sending email to external mail - Urgent
Hi All,
I am getting error while sending email with attachement. The Error code is 02.
I am not able to identify the error. bold Please help me in solving this problem.
Is it anything wrong with the code or Any Configuration with SCOT/SOST.bold
the code i am using is :
REPORT YVR_F MESSAGE-ID XX .
TABLES : EDIDC, EDIDS, EDPAR.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
PARAMETERS : P_STATUS LIKE EDIDC-STATUS DEFAULT '51'.
SELECT-OPTIONS : S_DIRECT FOR EDIDC-DIRECT,
S_MESTYP FOR EDIDC-MESTYP,
S_CREDAT FOR EDIDC-CREDAT.
SELECTION-SCREEN END OF BLOCK B1 .
PARAMETER: P_EMAIL LIKE SOMLRECI1-RECEIVER,
P_SENDER LIKE SOMLRECI1-RECEIVER no-display,
P_DELSPL AS CHECKBOX,
P_ONLINE NO-DISPLAY.
DATA : TB_EDIDC LIKE STANDARD TABLE OF EDIDC INITIAL SIZE 0 WITH HEADER
LINE.
DATA : TB_EDPAR LIKE STANDARD TABLE OF EDPAR INITIAL SIZE 0 WITH HEADER
LINE.
DATA : TB_KNA1 LIKE STANDARD TABLE OF KNA1 INITIAL SIZE 0 WITH HEADER
LINE.
DATA : TB_ADRC LIKE STANDARD TABLE OF ADRC INITIAL SIZE 0 WITH HEADER
LINE.
DATA: INT_PDF TYPE TABLE OF TLINE WITH HEADER LINE.
DATA : BEGIN OF TB_ED OCCURS 0,
SNDPRN LIKE EDIDC-SNDPRN,
LOC LIKE ADRC-BUILDING,
DOCNUM LIKE EDIDC-DOCNUM,
IDOCTP LIKE EDIDC-IDOCTP,
MESTYP LIKE EDIDC-MESTYP,
DIRECT LIKE EDIDC-DIRECT,
CREDAT LIKE EDIDC-CREDAT,
STATUS LIKE EDIDC-STATUS,
END OF TB_ED.
DATA: IT_MESSAGE TYPE STANDARD TABLE OF SOLISTI1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: IT_ATTACH TYPE STANDARD TABLE OF SOLISTI1 INITIAL SIZE 0
WITH HEADER LINE.
Job Runtime Parameters
DATA: GD_EVENTID LIKE TBTCM-EVENTID,
GD_EVENTPARM LIKE TBTCM-EVENTPARM,
GD_EXTERNAL_PROGRAM_ACTIVE LIKE TBTCM-XPGACTIVE,
GD_JOBCOUNT LIKE TBTCM-JOBCOUNT,
GD_JOBNAME LIKE TBTCM-JOBNAME,
GD_STEPCOUNT LIKE TBTCM-STEPCOUNT,
GD_ERROR TYPE SY-SUBRC,
GD_RECIEVER TYPE SY-SUBRC.
DATA: W_RECSIZE TYPE I,
W_SPOOL_NR LIKE SY-SPONO.
%_print LIKE pri_params.
DATA: GD_SUBJECT LIKE SODOCCHGI1-OBJ_DESCR,
IT_MESS_BOD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
IT_MESS_ATT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
GD_SENDER_TYPE LIKE SOEXTRECI1-ADR_TYP,
GD_ATTACHMENT_DESC TYPE SO_OBJ_NAM,
GD_ATTACHMENT_NAME TYPE SO_OBJ_DES.
Spool to PDF conversions
DATA: GD_SPOOL_NR LIKE TSP01-RQIDENT,
GD_DESTINATION LIKE RLGRAP-FILENAME,
GD_BYTECOUNT LIKE TST01-DSIZE,
GD_BUFFER TYPE STRING.
Binary store for PDF
DATA: BEGIN OF IT_PDF_OUTPUT OCCURS 0.
INCLUDE STRUCTURE TLINE.
DATA: END OF IT_PDF_OUTPUT.
DATA: GD_RECSIZE TYPE I.
CONSTANTS: C_DEV LIKE SY-SYSID VALUE 'DEV',
C_NO(1) TYPE C VALUE ' ',
C_DEVICE(4) TYPE C VALUE 'LOCL'.
DATA: T_PACKING_LIST LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
T_CONTENTS LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
T_RECEIVERS LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
T_ATTACHMENT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
T_OBJECT_HEADER LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
W_CNT TYPE I,
W_SENT_ALL(1) TYPE C,
W_DOC_DATA LIKE SODOCCHGI1.
DATA : MSTR_PRINT_PARMS LIKE PRI_PARAMS,
MC_VALID,
P_REPID LIKE SY-REPID,
WF_ID LIKE TSP01-RQIDENT,
LOC_BYTECOUNT TYPE I.
*start-of-selection.
MSTR_PRINT_PARMS-PDEST = 'LOCL'.
P_REPID = SY-REPID.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
authority= ' '
COPIES = '1'
COVER_PAGE = SPACE
DATA_SET = SPACE
DEPARTMENT = SPACE
DESTINATION = 'LP01'
EXPIRATION = '1'
IMMEDIATELY = 'X'
LAYOUT = 'X_65_132'
MODE = SPACE
NEW_LIST_ID = 'X'
NO_DIALOG = 'X'
USER = SY-UNAME
IMPORTING
OUT_PARAMETERS = MSTR_PRINT_PARMS
VALID = MC_VALID
EXCEPTIONS
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS = 2
INVALID_ARCHIVE_PARAMS = 3
OTHERS = 4.
SUBMIT (P_REPID) TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS MSTR_PRINT_PARMS.
AND RETURN.
NEW-PAGE PRINT ON NO DIALOG PARAMETERS
MSTR_PRINT_PARMS.
perform data.
NEW-PAGE PRINT OFF. "This marks the end of the screen for which the
*SPOOL NO WAS GENERATED.
WF_ID = SY-SPONO.
*converting spool to pdf
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = WF_ID "SPOOL NUMBER
NO_DIALOG = SPACE
PDF_DESTINATION = 'X'
IMPORTING
PDF_BYTECOUNT =
LOC_BYTECOUNT "NUMBER OF BYTES TRANSFERRED
TABLES
PDF = INT_PDF "TABLE FOR PDF REPORT
EXCEPTIONS
ERR_NO_ABAP_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DESTDEVICE = 5
USER_CANCELLED = 6
ERR_SPOOLERROR = 7
ERR_TEMSEERROR = 8
ERR_BTCJOB_OPEN_FAILED = 9
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11
OTHERS = 12.
*CALL FUNCTION 'DOWNLOAD'
*EXPORTING
*bin_filesize = loc_bytecount "NO. OF BYTES
*filename = 'C:/EMAILPDF.PDF'
*filetype = 'BIN'
**IMPORTING
**act_filename = loc_filename
*TABLES
*data_tab = int_pdf.
IF P_DELSPL EQ 'X'.
PERFORM DELETE_SPOOL.
ENDIF.
Transfer the 132-long strings to 255-long strings
LOOP AT INT_PDF.
TRANSLATE INT_PDF USING ' ~'.
CONCATENATE GD_BUFFER INT_PDF INTO GD_BUFFER.
ENDLOOP.
TRANSLATE GD_BUFFER USING '~ '.
DO.
IT_MESS_ATT = GD_BUFFER.
APPEND IT_MESS_ATT.
SHIFT GD_BUFFER LEFT BY 255 PLACES.
IF GD_BUFFER IS INITIAL.
EXIT.
ENDIF.
ENDDO.
DESCRIBE TABLE IT_MESS_ATT LINES GD_RECSIZE.
CHECK GD_RECSIZE > 0.
PERFORM SENDMAIL USING P_EMAIL..
*& Form sendmail
text
--> p1 text
<-- p2 text
FORM SENDMAIL USING P_EMAIL.
CHECK NOT ( P_EMAIL IS INITIAL ).
REFRESH IT_MESS_BOD.
Default subject matter
GD_SUBJECT = 'Subject'.
GD_ATTACHMENT_DESC = 'IDOC LIST'.
CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
IT_MESS_BOD = 'List Of Failed Idocs'.
APPEND IT_MESS_BOD.
IT_MESS_BOD = 'List Of Failed Idocs'.
APPEND IT_MESS_BOD.
If no sender specified - default blank
IF P_SENDER EQ SPACE.
GD_SENDER_TYPE = SPACE.
ELSE.
GD_SENDER_TYPE = 'INT'.
ENDIF.
Send file by email as .xls speadsheet
PERFORM SEND_FILE_AS_EMAIL_ATTACHMENT
TABLES IT_MESS_BOD
IT_MESS_ATT
USING P_EMAIL
'Document attachment'
'PDF'
GD_ATTACHMENT_NAME
GD_ATTACHMENT_DESC
P_SENDER
GD_SENDER_TYPE
CHANGING GD_ERROR
GD_RECIEVER.
ENDFORM. " sendmail
*& Form DELETE_SPOOL
text
--> p1 text
<-- p2 text
FORM DELETE_SPOOL.
DATA: LD_SPOOL_NR TYPE TSP01_SP0R-RQID_CHAR.
LD_SPOOL_NR = WF_ID. "GD_SPOOL_NR.
CHECK P_DELSPL <> C_NO.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
SPOOLID = LD_SPOOL_NR.
ENDFORM. " DELETE_SPOOL
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
text
-->P_IT_MESS_BOD text
-->P_IT_MESS_ATT text
-->P_P_EMAIL text
-->P_0846 text
-->P_0847 text
-->P_GD_ATTACHMENT_NAME text
-->P_GD_ATTACHMENT_DESC text
-->P_P_SENDER text
-->P_GD_SENDER_TYPE text
<--P_GD_ERROR text
<--P_GD_RECIEVER text
FORM SEND_FILE_AS_EMAIL_ATTACHMENT TABLES IT_MESSAGE
IT_ATTACH
USING P_EMAIL
P_MTITLE
P_FORMAT
P_FILENAME
P_ATTDESCRIPTION
P_SENDER_ADDRESS
P_SENDER_ADDRES_TYPE
CHANGING P_ERROR
P_RECIEVER.
DATA: LD_ERROR TYPE SY-SUBRC,
LD_RECIEVER TYPE SY-SUBRC,
LD_MTITLE LIKE SODOCCHGI1-OBJ_DESCR,
LD_EMAIL LIKE SOMLRECI1-RECEIVER,
LD_FORMAT TYPE SO_OBJ_TP ,
LD_ATTDESCRIPTION TYPE SO_OBJ_NAM ,
LD_ATTFILENAME TYPE SO_OBJ_DES ,
LD_SENDER_ADDRESS LIKE SOEXTRECI1-RECEIVER,
LD_SENDER_ADDRESS_TYPE LIKE SOEXTRECI1-ADR_TYP,
LD_RECEIVER LIKE SY-SUBRC.
DATA: T_PACKING_LIST LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
T_CONTENTS LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
T_RECEIVERS LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
T_ATTACHMENT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
T_OBJECT_HEADER LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
W_CNT TYPE I,
W_SENT_ALL(1) TYPE C,
W_DOC_DATA LIKE SODOCCHGI1.
LD_EMAIL = P_EMAIL.
LD_MTITLE = P_MTITLE.
LD_FORMAT = P_FORMAT.
LD_ATTDESCRIPTION = P_ATTDESCRIPTION.
LD_ATTFILENAME = P_FILENAME.
LD_SENDER_ADDRESS = P_SENDER.
LD_SENDER_ADDRESS_TYPE = P_SENDER_ADDRES_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 IT_MESSAGE 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 = p_EMAIL.
T_RECEIVERS-REC_TYPE = 'U'.
T_RECEIVERS-COM_TYPE = 'INT'.
T_RECEIVERS-NOTIF_DEL = 'X'.
T_RECEIVERS-NOTIF_NDEL = 'X'.
APPEND T_RECEIVERS.
DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
W_SENT_ALL = 'X'.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_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
object_header = objhead
CONTENTS_BIN = T_ATTACHMENT
CONTENTS_TXT = IT_MESSAGE
RECEIVERS = T_RECEIVERS
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
IF SY-SUBRC NE 0.
MESSAGE E000 WITH 'Error occurred while sending'.
ELSE.
MESSAGE I000 WITH 'The document was sent'.
ENDIF.
ENDFORM. " SEND_FILE_AS_EMAIL_ATTACHMENT
*& Form data
text
--> p1 text
<-- p2 text
FORM data.
SELECT SNDPRN
DOCNUM
IDOCTP
MESTYP
DIRECT
CREDAT
STATUS
FROM EDIDC
INTO CORRESPONDING FIELDS
OF TABLE TB_EDIDC
WHERE STATUS = P_STATUS
AND MESTYP IN S_MESTYP
AND DIRECT IN S_DIRECT
AND CREDAT IN S_CREDAT.
SELECT KUNNR
INPNR
FROM EDPAR
INTO CORRESPONDING FIELDS
OF TABLE TB_EDPAR
FOR ALL ENTRIES IN TB_EDIDC
WHERE KUNNR = TB_EDIDC-SNDPRN.
SELECT KUNNR
ADRNR
FROM KNA1
INTO CORRESPONDING FIELDS
OF TABLE TB_KNA1
FOR ALL ENTRIES IN TB_EDPAR
WHERE KUNNR = TB_EDPAR-INPNR.
SELECT ADDRNUMBER
BUILDING
FROM ADRC
INTO CORRESPONDING FIELDS
OF TABLE TB_ADRC
FOR ALL ENTRIES IN TB_KNA1
WHERE ADDRNUMBER = TB_KNA1-ADRNR.
LOOP AT TB_EDIDC WHERE STATUS = P_STATUS
AND MESTYP IN S_MESTYP
AND DIRECT IN S_DIRECT
AND CREDAT IN S_CREDAT.
TB_ED-SNDPRN = TB_EDIDC-SNDPRN.
TB_ED-DOCNUM = TB_EDIDC-DOCNUM.
TB_ED-IDOCTP = TB_EDIDC-IDOCTP.
TB_ED-MESTYP = TB_EDIDC-MESTYP.
TB_ED-DIRECT = TB_EDIDC-DIRECT.
TB_ED-CREDAT = TB_EDIDC-CREDAT.
TB_ED-STATUS = TB_EDIDC-STATUS.
READ TABLE TB_EDPAR WITH KEY KUNNR = TB_EDIDC-SNDPRN.
READ TABLE TB_KNA1 WITH KEY KUNNR = TB_EDPAR-INPNR.
READ TABLE TB_ADRC WITH KEY ADDRNUMBER = TB_KNA1-ADRNR.
TB_ED-LOC = TB_ADRC-BUILDING.
APPEND TB_ED.
ENDLOOP.
WRITE :/02 'CustomerNo',
15 'Location Code',
30 'Idoc Number',
55 'Basic Type',
70 'Message Type',
95 'Direction',
110 'Received Date',
130 'Status'.
ULINE.
LOOP AT TB_ED.
WRITE :/02 TB_ED-SNDPRN,
15 TB_ED-LOC,
30 TB_ED-DOCNUM,
55 TB_ED-IDOCTP,
70 TB_ED-MESTYP,
95 TB_ED-DIRECT,
110 TB_ED-CREDAT,
130 TB_ED-STATUS.
ENDLOOP.
ENDFORM. " data
Kindly help me in solving the issue.
Thanks in advance.
Suki.Hi,
Check in transaction SCOT. If your mail is in error status in SCOT, you can assure that there is no problem with your code. If your message has not reached till SCOT, then the problem will be with the code.
If the mail is there in scot with error status tell the BASIS to configure it. I feel this could be the problem.
Regards,
Renjith Michael. -
Error 500: ERROR: Cannot forward. Writer or Stream already obtained. Error
hi
i m unable to fugure out y I m getting this error
it's a suggestion page and on submitting this page I have to reload the page but with status of the page (requires approval) in form of url
earlier say few days back , it was working fine , i had absolutely no issues in this
since 2-3 days everytime i submit the page , i m getting the error
Error 500: ERROR: Cannot forward. Writer or Stream already obtained. Error 500
my code is listed below
pls help
<%@ include file="../includes/sessionChecker.jsp"%>
<%@ page isThreadSafe="false" errorPage="../html/messError.jsp" %>
<%@ page import="java.io.*,java.util.*,java.sql.*" %>
<%@ page import="com.syntaxsoft.util.*" %>
<%@ page import="com.syntaxsoft.util.DateUtil" %>
<%@ page import="com.syntaxsoft.admin.*" %>
<%@ page import="com.syntaxsoft.employee.*" %>
<%@ page import="com.syntaxsoft.db.*" %>
<%@ include file="../includes/cssJsInclude.jsp"%>
<%@ taglib uri="QuinnoxTags" prefix="QuinnoxTags" %>
<html>
<head>
<title>Suggestions</title>
<meta http-equiv="Content-Type" content="xls/html; charset=iso-8859-1">
<link href="../STYLESHEET/stylesheet.css" rel="stylesheet" type="text/css">
</head>
<body>
<%!
Table sqltab;
SqlBuilder sqlObj;
%>
<%
String dofc = "",subject="",suggestion = "",docsrno="",actions="";
String pick_button = "",locateid = "",employid="",url="";
String employeeid="";
String tabname=" ";
boolean success = false;
ResultSet rs= null;
%>
<%
employid = (String) session.getAttribute("empid");
locateid = (String) session.getAttribute("locationid");
Employee empobj = Employee.getEmployee(employid);
DateUtil dateform = new DateUtil(locateid);
actions = request.getParameter("actions");
pick_button = request.getParameter("DECISION");
System.out.println("ACTION"+actions);
System.out.println("pick_button"+pick_button);
%>
<body>
<%
if(actions.equals("create")){
if(pick_button == null){
%>
<form name="form1" method="post" action="../HRFiles/Suggestions.jsp">
<input type="hidden" name="actions" value="<%=actions%>">
<div class="page_heading">Suggestion Box</div><br>
<table>
<tr><th>From:</th><td><%=empobj.getFullName()%></td></tr>
<tr><th>Dated:</th><td><%=dateform.getToday()%></td></tr>
<tr><th>Subject</th><td><QuinnoxTags:TextBox type="text" name="subject" maxLength="65" required="true" value=" " label="Subject"/></td></tr>
<tr><th colspan="2">Suggestion:</th></tr>
<tr><td colspan="2"><QuinnoxTags:TextBox name="suggestion" type="textarea" cols="60" rows="13" required="true" value=" " label="Suggestion" maxLength="250"/></td></tr>
</table><br>
<table>
<tr>
<td align="right">
<input type="submit" name="DECISION" value="Submit" class="button">
</td>
</tr>
</table>
<input type="hidden" name="empid" value="<%=employid%>"
<jsp:include page="../masters/flow.jsp" flush="true">
<jsp:param name="CREATOR" value="true"/>
<jsp:param name="TABNAME" value="SUGGESTION_WKFLOW"/>
</jsp:include>
<!-- <table>
<tr><td align="right"><input type="submit" name="submit" value="Submit" class='button'></td></tr>
</table>-->
</form>
<%
else{
dofc = dateform.getTodayMillis()+"";
subject = request.getParameter("subject");
suggestion = request.getParameter("suggestion");
tabname =request.getParameter("TABNAME");
// insert into SUGGESTIONS
// generate key
IDs idObj = IDs.getIDs();
docsrno = idObj.getId("SUGGESTIONID");
sqlObj=new SqlBuilder("SUGGESTIONS");
sqlObj.setColumn("DOCSLNO",docsrno);
sqlObj.setColumn("EMPID",employid);
sqlObj.setColumn("DOFC",dofc);
sqlObj.setColumn("DOFCZONE",locateid);
sqlObj.setColumn("SUBJECT",tabname);
sqlObj.setColumn("SUGGESTION",suggestion);
// System.out.println("empid is "+request.getParameter("empid"));
System.out.println("empid is "+employid);
success = sqlObj.set(SqlBuilder.INSERT);
%>
<jsp:include page="../masters/flow1.jsp" flush="true">
<jsp:param name="DECISION" value="<%=request.getParameter(com.syntaxsoft.admin.WorkFlow.DECISION)%>" />
<jsp:param name="empid" value="<%=request.getParameter(\"empid\")%>" />
<jsp:param name="VIEWLEVEL" value="<%=request.getParameter(com.syntaxsoft.admin.WorkFlow.VIEWLEVEL)%>" />
<jsp:param name="VIEWERID" value="<%=request.getParameter(com.syntaxsoft.admin.WorkFlow.VIEWERID)%>" />
<jsp:param name="COMMENTS" value="<%=request.getParameter(com.syntaxsoft.admin.WorkFlow.COMMENTS)%>" />
<jsp:param name="DOCSLNO" value="<%=docsrno%>"/>
<jsp:param name="CREATOR" value="true"/>
<jsp:param name="TABNAME" value="<%=request.getParameter(\"TABNAME\")%>" />
<jsp:param name="MASTER_TABLE" value="SUGGESTIONS" />
</jsp:include>
<jsp:include page="../includes/redirectInclude.jsp" flush="true">
<jsp:param name="url" value="../HRFiles/ViewSuggestion.jsp?flag=empview" />
</jsp:include>
<%
} // end of if(pick_button == null)
} // end of if(actions == create)
if(actions.equals("select")){
rs = sqltab.select("select * from SUGGESTIONS");
if(rs.next()){
%>
<div class="page_heading">List of Suggestions</div><br>
<table>
<tr>
<th>Employee Id</th>
<th>Employee Name</th>
<th>Suggestion Date</th>
<th>Subject</th>
</tr>
<%
do{
docsrno = rs.getString("DOCSLNO");
employeeid = rs.getString("EMPID");
dofc = rs.getString("DOFC");
subject = rs.getString("SUBJECT");
Employee empobj1 = Employee.getEmployee(employeeid);
url = "../HRFiles/Suggestions.jsp?actions=view&docsrno="+docsrno;
%>
<tr>
<td><a href="<%=url%>"><%=employeeid%></a></td>
<td><a href="<%=url%>"><%=empobj1.getFullName()%></a></td>
<td><a href="<%=url%>"><%=dateform.getDate(dofc)%></a></td>
<td><a href="<%=url%>"><%=subject%></a></td>
</tr>
<%
}while(rs.next());
} // end of if
} // end of if(actions == select)
if(actions.equals("view")){
docsrno = request.getParameter("docsrno");
rs = sqltab.select("select * from SUGGESTIONS where DOCSLNO='"+docsrno+"'");
if(rs.next()){
do{
docsrno = rs.getString("DOCSLNO");
employeeid = rs.getString("EMPID");
dofc = rs.getString("DOFC");
subject = rs.getString("SUBJECT");
suggestion = rs.getString("SUGGESTION");
}while(rs.next());
} // end of if()
Employee empobj2 = Employee.getEmployee(employeeid);
%>
<div class="page_heading">Suggestion Box</div><br>
<table>
<tr><th>From:</th><td><%=empobj2.getFullName()%></td></tr>
<tr><th>Dated:</th><td><%=dateform.getDate(dofc)%></td></tr>
<tr><th>Subject</th><td><%=subject%></td></tr>
<tr><th colspan="2">Suggestion:</th></tr>
<tr><td colspan="2"><textarea name="suggestion" cols="70" rows="10" readonly><%=suggestion%></textarea></td></tr>
</table><br>
<table>
<tr><td colspan="4" align="right">Back</td></tr>
</table>
<%
} // end of if(actions == view)
%>
</body>
</html>
rgdsThe problem is that you are trying to do a forward somewhere when output has already been sent to the browser: this is not allowed. I cannot find it in your code, so it must be in one of the includes.
Maybe you are looking for
-
I have just come across this problem uploading pdf files on FF 3.6. Mariano posted this same problem on 5 Apr ( I found his post after a Google search as a search of this Forum gave no result). It is shown as "solved" but when I click on the Show Sol
-
How to use a bind variable in a table-validated flexfield
Hi, I want to prepare a table-validated descriptive flexfield, which uses as source a select statement. So, in the form "Validation table information" I use as table name the statement: (SELECT my_procedure('test_value') FROM DUAL) Up to here it work
-
Recently my ipod was stolen and had to replace my computer too now i can't find my music in itunes
recently my ipod was stolen and also had to replace my computer too i can't find my itunes purchased music
-
Removing Exchange 2010 from AD
Hi We have moved all our mail into Office 365 Exchange. We still need to run AD locally and will keep the DC's I need to shutdown the Exchange server, however if I do I need to understand how this may effect the Active Directory in the respect of se
-
A516 GPS Works Fine in Malaysia but Not Functionin​g in Singapore?
This is so strange, but the GPS works just fine when in Malaysia, but when crossed to Singapore the GPS just not functioning. I even tried removing my SIM card and it just the same. Anyone faced the same issue?