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: 

Can you send encrypted e-mails using SO_NEW_DOCUMENT_ATT_SEND_API1

0 Kudos

We use SO_NEW_DOCUMENT_ATT_SEND_API1 to send e-mails to employees for various notifications. The e-mails go out through SCOT and are sent to our lotus notes.

We have a project being implemented, where the data we are sending in the note is kind of sensitive, so we'd like to see if we could send the e-mail as encrypted. Does anyone know if there is some parameter we can set upon sending that would encrypt the text in the e-mail for sending?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I'm not sure whether you can with the out-of-date send mail APIs. However, a quick look at current SAP technology for sending email, BCS (CL_BCS), contains the method set_encrypt with a simple yes/no switch and a ENCRYPT (get encrypt indicator), so obviously, one can encrypt emails sent with the current ABAP/NetWeaver tools. Why not switch to current technology in SAP if this is new development?

11 REPLIES 11

Former Member
0 Kudos

I'm not sure whether you can with the out-of-date send mail APIs. However, a quick look at current SAP technology for sending email, BCS (CL_BCS), contains the method set_encrypt with a simple yes/no switch and a ENCRYPT (get encrypt indicator), so obviously, one can encrypt emails sent with the current ABAP/NetWeaver tools. Why not switch to current technology in SAP if this is new development?

0 Kudos

Thanks for the information. I may look into that for future projects or as a phase II. Unfortunately this project came up suddenly and needs to be implemented by the end of next week, so I don't have a lot of time to research how to use new tools, was just hoping there might be a way to do it using a parameter that was available in the function module we had experience with.

0 Kudos

You're going to be out of luck then if you're not using CL_BCS or the SAP Security Library or the SMTP node in SAP Connect. What you're referring to is called 'digital enveloping' and is part of SSF processing (Secure Store and Forward). You may want to look at OSS note 149926 for more information regarding SAP's capabilities for email encryption.

former_member182040
Active Contributor
0 Kudos

FORM pssword_prot_encryptpdf .
  DATA: BEGIN OF command_list OCCURS 0.
          INCLUDE STRUCTURE sxpgcolist.
  DATA: END OF command_list .

  DATA: BEGIN OF exec_protocol OCCURS 0.
          INCLUDE STRUCTURE btcxpm.
  DATA: END OF exec_protocol.
  DATA: status LIKE btcxp3-exitstat,
  commandname LIKE sxpgcolist-name VALUE 'ZTEST',

  sel_no LIKE sy-tabix.

* GET LIST OF EXTERNAL COMMANDS

  CALL FUNCTION 'SXPG_COMMAND_LIST_GET'
    EXPORTING
      commandname     = commandname
      operatingsystem = sy-opsys
    TABLES
      command_list    = command_list
    EXCEPTIONS
      OTHERS          = 1.

  CALL FUNCTION 'SXPG_COMMAND_CHECK'
    EXPORTING
      commandname                = command_list-name
      operatingsystem            = sy-opsys
    EXCEPTIONS
      no_permission              = 1
      command_not_found          = 2
      parameters_too_long        = 3
      security_risk              = 4
      wrong_check_call_interface = 5
      x_error                    = 6
      too_many_parameters        = 7
      parameter_expected         = 8
      illegal_command            = 9
      communication_failure      = 10
      system_failure             = 11
      OTHERS                     = 12.
*--------------------
  CLEAR command_list.
  REFRESH command_list.
  DATA: v_dir_input      TYPE sxpgcolist-parameters.
  DATA: v_dir_input1      TYPE sxpgcolist-parameters.
  break developer.
  command_list-name = 'ZTEST'.
  command_list-opsystem = 'Windows NT'.


  CONCATENATE   'd:\pdf\' main_dtl-vbeln '.PDF' INTO name.
  CONCATENATE 'cmd /c d:\pdf\encryptpdf.exe' '-i' name  '-o ' name  '-u'  hdr-password INTO v_dir_input SEPARATED BY space .

  READ TABLE command_list INDEX sel_no.
  break developer.
  CONCATENATE command_list-opcommand v_dir_input INTO command_list-opcommand SEPARATED BY space.
* CHECK AUTHORIZATION
  command_list-addpar = 'X'.
  APPEND command_list.
  .
  CONSTANTS: c_extcom    TYPE sxpgcolist-name VALUE 'ZTEST',
             c_oper      TYPE syopsys VALUE 'Windows NT'.

  DATA: t_result         TYPE STANDARD TABLE OF btcxpm.
  v_dir_input  =  command_list-opcommand.

  CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
    EXPORTING
      commandname                   = c_extcom
      additional_parameters         = v_dir_input
      operatingsystem               = c_oper
    TABLES
      exec_protocol                 = t_result
    EXCEPTIONS
      no_permission                 = 1
      command_not_found             = 2
      parameters_too_long           = 3
      security_risk                 = 4
      wrong_check_call_interface    = 5
      program_start_error           = 6
      program_termination_error     = 7
      x_error                       = 8
      parameter_expected            = 9
      too_many_parameters           = 10
      illegal_command               = 11
      wrong_asynchronous_parameters = 12
      cant_enq_tbtco_entry          = 13
      jobcount_generation_error     = 14
      OTHERS                        = 15.

*
ENDFORM.                    " PSSWORD_PROT

0 Kudos

@Krupaji: Do you understand what you've posted or are blind dumping code hoping for points? I don't see how that applies to email signing and digital enveloping, especially not with the old email function...

0 Kudos

.

0 Kudos

Thank you all. I believe I've gotten the answer to my question. Basically, we are using an old Function module to e-mail out notes, which does not allow us to encrypt the data. However, there are newer FM's available that I can use that would allow me to encrypt the data when sending the e-mails. I just need to do a little more research to figure out how to use them. I'll start with the resonses I received.

Thanks for your help.

Pam Laverty

0 Kudos

can u please explain now which FM u use?

0 Kudos

SO_NEW_DOCUMENT_ATT_SEND_API1

0 Kudos

hello Pam,

I am using the same FM but I am not getting any email, would you please tell me what shall I do to make it work?

thank you very much

0 Kudos

When you say you are not getting any e-mail, can you see in transaction SCOT if the e-mail is being generated and not being sent, or is it not even being generated at all?

The reason I ask is that there is a special process that our basis team has in place to send the e-mails automatically. If that is not in place you need to do something in SCOT to send.

Thanks,

Pam