Posted: Thu Feb 19, 2009 4:35 pm Post subject: Maintain Forward-To Agent for mail notification
Maintain Forward-To Agent for mail notification (Batch input report around SO36)
Code:
*& *----------------------------------------------------------------------*
* Report : Z_MASS_SO36
* Author : Morten Hjorth Nielsen
* Webpage: http://www.mortenhjorthnielsen.com
*
* Purpose: Maintain Workflow Forward to e-mail adress for office mail
* forwarding.
*
* This report is meant for inspiration, before you use it in a productive
* environment please Test and Adjust thoroughly
*& *----------------------------------------------------------------------*
REPORT z_mass_so36.
TABLES usr02.
DATA bname LIKE usr02-bname.
DATA email TYPE so_name.
DATA bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF itab OCCURS 20,
bname LIKE usr02-bname,
email TYPE so_name,
END OF itab.
SELECT-OPTIONS user FOR usr02-bname.
PARAMETERS: lv_dom(72) LOWER CASE,
ctumode LIKE ctu_params-dismode DEFAULT 'N', "Run in background
cupdate LIKE ctu_params-updmode DEFAULT 'S'. "Synch. update
************************************************************************
* read user from USR02 and generate forward to address and build *
* internal table *
************************************************************************
SELECT bname FROM usr02 INTO bname
WHERE bname IN user.
itab-bname = bname.
CONCATENATE bname '@' lv_dom INTO email.
itab-email = email.
*&--------------------------------------------------------------------*
*& Form so36
*&--------------------------------------------------------------------*
FORM so36.
PERFORM bdc_dynpro USING 'RSSOADM0' '1000'.
PERFORM bdc_field USING 'BDC_CURSOR' 'ETIM'.
PERFORM bdc_field USING 'BDC_OKCODE' '=ONLI'.
PERFORM bdc_field USING 'USRNAM' itab-bname.
PERFORM bdc_field USING 'NEW_SUBS' itab-email.
PERFORM bdc_field USING 'SUB_ESC' 'u'.
PERFORM bdc_field USING 'BDAT' '01.01.2004'.
PERFORM bdc_field USING 'BTIM' '08:00:00'.
PERFORM bdc_field USING 'EDAT' '31.12.9999'.
PERFORM bdc_field USING 'ETIM' '24:00:00'.
PERFORM bdc_field USING 'FORW_ALL' 'X'.
PERFORM bdc_field USING 'PSTHR2' 'X'.
PERFORM bdc_dynpro USING 'RSSOADM0' '1000'.
PERFORM bdc_field USING 'BDC_OKCODE' '/EE'.
PERFORM bdc_field USING 'BDC_CURSOR' 'USRNAM'.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.