Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Sending special e-mail uder EP user from R/3 (collaboration event)

Former Member
0 Kudos

Hello,

I'd like to send special e-mail form R/3. I reused functionality form EP (collaboration event sending).

I made regular EP application which sends this special e-mail when requested.

I tried to call application's url from R/3 (ABAP report using class cl_http_client; url contains EP user credentials), but mail wasn't send.

I tried to set breakpoint to my EP applicaton and this breakpoint wasn't reached.

If I open the same url under IE, breakpoint is reached and mail is send. Http responce in both cases seems to be same.

I think maybe some javascripts didn't start when using my ABAP report. Has somebody an idea?

Best regards,

Josef Motl

P.S. I can't use web service becouse I need authenticated EP user object (IUserContext) to send mentioned special mail (service user is not enough)

Message was edited by: Josef Motl

Message was edited by: Josef Motl

5 REPLIES 5

athavanraja
Active Contributor
0 Kudos

you could have continued your discussion in this thread

Regards

Raja

0 Kudos

My fault, sorry

Regards,

Josef

0 Kudos

can we see your ABAP code?

Regards

Raja

0 Kudos

CONCATENATE myURL
INTO wf_string.

CALL METHOD cl_http_client=>create_by_url
  EXPORTING
    url                = wf_string
  IMPORTING
    client             = http_client
  EXCEPTIONS
    argument_not_found = 1
    plugin_not_active  = 2
    internal_error     = 3
    OTHERS             = 4.

CALL METHOD http_client->request->set_header_field
  EXPORTING
    name  = '~request_method'
    value = 'GET'.

CALL METHOD http_client->request->set_header_field
  EXPORTING
    name  = 'User-Agent'
    value = 'Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)'.

CALL METHOD http_client->send
  EXPORTING
    timeout                    = 50000
  EXCEPTIONS
    http_communication_failure = 1
    http_invalid_state         = 2.

CALL METHOD http_client->receive
  EXCEPTIONS
    http_communication_failure = 1
    http_invalid_state         = 2
    http_processing_failed     = 3.

CLEAR result .
result = http_client->response->get_cdata( ).

Regards,

Josef

0 Kudos

1. are you passing the user id & pwd for portal via URL?

if not you have to call the following with authentication info.

http_client->propertytype_logon_popup = http_client->co_disabled.

wf_user = user .

wf_password = password .

call method http_client->authenticate

exporting

proxy_authentication = ' '

username = wf_user

password = wf_password.

2. GET is the default method , so you dont have to set it

3. after the receive step what do you get in result variable?

Regards

Raja