Application Development and Automation 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: 
Read only

BCS Recipient

Former Member
0 Likes
1,118

Hi All

I stand on the hose ;-).

I would like to send email bye Outlook and if i can't find the Email adress send bye internal SAP Mail.

data:  lr_recipient      type ref to if_recipient_bcs.

            lr_recipient = cl_cam_address_bcs=>create_internet_address(
            'misterx.at.com' ).

Outlook works great, i don't know how could i create the internal Adress because these dident works.

lr_recipient = cl_cam_address_bcs=>create_direct_address( sy-uname ).

Thanks for help

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
737

Hello

You are indeed up a blind alley because CREATE_DIRECT_ADDRESS is a private static method.

However, I believe you are looking for method CREATE_USER_HOME_ADDRESS:


DATA:
  lo_recipient    TYPE REF TO if_recipient_bcs.  " CL_CAM_ADDRESS_BCS


  CALL METHOD CL_CAM_ADDRESS_BCS=>CREATE_USER_HOME_ADDRESS
    EXPORTING
      I_USER = syst-uname
      I_COMMTYPE = 'INT'
   RETURNING
      RESULT = lo_recipient.   

Perhaps it may be necessary to define the variable of TYPE REF TO cl_cam_address_bcs and do the casting to the interface afterwards.

Regards

Uwe

2 REPLIES 2
Read only

uwe_schieferstein
Active Contributor
0 Likes
738

Hello

You are indeed up a blind alley because CREATE_DIRECT_ADDRESS is a private static method.

However, I believe you are looking for method CREATE_USER_HOME_ADDRESS:


DATA:
  lo_recipient    TYPE REF TO if_recipient_bcs.  " CL_CAM_ADDRESS_BCS


  CALL METHOD CL_CAM_ADDRESS_BCS=>CREATE_USER_HOME_ADDRESS
    EXPORTING
      I_USER = syst-uname
      I_COMMTYPE = 'INT'
   RETURNING
      RESULT = lo_recipient.   

Perhaps it may be necessary to define the variable of TYPE REF TO cl_cam_address_bcs and do the casting to the interface afterwards.

Regards

Uwe

Read only

0 Likes
737

hello Uwe Schieferstein ,

how to send xls file to multiple recipient, i want to send to 2 recipients.

i written below coding but it's sending email to id1 and id2 twice.

RECIPIENT = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS( ' id1' ).

RECIPIENT1 = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS( 'id2' ).

SEND_REQUEST->ADD_RECIPIENT( I_RECIPIENT = RECIPIENT ).

SEND_REQUEST->ADD_RECIPIENT( I_RECIPIENT = RECIPIENT1 ).

  • ---------- send document ---------------------------------------

SENT_TO_ALL = SEND_REQUEST->SEND( I_WITH_ERROR_SCREEN = 'X' ).

COMMIT WORK.

my requirement is send mail to id1 and id2 once.

thanks in advance.

regards

srinivas rathod