Trigger mail

Hello experts,
i want to trigger mail with the output of the report, means as the report gets executed i want to trigger mail with the displayed output....
sample code highly appreciated...............

Hello,
Check this sample report.This report will be very useful for your requirement
REPORT ZV_JOB_READ NO STANDARD PAGE HEADING LINE-SIZE 255..
TABLES: TSP01.
DATA: SV_ADR TYPE SOMLRECI1-RECEIVER.
SELECT-OPTIONS : P_EMAIL1 FOR SV_ADR NO INTERVALS.
*DEFAULT '[email protected]',
PARAMETERS: P_SENDER LIKE SOMLRECI1-RECEIVER,
*DEFAULT '[email protected]',
            P_REPID LIKE SY-REPID, " Report to execute
            P_LINSZ LIKE SY-LINSZ DEFAULT 132, " Line size
            P_PAART LIKE SY-PAART DEFAULT 'X_65_132', " Paper Format
            P_SLSET LIKE SY-SLSET, "Variant name
            P_ODESCR LIKE SODOCCHGI1-OBJ_DESCR,
            P_ADESCR TYPE SO_OBJ_NAM,
            P_DELSPL AS CHECKBOX.
*DATA DECLARATION
DATA: GD_RECSIZE TYPE I.
* Spool IDs
TYPES: BEGIN OF T_TBTCP.
        INCLUDE STRUCTURE TBTCP.
TYPES: END OF T_TBTCP.
DATA: IT_TBTCP TYPE STANDARD TABLE OF T_TBTCP INITIAL SIZE 0,
      WA_TBTCP TYPE T_TBTCP.
* Job Runtime Parameters
DATA: GD_EVENTID LIKE TBTCM-EVENTID,
      GD_EVENTPARM LIKE TBTCM-EVENTPARM,
      GD_EXTERNAL_PROGRAM_ACTIVE LIKE TBTCM-XPGACTIVE,
      GD_JOBCOUNT LIKE TBTCM-JOBCOUNT,
      GD_JOBNAME LIKE TBTCM-JOBNAME,
      GD_STEPCOUNT LIKE TBTCM-STEPCOUNT,
      GD_ERROR TYPE SY-SUBRC,
      GD_RECIEVER TYPE SY-SUBRC.
DATA: W_RECSIZE TYPE I,
      MC_VALID(1) TYPE C.
DATA: GD_SUBJECT LIKE SODOCCHGI1-OBJ_DESCR,
      IT_MESS_BOD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
      IT_MESS_ATT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
      GD_SENDER_TYPE LIKE SOEXTRECI1-ADR_TYP,
      GD_ATTACHMENT_DESC TYPE SO_OBJ_NAM,
      GD_ATTACHMENT_NAME TYPE SO_OBJ_DES,
      MI_RQIDENT LIKE TSP01-RQIDENT.
* Spool to PDF conversions
DATA: GD_SPOOL_NR LIKE TSP01-RQIDENT,
      W_SPOOL_NR LIKE TSP01-RQIDENT,
      GD_DESTINATION LIKE RLGRAP-FILENAME,
      GD_BYTECOUNT LIKE TST01-DSIZE,
      GD_BUFFER TYPE STRING.
DATA: MSTR_PRINT_PARMS LIKE PRI_PARAMS.
* Binary store for PDF
DATA: BEGIN OF IT_PDF_OUTPUT OCCURS 0.
        INCLUDE STRUCTURE TLINE.
DATA: END OF IT_PDF_OUTPUT.
CONSTANTS: C_DEV LIKE SY-SYSID VALUE 'DEV',
           C_NO(1) TYPE C VALUE ' ',
           C_DEVICE(4) TYPE C VALUE 'LOCL'.
START-OF-SELECTION.
* Write statement to represent report output. Spool request is created
* if write statement is executed in background. This could also be an
* ALV grid which would be converted to PDF without any extra effort
*** Alternative way could be to submit another program and store spool
  CALL FUNCTION 'GET_PRINT_PARAMETERS'
  EXPORTING
        AUTHORITY = SPACE
        COPIES = '1'
        COVER_PAGE = SPACE
        DATA_SET = SPACE
        DEPARTMENT = SPACE
        DESTINATION = SPACE
        EXPIRATION = '1'
        IMMEDIATELY = SPACE
