Error getting while sending the Mails using 'SO_NEW_DOCUMENT_ATT_SEND_API1'
Hi ALL,
I HAVE THE REQUIREMENT AS SEND A REPORT AS A MAIL. IAM USING FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' WHILE EXECUTING ITS NOT SHOWING ANY ERROR. BUT IAM NOT GETTING ANY MAIL. I CHECKED IN 'SOST' TCODE. THERE I SEE A MESSAGE LIKE 'CANNOT PROCESS THE MSG TYPE IN SAP SYSTEM'. PLS TELL ME THE WHAT IS THE PROBLE.
Hi
Please dont write in Capital letters, it considered as shouting. Hope you are aware of the forum rules.
You can check if you have made anything wrong in coding by referring wiki link.
[Sending Mails |http://wiki.sdn.sap.com/wiki/display/ABAP/SendingMails-HomePage]
Regards
Abhii
Similar Messages
-
Azure Sql DB Export to Storage Container fails with "An error occurred while sending the request"
I've built a new VM from which I'm running PowerShell scripts to backup my databases. It had worked before on an old server for several months, and worked once on the new server, then I upgraded my Azure PowerShell cmdlets, and haven't been able to
get it to work again. The new version is 0.8.10.1.
Below is my source code, with sensitive stuff replaced with ?'s. When I display the $stctx and $dbctx, they seem to have reasonable values. I added the IP address of the server as an exception to the db firewall, and I've installed SQL Server
Mangement Studio and verified that I can connect to the database. I have a feeling there's something simple I've overlooked.
Here's are both error messages:
Start-AzureSqlDatabaseExport : An error occurred while sending the request.
At C:\Users\Public\PublicCmds\test.ps1:29 char:1
+ Start-AzureSqlDatabaseExport -SqlConnectionContext $dbctx -StorageContext $stctx ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-AzureSqlDatabaseExport], HttpRequestException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet.StartAzureSqlDatabaseExport
Start-AzureSqlDatabaseExport : Error while copying content to a stream.
At C:\Users\Public\PublicCmds\test.ps1:29 char:1
+ Start-AzureSqlDatabaseExport -SqlConnectionContext $dbctx -StorageContext $stctx ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-AzureSqlDatabaseExport], HttpRequestException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet.StartAzureSqlDatabaseExport
Here is the source code:
param($dbname)
if ($dbname -eq $null) {
write-host "Database code must be specified"
return
$password = "????"| ConvertTo-SecureString -asPlainText -Force
$servercredential = new-object System.Management.Automation.PSCredential("????", $password)
$dbsize = 1
$dbrestorewait = 10
$dbserver = "????"
$stacct = $dbname
$stkey = "????"
$stctx = New-AzureStorageContext -StorageAccountName $stacct -StorageAccountKey $stkey
$dbctx = New-AzureSqlDatabaseServerContext -ServerName $dbserver -Credential $servercredential
$dt = Get-Date
$timestamp = "_" + $dt.Year + "-" + ("{0:D2}" -f $dt.Month) + "-" + ("{0:D2}" -f $dt.Day) + "-" + ("{0:D2}" -f $dt.Hour) + ("{0:D2}" -f $dt.Minute)
$bkupname = $dbname + $timestamp + ".bacpac"
write-host "db context"
$dbctx
write-host "storage context"
$stctx
write-host "Backup $dbname to $bkupname"
Start-AzureSqlDatabaseExport -SqlConnectionContext $dbctx -StorageContext $stctx -StorageContainerName databasebackup -DatabaseName $dbname -BlobName $bkupnameHi Brad,
Mentioned script, with appropriate values, works on my system.
I'm able to export an Azure SQL database to blob storage. Am using version 0.8.10.1 of cmdlets, so this the same version mentioned in this problem description.
Can you please try using Add-AzureAccount and check if that helps. This is indicated in a different third-party blog.
http://answers.flyppdevportal.com/categories/azure/azuretroubleshooting.aspx?ID=8aee89fe-430e-45fe-af54-7c8ed3ac60e1%29."http://answers.flyppdevportal.com/categories/azure/azuretroubleshooting.aspx?ID=8aee89fe-430e-45fe-af54-7c8ed3ac60e1
Does it work from a different machine with newly downloaded credentials.
Does it work for a newly created database (so minimal database size).
If above do not work, we may require additional details like RequestID, StorageAccountName, ServerName so an MS ticket may be more appropriate.
Girish Prajwal -
An error occurred while sending the message
I compose a email.When I click the send link ,an error occurs. The error page said "An error occurred while sending the message". Could anybody tell me what's wrong. Thanks.
Hi,
lsnrctl is not not able to start listener running on ports < 1024. Try starting the listener with the tnslsnr tool directly. My recommendation is to start it as root directly, so you don't have to set the s-bit.
<midtier_home>/bin/tnslsnr listener_es -u <uid> -g <grpid> &
Regards
Christian -
Error while sending the data using input schedule
Dear Friends,
I am unable to send the data using input schedule due to following error is occur while sending the data.
The Error Message : Member (H1) of dimension (ENTITY) is not a base member (parent or formula)
Can anyone please help me to resolve the above error.
Thanks and regards,
MD.Hi,
You are trying to send data to a parent/node, you can only send data in BPC to lowest-level children (base mamabers) of any dimension.
"H1" is a parent in the entity dimension so you should try sending to a child.
Tom. -
I want to generate an Accountname using EmployeeID, FirstName and LastName via a workflow.
I'm using the Granfeldt Workflow Activity Library (https://fimactivitylibrary.codeplex.com/)
I'm using the FIM Powershell Workflow Activity (https://fimpowershellwf.codeplex.com/)
Steps:
Passing the EmployeeID, FirstName and LastName to the powershell Activity, generating a logonid based on logic.
Add-PSSnapin FIMAutomation
$EmployeeID = $fimwf.WorkflowDictionary.EmployeeID
$Forename = $fimwf.WorkflowDictionary.Firstname
$Lastname = $fimwf.WorkflowDictionary.Lastname
'logic creating a custom logonid here
==> This works
Returning data back to the workflow via that powershell script:
$fimwf.WorkflowDictionary.Add('NewAccountName',$newlogonid)
==> This works
Using Lookup Value Activity to read the Workflow data and update the [//Target/AccountName] fails.
This gives an error:
An error occurred while enumerating the filter 'string' .
(where string is the actual generated userid that I've got back from the powershell script. Example dab2563)
I tried with only [//WorkflowData], then this gives the error:
Index was outside the bounds of the array.
Any hints to solve this?
Kind regards,
DavidThe Lookup Activity is for looking up an object in the FIM Service. Seems like thats not what you're trying to accomplish.
For updating the target of the workflow, just use the built-in Function Evaluator. The Lookup WF was not built for that and it is failing because you have not specified a valid XPAth lookup filter, such as /Person[AccountName='BillG']
Regards, Soren Granfeldt
blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt -
Error while sending a mail using UTP_MAIL package in Oracle 10g
Hi,
We are using UTP_MAIL package to send a mail from Oracle 10g.We have follwed the following steps ...
SQL> connect sys/password as sysdba
Connected.
SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sql
Package created.
Synonym created.
SQL> @$ORACLE_HOME /rdbms/admin/prvtmail.plb
Package body created.
SQL > alter system set smtp_out_server = '<mail_server_ip:25>' scope =spfile;
System altered..
Now we try the code
begin
utl_mail.send(
sender => 'sender's mail',
recipients => 'receiver mail',
CC => 'optional',
subject => 'Testing utl_mail',
message => 'Test Mail'
end;
But we get the following error...
ERROR at line 1:
ORA-29278: SMTP transient error: 421 Service not available
ORA-06512: at "SYS.UTL_SMTP", line 21
ORA-06512: at "SYS.UTL_SMTP", line 97
ORA-06512: at "SYS.UTL_SMTP", line 139
ORA-06512: at "SYS.UTL_MAIL", line 405
ORA-06512: at "SYS.UTL_MAIL", line 594
ORA-06512: at line 2
We also tried connecting to the mail server through telnet .But it is not getting connected..
Please help us to solve the issue.From your own posting you may have the clue, if you try to access your mail server through telnet and it is not successful, it means the service is down or there are networking issues.
On pre 10gR2 versions there was a bug 4083461.8. It could affect you if you are on 10gR1
"Bug 4083461 - UTL_SMTP.OPEN_CONNECTION in shared server fails with ORA-29278 Doc ID: Note:4083461.8"
This was fixed on 10gR2 base and on 9.2.0.8.0
~ Madrid -
Hello guys,
I am facing the error " Database error for <ADDR_PERS_COMP_COMM_GET> <0> " as a pop-up message.
below is my program.
types: BEGIN OF t_p0002,
pernr type PERSNO, "Personnel number
nachn TYPE PAD_NACHN, "Last Name
VORNA TYPE PAD_VORNA, "First Name
gbdat TYPE gbdat, "Date of Birth
END OF t_p0002.
*******************Data of an object which can be changed**************************************
data S_maildata type SODOCCHGI1.
*******************Text field length 255: texts***********************************************
data : IT_MAILTXT1 type table of SOLISTI1 , "Internal table will contain texts of mail header
WA_MAILTXT1 TYPE SOLISTI1,
IT_MAILTXT2 type table of SOLISTI1 , "Internal table will contain texts of contents in the mail
WA_MAILTXT2 TYPE SOLISTI1.
*******************Structure of the API Recipient List*****************************************
data : IT_MAILREC type table of SOMLRECI1,
WA_MAILREC TYPE SOMLRECI1.
DATA : it_pa0002 TYPE TABLE OF t_p0002,
wa_pa0002 type t_p0002.
data Header_text type c LENGTH 15.
CONSTANTS content_text type c LENGTH 35 VALUE 'Tomorrow is the birthday of'.
*******************Event start of selection***************************************************
start-of-selection.
PERFORM get_birthdate. " will give birthday details
PERFORM document_details. " will give text and mail details
*& Form get_birthdate
text : subroutine to get employee birthdate details
form get_birthdate.
data : l_date like sy-datum.
refresh it_pa0002.
l_date = sy-datum + 1.
SELECT pernr nachn vorna gbdat
from pa0002
INTO TABLE it_pa0002
where gbdat = '19650302'.
ENDFORM. "get_birthdate
*& Form document_details
text : subroutine to get texts and mail details.
FORM document_details.
CLEAR: Header_text,
wa_MAILREC.
REFRESH IT_MAILREC.
S_maildata-obj_name = 'Birthday Reminder'.
s_maildata-obj_descr = 'Birthday Reminder'.
s_maildata-obj_langu = sy-langu.
READ TABLE IT_MAILTXT1 INTO WA_MAILTXT1
WITH KEY WA_MAILTXT1-line .
WA_MAILTXT1-line = 'Birthday Reminder'.
append WA_MAILTXT1 TO IT_MAILTXT1.
CLEAR WA_MAILTXT1.
LOOP at it_pa0002 INTO wa_pa0002.
READ TABLE IT_MAILTXT2 INTO WA_MAILTXT2
WITH KEY WA_MAILTXT2-line .
CONCATENATE content_text ' ( ' wa_pa0002-pernr ' ) ' wa_pa0002-nachn wa_pa0002-vorna
INTO WA_MAILTXT2 SEPARATED BY ' '.
append WA_MAILTXT2 TO IT_MAILTXT2.
CLEAR WA_MAILTXT2.
CLEAR wa_pa0002.
ENDLOOP.
LOOP AT IT_MAILREC INTO WA_MAILREC.
WA_MAILREC-RECEIVER = 'Any mail id'.
WA_MAILREC-rec_type = 'U'.
append WA_MAILREC TO IT_MAILREC.
ENDLOOP.
********************Function Mofule:To Send new Document*****************************************
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = S_maildata
DOCUMENT_TYPE = 'RAW'
PUT_IN_OUTBOX = ' '
COMMIT_WORK = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
tables
OBJECT_HEADER = IT_MAILTXT1
OBJECT_CONTENT = IT_MAILTXT2
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
receivers = IT_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.
ENDFORM. "document_details
After I pressed the exit button the program is getting terminated but still this mail is comming to sost transaction code.
If I will comment the message code which is after sy-subrc the popup will not come and program will work without any interruption.
Can anybody please solve this problem?Resolved
-
Hi,
I have a requirement to send the details of an internal table to External mail as an attachment. I have used fn.module 'SO_NEW_DOCUMENT_ATT_SEND_API1' to do so. I am getting the attachment but the data is stored in only one row when we checked it in SAP outbox. This is irrespective of TXT, XLS etc. I can not check the exact file in my external mail inbox as the connection is not established in dev & Quality systems. This question was raised earlier by other guys and there was no correct answer provided. If any of you encountered this type of problem & got the solution please help.
Thanks,
AshokHi Buddy,
Hope this piece of code will definately help you out, Its working at my end.
Thanks,
Krishna..
FORM p_send_email .
FIELD-SYMBOLS: <field> TYPE ANY.
DATA : BEGIN OF i_dload OCCURS 0 ,
dload(1000) ,
END OF i_dload .
DATA: it_receivers LIKE somlreci1 OCCURS 1 WITH HEADER LINE,
w_object_content LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA: w_doc_data LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE.
DATA :w_records TYPE zres_records.
DATA: w_rsnum(10),
w_bdmng(14),
w_meins(4).
DATA: ws_email LIKE adr6-smtp_addr. "for internal e_mail address
DATA: ws_email1 LIKE adr6-smtp_addr. "for external e_mail address
*--Internal table declaration
DATA: it_objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
DATA: it_objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA: it_objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: it_objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: it_reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE.
DATA: doc_chng LIKE sodocchgi1.
DATA: tab_lines LIKE sy-tabix.
DATA: w_longtext(500) TYPE c.
DATA: v_date(10) TYPE c.
DATA: text(200) TYPE c.
DATA: w_text(50) TYPE c.
*--Get receipient address
CLEAR it_reclist.
*--To send error to internal mail
ws_email = p_email.
*--To send error to external mail
ws_email1 = p_email1.
*---setting name of file for csv
CONCATENATE text-003 p_bdoc text-004 INTO w_filename.
CONDENSE w_filename NO-GAPS.
IF flag <> 1.
IF p_email1 IS NOT INITIAL.
build body of message
CONCATENATE 'disply message ' ' ' INTO it_objtxt
SEPARATED BY space.
APPEND it_objtxt.
CLEAR it_objtxt.
it_reclist-receiver = ws_email1.
it_reclist-rec_type = c_u.
it_reclist-express = ' '.
it_reclist-com_type = 'INT'.
APPEND it_reclist.
Set title of object and email
CLEAR: w_text.
CONCATENATE 'Greenheck Packing List Data'
INTO w_text SEPARATED BY space.
doc_chng-obj_descr = text-005. "w_text.
doc_chng-obj_name = 'Inbound EDI'.
DESCRIBE TABLE it_objtxt LINES tab_lines.
READ TABLE it_objtxt INDEX tab_lines.
doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_objtxt ).
*--Move the Report Name as the Heading line for email file
CLEAR: w_longtext.
MOVE: text-012 TO w_longtext.
w_longtext = 'name of report for testing'.
it_objbin = w_longtext.
APPEND it_objbin. CLEAR it_objbin.
*--Append Blank Lines
APPEND it_objbin. CLEAR it_objbin.
APPEND it_objbin. CLEAR it_objbin.
*User name
CLEAR text.
MOVE: 'User:' TO text,
sy-uname TO text+6.
it_objbin = text.
APPEND it_objbin. CLEAR it_objbin.
---appending heading to Internal table of Email
CLEAR: w_longtext, w_xblnr_1 , w_aubel_1, w_vemng_1,
w_matnr_1, w_harmdesc_1, w_hc_1, w_cooland1_1,
w_brgew_1, w_tknum_1, w_vbeln_1, w_vbeln1_1,
w_exidv_1, w_vhilm_1, w_pack_no_1,
w_brgew1_1, w_laeng_1, w_breit_1,
w_hoehe_1, w_vol_1.
w_xblnr_1 = 'Cust PO No.'.
w_aubel_1 = 'Sal Order'.
w_vemng_1 = 'Pack Qty'.
w_matnr_1 = 'Model no.'.
w_harmdesc_1 = 'Hrm Desc'.
w_hc_1 = 'Hrm Code'.
w_cooland1_1 = 'Country of Origin'.
w_brgew_1 = 'Net Wt.'.
w_tknum_1 = 'Shipment'.
w_vbeln_1 = 'Billing Doc'.
w_vbeln1_1 = 'Delivery'.
w_exidv_1 = 'Pkg ID'.
w_vhilm_1 = 'Pkg Desc'.
w_pack_no_1 = 'Pkg No.'.
w_brgew1_1 = 'Gross Wt'.
w_laeng_1 = 'Length'.
w_breit_1 = 'Width'.
w_hoehe_1 = 'Height'.
w_vol_1 = 'Cubic Mtr'.
CONCATENATE w_xblnr_1 w_aubel_1 w_vemng_1
w_matnr_1 w_harmdesc_1 w_hc_1 w_cooland1_1
w_brgew_1 w_tknum_1 w_vbeln_1 w_vbeln1_1
w_exidv_1 w_vhilm_1 w_pack_no_1
w_brgew1_1 w_laeng_1 w_breit_1
w_hoehe_1 w_vol_1
INTO w_longtext SEPARATED BY ','.
it_objbin = w_longtext.
APPEND it_objbin. CLEAR it_objbin.
LOOP AT it_tab.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE it_tab TO <field>.
IF sy-subrc <> 0.
EXIT.
ENDIF.
Look for Commas in the field value. If it exists, put quotes around
value so that the file opens correctly with all the columns aligned
in Excel.
SEARCH <field> FOR ',' IN CHARACTER MODE.
If search for commas was successful.
IF sy-subrc = 0.
CONCATENATE '"' <field> '"' INTO <field> IN CHARACTER MODE.
ENDIF.
IF sy-index = 1.
i_dload-dload = <field>.
SHIFT: i_dload-dload LEFT DELETING LEADING space.
ELSE.
Put Comma as a separator for values in IT_DLOAD internal table
SHIFT: i_dload-dload LEFT DELETING LEADING space.
CONCATENATE i_dload-dload <field> INTO i_dload-dload
SEPARATED BY ',' IN CHARACTER MODE.
ENDIF.
ENDDO.
it_objbin = i_dload-dload.
APPEND it_objbin. CLEAR it_objbin.
ENDLOOP.
flag = 1.
endif.
ENDIF.
---if to send error file.
IF p_email IS NOT INITIAL.
build body of message
CONCATENATE 'Errors in file ' ' ' INTO it_objtxt
SEPARATED BY space.
APPEND it_objtxt.
CLEAR it_objtxt.
it_reclist-receiver = ws_email.
it_reclist-rec_type = c_u.
it_reclist-express = ' '.
it_reclist-com_type = 'INT'.
APPEND it_reclist.
Set title of object and email
CLEAR: w_text.
CONCATENATE 'Greenheck Packing List Data'
INTO w_text SEPARATED BY space.
doc_chng-obj_descr = text-005.
doc_chng-obj_name = 'Inbound EDI'.
DESCRIBE TABLE it_objtxt LINES tab_lines.
READ TABLE it_objtxt INDEX tab_lines.
doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_objtxt ).
*--Move the Report Name as the Heading line for email file
CLEAR: w_longtext.
MOVE: text-012 TO w_longtext.
w_longtext = 'name of report for testing'.
it_objbin = w_longtext.
APPEND it_objbin. CLEAR it_objbin.
*--Append Blank Lines
APPEND it_objbin. CLEAR it_objbin.
APPEND it_objbin. CLEAR it_objbin.
*User name
CLEAR text.
MOVE: 'User:' TO text,
sy-uname TO text+6.
it_objbin = text.
APPEND it_objbin. CLEAR it_objbin.
---appending heading to Internal table of Email
CLEAR: w_longtext, w_xblnr_1 , w_aubel_1, w_vemng_1,
w_matnr_1, w_harmdesc_1, w_hc_1, w_cooland1_1,
w_brgew_1, w_tknum_1, w_vbeln_1, w_vbeln1_1,
w_exidv_1, w_vhilm_1, w_pack_no_1,
w_brgew1_1, w_laeng_1, w_breit_1,
w_hoehe_1, w_vol_1, w_error.
w_xblnr_1 = 'Cust PO No.'.
w_aubel_1 = 'Sal Order'.
w_vemng_1 = 'Pack Qty'.
w_matnr_1 = 'Model no.'.
w_harmdesc_1 = 'Hrm Desc'.
w_hc_1 = 'Hrm Code'.
w_cooland1_1 = 'Counrty of Origin'.
w_brgew_1 = 'Net Wt.'.
w_tknum_1 = 'Shipment'.
w_vbeln_1 = 'Billing doc'.
w_vbeln1_1 = 'Delivery'.
w_exidv_1 = 'Pkg ID'.
w_vhilm_1 = 'Pkg Desc'.
w_pack_no_1 = 'Pkg No.'.
w_brgew1_1 = 'Gross Wt'.
w_laeng_1 = 'Length'.
w_breit_1 = 'Width'.
w_hoehe_1 = 'Height'.
w_vol_1 = 'Cubic Mtr'.
w_error = 'Error'.
CONCATENATE w_xblnr_1 w_aubel_1 w_vemng_1
w_matnr_1 w_harmdesc_1 w_hc_1 w_cooland1_1
w_brgew_1 w_tknum_1 w_vbeln_1 w_vbeln1_1
w_exidv_1 w_vhilm_1 w_pack_no_1
w_brgew1_1 w_laeng_1 w_breit_1
w_hoehe_1 w_vol_1 w_error
INTO w_longtext SEPARATED BY ','.
it_objbin = w_longtext.
APPEND it_objbin. CLEAR it_objbin.
*--Append the details to Internal table of Email
LOOP AT it_tab.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE it_tab TO <field>.
IF sy-subrc <> 0.
EXIT.
ENDIF.
Look for Commas in the field value. If it exists, put quotes around
value so that the file opens correctly with all the columns aligned
in Excel.
SEARCH <field> FOR ',' IN CHARACTER MODE.
If search for commas was successful.
IF sy-subrc = 0.
CONCATENATE '"' <field> '"' INTO <field> IN CHARACTER MODE.
ENDIF.
IF sy-index = 1.
i_dload-dload = <field>.
SHIFT: i_dload-dload LEFT DELETING LEADING space.
ELSE.
Put Comma as a separator for values in IT_DLOAD internal table
SHIFT: i_dload-dload LEFT DELETING LEADING space.
CONCATENATE i_dload-dload <field> INTO i_dload-dload
SEPARATED BY ',' IN CHARACTER MODE.
ENDIF.
ENDDO.
it_objbin = i_dload-dload.
APPEND it_objbin. CLEAR it_objbin.
ENDLOOP.
flag = 0.
endif.
-Convert to correct format----
CALL FUNCTION 'SO_RAW_TO_RTF'
TABLES
objcont_old = it_objbin
objcont_new = it_objbin.
create the control table entry for the main email
DESCRIBE TABLE it_objtxt LINES tab_lines.
CLEAR it_objpack-transf_bin.
it_objpack-head_start = 1.
it_objpack-head_num = 0.
it_objpack-body_start = 1.
it_objpack-body_num = tab_lines.
it_objpack-doc_type = 'RAW'.
APPEND it_objpack.
DESCRIBE TABLE it_objbin LINES tab_lines.
it_objpack-head_start = 1.
it_objpack-head_num = 0.
it_objpack-body_start = 1.
it_objpack-body_num = tab_lines.
it_objpack-transf_bin = c_x.
it_objpack-doc_type = 'CSV'.
it_objpack-obj_descr = w_filename. "'billing doc no.csv'.
it_objpack-obj_name = 'Billing Doc'.
it_objpack-doc_size = tab_lines * 255.
APPEND it_objpack.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
PUT_IN_OUTBOX = c_x
commit_work = c_x
TABLES
packing_list = it_objpack
object_header = it_objhead
contents_bin = it_objbin
contents_txt = it_objtxt
receivers = it_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
IF sy-subrc <> 0.
WRITE: / 'failure in sending mail'.
ELSE.
if flag = 0.
MESSAGE s999(pp) WITH text-007.
endif.
if flag = 1.
MESSAGE s999(pp) WITH text-006.
endif.
WRITE: / 'success in sending mail'.
ENDIF.
ENDFORM. " p_send_email -
Good Afternoon,
I'm using the following code to send e-Mails:
LOOP AT t_z3emailusr INTO w_z3emailusr.
t_receivers-receiver = w_z3emailusr-email.
t_receivers-rec_type = 'U'.
t_receivers-express = 'X'.
APPEND t_receivers.
ENDLOOP.
MOVE text-003 TO t_mailtxt-line.
APPEND t_mailtxt.
CLEAR t_mailtxt-line.
APPEND t_mailtxt.
MOVE text-001 TO t_mailtxt-line.
APPEND t_mailtxt.
CLEAR t_mailtxt-line.
APPEND t_mailtxt.
LOOP AT t_apqi INTO w_apqi.
MOVE w_apqi-groupid TO t_mailtxt-line.
APPEND t_mailtxt.
ENDLOOP.
MOVE text-002 TO t_mailtxt-line.
APPEND t_mailtxt.
CLEAR t_mailtxt-line.
APPEND t_mailtxt.
MOVE text-003 TO t_mailtxt-line.
APPEND t_mailtxt.
MOVE text-004 TO t_mailtxt-line.
APPEND t_mailtxt.
CLEAR t_mailtxt.
DESCRIBE TABLE t_mailtxt LINES mailtxt_size.
MOVE text-000 TO t_doc_att-obj_descr.
MOVE sy-langu TO t_doc_att-obj_langu.
MOVE 'O' TO t_doc_att-sensitivty.
t_doc_att-doc_size = mailtxt_size * 255.
CLEAR t_mailpack-transf_bin.
MOVE 1 TO t_mailpack-head_start.
CLEAR t_mailpack-head_num.
MOVE 1 TO t_mailpack-body_start.
MOVE mailtxt_size TO t_mailpack-body_num.
MOVE 'HTM' TO t_mailpack-doc_type.
MOVE sy-langu TO t_mailpack-obj_langu.
APPEND t_mailpack.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = t_doc_att
put_in_outbox = 'X'
TABLES
packing_list = t_mailpack
contents_txt = t_mailtxt
receivers = t_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.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Everything is ok except for the text...
Although i'm appending lines in t_mailtxt the text of the e-mail is continuous...
How to display text with "line breaks"? Do i need to change the doc_type of t_mailpack?
Regards,
Pedro GasparYes .. change the doc_type.
-
Sending external mail using SO_NEW_DOCUMENT_ATT_SEND_API1
When i use this RFC by appending the internal table receiver with receiver: sapuser name and rec_type B it triggers mail to the sap user login .But when i give external email address for receiver with rec_type 'U' it is not triggering any mail.Can anyone please tell me how to use this RFC in sending external mails??
I went back and you are right "INT" was not the REC_TYPE it was the COM_TYPE.
Sorry for any confusion caused.
However,
I suggest 2 more tests and then I give up and can not think about anything else.
Try:
#1
REC_TYPE = 'X'.
if it does not work.
#2
REC_TYPE = 'R'.
Hope that will do the trick. I was trying a lot when I had to get that working some time ago.
And surely the other colleagues point to something which must be setup as well. Transaction SCOT the SMTP settings.
Furthermore there could be another issue. I remember that I worked at a client who had turned off the send settings on their email server. So SAP finished everything and handed the emails on to a mail server. The mail server had a setting to block any emails from the development environment.
So that might be another cause of your issue. -
[urgent ]runtime error occured while creating the material using mm01
hai
am configure the ale program now . the problem is occured during the creating the material using mm01.
am using client 000 (sending system). and i want to send the material to the client 400(receiving system)
while am save the created material using t-code mm01 in client 000 . it depicts the error as
syntax error in program SAPLC140.
plz resolve this problem.
regards
surenderHi,
In MM01 transaction code u have a problem..normally u will go to mm01 screen to create the material..i thought the same error will occur...so call basis to rectify this problem..
Thank u,
Manjula Devi.D -
Hi,
I am trying to migrate an application from JBoss to SAP Netweaver WAS.
I am getting an exception when i am trying to deploy the application from Netweaver developer studio as "<b>java.lang.OutOfMemoryError</b>". The portion of the stack is given below,
<b>Caused by: com.sap.engine.services.ejb.exceptions.deployment.EJBFileGenerationException: Errors while compiling:
The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError
at com.sap.engine.services.ejb.util.AdminUtils.compile(AdminUtils.java:476)
at com.sap.engine.services.ejb.deploy.DeployAdmin.deploySingleJar(DeployAdmin.java:625)
at com.sap.engine.services.ejb.deploy.DeltaDeployAdmin.makeUpdate(DeltaDeployAdmin.java:185)
at com.sap.engine.services.ejb.EJBAdmin.makeUpdate(EJBAdmin.java:529)</b>
I heard that by changing some configuration values, we can resolve the problem (like adjusting -Xms & - Xmx parameters as well as the Max threads). But i don't know in which script/ tool should i find these settings to change.
Could you please share your knowledge in this regard,
Best regards,
Sudheesh...Hi
You can change the XMX and thread parameter in the Visual Administrator.
Please refer to the link below:
http://help.sap.com/saphelp_erp2005/helpdata/en/42/c98d6b11886babe10000000a1553f6/frameset.htm
Hope this helps,
Regards,
Harish
(Please award points for useful answers) -
How to Attach a pdf file which is created in EP while sending the mail
Hi guys,
My scenario is, " A form is created in the EP and a HR person give the input/mandatory field employee number in that form so he gets the details of the employee and he edit some of the fields in the form and he gives his comments, then he press "submit" button."
Note: The edited fields are not stored in any table.
At this point my workflow will trigger using the event "POSITIONCHANGE" using the business object "BUS1065". Now i have to send a notification to 5 persons along with the pdf form as a attachment which is created by the initator in a display mode.
My Questions are:
1. How can i get that pdf form which is created by the intiator in EP to my workflow.
2.Then how can i attach this form in the mail.I got the pdf into my workflow in a binary data and i passed this binary data to the function module so_document_attacthment_ap1.
in that i am specifing that the file type is .pdf and i received mail with the pdf attachment too. -
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. -
Error getting while deploying BPEL process using CI in peoplesoft adapter
When i am deploying BPEL process which connects to peoplesoft through component interface (CI) using peoplesoft adapter. I am getting error when i pass the input parameter which fetches data from peoplesoft component.
after posting XML message following error occurs.
<faultstring>java.lang.IllegalStateException: Cannot call setRollbackOnly() current thread is NOT associated with a transaction</faultstring>
any help will be very thankfulThanks for your response
This is the part of log when i am giving request from JCA servlet to JDE test
Wed, 23 Jan 2008 10:28:31.0557 IST - Thread[AJPRequestHandler-HTTPThreadGroup-54,5,HTTPThreadGroup] [debug] [IWAF JCA JDEdwards] IWAFInteraction.execProcess() exited.
Wed, 23 Jan 2008 10:28:31.0557 IST - Thread[AJPRequestHandler-HTTPThreadGroup-54,5,HTTPThreadGroup] [debug] [IWAF JCA JDEdwards] IWAFConnection.close() called, on connection: com.ibi.afjca.cci.IWAFConnection@188518f for IWAFManagedConnection: com.ibi.afjca.spi.IWAFManagedConnection@e19158
Wed, 23 Jan 2008 10:28:31.0557 IST - Thread[AJPRequestHandler-HTTPThreadGroup-54,5,HTTPThreadGroup] [info ] [IWAF JCA JDEdwards] IWAFManagedConnection for JDEdwards:JDEFinalMorning dispatch event 1
Wed, 23 Jan 2008 10:28:31.0557 IST - Thread[AJPRequestHandler-HTTPThreadGroup-54,5,HTTPThreadGroup] [debug] [IWAF JCA JDEdwards] IWAFManagedConnection.cleanup() for JDEdwards:JDEFinalMorning entered.
Wed, 23 Jan 2008 10:28:31.0557 IST - Thread[AJPRequestHandler-HTTPThreadGroup-54,5,HTTPThreadGroup] [debug] [IWAF JCA JDEdwards] IWAFManagedConnection for JDEdwards:JDEFinalMorning cleaned.
Wed, 23 Jan 2008 10:28:31.0573 IST - Thread[AJPRequestHandler-HTTPThreadGroup-54,5,HTTPThreadGroup] [debug] [IWAF JCA JDEdwards] IWAFManagedConnection.destroy() for JDEdwards:JDEFinalMorning entered.
Wed, 23 Jan 2008 10:28:31.0604 IST - Thread[AJPRequestHandler-HTTPThreadGroup-54,5,HTTPThreadGroup] [debug] [IWAF JCA JDEdwards] IWAFManagedConnection for JDEdwards:JDEFinalMorning destroyed.
Wed, 23 Jan 2008 10:28:40.0636 IST - Thread[AJPRequestHandler-HTTPThreadGroup-54,5,HTTPThreadGroup] [debug] [IWAF JCA JDEdwards] IWAFManagedConnection created for JDEdwards:JDEdwardsCFIN
Wed, 23 Jan 2008 10:28:40.0636 IST - Thread[AJPRequestHandler-HTTPThreadGroup-54,5,HTTPThreadGroup] [info ] [IWAF JCA JDEdwards] IWAFManagedConnection for JDEdwards:JDEdwardsCFIN has listener registered: com.evermind.server.connector.ConnectionContext@1f24a78
Wed, 23 Jan 2008 10:28:40.0636 IST - Thread[AJPRequestHandler-HTTPThreadGroup-54,5,HTTPThreadGroup] [debug] [IWAF JCA JDEdwards] IWAFConnection created, com.ibi.afjca.cci.IWAFConnection@1f71eb7, for IWAFManagedConnection: com.ibi.afjca.spi.IWAFManagedConnection@1267d64
Wed, 23 Jan 2008 10:28:40.0636 IST - Thread[AJPRequestHandler-HTTPThreadGroup-54,5,HTTPThreadGroup] [debug] [IWAF JCA JDEdwards] IWAFInteraction created.
Wed, 23 Jan 2008 10:28:40.0636 IST - Thread[AJPRequestHandler-HTTPThreadGroup-54,5,HTTPThreadGroup] [debug] [IWAF JCA JDEdwards] IWAFInteraction.execProcess() entered.
Wed, 23 Jan 2008 10:28:40.0636 IST - Thread[AJPRequestHandler-HTTPThreadGroup-54,5,HTTPThreadGroup] [debug] [IWAF JCA JDEdwards] IWAFInteraction.execProcess() called with string:
<jdeRequest type="callmethod" user="ASHISHM" pwd="ASHISHM" environment="JDV811" session="">
<callMethod name="GetEffectiveAddress" app="" runOnError="no">
<params>
<param name="mnAddressNumber">1001</param>
<param name="jdDateBeginningEffective"></param>
<param name="cEffectiveDateExistence10"></param>
<param name="szAddressLine1"></param>
<param name="szAddressLine2"></param>
<param name="szAddressLine3"></param>
<param name="szAddressLine4"></param>
<param name="szZipCodePostal"></param>
<param name="szCity"></param>
<param name="szCountyAddress"></param>
<param name="szState"></param>
<param name="szCountry"></param>
<param name="szUserid"></param>
<param name="szProgramid"></param>
<param name="jdDateupdated"></param>
<param name="szWorkstationid"></param>
<param name="mnTimelastupdated"></param>
<param name="szNamealpha"></param>
<param name="mnSynchronizationStatus"></param>
<param name="mnServerStatus"></param>
</params>
<onError abort="no"></onError>
</callMethod>
</jdeRequest>
Wed, 23 Jan 2008 10:28:40.0636 IST - Thread[AJPRequestHandler-HTTPThreadGroup-54,5,HTTPThreadGroup] [debug] [IWAF JCA JDEdwards] IWAFInteraction.execProcess() gets the inDoc com.iwaysoftware.idom.XmlDocument@101bde9
Wed, 23 Jan 2008 10:28:49.0606 IST - Thread[AJPRequestHandler-HTTPThreadGroup-54,5,HTTPThreadGroup] [debug] [IWAF JCA JDEdwards] IWAFInteraction.execProcess() added at index 0, return record:
<jdeResponse user="ASHISHM" type="callmethod" session="3780.1201064308.7" environment="DV811" role="*ALL">
<callMethod app="" name="GetEffectiveAddress" runOnError="no">
<returnCode code="2"/>
<params/>
</callMethod>
</jdeResponse>
Wed, 23 Jan 2008 10:28:49.0606 IST - Thread[AJPRequestHandler-HTTPThreadGroup-54,5,HTTPThreadGroup] [debug] [IWAF JCA JDEdwards] IWAFInteraction.execProcess() return record:
[<jdeResponse user="ASHISHM" type="callmethod" session="3780.1201064308.7" environment="DV811" role="*ALL">
<callMethod app="" name="GetEffectiveAddress" runOnError="no">
<returnCode code="2"/>
<params/>
</callMethod>
</jdeResponse>
Maybe you are looking for
-
In an InDesign book, how can I create links that work across documents?
The hyperlinking works fine when it is contained within a single document in a book, however doesn't work across documents.
-
Hi all , ihave a problem with i-mesaages. I can recieve i message and can reply on the same i messages . But if i want to intiate i messages with the same guy who i've recieved from i can't. Kindly advise
-
IPod green/gray lines down the middle and they keep growing help!
have had my iPod touch 4th gen for over a year now and i have these weird gray/green lines going down the center of the screen. They will not go away when i restart my iPod, and they only started when i came home from school and have kept growing pl
-
Load Balancing Health Check Probes
Are these values correct for setting up a load balancer with Exchange 2013 Layer 7? Trying to go over this article from Ross Smith: http://blogs.technet.com/b/exchange/archive/2014/03/05/load-balancing-in-exchange-2013.aspx OWA: https:/mail.company.c
-
After I download firefox the install window does not appear
I am trying to upgrade Firefox on my laptop. After I choose to download the most recent edition, I'm waiting for the next step - RUN - to appear but it does not do so. I've tried this four times without success. Please advise. Thank you.