Truncation while using FM SO_NEW_DOCUMENT_ATT_SEND_API1 for sending mail
I am using function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send mail to external email id specified in a distribution list .But the restriction of this FM is truncates the content of a line having more than 255 char (as CONTENTS_BIN is of type char of 255 length ).
Is there is any other function module or any tweak to this FM which can solve my problem
Regards.
Tushar
Refer the links -
Re: Formattiing mail With more than 255 characters
Re: Mail with a file txt attached - lenght each record more than 255 chars
Email attachment rows greater than 255 char get truncated
Creating an spreadsheet as an e-mail attachment sprdsht line data is GT 255
Regards,
Amit
Reward all helpful replies.
Similar Messages
-
hi
i using the function to send mail from sap to external!
the coding as follow: but i will get sy-subrc = 2:document could not be sent to any of the recipients
if i want to send mail from SAP
and how to solved it !
thank you very much!
*& Report ZJOHN_STUDY1
REPORT ZJOHN_STUDY1.
*REPORT ZSSO_DOCUMENT_SEND_API1.
DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 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.
* Creating the document to be sent
DOC_CHNG-OBJ_NAME = 'OFFER'.
DOC_CHNG-OBJ_DESCR = 'Auction of a Picasso jr'.
OBJTXT = 'Reserve price : $250000'.
APPEND OBJTXT.
OBJTXT = 'A reproduction of the painting to be auctioned'.
APPEND OBJTXT.
OBJTXT = 'is enclosed as an attachment.'.
APPEND OBJTXT.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
* Creating 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.
* Creating the document attachment
* (Assume the data in OBJBIN are given in BMP format)
OBJBIN = ' \O/ '. APPEND OBJBIN.
OBJBIN = ' | '. APPEND OBJBIN.
OBJBIN = ' / \ '. APPEND OBJBIN.
DESCRIBE TABLE OBJBIN LINES TAB_LINES.
OBJHEAD = 'picasso.bmp'. APPEND OBJHEAD.
* Creating 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 = 'BMP'.
OBJPACK-OBJ_NAME = 'ATTACHMENT'.
OBJPACK-OBJ_DESCR = 'Reproduction object 138'.
OBJPACK-DOC_SIZE = TAB_LINES * 255.
APPEND OBJPACK..
* Entering names in the distribution list
RECLIST-RECEIVER = "'test @ test . com". "is external mail
RECLIST-REC_TYPE = 'U'.
RECLIST-com_type = 'INT'.
RECLIST-notif_del = 'X'.
RECLIST-notif_ndel = 'X'.
APPEND RECLIST.
*RECLIST-RECEIVER = 'DLI-NEUREICH'.
*RECLIST-REC_TYPE = 'P'.
*APPEND RECLIST.
*** 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 = 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 'sent successfully'.
ELSE.
WRITE 'not sent'.
ENDIF.
ENDLOOP.
WHEN 1.
WRITE: /
'no authorization to send to the specified number of recipients!'.
WHEN 2.
WRITE: / 'document could not be sent to any of the recipients!'.
WHEN 4.
WRITE: / 'no authorization to send !'.
WHEN OTHERS.
WRITE: / 'error occurred during sending !'.
ENDCASE.
Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 12:36 PMwhen sy-subrc = 0 for above f.m then write below coding...
if sy-subrc = 0.
SUBMIT RSCONN01 WITH MODE = 'INT'. ----> *to run scot t.code*
endif.
as below..
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = objpack
contents_txt = objtxt[]
contents_bin = so_ali[]
*contents_hex = so_ali[]
receivers = reclist[]
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc = 0.
MESSAGE 'Mail sent successfully' TYPE 'S'.
*SUBMIT RSCONN01 WITH MODE = MODE.*
ENDIF.
Edited by: shan palani on Jan 7, 2009 4:10 PM
Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 12:36 PM -
in my ipad email address which I am using for sending mail is appearing differently in the receipents mail box ! how to resolve that
while sending a email in my ipad it is showing the correct email address([email protected]) in the ""from"" field but in receipients inbox ""from"" field it is showing another email id ([email protected])
-
I am holidaying in Auckland using my daughter's Orcon internet account for sending mail but it will not send. I am sure I am putting in the correct information but it still says mail.orcon.net.nz(Offline). I have spent half an hour with Orcon putting in correct info. They do not know how to help me further and neither does telstra clear, my own internet provider.
Any advice appreciated.On the Mail menubar > Mailbox, make sure Take all accounts online is selected.
-
How to create distribution list in workflow? for sending mail or work-item
Hi,
How to create distribution list in workflow? for sending mail or work-item to multiple users.
Regards,
SurjithHi Surjith,
A.Working with Distribution Lists Creating a Distribution List.
1 Businees Workplace->shared folder - create new subfolder name = WF_distributor
2.Then click on the distribution list in Businees Workplace.
say create Name = WF_Vliste
folder Name = WF_distributor
3.distribution list content tab
Enter Recipient (SAP User ID)
B.Wrkflow Builder
Find out the dialig step in which u want to use distribution list
Use workflow Rule 30000012 (SWX_READ_DLI).
Maintain the binding from workflow container to rule container.
Just pass the name of the distribution list from WF to Rule container.
Regards
Sagar S -
CLASS cl_bcs Query for sender mail id
Hi,
I am using class cl_bcs.but, i am facing problem for sender mail-id. I want to append mail-id directly to sernder mail-id without using user mail attribute.
Is there ne way from which i can append mail-id as sender mail id??
thanx in advance,
Sameeryou can do that.
check this code sample.
DATA: sender TYPE REF TO if_sender_bcs.
CLEAR sender .
sender = cl_cam_address_bcs=>create_internet_address( '[email protected]' ).
CALL METHOD send_request->set_sender
EXPORTING
i_sender = sender.
and check this code sample for complete code.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5931ff64-0a01-0010-2bb7-ff2f9a6165a0
Regards
Raja -
I just upgraded to 10.8.2 and Mail is having a problem. It won't remember my password for getting mail; but it does remember the password for sending mail, i.e., smtp. Does anyone know of a fix?
The solution surprised even me, and we've been using Macs since 1984 (still have an original 128K).
I contacted Apple support, and because we had just upgraded yesterday, clicked on the "exception" button as opposed to paying the $19.99 one-time support fee. An Apple tech called and the problem was solved in two minutes.
Somehow during the installation of OS 10.8.2 (over 10.6.x) the key chain data for my email ISP login password got corrupted. The solution was to delete both the POP mail and SMTP entries in my keychain.
Back to Mail, it asked for the POP password, I entered it and bingo, mail got busy downloading. Interestingly, the password was also entered into the SMTP panel.
So, that's it. Thanks for you response, Mr. Hoffman, and regards. -
Problem assigning an account for sending mail from external mail app
Good morning , i have an IPhone 4s 16gb with IOS 7.0.6 and even in setting-mail and calendar i have setup the default account to use for sending mail outside mail app it use ICloud mail account.
if i select Icloud account and then my gmail account sometimes works but after some days it start again to use the other account...i don't know if it is when i power off the IPhone...if i look into settings-mail and calendar account selected is gmail even the account used is the ICloud.
i think is a IOS bug.
please let me know.
Best regardsJun T. wrote:
But there is a (high) possibility that Gmail's server requires authentication (or certification) to connect to it.
I wonder if they're simply silently dropping emails in certain cases. I forgot earlier that I have a Gmail account. If I send an email from the command line on my home computer, which is on Comcast, the mail log shows that I successfully connect to Gmail, the message is sent and accepted by Gmail, but the email never arrives in my inbox. I've tried several times with the same result.
However, emails from a web server from work get through to Gmail without a problem. So I'd bet it's a case of them not delivering mail from Comcast IP addresses.
For grins, I also tried sending to my Yahoo email account from my home computer and their server at least refuses the connection and I get an error message stating that it's because it's a residential IP address.
In this case you need an SMTP client (=a software which directly sends the mail to the Gmail server) which supports authentication.
I think this might also be possible with Postfix by editing the configuration files. I know I had to set up authentication to send emails to my work address directly from my home computers, but I haven't been able to get the same thing to work with Gmail yet. If I get a chance, I'll look into it again later tonight.
charlie -
Setting Host for sending mails
Hi Xperts
For sending mails to external mail id my internal support team had advised to do the following changes:
"<i>Please configure your host(s) to send to smlolw.lol.com, use default port#90.</i>"
i'm not dure on what he meant by this and where to carry these changes. Can i be guided to have this set properly.
thkx
PrabhuHi,
1. Goto transaction SCOT.
2. Double click the SMTP.
Thanks,
Reward If Helpful. -
How ca i create a stationery for sending mail with my letter head and logo etc.
I want to use a stationery with my letter head and logo for sending mails. Please tell me how can I create my page.
http://kb.mozillazine.org/Thunderbird_:_FAQs_:_Using_Templates
-
I've checked all through the forum and can't find an answer, so I hope this is not a repeat...
Is there a way to have a different sound (that I choose) play for sending mail versus receiving mail? I can change the incoming sound in preferences and I've checked the box to have sound play for other events...but it always plays the same sound for every event.
Help!!
MacBook Pro Mac OS X (10.4.10)I did further reseach and found if you substitute an AIFF file for the "Mail Sent.aiff" file in Mail's package\contents\resources - you can assign any sound. You have to rename the new file exactly the same as the existing. I backed up the original first for safety.
Why isn't there a preference for this?? -
Hi all;
i am configuring alerts for sending mails . i am on XI 7.0 SP 2.i am not able to find an option like internal processing in ALRTCATDEF settings configurations.
Can this be the reason why mails are not getting send.Hi Mudit,
To send an EMAIL, assign an EMAIL ID to the corresponding user in the transaction SU01 and then set up SCOT and you can send emails when the ALERT is triggered.
Once you have configure Alerts, you will get the Alerts into ALERT INBOX in RWB of the user. To also get the email, the following needs to be done,
1. In SU01 -- Assign the Email ID for the Recipient of the ALERT.
2. In , RWB>ALERT INBOX> PERSONALIZATION--> Time Independent Delivery and Email are selected.
3. Finally, SCOT needs to be set up to send Emails. Check this for the same. You can ask your BASIS team to do this step.
http://help.sap.com/saphelp_nw04/helpdata/en/23/1edf098ea211d2b47300609419ed29/frameset.htm
Also, In ALRTCATDEF, go to SETTINGS--> CONFIGURATION. By default, the option selected is INTERNAL PROCESSING. Select the option SMTP FORWARDING AS XML and give the email id. This will enable you to send an email alert whenever an error occurs in XI.
Also, to test your Alerts, execute the report RSALERTTEST in SE38.
Also go throuh the following links...
/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide
/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
http://help.sap.com/saphelp_nw04/helpdata/en/3f/81023cfa699508e10000000a11402f/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/80/942f3ffed33d67e10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/2b/d925bf4b8a11d1894c0000e8323c4f/frameset.htm
Regards,
Abhy
Message was edited by: Abhy Thomas -
Maximum retries for sending mail ( java mail api )
Hi,
How can I set the property "maximum retries for sending mail" for my smtp through java mail api ?
Is there any property that I need to set in the Javamail session or any other way out ?
Thanks.That's a server property. You would set that in your server configuration. JavaMail is for sending and receiving mail, not for controlling mail servers.
-
I am using outlook express for my mail. When using internet explorer on PC I could set it up so I could simultaneously see all my inboxes, the mail details and a message preview. Can I do this on my Mac?
About accessing using a browser: I can get in using Firefox or Safari, butI cant set the page up to see all my inboxes at the same time (so I can file emails appropriately) or get a preview to save opening every mail
-
Mail won't use correct account for sending
I have the option checked for "Send new messages from Account of Selected Mailbox". I have several filters set up to shovel certain email list into a separate folder locally and taken off the server. When I reply to these emails, Mail ALWAYS uses my .mac account (which is at the top of the mail accounts list). It will not use the account these mails are addressed to. In Lion and before, this worked as expected. Now, in Mountain Lion, it is a problem. How do I fix it?
The way to fix it is this:
Open Mail, and click on the triangle next to, say, inbox on the left side of the screen. You should see the inboxes of all your individual accounts.
Now drag the account you want to use to the top of that list!
Maybe you are looking for
-
If I type a moderately long e-mail (I haven't counted the letters/digits to determine how long), then suddenly letters won't appear. If make a typing errors, and backspace over or delete the error/s, the cursor will disappear. It's not anywhere in th
-
What's The Point Of Having DVRS If The Guide Is Incorrect?
As the holiday season is upon us with a new year right around the corner verizon's guide issues still continue to get worse and worse with each day that passes with no end in sight as to verizon actually making an effort to correct the guide issues t
-
How do you transfer the data from your Ipad to a new pc?
How do you transfer the data from your Ipad to a new pc?
-
Possible to interact with checkbox in a custom menuitem?
Is there any way to allow custom menu items to be checked (like the menuitems in the Windows menu can be)? The 'checked' property is read-only, for the menu item and the menu action, so I guess I'm wondering if there are any known workarounds or if t
-
Warning on Grub2 installation: GPT
Hello I just got a new notebook (T61) and am trying to install Arch on it. Before that I had a UEFI Notebook and after some tries I was able to install it. But now I don't know what to do. As the Topic title says I can't install Grub, it is giving me