*       in_archive_parameters = space
*       in_parameters = space
        LAYOUT = SPACE
        MODE = SPACE
        NEW_LIST_ID = 'X'
        NO_DIALOG = 'X'
        USER = SY-UNAME
  IMPORTING
        OUT_PARAMETERS = MSTR_PRINT_PARMS
        VALID = MC_VALID
  EXCEPTIONS
        ARCHIVE_INFO_NOT_FOUND = 1
        INVALID_PRINT_PARAMS = 2
        INVALID_ARCHIVE_PARAMS = 3
        OTHERS = 4.
  IF MSTR_PRINT_PARMS-PDEST = SPACE.
    MSTR_PRINT_PARMS-PDEST = 'LOCL'.
  ENDIF.
  MSTR_PRINT_PARMS-LINSZ = P_LINSZ.
  MSTR_PRINT_PARMS-PAART = P_PAART.
  SUBMIT (P_REPID) TO SAP-SPOOL WITHOUT SPOOL DYNPRO
                      SPOOL PARAMETERS MSTR_PRINT_PARMS
                      USING SELECTION-SET P_SLSET
                      AND RETURN.
* Get spool id from program called above
  PERFORM GET_SPOOL_NUMBER USING SY-REPID SY-UNAME CHANGING MI_RQIDENT.
* IMPORT w_spool_nr FROM MEMORY ID SY-REPID.
  PERFORM CONVERT_SPOOL_TO_PDF.
  PERFORM PROCESS_EMAIL.
  IF P_DELSPL EQ 'X'.
    PERFORM DELETE_SPOOL.
  ENDIF.
  IF SY-SYSID = C_DEV.
    WAIT UP TO 5 SECONDS.
    SUBMIT RSCONN01 WITH MODE = 'INT'
    WITH OUTPUT = 'X'
    AND RETURN.
  ENDIF.
* FORM obtain_spool_id *
FORM OBTAIN_SPOOL_ID.
  CHECK NOT ( GD_JOBNAME IS INITIAL ).
  CHECK NOT ( GD_JOBCOUNT IS INITIAL ).
  SELECT * FROM TBTCP INTO TABLE IT_TBTCP
                              WHERE JOBNAME = GD_JOBNAME
                              AND JOBCOUNT = GD_JOBCOUNT
                              AND STEPCOUNT = GD_STEPCOUNT
                              AND LISTIDENT <> '0000000000'
                              ORDER BY JOBNAME
                              JOBCOUNT
                              STEPCOUNT.
  READ TABLE IT_TBTCP INTO WA_TBTCP INDEX 1.
  IF SY-SUBRC = 0.
    MESSAGE S004(ZDD) WITH GD_SPOOL_NR.
    GD_SPOOL_NR = WA_TBTCP-LISTIDENT.
    MESSAGE S004(ZDD) WITH GD_SPOOL_NR.
  ELSE.
    MESSAGE S005(ZDD).
  ENDIF.
ENDFORM. "OBTAIN_SPOOL_ID
* FORM get_job_details *
FORM GET_JOB_DETAILS.
* Get current job details
  CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
       IMPORTING
            EVENTID                 = GD_EVENTID
            EVENTPARM               = GD_EVENTPARM
            EXTERNAL_PROGRAM_ACTIVE = GD_EXTERNAL_PROGRAM_ACTIVE
            JOBCOUNT                = GD_JOBCOUNT
            JOBNAME                 = GD_JOBNAME
            STEPCOUNT               = GD_STEPCOUNT
       EXCEPTIONS
            NO_RUNTIME_INFO         = 1
            OTHERS                  = 2.
