E-mail functions for Custom Extensions

Hello,
Is there a way to use the e-mail functions that P4P uses, including reading the config file, in a Custom Extension?
Thanks, in advance.

you can use something like the following
//If you want to get the current user's email (as the From):
var currentUser = userService.UserContext.User.ContainedUser as IUser;
string from = currentUser.email;
// To get the email info of the originator from a spec, access the SpecSummary's Originator property, which is an IUser, and then get the email property of the user.
string to = <yourSpec>.SpecSummary.Originator.email;
string subject = "...";
  EmailService().SendMessage(from , to, subject, body);
private static IUserService GetUserService()
            return AppPlatformHelper.ServiceManager.GetServiceByType<IUserService>();          
private static IEmailService EmailService()
       return AppPlatformHelper.ServiceManager.GetServiceByType<IEmailService>();          

Similar Messages

  • Enable E-mail functionality for RFQ/PO.

    Hi All,
    I have a requirement to enable E-mail functionality to send the PO/RFQ output to the Vendor. Whenever we go to the messages in the PO ME22N or ME23N & click on the out message, we should get a pop up asking to enter the E-mail address.
    Please let me know what settings do we need to do?
    -Muneer.

    Hi,
    Purchase order via e-mail in SAP system can be done , there are some configurations and pre-requisites to do as follow:
    1. You must maintain an e-mail address in the address in the vendor master.
    2. The same applies to your own user master. You also have to specify an e-mail address there in order to identify the sender.
    Note that it is not possible to change the e-mail address of the vendor via the SAP purchase order transaction (ME21N, ME22N, and so on). The system only uses the e-mail address of the vendor that is maintained in the vendor master!
    3. For the output type for default values, a communication strategy needs to be maintained in the Customizing that supports the e-mail. You can find the definition of the communication strategy in the Customizing via the following path: (SPRO -> IMG -> SAP Web Application Server -> Basic Services -> Message Control -> Define Communication Strategy). As a default, communication strategy CS01 is delivered. This already contains the necessary entry for the external communication. Bear in mind that without a suitable communication strategy it is not possible to communicate with a partner via Medium 5 (external sending).
    4. Use the standard SAP environment (program 'SAPFM06P', FORM routine 'ENTRY_NEU' and form 'MEDRUCK') as the processing routines.
    5. In the condition records for the output type (for example, Transaction MN04), use medium '5' (External send).
    6. You can use Transaction SCOT to trigger the output manually. The prerequisite for a correct sending is that the node is set correctly. This is not described here, but it must have already been carried out.
    7. To be able to display, for example, the e-mail in Outlook, enter PDF as the format in the node.
    For more details, check out the OSS note :191470
    Regards,
    Biju K

  • Automated mail function for sales order acknowledgement

    Hi Friends,
    We have a requirement for automated functionality for sending mail to the sold to customers when the order is first saved.
    We already have a customer program to convert into PDF and mail directly.
    But this is to automatically send the mail to sold to customer. I think for acknowledgement we have already a existing outputtype.
    I understand that we need to maintain the mail address over the customer master of the sold to.
    Apart from this, is there that we need to maintain to have this automated functionality of sending mails.
    I had tested with existing Z otuput type by changing the transmission medium to 5 and entering my own email id where it prompts to enter mail id. But it wont send any mails.
    Just wondering if we have any determined steps that i can follow.
    thanks in advance.
    Best Regards,
    Ram

    Hi:
    Order acknowlegement output BA00 or your copy of this one is capable of using medium 5 to send SMTP mail to an external address  ( even PDFs can be attached  is your want).  When you trigger the medium 5 output, did the output get process successfully and you get a green light in your output screen?   If not, have a look to see if a communication strategy is assigned.  If yes, your configuration is OK. What is missing is mostly likely that Basis have not set up SAPCONNECT to send SMTP mail externally for you.
    Frank

  • SPAU-like functionality for custom objects - Z* or Y* Objects?

    Hello Experts,
    My scenario is like below:
    Assume that my SAP System is DEV1 and it is of SAP 4.6X version. I have imported Program ZPGMA from foreign system DEV2. And are moved to the Production system PROD1. Now there are some corrections did in program ZPGMA in DEV1 system either by using modification assistant or by turning Modifications Assistant Off. And then moved to PROD1.
    Now we are going for Upgradation from 4.6X system to ECC 6.0.
    Now, i need to get the list of programs that have original system as DEV2 but are modified in DEV1.
    In brief, i am looking for some functionality similar to SPAU which would work for Custom objects (Z* or Y* Objects).
    Thanks and Best Regards,
    Suresh

    Hi Suresh,
    There is not any functionality like SPAU to find these kind of program.But if you want to find your DEV2 programs moved and modified in DEV1, just go in table TADIR and find source system field ( SRCSYSTEM ) as DEV2 .
    You will get list of program moved in DEV1.
    Regards
    NImesh S. Patel

  • Can I use "dvt" function for customizing the chart format in OBIEE 11g?

    Hi,
    ".pcxml" file cannot be found in OBIEE11g. However, can I use "dvt" function for customization? If yes, how?
    Reference for dvt function:
    http://docs.oracle.com/cd/E23943_01/apirefs.1111/e12418/tagdoc/dvt_pieGraph.html

    Hello,
    I know it's possible, because i already found some blogs about changing the chart colors and turning off the animated graphs.
    <Graph visualEffects="NONE" animationDuration="0">
    But we want to alter more chart options, like make a bar chart default stacked. In 10G this was possible. I think this is also
    possible in 11G through the dvt-graph-skin.xml, but what i want to know is, is there a document that explains which tags you could use in this file.
    It would be great to get some help on this.

  • Creation of partner functions for customer master with LSMW

    Hello,
    I try to create partner functions together with a customer via Batch Input in LSMW.
    Object: 0050, method: 0000, program name: RFBIDE00, program type: B.
    I use the structure BKNVP (Customer master partner functions) to create a new partner and set values for the fields KTONR and PARVW.
    When I start the batch input the fields are filled in correctly in a new dynpro. After the confirmation of these values the dynpro changes back to the partner functions sscreen, but the value for KTONR isn'n being transferred. So I get an error message.
    Is it only possible to update partner functions with that BI or what is going wrong ?
    Thanks in advance and regards
    Alex

    Hi Alex,
    Could you specify what error message you are getting?
    Thanks!
    Rudra

  • Partner function for customer through IDOC

    Hi All,
    I have a requirement in which I need to create the customer master through IDOC. I am using DEBMAS basic type for that. In its functionality, I need to assign different partner functions to it.
    When I create customer without giving any partner details,  4 entries get created by default with partner functions as BP, SP, PY, SH and KUNN2 value as INTERNAL or the same customer number which is getting created. But I want that the customer number provided by me should be assigned as partner function. Is there any way to change the default entry which is getting created so that I can replace the INTERNAL customer number with the one provided by me.
    I identified the segment as E1KNVPM in it at hierarchy level 3. I passed the partner function in the PARVW field of it and provided the customer number which I want to assign as partner function in the KUNN2 field. But I am getting error Customer INTERNAL already exists for function <Partner function>.
    Am I missing something. Any msgfn or any other input.
    Please help me on this.
    Thanks
    Natasha

    Hi,
    Im facing similar problem
    Im trying to create the customer master through IDOC.
    I am using DEBMAS06 Idoc. 
    I need to assign two partner functions to it.
    When I create a customer with  giving  two partner details, 
    6 entries get created by default with partner functions as BP, RP, EM, SH and KUNN2 value as INTERNAL,
    two others entries (ZC,ZV) are created because this partner roles i defined to be created but KUNN2 hasnt assined value and request to fill it.
    I identified the segment as E1KNVPM in it at hierarchy level 3.
    I passed the partner function in the PARVW field of it and provided the customer number which I want to assign as partner function in the KUNN2 field.
    But I am getting error when  "Customer INTERNAL already exists for function <Partner function>".
    Am I missing something. Any msgfn or any other input.
    How can avoid this error?
    Please help me on this.
    Thanks
    Armand

  • E-Mail Functionality for PO's

    Hi Every Body,
    I am working on email functionality.
    => (Requirement) Sending the PO Order Ouput to vendor via email in the form of PDF fom.
    => I am getting some problem while receiving mail in the OUTLOOK.
    => I am getting mail in the form of "TEXT Fomate"  with special character instead of "PDF Formate".
    For Your Information.
    => I am using following functional module.
    CONVERT_OTF - PDF Conversion FM
    SO_NEW_DOCUMENT_ATT_SEND_API1 - E-Mail FM.
    => Unicode is Mandatory.
    If any body is aware of this problem, provide some inputs to me to go ahead forward
    Thanks & Regards,
    Naga.

    Hi Naga
    Firstly , As you are getting problem while receiving mail through Outlook , and as you are getting mail in text format, then you need to check the Conversion OTF - PDF
    .Secondly also check what is the condition record you have maintained for the output type. with e-mail only or any other transmission medium
    Finally check in  the output type wheather you have assigned any smartform data , if assigned then go to smartform and check how the text conversion has been maintained
    Regards
    Srinath

  • Help needed: Search function for custom Repository Manager

    Hi there,
    i'm writing my own Repository Manager for EP 6.0 SP2 PL4.
    I've serious problems getting the search function running. I'm using the 'new', Netweaver-based API.
    I think, there are some general questions to answer:
    - My Repository Manager exposes lots of custom 
       properties to the system. I create the properties
       for example using following code:
       IProperty newProp = new StringSingleValueProperty(
         PropertyName.getPropertyName(
                  "{}" + myAttName),
         myAttVal,                         PropertyFlags.constructFlags(
                  true, false, true, false)
        Is there any convention for the propertie's name?
        I think it has to be written in lowercase only?
        Can I use ANY namespace I want instead of the
        empty default namespace? (For example:
    - After indexing my resources (of course, containing my
       custom properties), the TREX-Monitoring screen for my
       index shows all my custom properties in the 'Document
       Properties' area, but all uppercase chars are escaped
       somewhat. Is this OK?
    - Trying to use the index above to search for particular
       resources in my repository by my custom properties
       fails all the time ('no docs found...'); searching for
       any system property works fine. What's the reason?
    - How can I force the (Property-) search uses my
       custom namespace-manager's methods
       isQueryPropertyNameUnderstood() and
       getQueryBuilder()
       to perform a 'pure' property search by the repository
       manager? It seems that the TREX always handles the
       queries by itself, because my methods are never called.
    Thanx for you help,
    Daniel

    I created a new manager and copied the classes exactly from the "simple" example and I see similar behavior. Actually, when I do this, folders are recursively copied, but not files. Again, browsing and viewing of files work fine. Again, I am not seeing any unexpected exceptions.
    The only thing that changed were the names and namespaces. Nothing else at all was changed.
    This makes me think I am missing some configuration somewhere or there is something special about the example project that the wizards are not creating. The only difference I see in the project file is an additional nature (com.tssap.selena.cmf.PatternNature), but I am not sure that is relevant.
    Wow, I am really stumped.
    -Alex

  • Mail badge for custom folder

    I am running OS X Lion 10.7.2. I have configured my iCloud mail ID with the Mail app. I am also having my Gmail forwarded to my iCloud mail ID, and thanks to a rule I created in the web interface for iCloud mail, all mail being forwarded from Gmail lands in a particular folder in the Mail app. The problem is that the unread mail count badge does not appear for mails arriving in that custom folder. Is there a workaround to it?

    It seems not possible for me. May be using some scripts via GPO to modify this settings. Youcould ask in scripting, but I don't think it would be an easy work.
    Rgds

  • How to enable Like/Unlike, paging and searchbox functions for customized blog view list with JSLink.

    Hi All
    I am trying to customizing a view list which based on a blog template( =AllPost.aspx ) bu JSLink. The view need below 3 functions.
    1. User can set Like/Unlike for each item on the list view.
    2. User can move page by standard like page navigation buttons( prev/next ).
    3. User can search the specific item by searchbox keyword.
    I tried to overrideCtx.Templates.Item and overrideCtx.Template.Footer in .js - customized footer returns RenderFooterTemplate(ctx).
    a). Like/Unlike function worked fine.
    b). Page navigation and search did not worked.
    Next, I tried to overrideCtx.Templates.Body -
    a). Like/Unlike function worked not fine. - when the user clicks Like/UnLike on the page(n>2), list view moves top(n=1) after the below code executed.
    EnsureScriptFunc('reputation.js', 'Microsoft.Office.Server.ReputationModel.Reputation', function ()
    Microsoft.Office.Server.ReputationModel.Reputation.setLike(
    ctxObj,
    listId,
    itemId,
    like);
    b). Page navigation and search worked fine.
    Finally, I override both Item and Body with almost same code(differs set for the item object).
    After that all functions work fine, but I can not understand
    why. 
    Does anyone have explanation of that or another way?

    try this links for button funcitonality:
    https://social.msdn.microsoft.com/Forums/en-US/6a19b015-83a3-4cf3-a5da-216133ce936b/need-next-previous-button-on-list-view-webpart?forum=sharepointcustomization
    http://maulikdhorajia.blogspot.com/2011/06/sharepoint-2010-customize-paging-in.html

  • Reset Processing Status function for Custom Document does not exist?

    Expert,
    I have a need to reset Process Status of Custom Document from
    "Blocked - Awaiting Reply from Authorities" to previous status. Many times we will receive error messages from US AES and require further processing and resent.
    According to help.sap.com documentation, i should be able to find this function through
    System Administration. Choose System Monitoring ® Status of Customs Declarations/Shipments.
    I don't seem to be able to find this in our GTS 7.20 system. I have SP 009.
    Please help.
    Thank you,
    Wen

    ok. I received the answer from SAP. The transaction to reset processing status of custom declaration is
    /n/SAPSLL/CDOC_STARES accessible through role Menu /SAPSLL/LEG_SYS_COMM.
    Wen

  • How to maintain Partner Function for Customer

    Hi Guys,
                  I create customer using SD_CUSTOMER_MAINTAIN_ALL.
    Is there any provision to maintain partner type as well in this FM or any FM I can use to maintain partner type after creation ?
    Thanks

    I got it fixed my self.
    here is the solution.
    in user exit :EXIT_SAPMM06E_012.
    call below FM: MM_CALL_UPDATE_PARTNERS
    Trick is pass the partner values the one you wanted to below table: x_mmpa and xuekpa.
    you can calculate partner records from wyt3 table depends on your logic/requirement.
    CALL FUNCTION 'MM_CALL_UPDATE_PARTNERS'
         EXPORTING
           ebeln       = wa_ebeln
           bstyp       = 'F'
    *     knuma       = wa_knuma
           application = 'P'
         TABLES
           x_mmpa      = it_mmpa1
           y_mmpa      = it_mmpa2
           xuekpa      = it_uekpa1
           yuekpa      = it_uekpa2
           i_mmpa      = it_mmpa3
           u_mmpa      = it_mmpa4
           d_mmpa      = it_mmpa5.
    Thanks,
    Mahesh

  • Search Help functionality for Custom Field in CRM 6.0

    Hi,
    We have added custom field  PRODUCT_ID into component BT120H_CPL.  For this field, I need to provide search help in WebUI.  Can you please give some suggestion on the same.
    Regards,
    Ramki.

    Hi Ram,
                     Here is the sample code.
    Outbound plug:
    Global attribute : GR_CITYCODE_F4     Instance Attribute     Private     Type Ref To     IF_BSP_WD_POPUP
    data declaration
      DATA: LT_COL_DEF       TYPE TABLEVIEWCONTROLTAB,
            LS_COL_DEF       TYPE LINE OF TABLEVIEWCONTROLTAB,
            LV_REGION        TYPE REGIO,
            LV_COUNTRY       TYPE LAND1,
            LR_ENTITY_HEADER TYPE REF TO CL_CRM_BOL_ENTITY,
            LR_ENTITY_ADDR   TYPE REF TO CL_CRM_BOL_ENTITY.
      TRY.
          LR_ENTITY_HEADER ?= TYPED_CONTEXT->header->COLLECTION_WRAPPER->GET_CURRENT( ).
        CATCH CX_SY_MOVE_CAST_ERROR.
      ENDTRY.
      CHECK LR_ENTITY_HEADER IS BOUND.
      LR_ENTITY_ADDR ?= LR_ENTITY_HEADER->GET_RELATED_ENTITY( IV_RELATION_NAME = 'BuilStandardAddressRel' ).
        CHECK LR_ENTITY_ADDR IS BOUND.
    getting region and country
      CALL METHOD LR_ENTITY_ADDR->GET_PROPERTY_AS_VALUE
        EXPORTING
          IV_ATTR_NAME = 'REGION'
        IMPORTING
          EV_RESULT    = LV_REGION.
      CALL METHOD LR_ENTITY_ADDR->GET_PROPERTY_AS_VALUE
        EXPORTING
          IV_ATTR_NAME = 'COUNTRY'
        IMPORTING
          EV_RESULT    = LV_COUNTRY.
    appending citycode and description to internal table
      LS_COL_DEF-COLUMNNAME = 'ZZCITYCODE'.
      LS_COL_DEF-TITLE      = 'City Code'.
      APPEND LS_COL_DEF TO LT_COL_DEF.
      LS_COL_DEF-COLUMNNAME = 'TEXT'.
      LS_COL_DEF-TITLE      = 'Description'.
      APPEND LS_COL_DEF TO LT_COL_DEF.
      CLEAR: GT_CITYCODE[].
    fill the internal table  GT_CITYCODE whcih must appear in popup.
      FREE GR_CITYCODE_F4.
      GR_CITYCODE_F4 = COMP_CONTROLLER->WINDOW_MANAGER->CREATE_DECISION_POPUP( IV_TITLE             = 'City Code'
                                                                               IV_DESCRIPTION       = 'City Code'
                                                                               IV_VISIBLE_ROW_COUNT = 10
                                                                               IV_DISPLAY_TABLE     = GT_CITYCODE
                                                                               IV_VISIBLE_COLUMNS   = LT_COL_DEF ).
      GR_CITYCODE_F4->SET_ON_CLOSE_EVENT( IV_EVENT_NAME = 'CITYCODE_F4_SELECTED'
                                          IV_VIEW       = ME  ).
      GR_CITYCODE_F4->OPEN( ).
    on close event ****************************************************************
    where you can set the value of the  field *********************************
    METHOD EH_ONCITYCODE_F4_SELECTED.
    Added by wizard: Handler for event 'CITYCODE_F4_SELECTED'
    data declaration
      DATA: LR_OUTPUTNODE  TYPE REF TO CL_BSPWDCMP_BSPWDCOMPONEN_CN01,
            LR_ENTITY      TYPE REF TO IF_BOL_BO_PROPERTY_ACCESS,
            LR_HEADER      TYPE REF TO ZL_BP_HEAD_ACCOUNTDETAILS_CN00,
            LV_ROW_INDEX   TYPE STRING,
            LV_EVENT_NAME  TYPE STRING,
            LV_VALUE       TYPE STRING,
            LS_CITYCODE    TYPE ZTB0000A31PL2T .
      LR_OUTPUTNODE ?= GR_CITYCODE_F4->GET_CONTEXT_NODE( 'OUTPUTNODE' ).
      LV_ROW_INDEX = LR_OUTPUTNODE->GET_SELECTEDROWINDEX( ).
      LV_EVENT_NAME = LR_OUTPUTNODE->GET_EVENT_NAME( ).
      GR_CITYCODE_F4->CLOSE( ).
      IF LV_EVENT_NAME = 'OK'.
        LR_ENTITY ?= ME->TYPED_CONTEXT->HEADER->COLLECTION_WRAPPER->GET_CURRENT( ).
        READ TABLE GT_CITYCODE INTO LS_CITYCODE INDEX LV_ROW_INDEX.
        LR_HEADER ?= ME->TYPED_CONTEXT->HEADER.
        LR_HEADER->GS_CITYCODE_F4 = LS_CITYCODE.
        LV_VALUE = LS_CITYCODE-ZZCITYCODE.
      setting city code
        LR_ENTITY->SET_PROPERTY_AS_STRING( IV_ATTR_NAME = 'ZZCITYCODE'
                                           IV_VALUE     = LV_VALUE ).
      ENDIF.
    ENDMETHOD.
    Hope this helps.
    Regards,
    Ruby.

  • Mail functionality for entry made

    Hi,
    AT the time whenever employees (created as vendors) account get hit,we want to send mail to them.
    Is there any std functionality by which we can inform them about their account statement.
    I know this can be done by exits & all, But if any standard is there then I want to use that.
    Your help will be highly appreciated.
    Regards,
    Meenakshi

    Hi,
    No std workflow is available.
    regards

