on 05-10-2011 11:55 AM
Hi all I want to pass a hyperlink in Work-flow activity
I am getting problem when my URL is more then 66 0r in sometime 77 characters it that.
It is adding %20%20 in between the URL if it is having more then 66 characters .
Please help me for resolving the issue
Hi,
As there some some charecter limitation to send the link, you need to use the FM SO_NEW_DOCUMENT_SEND_API1. Please see the follwing sample code. Write the code in method and call it within the Task. Make suer that all the required data should be passed to method through binding.
DATA:
lt_user_IDS type STANDARD TABLE OF SWHACTOR,
ls_user_IDS type SWHACTOR,
lt_EMAIL_ADDRESSES TYPE STANDARD TABLE OF ADR6-SMTP_ADDR,
ls_EMAIL_ADDRESSES type ADR6-SMTP_ADDR,
lv_STATUS TYPE CFS_STATUS-STATUS_ID,
Lv_Object_ID type crmd_orderadm_h-object_id,
ls_document_data TYPE sodocchgi1,
lt_text TYPE solisti1 OCCURS 0,
l_document_data TYPE sodocchgi1,
lt_receivers TYPE somlreci1 OCCURS 0,
ls_wa_receive TYPE somlreci1,
ls_text TYPE solisti1,
lv_link_title TYPE char50 'Please click here'.
DATA: lv_link TYPE char200 VALUE 'http://sdfkndggfhjgasdfhasdfhgjhdgfhjasdkljhsdhfjkhjsdfjklhsddfjklhsaddkjghasdjksjkhfjkhjkhsdfjkhasdjkfhjkhsdfkjhjkhsdajklfhjkhkjfhjkh.com'.
CONCATENATE '<A HREF=' lv_link '>'
INTO ls_text.
APPEND ls_text TO lt_text.
CLEAR : ls_text.
CONCATENATE '<H5>' lv_link_title '</H5></A>'
INTO ls_text.
APPEND ls_text TO lt_text.
* Receiver
Loop at lt_user_IDS into ls_user_IDS.
ls_wa_receive-rec_type = 'G'. "SAP User
ls_wa_receive-receiver = ls_user_IDS. "Mail Address
APPEND ls_wa_receive TO lt_receivers.
Endloop.
Loop at lt_EMAIL_ADDRESSES into ls_EMAIL_ADDRESSES.
ls_wa_receive-rec_type = 'U'. "Internet User
ls_wa_receive-receiver = ls_EMAIL_ADDRESSES. "Mail Address
APPEND ls_wa_receive TO lt_receivers.
Endloop.
*This function module is used to send mail
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = ls_document_data
document_type = 'HTM'
put_in_outbox = 'X'
commit_work = 'X'
TABLES
object_content = lt_text
receivers = lt_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
*If Mail Send Successful
IF sy-subrc EQ 0.
COMMIT WORK.
* Push mail out from SAP outbox
SUBMIT rsconn01 WITH mode = 'INT' AND RETURN. "#EC CI_SUBMIT
ENDIF.
Thanks and regards,
SNJy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try masking the URL using - <(> <)>
Cheers,
Thomas,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.