ENDFORM. "GET_JOB_DETAILS
* FORM convert_spool_to_pdf *
FORM CONVERT_SPOOL_TO_PDF.
  CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
       EXPORTING
            SRC_SPOOLID              = MI_RQIDENT
            NO_DIALOG                = C_NO
            DST_DEVICE               = C_DEVICE
       IMPORTING
            PDF_BYTECOUNT            = GD_BYTECOUNT
       TABLES
            PDF                      = IT_PDF_OUTPUT
       EXCEPTIONS
            ERR_NO_ABAP_SPOOLJOB     = 1
            ERR_NO_SPOOLJOB          = 2
            ERR_NO_PERMISSION        = 3
            ERR_CONV_NOT_POSSIBLE    = 4
            ERR_BAD_DESTDEVICE       = 5
            USER_CANCELLED           = 6
            ERR_SPOOLERROR           = 7
            ERR_TEMSEERROR           = 8
            ERR_BTCJOB_OPEN_FAILED   = 9
            ERR_BTCJOB_SUBMIT_FAILED = 10
            ERR_BTCJOB_CLOSE_FAILED  = 11
            OTHERS                   = 12.
  CHECK SY-SUBRC = 0.
* Transfer the 132-long strings to 255-long strings
  LOOP AT IT_PDF_OUTPUT.
    TRANSLATE IT_PDF_OUTPUT USING ' ~'.
    CONCATENATE GD_BUFFER IT_PDF_OUTPUT INTO GD_BUFFER.
  ENDLOOP.
  TRANSLATE GD_BUFFER USING '~ '.
  DO.
    IT_MESS_ATT = GD_BUFFER.
    APPEND IT_MESS_ATT.
    SHIFT GD_BUFFER LEFT BY 255 PLACES.
    IF GD_BUFFER IS INITIAL.
      EXIT.
    ENDIF.
  ENDDO.
ENDFORM. "CONVERT_SPOOL_TO_PDF
* FORM process_email *
FORM PROCESS_EMAIL.
  DESCRIBE TABLE IT_MESS_ATT LINES GD_RECSIZE.
  CHECK GD_RECSIZE > 0.
  LOOP AT P_EMAIL1.
    PERFORM SEND_EMAIL USING P_EMAIL1-LOW.
  ENDLOOP.
* perform send_email using p_email2.
ENDFORM. "PROCESS_EMAIL
* FORM send_email *
* --> p_email *
FORM SEND_EMAIL USING P_EMAIL.
  CHECK NOT ( P_EMAIL IS INITIAL ).
  REFRESH IT_MESS_BOD.
* Default subject matter
  GD_SUBJECT = P_ODESCR.
  GD_ATTACHMENT_DESC = P_ADESCR.
* CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
  IT_MESS_BOD = TEXT-001." 'This is an automated report from SAP.'.
  APPEND IT_MESS_BOD.
  IT_MESS_BOD = TEXT-002. " 'Please do not reply to this mail id.'.
  APPEND IT_MESS_BOD.
  IF P_SENDER EQ SPACE.
    GD_SENDER_TYPE = SPACE.
  ELSE.
    GD_SENDER_TYPE = 'INT'.
  ENDIF.
* Send file by email as .xls speadsheet
  PERFORM SEND_FILE_AS_EMAIL_ATTACHMENT
                                TABLES IT_MESS_BOD
                                IT_MESS_ATT
                                USING P_EMAIL
                                P_ODESCR
                                'PDF'
                                GD_ATTACHMENT_NAME
                                GD_ATTACHMENT_DESC
                                P_SENDER
                                GD_SENDER_TYPE
                                CHANGING GD_ERROR
                                GD_RECIEVER.
ENDFORM. "SEND_EMAIL
* FORM delete_spool *
FORM DELETE_SPOOL.
  DATA: LD_SPOOL_NR TYPE TSP01_SP0R-RQID_CHAR.
  LD_SPOOL_NR = GD_SPOOL_NR.
  CHECK P_DELSPL <> C_NO.
  CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
       EXPORTING
            SPOOLID = LD_SPOOL_NR.
