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

Send executable Email to SBWP using CL_BCS

marco_weienseel
Explorer
0 Likes
1,765

Hello,


until recently we were sending email to SAP Business Workplace using SO_OBJECT_SEND.

This FM has the posibility to add an executable function to the mail, for example Report, FM, DB, TCode.

The transaction is given to SO_OBJECT_SEND using "object_hd_change", the parameters for the transaction are located in objpara[].


I was able to find the database tables:

SOOD-ACNAM     (Name of transaction)

SOOD-VMTYP     (Type: transaction, report,...)

SOOD-SKIPS      (Skip first screen)

The transaction parameters are somehow saved in table SOC3.


My task is to implement the same function using CL_BCS instead of SO_OBECT_SEND.

Im alreasy successfully sending mails with attachment to SBWP using CL_BCS, CL_DOCUMENT_BCS,...

But I cant find a way to implement the execute transaction function.


I'm quite sure, that there has to be a way, because SO_OBJECT_SEND itself is using some kind CL_BCS.


Would be great if anyone could help me,

Thank you in advance!

2 REPLIES 2
Read only

Former Member
0 Likes
907

Hi together,

did anyone find a solution for this?

I'm trying the same and can not find the fields to input the transaction code.

Read only

0 Likes
907

Hello,

no i didn't find a standard way.

I have implemented a workaround by implementing an implicit enhancement point.

CL_BCS_BODYPART_DB -> method db_insert

You need to fill variables mt_head, mt_para, ms_sood.

Example: in this case i want to start an invoice processing transaction.

DATA:ls_para           TYPE selc,
         h_object_hd_str   TYPE soxobj.

    ms_sood-vmtyp   = 'T'"Execute transaction
    ms_sood-skips   = 'X'.   "skip first screen

    ms_sood-acnam = 'Z_ABC'.  "name of your transaction

* fill parameters

    ls_para-option  = 'EQ'.
    ls_para-name   = 'BLP'.
    ls_para-low      = ...       
    APPEND ls_para TO mt_para.
    ls_para-name  = 'GJR'.
    ls_para-low     = ....     
    APPEND ls_para TO mt_para.

    ls_para-name  = 'BUK'.
    ls_para-low   = ....   
    APPEND ls_para TO mt_para.

    h_object_hd_str-objkey  = ls_fi_keydata.
    h_object_hd_str-objtype = 'BKPF'.

* fill structure h_object_hd_str
  h_object_hd_str-objkey  = ls_mm_keydata.          "Key of the SAP-object
  h_object_hd_str-objtype = 'BUS2081'.                   "SAP-object to execute

  APPEND h_object_hd_str TO mt_head.

Greetings