SAP tms-default-emails

tms-default-emails







  


* Add custom form output processing
 
 
 
 
 This is basic stuff but also complicated as there is no real way of knowing what you need to do 
 without some help pointing you in the 
 right direct, but bassically you do the following simple steps:
 
 
 
 
 Step 1 - Activate BADI 
 
 First you simply need to activate BADI COMPLETE_PROC_PPF for the form you want add customer send output processing too. 
 
 
 
 
 
 
 
 

Enter the profile and action related to you specific output form from teh dropdown, or use the * to capture for all.

Step 2 - Redefine complete_send method of your print class The next step is to redefine the COMPLETE_SEND Method of print class assigned to you output forms i.e. ZCL_PPF_SERV_FOR_TOR Add the following code to insert an email address data: ld_email type AD_SMTPADR.
   DATA(lo_rec) = cl_cam_address_bcs=>create_internet_address( i_address_string = ld_email ).
   io_send->add_recipient( EXPORTING i_recipient = lo_rec ).
   
* You can also use the following code to get the current order / tor object DATA: ls_printout_lp TYPE ztms_printout_lp, lt_root TYPE /scmtms/t_tor_root_k, lt_party TYPE /scmtms/t_tor_party_k, lt_item_tr TYPE /scmtms/t_tor_item_tr_k, lt_stages TYPE /scmtms/t_pln_stage, lt_stops TYPE /scmtms/t_tor_stop_k, lt_exec TYPE /scmtms/t_tor_exec_k. DATA: lt_item_pos TYPE /scmtms/t_tor_item_pos_k. DATA: lt_keys TYPE /bobf/t_frw_key. DATA: wa_keys LIKE LINE OF lt_keys. wa_keys-key = iv_key. APPEND wa_keys TO lt_keys. * Get details of current Freight order CALL METHOD /scmtms/cl_print_helper=>get_tor_nodes EXPORTING it_key = lt_keys IMPORTING et_root = lt_root et_item_tr = lt_item_tr et_item_pos_details = lt_item_pos et_party = lt_party et_stages = lt_stages et_stop = lt_stops et_exec = lt_exec.





Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!