ENDFORM. "DELETE_SPOOL
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
* Send email
FORM SEND_FILE_AS_EMAIL_ATTACHMENT TABLES IT_MESSAGE
                                          IT_ATTACH
                                          USING P_EMAIL
                                          P_MTITLE
                                          P_FORMAT
                                          P_FILENAME
                                          P_ATTDESCRIPTION
                                          P_SENDER_ADDRESS
                                          P_SENDER_ADDRES_TYPE
                                          CHANGING P_ERROR
                                          P_RECIEVER.
  DATA: LD_ERROR TYPE SY-SUBRC,
  LD_RECIEVER TYPE SY-SUBRC,
  LD_MTITLE LIKE SODOCCHGI1-OBJ_DESCR,
  LD_EMAIL LIKE SOMLRECI1-RECEIVER,
  LD_FORMAT TYPE SO_OBJ_TP ,
  LD_ATTDESCRIPTION TYPE SO_OBJ_NAM ,
  LD_ATTFILENAME TYPE SO_OBJ_DES ,
  LD_SENDER_ADDRESS LIKE SOEXTRECI1-RECEIVER,
  LD_SENDER_ADDRESS_TYPE LIKE SOEXTRECI1-ADR_TYP,
  LD_RECEIVER LIKE SY-SUBRC.
  DATA: T_PACKING_LIST LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
  T_CONTENTS LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
  T_RECEIVERS LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
  T_ATTACHMENT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
  T_OBJECT_HEADER LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
  W_CNT TYPE I,
  W_SENT_ALL(1) TYPE C,
  W_DOC_DATA LIKE SODOCCHGI1.
  LD_EMAIL = P_EMAIL.
  LD_MTITLE = P_MTITLE.
  LD_FORMAT = P_FORMAT.
  LD_ATTDESCRIPTION = P_ATTDESCRIPTION.
  LD_ATTFILENAME = P_FILENAME.
  LD_SENDER_ADDRESS = P_SENDER_ADDRESS.
  LD_SENDER_ADDRESS_TYPE = P_SENDER_ADDRES_TYPE.
* Fill the document data.
  W_DOC_DATA-DOC_SIZE = 1.
* Populate the subject/generic message attributes
  W_DOC_DATA-OBJ_LANGU = SY-LANGU.
  W_DOC_DATA-OBJ_NAME = 'SAPRPT'.
  W_DOC_DATA-OBJ_DESCR = LD_MTITLE .
  W_DOC_DATA-SENSITIVTY = 'F'.
* Fill the document data and get size of attachment
  CLEAR W_DOC_DATA.
  READ TABLE IT_ATTACH INDEX W_CNT.
  W_DOC_DATA-DOC_SIZE =
  ( W_CNT - 1 ) * 255 + STRLEN( IT_ATTACH ).
  W_DOC_DATA-OBJ_LANGU = SY-LANGU.
  W_DOC_DATA-OBJ_NAME = 'SAPRPT'.
  W_DOC_DATA-OBJ_DESCR = LD_MTITLE.
  W_DOC_DATA-SENSITIVTY = 'F'.
  CLEAR T_ATTACHMENT.
  REFRESH T_ATTACHMENT.
  T_ATTACHMENT[] = IT_ATTACH[].
* Describe the body of the message
  CLEAR T_PACKING_LIST.
  REFRESH T_PACKING_LIST.
  T_PACKING_LIST-TRANSF_BIN = SPACE.
  T_PACKING_LIST-HEAD_START = 1.
  T_PACKING_LIST-HEAD_NUM = 0.
  T_PACKING_LIST-BODY_START = 1.
  DESCRIBE TABLE IT_MESSAGE LINES T_PACKING_LIST-BODY_NUM.
  T_PACKING_LIST-DOC_TYPE = 'RAW'.
  APPEND T_PACKING_LIST.
* Create attachment notification
  T_PACKING_LIST-TRANSF_BIN = 'X'.
  T_PACKING_LIST-HEAD_START = 1.
  T_PACKING_LIST-HEAD_NUM = 1.
  T_PACKING_LIST-BODY_START = 1.
  DESCRIBE TABLE T_ATTACHMENT LINES T_PACKING_LIST-BODY_NUM.
  T_PACKING_LIST-DOC_TYPE = LD_FORMAT.
  T_PACKING_LIST-OBJ_DESCR = LD_ATTDESCRIPTION.
  T_PACKING_LIST-OBJ_NAME = LD_ATTFILENAME.
  T_PACKING_LIST-DOC_SIZE = T_PACKING_LIST-BODY_NUM * 255.
  APPEND T_PACKING_LIST.
