Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8088

Re: How to create notification workitem without creating the Workflow Template

$
0
0

Hi Sudeesh

 

Workflow step...just for an email.....is overengineering!

 

To trigger this custom Step, you will have to code in a BADI/UserExit/Enhancement........ so instead of triggering a workflow step why not send the email straightaway?

 

You can use Methods of  CL_BCS class to send an email...here is the simple sequence of calls

 

  1. lr_bcs = cl_bcs=>create_persistent( )
  2. lr_doc = cl_document_bcs=>create_document(..necessary parameters....)
  3. lr_bcs->set_document( lr_doc ).
  4. lr_sender = cl_sapuser_bcs=>create( 'WF-BATCH' ).
  5. lr_bcs->set_sender( lr_sender ).
  6. Loop on all addresses
    1. lr_rece = cl_cam_address_bcs=>create_internet_address( lv_receiver ).
    2. lr_bcs->add_recipient( lr_rece ).
    3. lr_bcs->add_recipient( I_RECIPIENT = lr_rece  I_COPY = 'X').

  7. Endloop
  8. lr_bcs->send( ).
  9. Let application handle the Commit Work

 

 

 

Regards,

Modak


Viewing all articles
Browse latest Browse all 8088

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>