Maybe you are looking for

  • Use of ODI in Data Import scenario

    Hi, We are contemplating to use ODI for a Data Import scenario. The flow goes something like this: 1.A user specified flat file or xml with a mapping between the file columns and base table columns serves as the input. (Note that the file column name

  • Select permission denied in RPD

    I am mapping data in my rpd file and cannot view data or update row counts for almost all of my tables in the database. I am running obiee 11g on my local machine connected to an sql server database. The error I receive is "Select permission denied o

  • Calling mysql stored procedure having insert sql commands within cftransaction is not getting rolled back

    Hi, cftransaction is working perfectly when all the insert updates are called by cfqquery. But when there is a mysql stored procedure call with in cftrnsaction and that mysql stored procedure is having many inserts and updates, cftransaction is not a

  • Google Maps zooms with Apple magic mouse

    Ever since I bought the Apple magic mouse, I've noticed that whenever I use Google Maps via my desktop Apple, the map will zoom without me telling it to in street view.  This is INCREDIBLY annoying when trying to view a street or move across the map.

  • Great News for Java Game Developers!

    Finally, a complete game engine is being developed for Java! Mind2Machine is developing a genre-neutral game engine that goes way beyond a simple 3D Library. The engine is called: OpenMind Alpha v0.7 and includes many useful game programming librarie