* Add the recipients email address
  CLEAR T_RECEIVERS.
  REFRESH T_RECEIVERS.
  T_RECEIVERS-RECEIVER = LD_EMAIL.
  T_RECEIVERS-REC_TYPE = 'U'.
  T_RECEIVERS-COM_TYPE = 'INT'.
  T_RECEIVERS-NOTIF_DEL = 'X'.
  T_RECEIVERS-NOTIF_NDEL = 'X'.
  APPEND T_RECEIVERS.
  CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
       EXPORTING
            DOCUMENT_DATA              = W_DOC_DATA
            PUT_IN_OUTBOX              = 'X'
            SENDER_ADDRESS             = LD_SENDER_ADDRESS
            SENDER_ADDRESS_TYPE        = LD_SENDER_ADDRESS_TYPE
            COMMIT_WORK                = 'X'
       IMPORTING
            SENT_TO_ALL                = W_SENT_ALL
       TABLES
            PACKING_LIST               = T_PACKING_LIST
            CONTENTS_BIN               = T_ATTACHMENT
            CONTENTS_TXT               = IT_MESSAGE
            RECEIVERS                  = T_RECEIVERS
       EXCEPTIONS
            TOO_MANY_RECEIVERS         = 1
            DOCUMENT_NOT_SENT          = 2
            DOCUMENT_TYPE_NOT_EXIST    = 3
            OPERATION_NO_AUTHORIZATION = 4
            PARAMETER_ERROR            = 5
            X_ERROR                    = 6
            ENQUEUE_ERROR              = 7
            OTHERS                     = 8.
* Populate zerror return code
  LD_ERROR = SY-SUBRC.
* Populate zreceiver return code
  LOOP AT T_RECEIVERS.
    LD_RECEIVER = T_RECEIVERS-RETRN_CODE.
  ENDLOOP.
ENDFORM. "SEND_FILE_AS_EMAIL_ATTACHMENT
*& Form GET_SPOOL_NUMBER
* text
* -->P_SY_REPID text
* -->P_SY_UNAME text
* <--P_MI_RQIDENT text
FORM GET_SPOOL_NUMBER USING F_REPID
                            F_UNAME
                            CHANGING F_RQIDENT.
  DATA:
  LC_RQ2NAME LIKE TSP01-RQ2NAME.
  CONCATENATE F_REPID+0(9)
  F_UNAME+0(3)
  INTO LC_RQ2NAME.
  SELECT * FROM TSP01 WHERE RQ2NAME = LC_RQ2NAME
                      ORDER BY RQCRETIME DESCENDING.
    F_RQIDENT = TSP01-RQIDENT.
    EXIT.
  ENDSELECT.
  IF SY-SUBRC NE 0.
    CLEAR F_RQIDENT.
  ENDIF.
ENDFORM. " GET_SPOOL_NUMBER
Regards,
Vasanth

