Problem while sending spool as mail in Excel
Hello,
My requirement is to send the spool generated in background as attachment in excel. i am using RSPO_RETURN_SPOOLJOB for converting spool in to internal table and SO_NEW_DOCUMENT_ATT_SEND_API1 for sending mail.
The problem is data is not displayed properly. How to handle the data retreived from RSPO_RETURN_SPOOLJOB .
Thanks.
Hello Sandra,
This is how my data is been displayed in excel
4100000001|1000|1000|304|04/05/1999|00010|ACETAMIDE |3000081 |1000| 6,000 |KG |KG | 58.00| 4100000002|1000|1000|304|04/05/1999|00010|AMMONIA GAS |3000084 |1000| 12,000 |KG |KG | 17.20| 4100000003|1000|1000|304|04/05/1999|00010|LIQUID NITROGEN |3000216 |1000| 140,000 |L |L | 5.05| 4100000004|1000|1000|304|04/05/1999|00010|HYDROGEN PEROXIDE 50 % |3000203 |1000| 10,000 |KG |KG | 10.05|
This is coming in single cell of the excel.
Similar Messages
-
Problem while sending the mail from sap
Hi experts,
I am facing some problem while sending mail from sap to external mail.
this is th code i am using but it is not working. plz check and tell me.
REPORT ZMAIL_DEMO.
data: maildata type sodocchgi1.
data: mailtxt type table of solisti1 with header line.
data: mailrec type table of somlrec90 with header line.
start-of-selection.
break-point.
clear: maildata, mailtxt, mailrec.
refresh: mailtxt, mailrec.
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test'.
maildata-obj_langu = sy-langu.
mailtxt-line = 'This is a test'.
append mailtxt.
mailrec-receiver = 'SOME MAIL ID'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'RAW'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
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. "( did not receive any mail) *
write : 'mail sent'.
endif.Hi,
Please check with the following code.
TABLES: KNA1.
data for send function
DATA DOC_DATA LIKE SODOCCHGI1.
DATA OBJECT_ID LIKE SOODK.
DATA OBJCONT LIKE SOLI OCCURS 10 WITH HEADER LINE.
DATA RECEIVER LIKE SOMLRECI1 OCCURS 1 WITH HEADER LINE.
SELECT * FROM KNA1 WHERE ANRED LIKE 'C%'.
WRITE:/ KNA1-KUNNR, KNA1-ANRED.
send data internal table
CONCATENATE KNA1-KUNNR KNA1-ANRED
INTO OBJCONT-LINE SEPARATED BY SPACE.
APPEND OBJCONT.
ENDSELECT.
insert receiver (sap name)
REFRESH RECEIVER.
CLEAR RECEIVER.
MOVE: 'any_email'_ TO RECEIVER-RECEIVER, " SY-UNAME
'X' TO RECEIVER-EXPRESS,
'U' TO RECEIVER-REC_TYPE.
APPEND RECEIVER.
insert mail description
WRITE 'Sending a mail through abap'
TO DOC_DATA-OBJ_DESCR.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_DATA
IMPORTING
NEW_OBJECT_ID = OBJECT_ID
TABLES
OBJECT_CONTENT = OBJCONT
RECEIVERS = RECEIVER
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. -
Can't send email. Get error: "An error occurred while sending. The mail sever responded: From address is not valid [R0107001]. Please verify your email address is correct in your Mail Preference and try again."
My email ([email protected]) is correct.
After receiving the error message I try to resend. Get second error message. BUT AFTER ABOUT SIX TRYS THE MESSAGE IS SENT.
What shall I do???problem solved. an update thunderbird message showed up, did update and now works. WOW!
-
While sending an e-mail from hotmail account, in a few seconds a message is received - Widows Live hotmail does not ready to accept your request. This is not the case on Safari.
It requires me to download the latest version of Silverlight, which is done, yet I do not know how to get to it on my hotmail page. I am using mac.Just to recap, this is a collection of ports I have collected over time for people who needed this information when setting up the HP ePrint app so that they could view their email from within the app. I am certain other applications also need this information. Although lengthy, I could not find a more comprehensive place to retrieve this information. Feel free to post additional information, faulty information, or other related topics below as this is simply a collection of data and it would be practically impossible to test all of them. Thank you!
Don't forgot to say thanks by giving "Kudos" if I helped solve your problem.
When a solution is found please mark the post that solves your issue.
Every problem has a solution! -
Problem while sending the message using RWB
Dear All,
I am facing a problem while sending a message from RWB. I sent the message using Test Message in component monitoring, it says message sent but I am not able to see any message in sxi_monitor.
When I send the same message using the http client it successfully processed by XI and I can see the success message in sxi_monitor.
Please let me know if anyone has face similar kind of issue.
Thanks,
Alok
Edited by: Alok Raoka on May 26, 2008 5:08 PMDear All,
I am facing a problem while sending a message from RWB. I sent the message using Test Message in component monitoring, it says message sent but I am not able to see any message in sxi_monitor.
When I send the same message using the http client it successfully processed by XI and I can see the success message in sxi_monitor.
Please let me know if anyone has face similar kind of issue.
Thanks,
Alok
Edited by: Alok Raoka on May 26, 2008 5:08 PM -
Problem while sending FAX through PRINT_TEXT FM
Hi All,
I have a problem while sending a fax.
we are sending fax through the FM PRINT_TEXT.
Below is the FM we are passing paramenters.
CALL FUNCTION 'PRINT_TEXT'
EXPORTING
APPLICATION = 'TX'
DEVICE = 'TELEFAX'
DIALOG = SPACE
HEADER = fs_header
OPTIONS = fs_popt
IMPORTING
RESULT = fs_pres
TABLES
LINES = <b>int_fax</b>
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
UNKNOWN = 6
FORMAT = 7
TEXTFORMAT = 8
COMMUNICATION = 9
BAD_PAGEFORMAT_FOR_PRINT = 10
OTHERS = 11.
if sy-subrc ne 0.
p_flag = lit_x.
endif.
In INT_FAX internal table we have two fields one is tdformat second one is tdline
The lengh of the TDLINE is 132 char,Initially for all reocords we have only 108 char length,But according to user requirement we added one more field in taht
Now the lengh increased to 132 for each records.
When i checked in debugg mode the INT_FAX internal table have all 132 characters.
The problem is while checking in SOST trnasaction it is showing 108 characters in one line and remaining in second line,can you please help on this.
Thanks In advance
Sriman.may it be that in those cases where it doesnt work, that you got no fax number?
Since it works soemtimes, it seems there are no errors, but rather in some cases some important info is missing, fax number may be one of thsoe important info in a FAX scenario. -
Problem while sending IDOC to File Senario
Hi Experts
I am having problem while sending the Idoc from SAP R/3 to File
I have done all the setting in SAP as well in XI but while pushing IDOC
I am getting error in the transaction sm58 in SAP R/3
" <b>The service for the client 300(My SAP R/3 client) is not present in Integration
Directory</b>"
I can any one explain me what to done on this....all the connections are fine
Waiting for Response
Adv points and thanx
RakeshReason and Prerequisites
You send IDocs from system ABC to the exchange infrastructure (XI) of system XIZ, and error messages are issued in system ABC (Transaction SM58) for the IDOC_INBOUND_ASYNCHRONOUS function module.
This note proposes solutions for the following error messages:
a) No service for system SAPABC client 123 in the integration directory
b) Transaction IDX1: Port SAPABC, client 123, RFC destination
c) ::000
d) NO_EXEC_PERMISSION: "USER" "Business_System"
e) IDoc adapter inbound: Error error ...
Solution
a) Error message: No service for system SAPABC client 123 in the integration directory
Solution:
You send IDocs from system ABC to XI. In the control record of the IDoc, the SNDPOR field contains the value "SAPABC". The client of the sending system is determined by the MANDT field of the control record. The system ID and client are then used to determine a service without party of the type (business-system/business-service):
Business system
Activities in the System Landscape Directory (SLD)(Create technical system):
Create a technical system for system ABC in the SLD, and create the client for this. Do not forget to assign an "ALE logical system" (for example, "ABCCLNT123") to this technical system.
SLD (Business system):
You can now explicitly assign a business system to this client.
For more details, refer to the SLD documentation.
Activities in system ABC (self-registration in the SLD):
Alternatively, you can register the system in the SLD in system ABC with Transaction RZ70. You will find detailed information about the SLD registration of systems on the SAP Service Marketplace for the "Exchange Infrastructure" in the document "Exchange_Installation_Guide.pdf".
In system ABC, you can check your configuration with TransactionSLDCHECK.
Activities in Integration Directory (import business system from SLD):
You will find the business systems under Services Without Party in the Integration Services. In the Service menu, you will find the system identifiers, the client, and the corresponding ALE logical system under "Objects"->"Adapter-specific identifiers".
Use the Import/Update button to copy the data from the SLD, to create business systems, or to update their identifiers.
Business service
Activities in the Integration Builder directory:
You want to create a service without party that is not part of your system infrastructure and is therefore not maintained in the SLD.
In the Integration Builder directory, you will find the "Business-Services" under Services Without Party. In the Service menu, you will find the system identifiers, the client, and the corresponding ALE logical system under "Objects"->"Adapter-specific identifiers".
Activate the change list in Integration Directory.
In system ABC, you can restart the incorrect entry from Transaction SM58 .
b) Error message: Transaction IDX1: Port SAPABC, client 123, RFC destination
Solution:
The Integration Server tries to load the IDoc metadata from the sending system. The IDoc schemas from the Integration Repository cannot be used because they are release-dependent.
The sending system is determined by the value of the "SNDPOR" field from the IDoc control record (for example, "SAPABC").
Activities in the central XI system:
In Transaction IDX1, you can assign an RFC destination to the sending system (for example, "SAPABC"). This must be created beforehand in Transaction SM59.
Note that the IDoc metadata is cross-client data. In Transaction IDX1, only one entry must be maintained for each system. Only the lowest client is used by the runtime for Idoc metadata retrieval with RFC.
Ensure that only SAPABC and not "SAPABC_123" is entered in the port name.
c) Error message: "::000"
Solution:
This error occurs if the central XI system tries to load the IDoc metadata from the sending system by RFC.
There may be several different reasons for the failure of the metadata import, the error is not transferred in full by tRFC completely, and this results in the error message above.
User cannot log onto sending system
User/password/client is not correct or the user is logged due to too many failed logons.
Activities in sender system ABC:
Transaction SM21 contains entries for failed logons.
Activities in the central XI system:
Determine the sending port from the IDoc control record of the IDoc. If the ID of the sending system has the value "ABC", the value of the sending port is "SAPABC". You will find the RFC destination used for the "SAPABC" sending port with the lowest client in Transaction IDX1. In Transaction SM59, you will find the RFC destination containing the maintained logon data .
User does not have the required authorizations
Activities in the sender system ABC:
In Transaction SM21, you will find entries relating to authorization problems and more exact details.
Contact your system administrator and, if necessary, assign the user the required roles in user administration.
IDoctyp/Cimtyp cannot be loaded
Activities in sender system ABC:
In the sender system, you can check your IDoc types in Transaction WE30 (IDoc type editor) Take note not only of the errors, but also of the warnings.
The most common errors are:
- IDoc type or segments not released
- Segments that no longer exist are listed in the IDoc type
- Data elements that do not exist in the DDIC are assigned to fields
in the segment.
Contact your system administrator and correct these errors in the IDoc type.
d) Error message: NO_EXEC_PERMISSION: "User" "Business_System"
Solution:
You created a list of users in the directory who are authorized to use the "Business_System". The user in the error message is not on the list.
Alternatively, the same error is used if you have created a sender agreement with a channel of the IDoc type for the "Business_System" and the interface used. The user in the error message is not contained in the list of all authorized users defined there.
e) Error message: IDoc adapter inbound: Error error
Solution:
You send IDocs to the central XI system, where they are received by the IDoc adapter. The IDocs are converted into IDoc XML, and a corresponding XI message is generated and transferred to the XI Runtime Engine. The Engine tries to read its own business system from the "Exchange Profile". If the Exchange Profile is currently unavailable, the message is not processed and it is returned to the sending system with an error message.
Regard's
Prabhakar..... -
Problem while sending unicode (utf-8) xml to IE.
Hi,
I have encoding problem while sending utf-8 xml from servlet to IE (Client), where i am parsing the xml using Ajax.
In the log I can see proper special characters that are being sent from the servlet. but when same is seen in the client end,, it is showing ? symbols instead of special charcters.
This is the code that sends the xml from servlet.
ByteArrayOutputStream stream = new ByteArrayOutputStream(2000);
transformer.transform(new DOMSource(document), new StreamResult(new OutputStreamWriter(stream, "iso-8859-1")));
_response.setContentType("text/xml; charset=UTF-8");
_response.setHeader("Cache-Control", "no-cache");
_response.getWriter().println(new String(stream.toByteArray(), "UTF-8"));
In the log i can see :
<response status="success" value="1154081722531" hasNextPage="false" hasPreviousPage="false" ><row row_id="PARTY_test_asdasd" column_0="PARTY_test_asdasd" column_1="asdasd �" mode="edit" column_en_US="asdasd �" column_de_DE="? xyz" column_fr_FR="" ></row></response>
But in the Client side I am able to see
<?xml version = '1.0' encoding = 'UTF-8'?>
<response status="success" value="1154082795061" hasNextPage="false" hasPreviousPage="false"><row row_id="PARTY_test_asdasd" column_0="PARTY_test_asdasd" column_1="asdasd ?" mode="edit" column_en_US="asdasd ?" column_de_DE="? xyz" column_fr_FR=""/></response>
I am getting ? instead of �.
It will be greatful if somebody tell how to send utf xml from servlet, for ajax purpose.
Thanks,
Siva1This is the code that sends the xml from servlet.
ByteArrayOutputStream stream = new
ByteArrayOutputStream(2000);
transformer.transform(new DOMSource(document), new
StreamResult(new OutputStreamWriter(stream,
"iso-8859-1")));Here you produce XML that's encoded in ISO-8859-1. (!!!)
_response.setContentType("text/xml; charset=UTF-8");Here you tell the browser that it's encoded in UTF-8.
_response.getWriter().println(new String(stream.toByteArray(), "UTF-8"));Here you convert the XML to a String, assuming that it was encoded in UTF-8, which it wasn't.
Besides shooting yourself in the foot by choosing ISO-8859-1 for no good reason, you're also doing a lot of translating from bytes to chars and back again. Not only is that a waste of time, it introduces errors if you don't do it right. Try this instead:_response.setContentType("text/xml; charset=UTF-8");
_response.setHeader("Cache-Control", "no-cache");
_transformer.transform(new DOMSource(document_),
new StreamResult(_response.getOutputStream())); -
How to rollback a traansacation if we got any problem while sending data to
how to rollback a traansacation if we got any problem while sending data to a webservice...
Is it SOA or OSB? Which version you are in..
-
Facing problem while downloading ALV grid Output into Excel
Hi Guys,
I am facing problem while downloading ALV grid Output into Excel.
It is downloading into excel, but all character columns first and next all quantity columns it is displaying. But I need columns order as it is in the grid.
If I take all columns as characters it works fine. But it will be problem for calculating total, subtotals of quantity columns
Can someone help me regarding this
thanks for your helpHi,
Open up Excel on your desktop. Goto Tools > Macro > Security.
Make sure that your security is set to Medium (or less). SAP uses OLE automation to run the Excel instance and in Office 2003 (for example), Microsoft has increased their default security setting to High. With the High setting, the output to Excel fails.
Was this your problem? Don't forget those points, either.
check with this wetther it is solved or not.
Regards,
sana. -
Excel 2007 Problems while sending E-Mail with Excel Attachment
Hello all,
i wrote a small WD application for uploading a file and sending this file
vie e-mail to some recipients.
I'm using class "cl_document_bcs". No problem with ".doc", ".pdf", also no problem
with ".xls" files generated by old Excel version. But when generating an .xls document with
Excel 2007, the attached file is not readable (just non usable signs).
For attaching the .xls file i use:
TRY.
lr_attachment = cl_document_bcs=>create_document(
i_type = lv_filetype " --> 'XLS'
i_subject = 'excel document'
i_hex = lt_file_solix
CATCH cx_document_bcs .
ENDTRY.
Are there any restrictions regarding Excel 2007?
The data element of i_type is just char3, so XLSX
wouldn't be possible.hello Christopher Linke ,
if you Programatically generation a excel file and you have 2007 version you can use OLE automation to save file as .xls i.e. a 2003 work book ..
if you have a excel file ready and you just want to send it across the you will have to convert the xlsx to xls and then send it you can do this as well using OLE automation
(in 2007 in SAVE AS option you can save it excel 97 2003 workbook)
Edited by: Anup Deshmukh on Mar 3, 2010 3:38 PM -
Problem while sending Abap list to mail in the background
Hi all,
I am sending abap list to email in the background.
My code as folllows:
DATA: so_ali LIKE solisti1 OCCURS 100 WITH HEADER LINE.
DATA: listobject LIKE abaplist OCCURS 0 WITH HEADER LINE.
DATA: objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA: objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE.
DATA: doc_chng LIKE sodocchgi1.
DATA: tab_lines LIKE sy-tabix.
DATA: lt_user TYPE soud3 OCCURS 0 WITH HEADER LINE.
*Start of modification Tix 14411 for transport request D82K929044
DATA: it_user like SODLIENTI1 occurs 0 with header line.
*End of modification for Tix 14411 for transport request D82K929044
CLEAR: listobject, so_ali, objpack, objhead, objtxt, reclist, doc_chng.
REFRESH :
listobject, so_ali, objpack, objhead, objtxt, reclist.
creation of the document to be sent
doc_chng-obj_name = 'BOFAREPORT'.
WRITE sy-datum TO doc_chng-obj_descr.
CONCATENATE 'Bank Activity Report for :'(025)
company_itab_tr-company_code '-' doc_chng-obj_descr INTO
doc_chng-obj_descr. "AN052799
objtxt = 'This is the bank activity report received for'(026).
APPEND objtxt.
CONCATENATE company_itab_tr-company_code '-'
company_itab_tr-company_name '-'
company_itab_tr-company_city INTO
objtxt.
APPEND objtxt.
WRITE sy-datum TO objtxt.
CONCATENATE 'Date Received : '(027) objtxt INTO objtxt.
APPEND objtxt.
WRITE sy-uzeit TO objtxt.
CONCATENATE 'Time Received : '(028) objtxt INTO objtxt.
APPEND objtxt.
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
Creation of the entry for the compressed document
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
APPEND objpack.
Creation of the document attachment
CALL FUNCTION 'SAVE_LIST'
EXPORTING
list_index = '0'
TABLES
listobject = listobject
EXCEPTIONS
list_index_invalid = 1
OTHERS = 2.
CALL FUNCTION 'TABLE_COMPRESS' "Schneller Tabellencopy
TABLES
in = listobject
out = so_ali.
DESCRIBE TABLE so_ali LINES tab_lines. "objbin
objhead = 'BOFA-REPORT'. APPEND objhead.
Creation of the entry for the compressed attachment
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'ALI'.
objpack-obj_name = 'BOFAREPORT'.
objpack-obj_descr = 'Bank Activity Report'.
objpack-doc_size = tab_lines * 255.
APPEND objpack.
Completing the recipient list
SELECT * FROM zwfi_yefap_paypr WHERE
bukrs = company_itab_tr-company_code.
IF NOT ( zwfi_yefap_paypr-list1 IS INITIAL ).
clear it_user[].
CALL FUNCTION 'SO_DLI_READ_API1'
EXPORTING
DLI_NAME = zwfi_yefap_paypr-list1
DLI_ID = ' '
SHARED_DLI = 'X'
IMPORTING
DLI_DATA =
TABLES
DLI_ENTRIES = it_user
EXCEPTIONS
DLI_NOT_EXIST = 1
OPERATION_NO_AUTHORIZATION = 2
PARAMETER_ERROR = 3
X_ERROR = 4
OTHERS = 5
IF SY-SUBRC = 0.
loop at it_user.
if it_user-member_typ = 'A'.
reclist-receiver = it_user-member_adr.
reclist-rec_type = 'U'.
reclist-com_type = 'INT'.
reclist-notif_del = 'X'.
reclist-notif_ndel = 'X'.
append reclist.
elseif it_user-member_typ = ''.
reclist-receiver = it_user-member_nam.
reclist-rec_type = 'B'.
reclist-express = 'X'.
append reclist.
Endif.
endloop.
ENDIF.
ENDIF.
IF NOT ( zwfi_yefap_paypr-list2 IS INITIAL ).
clear it_user[].
CALL FUNCTION 'SO_DLI_READ_API1'
EXPORTING
DLI_NAME = zwfi_yefap_paypr-list2
DLI_ID = ' '
SHARED_DLI = 'X'
IMPORTING
DLI_DATA =
TABLES
DLI_ENTRIES = it_user
EXCEPTIONS
DLI_NOT_EXIST = 1
OPERATION_NO_AUTHORIZATION = 2
PARAMETER_ERROR = 3
X_ERROR = 4
OTHERS = 5
IF SY-SUBRC = 0.
loop at it_user.
if it_user-member_typ = 'A'.
reclist-receiver = it_user-member_adr.
reclist-rec_type = 'U'.
reclist-com_type = 'INT'.
reclist-notif_del = 'X'.
reclist-notif_ndel = 'X'.
append reclist.
elseif it_user-member_typ = ''.
reclist-receiver = it_user-member_nam.
reclist-rec_type = 'B'.
reclist-express = 'X'.
append reclist.
Endif.
endloop.
ENDIF.
endif.
ENDSELECT.
CLEAR error_text.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
put_in_outbox = 'X'
COMMIT_WORK = 'X'
TABLES
packing_list = objpack
object_header = objhead
contents_bin = so_ali "objbin
contents_txt = objtxt
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
CASE sy-subrc.
WHEN 0.
write: / 'Result of the send process:'.
LOOP AT reclist.
write: / reclist-receiver(48), ':'.
IF reclist-retrn_code <> 0.
write 'The document was sent'.
else.
CONCATENATE 'The document could not be sent to : '(029)
reclist-receiver(48) INTO error_text.
ENDIF.
ENDLOOP.
WHEN 1.
error_text = text-030.
WHEN 2.
error_text = 'Document could not be sent to any recipient'(031).
WHEN 4.
error_text = 'No send authorization'(032).
WHEN OTHERS.
error_text = 'Error occurred while sending'(033).
ENDCASE.
IF NOT ( error_text IS INITIAL ).
CONCATENATE 'Mail send Error : '(034) error_text INTO error_text.
PERFORM WRITE_LOG(YEFAP_APERAK) USING ERROR_TEXT.
PERFORM write_log(zwfi_yefap_bank_report) USING error_text.
ENDIF.
CALL FUNCTION 'LIST_FREE_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1.
When I excute the same program in the foreground, Attachment in the mail is showing all the pages of the report output.
But when I excute the same program in the background only last page is shown in the mail attachemnt.
I think the problem is with the function module SAVE_LIST function module.
I replaced the SAVE_LIST function module with LIST_TO_MEMORY and LIST_FROM_MEMORY function modules.
It is also giving the same result.
In the foreground excution email attachemnt showing all the pages and in the background excution only last page is shown in the attachemnt.
I want all the pages dispalyed in the background mode excution in the email attachment.
How to slove this issue.
Thanks in advance.
RajaI have seen this problem before. Please have a look at this example program. This works very well when ran in background as well as foreground
* This program works in the background,
report zrich_0003 .
data: maildata like sodocchgi1.
data: mailtxt like solisti1 occurs 10 with header line.
data: mailrec like somlrec90 occurs 0 with header line.
data: list type table of abaplist with header line.
data: ascilines(1024) type c occurs 0 with header line.
data: htmllines type table of w3html with header line.
parameters: p_check.
start-of-selection.
submit zrich_0004 exporting list to memory and return.
call function 'LIST_FROM_MEMORY'
tables
listobject = list
exceptions
not_found = 1
others = 2.
call function 'LIST_TO_ASCI'
tables
listobject = list
listasci = ascilines
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
call function 'WWW_HTML_FROM_LISTOBJECT'
tables
html = htmllines
listobject = list.
clear: maildata, mailtxt, mailrec.
refresh: mailtxt, mailrec.
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test Subject'.
loop at htmllines.
mailtxt = htmllines.
append mailtxt.
endloop.
mailrec-receiver = '[email protected]'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'HTM'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
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.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
commit work.
wait up to 2 seconds.
submit rsconn01 with mode = 'INT'
with output = 'X'
and return.
Regards,
Rich Heilman -
PROBLEM WHILE SENDING MAILS TO MUTILPLE RECIPIENTS
hi,
while sending mails to multiple recipients,if any one of the mail id is invalid the mail is not being send to other valid mailids,how can this problem be resolved , so that other than the invalid recipient mail has to be send to other valid mailidsCOULD YOU PLEASE STOP SHOUTING?
CAN YOU TALK LOUDER, I CAN'T HEAR YOU! -
Problems while sending mail using java mail
hi all,
the following are the errors i get while sending a mail from my smtp local host-
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;
public class SendEmail
public static void main(String[] args)
System.out.println(args.length);
if (args.length != 6)
System.out.println("usage: sendmessage <to> <from> <smtphost> <true|false> <subject> <text>");
System.exit(1);System.out.println("jj"+args.length);
SendEmail m=new SendEmail();
m.SendMessage(args[0],args[1], args[2], args[3], args[4], args[5]);
public static String SendMessage(String emailto, String emailfrom, String smtphost, String emailmultipart, String msgSubject, String msgText)
boolean debug = false; // change to get more information
String msgText2 = "multipart message";
boolean sendmultipart = Boolean.valueOf(emailmultipart).booleanValue();
// set the host
Properties props = new Properties();
props.put("mail.smtp.host",smtphost);
props.put("mail.smtp.starttls.enable","true");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.sendpartial", "true");
Authenticator loAuthenticator = new SMTPAuthenticator();
System.out.println("f");
// create some properties and get the default Session
Session session = Session.getDefaultInstance(props, loAuthenticator );
session.setDebug(debug);
try
// create a message
Message msg = new MimeMessage(session);
// set the from
InternetAddress from = new InternetAddress(emailfrom);
msg.setFrom(from);
InternetAddress[] address =
new InternetAddress(emailto)
//InternetAddress ad=new InternetAddress(session);
msg.setRecipients(Message.RecipientType.TO, address);
System.out.println("fc");
msg.setSubject(msgSubject);
System.out.println("fvf");
if(!sendmultipart)
// send a plain text message
msg.setContent(msgText, "text/plain");
System.out.println("fif");
else
System.out.println("felsd");
// send a multipart message// create and fill the first message part
MimeBodyPart mbp1 = new MimeBodyPart();
mbp1.setContent(msgText, "text/plain");
// create and fill the second message part
MimeBodyPart mbp2 = new MimeBodyPart();
mbp2.setContent(msgText2, "text/plain");
// create the Multipart and its parts to it
Multipart mp = new MimeMultipart();
mp.addBodyPart(mbp1);
mp.addBodyPart(mbp2);
// add the Multipart to the message
msg.setContent(mp);
Transport transport = session.getTransport("smtp");
transport.connect(smtphost,"[email protected]","xyz");
msg.saveChanges();
System.out.println("fconn");
//transport.sendMessage(msg,msg.getAllRecipients());
transport.sendMessage(msg,msg.getAllRecipients());
transport.close();
//Transport.send(msg);
catch(MessagingException mex)
mex.printStackTrace();
return "Email sent to " + emailto;
class SMTPAuthenticator extends Authenticator
public PasswordAuthentication getPasswordAuthentication()
String username = "[email protected]";
String password = "xyz";
return new PasswordAuthentication(username, password);
i dont understand what the problem is..inspite of having the right code..
i guess some firewall problem..
can somebody help me please..il be highly obliged..thanks..hi all,
the following are the errors i get while sending a mail from my smtp local host-
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;
public class SendEmail
public static void main(String[] args)
System.out.println(args.length);
if (args.length != 6)
System.out.println("usage: sendmessage <to> <from> <smtphost> <true|false> <subject> <text>");
System.exit(1);System.out.println("jj"+args.length);
SendEmail m=new SendEmail();
m.SendMessage(args[0],args[1], args[2], args[3], args[4], args[5]);
public static String SendMessage(String emailto, String emailfrom, String smtphost, String emailmultipart, String msgSubject, String msgText)
boolean debug = false; // change to get more information
String msgText2 = "multipart message";
boolean sendmultipart = Boolean.valueOf(emailmultipart).booleanValue();
// set the host
Properties props = new Properties();
props.put("mail.smtp.host",smtphost);
props.put("mail.smtp.starttls.enable","true");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.sendpartial", "true");
Authenticator loAuthenticator = new SMTPAuthenticator();
System.out.println("f");
// create some properties and get the default Session
Session session = Session.getDefaultInstance(props, loAuthenticator );
session.setDebug(debug);
try
// create a message
Message msg = new MimeMessage(session);
// set the from
InternetAddress from = new InternetAddress(emailfrom);
msg.setFrom(from);
InternetAddress[] address =
new InternetAddress(emailto)
//InternetAddress ad=new InternetAddress(session);
msg.setRecipients(Message.RecipientType.TO, address);
System.out.println("fc");
msg.setSubject(msgSubject);
System.out.println("fvf");
if(!sendmultipart)
// send a plain text message
msg.setContent(msgText, "text/plain");
System.out.println("fif");
else
System.out.println("felsd");
// send a multipart message// create and fill the first message part
MimeBodyPart mbp1 = new MimeBodyPart();
mbp1.setContent(msgText, "text/plain");
// create and fill the second message part
MimeBodyPart mbp2 = new MimeBodyPart();
mbp2.setContent(msgText2, "text/plain");
// create the Multipart and its parts to it
Multipart mp = new MimeMultipart();
mp.addBodyPart(mbp1);
mp.addBodyPart(mbp2);
// add the Multipart to the message
msg.setContent(mp);
Transport transport = session.getTransport("smtp");
transport.connect(smtphost,"[email protected]","xyz");
msg.saveChanges();
System.out.println("fconn");
//transport.sendMessage(msg,msg.getAllRecipients());
transport.sendMessage(msg,msg.getAllRecipients());
transport.close();
//Transport.send(msg);
catch(MessagingException mex)
mex.printStackTrace();
return "Email sent to " + emailto;
class SMTPAuthenticator extends Authenticator
public PasswordAuthentication getPasswordAuthentication()
String username = "[email protected]";
String password = "xyz";
return new PasswordAuthentication(username, password);
i dont understand what the problem is..inspite of having the right code..
i guess some firewall problem..
can somebody help me please..il be highly obliged..thanks.. -
Problem while sending mail inOIM 11g r2 after usercreation
Hi,
By default OIM sends mail to user mail id when the user created. i have tested this scenario using test mail server, it is working fine . when i am trying this scenario using exchange mail server, it is throwing errors. for Exchange just i have changed IT resource parameters.
Authentication true
Server Name ip address of the Exchange server
User Login [email protected]
User Password *************
is there anything missing. for SMTP server is ums nedded ?.
<Oct 1, 2012 7:07:51 AM EDT> <Error> <oracle.iam.notification.impl> <BEA-000000> <Provider UMSEmailServiceProvider has encountered exception : javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Message send failed: Connection refused>
<Oct 1, 2012 7:07:51 AM EDT> <Error> <oracle.iam.notification.impl> <BEA-000000> <Sending notification with Provider UMSEmailServiceProvider has encountered exception : Error occured while Sending Notification through Provider UMSEmailServiceProvider : javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Message send failed: Connection refused>
<Oct 1, 2012 7:07:51 AM EDT> <Error> <oracle.iam.notification.impl> <BEA-000000> <Sending notification with Provider UMSEmailServiceProvider detailed exception : javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Message send failed: Connection refused>
<Oct 1, 2012 7:07:52 AM EDT> <Error> <oracle.iam.notification.provider> <BEA-000000> <300>
<Oct 1, 2012 7:07:52 AM EDT> <Error> <oracle.iam.notification.impl> <BEA-000000> <Provider SOAEmailServiceProvider has encountered exception : java.lang.IllegalArgumentException: 300>
<Oct 1, 2012 7:07:52 AM EDT> <Error> <oracle.iam.notification.impl> <BEA-000000> <Sending notification with Provider SOAEmailServiceProvider has encountered exception : Error occured while Sending Notification through Provider SOAEmailServiceProvider : java.lang.IllegalArgumentException: 300>
<Oct 1, 2012 7:07:52 AM EDT> <Error> <oracle.iam.notification.impl> <BEA-000000> <Sending notification with Provider SOAEmailServiceProvider detailed exception : java.lang.IllegalArgumentException: 300>
<Oct 1, 2012 7:07:52 AM EDT> <Error> <oracle.iam.notification.impl> <BEA-000000> <Provider EmailServiceProvider has encountered exception : null>
Thanks,Given below steps in oracle doc for UMS configuration. you can try the same
Configuring UMS Provider for Sending Notifications (Optional)
To configure Unified Messaging Service (UMS) provider for sending notifications:
Edit the oim-config.xml file by using MBeans. To do so:
Log in to Oracle Enterprise Manager.
Navigate to Identity and Access, oim.
Right-click oim(11.1.1.x.x), and select System MBean Browser.
In the System MBean Browser, navigate to Application Defined MBeans, oracle.iam, Server: oim_server1, Application:oim, XMLConfig, Config, XMLConfig.NotificationConfig, EmailProvider.
Click the EmailProvider attribute, and replace the value oracle.iam.notification.provider.EmailServiceProvider with oracle.iam.notification.provider.UMSEmailServiceProvider.
Click Apply.
Configure the Email Provider Instance - UMS IT resource with the UMS Web service details. To do so:
Login to Oracle Identity Manager Administrative and User Console, and navigate to Advanced Administration.
Click the Configuration tab, click Resource Management, and then click Manage IT Resource.
Click Search. The list of IT resources is displayed.
For the Email Provider Instance - UMS IT resource, click the Edit icon. The Edit IT Resource Details and Parameters page is displayed.
Specify values in the following fields:
Web service URL: The URL of the UMS web service to be invoked. For example, http://<SOA_host>:<SOA_Port>/ucs/messaging/webservice.
Policies: The OWSM policy attached to the given web service. Leave this field as blank.
Username: The username provided in the security header. If no policy is attached, then leave this field as blank.
Password: The password provided in the security header. If no policy is attached, then leave this field as blank.
Click Apply, and then close the popup window.
Configure UMS Server for using a mail server other than the local LINUX mail server, which is picked by default. For example, to setup the mail server to use stbeehive email server:
Stop the Linux Local sendmail email server running on the host, if this is a LINUX host, by running the following command:
/usr/local/redhat/packages/aime/ias/run_as_root "/sbin/service sendmail stop"
Configure Mail Server information in UMS Email Driver. To do so:
i. Login to Oracle Enterprise Manager.
ii. Expand User Messaging Service, and select usermessagingdriver-email (soa_server1).
iii. From the Driver-Specific Configuration list, select Email Driver Properties.
iv. Configure the following mandatory fields:
OutgoingMailServer: The name of the SMTP server, for example, mailserver.mycompany.com.
OutgoingMailServerPort: The port number of the SMTP server, for example, 465.
OutgoingMailServerSecurity: The security setting used by the SMTP server. Possible values can be None, TLS, or SSL.
OutgoingUsername: Any valid username similar to your mail client configuration, such as in the [email protected].
OutgoingPassword: The password used for SMTP authentication. This consists of the following fields:
Type of Password: Select Indirect Password, Create New User.
Indirect Username/Key: Enter a unique string, for example, OIMEmailConfig. This masks the password and does not expose it in clear text in the configuration file.
Password: Enter a valid password for this account.
v. Click Apply.
Right-click usermessagingdriver-email (soa_server1), and select Control, Shutdown.
Allow at least 2 minutes to pass, after which you can restart the email driver. To so so, right-click usermessagingdriver-email (soa_server1), and select Control, Restart.
Maybe you are looking for
-
Can't get apps to work or download new ones!
I go to the ovi store, try to download an app but everytime i do i get "Unable to download "fennec". Application package not found. The weird thing is all the apps Utilities 0.00MB. And I just realised apps like Facebook and amazon have the same prob
-
Budget and Planning KP06 and CJR2
Does anybody know about function/BAPI that inputs the budget for cost center (trans. KP06) and projects/WBS (trans. CJR2). I want to stop using BDC and use the function instead. I looked at function BAPI_COSTACTPLN_POSTACTINPUT and its group; they do
-
EDI810== INVOICE== INVOIC02 IDOC == Need Form for output
Anybody know the the best Sapscript form or Smartform to use in this case. I'll probably be creating the form from the invoice in MIR4.....Thank-You.
-
Aplle tv clignotante et écran noir.
bonjour j'ais toute essayer se kil y a sur le site apple pr remettre mon aplle tv en route mais il revie toujour a un écran noir aprés quil se soit rallumé. et le voyant se remet a clignoter. merci d'avance de votre aide.
-
Disable handling multimedia keys by Xserver
Hi there, i've got problem with multimedia keys. Yes, i want disable it. Earlier(some time ago) i had my own handling scripts in acpi, that were using acpi_fakekey known from debian/ubuntu, to generate key action in Xserver. Some day, i have seen, th