cancel
Showing results for 
Search instead for 
Did you mean: 

LINK TO URL FOR SENDING MAIL Doesnot work if more than 255 chars

Former Member
0 Kudos

Hi Experts ,

I am Using Link to URL to open the mail browser with details passed as below

lv_refr = mailto:<mail_addr>?Subject=<subjectof mail>&body=<text of the mail>.

Above one works fine as long as length is LE 255 chars

if length lv_refr GE 255 does not work any more . I have body (Mail text) more than 500 chars . How can go about this issue ?

Please reply

Patil

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Yes - send the mail directly from ABAP and not via the mail client. Then you work around the URL parameter limitations. ABAP has mail sending capabilities already built in via the BCS (Business Communication Services). If you want the user to be able to edit the message or choose the sender - you can do that via a Web Dynpro form before actually composing the final email. Here is a blog on the subject of how to use the BCS:

Former Member
0 Kudos

Hi Thomas,

i also need to put an url on the TEXT message with more than 255 character. How can i do? In the blog you talk about the attachament, not for the text line

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I've already answered this question when you placed it on my blog as well.

Build up your HTML in a single string instead of 255 character rows in an internal table. That way you aren't wrapping content between lines in the table. Then use the static method CL_BCS_CONVERT=>STRING_TO_SOLIX( ). This will turn your string into an internal table of type SOLIX_TAB. The lines of the table will no longer represent a line in the content. You can have single lines of content that are more than 255 characters. The content is now stored binary and contains newline and carrage return characters inline to mark the end of line. This is also a more efficient way of storing the data since there is no wasted space.

Former Member
0 Kudos

Hi Thomas

Got a guestion! pertaining to this URL cutting off in emails.

The situation is that we have a workflow in which a task sends out email, in the email the URL does not display the whole link.

Can you help me display the whole URL when the workflow send out the EMAIL.

regards

MAtt

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Hi Thomas

>

> Got a guestion! pertaining to this URL cutting off in emails.

>

> The situation is that we have a workflow in which a task sends out email, in the email the URL does not display the whole link.

> Can you help me display the whole URL when the workflow send out the EMAIL.

>

> regards

> MAtt

The same solution that I suggested above applies here. Build your email message as a single string. Line lenght won't matter. Then convert the string to the binary table. The binar table won't be restricted to 255 character line lenghts - and in fact wont' care about line lenghts at all. Your long URL in your hyperlink will be fine.

Former Member
0 Kudos

hey thomas

Thanks for your help

yes the part converting it to binary table is fine and it works, But in my workflow object (method) when running this procedure

i have a problem exporting the Table to the workflow so i can you use it in my task(email). Nothing gets sent over,even though

it is set up as the same table as it was converted to. How would i bring this into my task to be used

regards

MAtt

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I'm afraid I'm not the right person to help you with workflow related problems. Is there something web dynpro specific about the interaction with the workflow?

Former Member
0 Kudos

Hi Thomas,

I have the same issue truncating URL string in email. I tried your suggestion. Now the text is not truncated but the content is displayed as attachment but not in the email body.

Did I miss anything?

Appreciate your help.

Thank you.

Sri

Former Member
0 Kudos

hi matt,

how to convert the data from string to binary table,can you give me sample code

regards

sandeep

Former Member
0 Kudos

Hi Thomas,

I am using the same technique as mentioned by you, but I am getting the URL link in an attachment, rather than the Email Body. Is there a way to get it in the Body of the mail?

Thanks... Tareq

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Did the content of your email go into the body before you added the URL link?  If the conent is coming as an attachment instead of the body, it sounds like you are doing something wrong in general with setting the content into the email.  Difficult to say exactly what you are doing wrong with such limited informaiton.

Answers (0)