Similar Messages

  • Added custom date fields at contract;need to trigger mail using those dates

    Hi,
    II have added 14 custom fields in the service order quotation for handling waranty start date and end dates capturing for the maximum of 7 years contract.
    Then its usual yearly action of the waranty team to put the dates in those fields.
    The first set of 2 input fields will be filled at the quotation creation itself; rest the set of 12 fields will be updated in this 7 years time.
    My requirement is such that to the capture all the waranty end dates filled in the input fields and trigger a mail 30 days prior to that days.
    Example : I have contract from 01/08/2004 to 31/07/2010.
    Then my waranty startdate / end date can be filled by waranty team as 01/08/2004 to 31/07/2005 in the waranty first year.the i need to trigger a mail to waranty team on 01/07/2005.
    For the second year if we have dates filled as 01/08/2005 to 31/07/2006; then to trigger mail on 01/07/2006.
    I have tried using ACTIONS but couldn't get much help.
    As a work around thinking for a report to fetch the contract for that Trans.type and check the dates with the present date + 30 and collect those to perfrom the respective actions.This is workaround.
    Tried using the DATE TYPES creating 7 different DATE TYPES and assigning the ( end dates - 30 ) to that manually upon save.
    and using this DATE TYPE along with the action definition can we acheive ?  but it too will be work around.
    How to acheive this one. It became critical now in the project. 
    Thanks and Regards,
    Satish Akkina

    Hi,
    In your scenario, you don't need synchronous email facility.
    Probably you can create a z table and maintain all required dates in this table (before saving your transaction somewhere you would have to read your custom fields and save them in this table along with object ID/GUID). Then create a report that would read dates from z table and then send emails to your warranty team. Schedule this report in background with frequency of once day.
    Hope that helps.
    Regards,
    BJ

  • How to use RCIEV feature to trigger mail to a particular mail id in M0001

    Hi,
    I'm trying to trigger mail for any marital status change in personal data infotype for employee through dynamic action. Kindly help me in using RCIEV feature in M001 feature in detail for triggering mail to a manager other than administrator.
    Thanks,
    Kalai.

    Check this documentation.
    RCIEV  Defining a Distribution List or Mail Address
       you can define a feature that sets the parameters for a
        mail to be sent when changes are made to an infotype record. In the
        standard system, this involves feature M0001. You can also specify a
        feature within this feature to determine possible recipients of the mail
        according to the control values in the organizational assignment.
      Use
        Mail connection for master data infotype changes for employees and
        applicants.
      Procedure
        The return matrix of the feature has the following structure: X-VVVVVVVV
        with the following meanings:
        o   X - Indicator 'M' for mail or 'V' for distribution lists
        o   VVVVVVVV - Valid mailing name or distribution list, which is stored
                       in a shared folder in SAPoffice (transaction so04).
      See also
        Feature TEXT1

  • Trigger mail to dynamic Agents

    Hi Experts,
    My requirement is to trigger a email to user based on document type.
    Lets say my doc. type is     DOC1 then Approver will be USER1
                                                DOC2 then  Approver will be USER2.
    and mail should be triggered to this agents dynamically based on document type.
    I have created one z table and maintained this entries.
    created one Rule .
    If I pass my document type to rule, it fetches USER correctly.
    Now how to use this Rule in work flow to trigger mail to fetched User ??
    Please give me a step by step guide to do it.

    Hi Sunil,
    Probably you need to go through some basic material related to Business object and workflow.
    Go through the below link.
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/c5/e4ac12453d11d189430000e829fbbd/frameset.htm
    http://wiki.sdn.sap.com/wiki/display/ABAP/SAPBusinessWorkflow
    Regards
    Kedar

  • Trigger mail after UD

    Hi Experts,
    Can anyone please tell me how to configure for trigger mail in workplace once UD takes place.
    System should send mail once I save the UD & its should show pop up message of mail.
    Regards,

    There is concept of followup action in Usage decision code.Explre QS51 where against UD code there is followup action.
    Where you can get facility to trigger the mail.
    What you can do is ->In QCC3->Inspect lot completion>define followup action>here create a Z-function module & assign against the followup action......
    Take help of Abaper
    Also refer recent thread Follow-up Action at UD-QM

  • Trigger mail(sending mail to respective person)when budget is release in PS

    Dear Sir,
    I want to trigger mail ( sending mail to respective person ) when budget is release in PS.
    Please help for following :
    Option 1 : User exit
    Option 2: Workflow.
    Regards
    Vinu

    Hi Vinod,
    You can acheive this using a Workflow. What you need to do is set an user status as Rbud-release budget, and when ever you project is set to this status a workflow will trigger to the concerned aggest assigned to workflow task. Here you can provide a user decision as 1. Approve 2. Reject. When ever workflow triggers, approver can see in his inbox the project budget in Cj30 by clicking object link to cj30 and if he feels it is ok then he can click Approve button this will take him to CJ32 screen where he can release the budget. IF the user feels Budget need to be revised then he will click reject this will send an email to the person responsible to revise the budget and at the same time user status will be reset back to previous user status.
    The above  method we have adapted for one of our client. This is done by a workflow consultant.
    Thanks
    regards
    kishore

  • How to Trigger Mail

    Hi! All
          How to Trigger a Mail to a Vendor when the Stock level reached the Minimum Stock Level.
         I have assigned the mail Id for a particular vendor in Vendor master. and assigned the Stock level in Material Master. what are the details need to be done to trigger a mail.
    Thanks and Regards,
    Kv

    What the Vendor will do when  the Stock level reached the Minimum Stock Level..?
    You need to go for MRP, So that system will generate the Purchase Requistion Automatically when Stock level reaches the Minimum Stock Level..
    and you can Convert the Purchase Requistion  into Purchase Order ..and procure Material from that Vendor..

  • Trigger mail when backgroung job is cancel

    Hi,
    I want to trigger a mail to outlook when background job in sap gets cancel
    Regards
    Gopal

    Hi Gopal
    Have u read through [This|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/97d2e8b3-0b01-0010-b787-b8ce558a51c2] document?

  • Workflow doesnot automatically trigger mail ..

    Hi MDM Gurus,
    I am trying to design a simple workflow
    Start>Process>Approve-->Stop.
    This flow Or workflow works and does trigger a mail to approver and processer when i execute the workflow Manually .i.e In Datamgr i select the record... go to records in header --workflow and execute the corresponding workflow..evrything works fine..
    But when i put the XML file in ready folder(to automatically suck into datamanager with help of MDIS server) of respective repository..Workflow doesnot trigger a mail...What can be the reason ..I have checked the mds.ini file and it has server path in it.
    Please can anyone let me know what can be the problem...
    Regards,
    Vikrant...

    Hi Vikrant,
    I have worked on a similar scenario as yours,where my workflows steps were
    START->MATCH->APPROVE->STOP->
    I automated this workflow,whereby the import file was automatically pulled into MDM and workflow automatically launched  then the matching strategy automatically executed on them.
    For this I had to:
    - Create a workflow chk if all the stencil are properly connected and then SAVE the workflow.
    -Fill in the properties of all properly,by mentioning the strategy name in the match stencil.
    -Making the trigger action as Record Import
    -In Configuration options giving the name of the workflow
    -Setting up the ini file and giving the delay time.
    If all these steps are carried out properly your workflow should work automatically fine,it worked for me
    Check to see your import server is up and running fine in the services and that your workflow is saved properly.
    Below link might help you build your workflow correctly
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=workflow&cat=sdn_all
    (Dynamism in Static Master Data Management Area - The Workflow)
    Thanks & Regards
    Simona

  • Trigger mail for cancelled background jobs scheduled using SM37

    Dear Experts,
    My requirement is to trigger email whenever a job gets cancelled in background.
    For this I have already tried creating a workflow using BO BPJOB for event ABORTED.
    But for some reason the event is never getting triggered.
    I tested executing the workflow from tcode SWDD, it was running successfully, which means that there is no issue with my workflow.
    Now I want to resolve the above issue   OR
    I want to raise the event manually from the program through some BADI or Exit.
    But I didn't find any BADI or Exit for tcode SM37. Can anybody let me know if any.

    Hi,
    Please refer the below links.
    Workflow- Background job fail
    Re: Send mail when job fails
    Regards
    GK.
    Moderator message: please do not post just links without any further explanations.
    Edited by: Thomas Zloch on Sep 20, 2010 11:53 AM

  • Submit button to trigger mail sending

    my requiredment is in interactive form.. i have some fields to be filled by end user at their local machines..
    and then a submit button is there, which when clicked will trigger a new mail (say an new mail window of outlook express will open with this pdf attached to a particular receiver name by default..
    can some body tell me what script i have to write (in formcalc/javascript) for this and  in which event of the submit button i should write the script

    Soumya,
    Check this [document|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c2567f2b-0b01-0010-b7b5-977cbf80665d]
    Another thing which I found and you can try is :
    1. Create a regular button.
    2. In the Object palette, set the Control Type to Submit.
    3. Go to the Submit tab. Select Submit Format as PDF.
    4. In the Submit to URL box, type the submit email address preceded by mailto: tag
        For example: mailto:[email protected]
    Please note that in order to submit a PDF, either :
    - your end users must have Acrobat installed; or
    - you must pay Adobe for a Reader Extensions license for your form.
    If you don't do this, your button won't work.
    Chintan
    Edited by: Chintan Virani on Mar 3, 2008 11:05 AM

  • CS02 - trigger mail at save with detail of changes

    Dear Sapians,
      I come through a requirement in which , i have to trigger a mail to authorized user with detail of changes done in CS02 by unauthorized user.
    I got a BADI 'BOM_UPDATE'  'CHANGE_AT_SAVE'.
    And as per my understanding change detail are in table CDHDR and CDPOS.
    And in above table data is loaded after CS02 is saved.
    So, no detail of recent changes done is reflected in CDHDR and CDPOS .
    So, I am looking for some USER-EXITS or BADI , which help me out in this scenario.
    Scenario is :--
      a).
          When changes are done in CS02 by some UNAUTHORIZED USER, changes has to be verified by AUTHORIZED USER, so change detail has to be send to AUTHORIZED USER.
    Awaiting for your reply
    Thanks,
    Jeet

    Dear
    Sorry for not discussing the whole scenario.
    Actually , If some unauthorized user gas done some changes in CS02  than BOM Status is to be '2',
                    so mail is needed to ask authorized user permission to set BOM status '1'.
    But in the same time , authorized wanna know what changes are done. and changes are recorded in cdhdr and cdpos tables which is updated after after bom is saved not in between.
    That why mail is needed.

  • Need to trigger mail to requestor along with creator in SRM 7.0

    Hi Experts,
    We are using SRM 7.0 Extended classic scenario with process controlled Workflow in our system.
    As I am very much new to the workflow concept need your help in this regard.
    We have a requirement where we need to trigger a rejection email when Shooping cart got rejected by the approver to the requestor along with creator.
    As per our current design rejection mail is going only to creator but not requestor.
    Can somebody help me in this regard how to get this functionality.
    Thanks.
    Regards,
    Kalyani

    Hi Konstantin,
    We tried with suggested badi BBP_ALERTING BADI. But when I set the break-point in the enhancement of this badi and tried to trigger by rejecting the Shopping cart, i dont see any entries in the structure CT_RECEPIENTS[].
    Some entries should be there in CT_RECEPIENTS[] by the time this badi triggers or how to figure this out?
    Small change in my requirement is rejection mail is going successfully to requestor and we are expecting same mail to creator.
    Thanks in advance.
    Regards,
    Kalyani

  • Trigger mail notification on UDF update

    Hi All,
    I have a created a custom mail notification and I want to trigger it when USR_UDF_FLAG value becomes YES on user form.Please let me know how to achieve it.
    Thanks,
    Raj

    What exactly do you mean when you say you have created a custom email notification .
    You can have a task for the UDF update in the process task triggers look up and when the UDF update task is triggerred , check to see if value is YES , then return a response YES and send an email on this response code via a email task .
    OR
    You can use a entity adapter in post update which will check whether the value of UDF is Yes and send email using API .
    Thanks
    Suren

  • File sender adapter: trigger mail if file is not there

    Hi,
    I have an scenario where I have a file sender adapter, and I need to look for a file in a specific folder from a specific FTP site.
    If the file is not present there, I need to trigger an alert to let some people know that the file was not found.
    Is this possible? If so, how should I do it?
    Thanks!

    You could also write an abap in your PI system to call the function 'EPS_GET_DIRECTORY_LISTING' against the FTP site/folder/filename(s) at a required interval if you don't want to use a BPM. This abap could also send an email if you so desired.
    The general theory should be that if you can do something a simpler way then don't use BPM's if you can avoid them.

Maybe you are looking for

  • I need Help with a website I've created

    I need help with a website I've created (www.jonathanhazelwood.com/lighthouse) I created the folowing site with dreamweaver at my current resolution 1366 by 768. Looks great on my screen resolution but if it is viewed on other resolutions the menu mo

  • Picture and audio not matching in Photo Booth

    Hi, can anyone tell me why when I record a video using Photo Booth the audio doesn't match up to the picture? I recently recorded a video and when I went back to watch it I noticed that the video starts and then like 30 seconds later the sound starts

  • Sync the movies in Finder Movies and the movies in iTunes

    I wish that the movies in my Finder folder "Movies" would somehow synchronize with the iTunes movies. I don't want to have to copy my movies from finder in to iTunes and vice versa in the interest of saving disk space. Besides this, i think it would

  • IMac Intel Edirol FA-66 monitoring delay

    I read somewhere else through the discussions that Edirol products can have some problems working with GarageBand. I used it a few times on my iMac Intel with guitar/bass and every time I experienced a monitoring delay after 2-3 mins from instrument

  • Export table as insert stops short

    I'm trying to export a table as insert statements however after 2436s rows the SQL Developer stops generating statements, and after quite a while the progress bar closes. The final insert is never completed, and seems to die in slightly different pla