How to set the language of a mail template from NotificationUtil?

Hi experts!
I've been having some issues with the Message Template Language when using the NotificationUtil to send an Email.
How do I set the language of the template?
Do i set this by the sender? Or do I need to reference the recipient?
If so, how could I get the Account Object Interface from the user given that I got him as a collaborator?
I wish you could help me out whit this language problem.
Here's an example of the code I'm using:
Properties params = new Properties();
params.put(new String("PHASE_NAME"), faseName);
params.put(new String("DOCUMENT_TYPE"), docType);
params.put(new String("DOCUMENT_NAME"), contractName);
params.put(new String("OWNER_FIRST_LAST_NAME"), owner.toString());
params.put(new String("START_DATE"), fecha);
params.put(new String("INSTRUCTION"), "");
params.put(new String("DOCUMENT_HEADER_URL"), vinculo);
String[] recipients = {mail};
sender = session.getAccount();
mailTypeEnum = new MailTypeEnumType(MailTypeEnumType.ODP_WORKFLOW_APPROVAL_REQUEST_MSG);
NotificationUtil.sendNotification(recipients,sender, mailTypeEnum,params,null,null);
Thanks in Advance!

Hi vikram!
Sorry for the still inconvenience, but I'm getting this error:
Error in method invocation: Static method sendNotification( com.sap.odp.usermgmt.masterdata.UserAccountBo, com.sap.odp.usermgmt.masterdata.UserAccountBo, com.sap.odp.api.comp.messaging.MailTypeEnumType, java.util.Properties, null, null ) not found in class'com.sap.odp.api.util.NotificationUtil'
Im making the code the following way:
Properties params = new Properties();
params.put(new String("PHASE_NAME"), faseName);
params.put(new String("DOCUMENT_TYPE"), docType);
params.put(new String("DOCUMENT_NAME"), contractName);
params.put(new String("RECIPIENT_FIRST_NAME"), nombre);
params.put(new String("OWNER_FIRST_LAST_NAME"), owner.toString());
params.put(new String("START_DATE"), fecha);
params.put(new String("ORG_UNIT"), orgUnit);
params.put(new String("INSTRUCTION"), "");
params.put(new String("DOCUMENT_HEADER_URL"), vinculo);
recipients = IapiAccountLocator.lookup(session, collaborator.getPrincipal()); // This Changed.
( I also tried like this:
IapiAccountIfc recipients = IapiAccountLocator.lookup(session, collaborator.getPrincipal());)
sender = session.getAccount();
mailTypeEnum = new MailTypeEnumType(MailTypeEnumType.ODP_WORKFLOW_APPROVAL_REQUEST_MSG);
NotificationUtil.sendNotification(recipients,sender, mailTypeEnum,params,null,null);
Thanks again!

Similar Messages

  • [ISA 4.0 SP5] How to set the language of an order

    Hi,
    how to set the language of an order?
    I use address.setCountry( myCountry ) and works fine, but:
    an Order in R3 has also a field "Language" under the tab "Communication", but it's not set automatically, corresponding to the country.
    How do i set this field on the Java-side in InternetSales 4.0 Sp5?

    Hi vikram!
    Sorry for the still inconvenience, but I'm getting this error:
    Error in method invocation: Static method sendNotification( com.sap.odp.usermgmt.masterdata.UserAccountBo, com.sap.odp.usermgmt.masterdata.UserAccountBo, com.sap.odp.api.comp.messaging.MailTypeEnumType, java.util.Properties, null, null ) not found in class'com.sap.odp.api.util.NotificationUtil'
    Im making the code the following way:
    Properties params = new Properties();
    params.put(new String("PHASE_NAME"), faseName);
    params.put(new String("DOCUMENT_TYPE"), docType);
    params.put(new String("DOCUMENT_NAME"), contractName);
    params.put(new String("RECIPIENT_FIRST_NAME"), nombre);
    params.put(new String("OWNER_FIRST_LAST_NAME"), owner.toString());
    params.put(new String("START_DATE"), fecha);
    params.put(new String("ORG_UNIT"), orgUnit);
    params.put(new String("INSTRUCTION"), "");
    params.put(new String("DOCUMENT_HEADER_URL"), vinculo);
    recipients = IapiAccountLocator.lookup(session, collaborator.getPrincipal()); // This Changed.
    ( I also tried like this:
    IapiAccountIfc recipients = IapiAccountLocator.lookup(session, collaborator.getPrincipal());)
    sender = session.getAccount();
    mailTypeEnum = new MailTypeEnumType(MailTypeEnumType.ODP_WORKFLOW_APPROVAL_REQUEST_MSG);
    NotificationUtil.sendNotification(recipients,sender, mailTypeEnum,params,null,null);
    Thanks again!

  • How to set the table input in Query template?

    Hi all.
    I need to call a Bapi_objcl_change, with import parameter and a table as an input. I have done this, in BLS. I have set the table input in the
    form of xml. In BLS, I get the output(the value gets change in SAP R3, what i have given in BLS).  But if i set the same xml structure  in
    query template, I didn't get the output. Table input parameter does not take that xml source.  How to set the table input in Query template?
    can anyone help me?
    Regards,
    Hemalatha

    Hema,
    You probably need to XML encode the data so that it will pass properly and then xmldecode() it to set the BAPI input value.
    Sam

  • How to set the language of oracle universal installer

    Hi all,
    I have downloaded oracle9i database release 2 Enterprise/standard/personal edition for windows. so I got the them into 3 different folders as said in the oracle site. I have few questions.
    1.i have installed oracle using the universal installer, but my operating system is winxp german version.I want the installer to be in english so that i can easily navigate, how can i set the language. Does the installer automatically detects the OS and chosses the language.
    2. I have 2 sql scripts. One with Schema(tables for database with create statements) and other file with data(insert statements).That is Schema.sql, data.sql. How can i use these scripts for querying using the installed database.
    3. I am totally confused with SID, how to set it and what does it indicate(functionality).
    4. The login for SQL PlUS, i used scott and tiger. Because i think the installer did not installled completely, i could not create my own username/password. What will be the host-string while logging to sqlplus.
    Thanks and Regards
    Babu.

    1.i have installed oracle using the universal installer, but my operating system is winxp german version.I want the installer to be in english so that i can easily navigate, how can i set the language. Does the installer automatically detects the OS and chosses the language.From the control panel, regional setting, make default for English (United States) and English as default language. While installing oracle from OU, choose only english langauge.
    2. I have 2 sql scripts. One with Schema(tables for database with create statements) and other file with data(insert statements).That is Schema.sql, data.sql. How can i use these scripts for querying using the installed database.Once you have installed oracle and create database, make sure the following and then run your scripts.
    1. Check oracle services are started or not from the windows services. If yes, then do step 2, else, start services first and then do step 2.
    2. set oracle_sid=your_database_name
    3. sqlplus /nolog -- when you give this command, if you get reply that connected to idel instance, then, your database is not up, in this case, startup your database after step 4. (startup)
    4. connect / as sysdba
    5. run your script to create schema.
    --once schem created. connec to your newly created schema.
    6. connect username/password --
    7. run the script (insert records)
    3. I am totally confused with SID, how to set it and what does it indicate(functionality).ORACLE_SID is nothing bur your oracle database name. You will be asked to provide the database name while installing and creating oracle database.
    4. The login for SQL PlUS, i used scott and tiger. Because i think the installer did not installled completely, i could not create my own username/password. What will be the host-string while logging to sqlplus.As long as you want to do it on the database server, then, you dont need tnsname. If you want to access database from other machines, then, you need to create a tnsname to connect.
    Jaffar
    OCP DBA

  • How to set the language for a RFC call ?

    Hi,
    when calling from BSP (WAS620) to our R3 using RFC the results (units, ...) are always in DE. How do the call to get the results in EN?
    Language in RFC Destination/Logon&Security does not have an effect.
    thx for your support.

    Martin,
    I am not sure whether this is a logon problem.
    If you run the function module in transaction SE37 then you will get PC because there are some exits associated to it.
    When you call it from "outside", then the internal value is returned to the caller.
    The same happens when using BAPI from languages like Java or .Net
    The material field - in particular - is well-known for this behaviour.
    Hope someone else could testify because I haven't crossed the problem myself.
    Check this thread for instance:
    sap.net connector error
    If you have a doubt, then set an external breakpoint in the remote system for the RFC user. Then, check the content of the <i>sy-langu</i> field.
    Best regards,
    Guillaume
    Message was edited by:
            Guillaume GARCIA

  • How to set the "delete" button in Mail to actually delete instead if Archive Google Mail messages...

    I know these kinds of questions are asked a lot, but I just wanted to ask my specific question for a nice specific answer.
    I understand Gmail's thoughts on archiving and labels, but it makes gmail a beast to work with on mail clients.  I FINALLY have everything set up perfectly on my Mac's Mail app so that everything syncs and I get no duplicate messages.
    The only issue I have is that when I highlight emails and press the "trash" icon in the toolbar (and hit the delete key I assume) the message(s) is/are archived in the All Mail folder instead of going into the "Trash" folder.  The only way I can truly delete messages is to drag and drop them into the Gmail/Trash folder in the side bar, which can get tedious. 
    Is there anyway to set the "delete" icon and delete key to actually send messages to the trash instead if archiving without causing syncing issues, or do I just need to stick with the drag and drop method?
    Thank you.
    Respectfully,
    JAC151

    Take a look here: http://jeffschuette.com/2012/03/07/setting-up-apple-mail-to-rock-and-roll-with-g mail/
    Jeff explains why it happens and how to deal with it.

  • How to set the Correlation ID in Oracle Q from JMS Adapter

    Hi,
    I'm using a JMS Adapter on my BPEL process to push messages to an Oracle instance in another machine.
    While testing, I could see that a message is posted on the Q table, but the Correlation ID is null.
    How is the correlation ID on the Q set from the adapter? IDeally I want this ID dynamic to be unique.
    Is this something st on the Invoke activity to the jms adapter, i.e., the Correlations tab, or is that
    unrelated altogether.
    Thanks,
    Ramon

    Found the solution.
    On the Invoke activity, I set the property jca.jms.JMSCorrelationID to a variable I created.
    I set my variable to string appended with sysdate to make it unique.

  • How to send the Adobe page as mail attachement from webdynpro...

    Hi Experts,
    How to send the Adobe page as external mail attachment from webdynpro automatically (for example: If I input the data for sales order in a view and created the sales order, if the sales order is created then have to place the created sales order number and the some details in a adobe form and should send as external mail and have to specifying the body as "Sales order created and details can be found in the attached adobe form" from webdynpro).
    Do the needful.
    Thanks & regards,
    Ravi.

    Hi ravi,
    See the WDA forum for the how to attach a file in webdynpro component for the attachments.

  • How to set the language key in Sales document header text?

    Hi Guys,
    When I am creating a sales order I found in the header text tab only three languages English, Thai and Ukranian are mentained.. So can you please tell me how to add/ delete more language keys in language key field in a step by step process???
    Thanx and regards,
    JEET

    Just select the "unwanted language" keys (By 'right clicking') on each & then use the "delete" icon (3rd icon) on the bottom half.
    you can also manintain as many languages as you want.
    Pls do the needful.
    Rgds
    Sumanth.Gururaj
    Edited by: SUMANTH GURURAJ on Jan 21, 2011 6:21 PM

  • How to set the language in Safari? why is this so complicated?

    Hi,
    I have already installed Safari 5 but it is in French! I would like to change it into English. I don't find any language setting in the different menu/submenu/preference!
    I am using win7.
    While searching the web, I found that I have to that in the program file folder in the Safari.resources. When I deleted the fr.lproj nothing happened except reinstall the French language file!
    I tried to copy the content of en.lproj folder (which contains one file named bindict) and I put it in the fr.lproj but no change neither!
    Why changing the interface language is so complicated in Safari ?
    I think I will uninstall Safari and go back to Firefox.
    Message was edited by: ablar

    Hi there,
    Did you try the solutions described here:
    http://discussions.apple.com/message.jspa?messageID=6889371
    If so, did you try reinstalling Safari after following the steps?
    Hope that helps,
    Elliott

  • How to set the language of the component to a particular language?

    Hi!
    I need it for JTextField.
    Thanks.

    This is a sample of Hebrew class extending JTextField, the data typed will be translated to hebrew if neede.
    public class Hfield extends JTextField
         String key = "tcdsvuzjyhlfkonibxg;p.mera,/'q`w";
         String old = "`abcdefghijklmnopqrstuvwxyz.,/;'";
    public Hfield()
         super(1);
    protected void processKeyEvent(KeyEvent ev)
         int d = key.indexOf(ev.getKeyChar());
         if (d >= 0)
              if (d < 27) d = d +1488;
                   else   d = old.charAt(d);
              ev.setKeyChar((char)d);
         super.processKeyEvent(ev);     

  • How to set the value of a data template parameter at runtime?

    I went through the document and found one line "A parameter is a variable whose value can be set at runtime.". But there is no further description or example about this feature.
    Can anyone tell how to do or show me a example?
    Thanks in advance

    Hi,
    define in the report-definition a parameter (for example p_deptno). This results in an entry in the xdo-file:
    <parameter id="p_deptno"> ....
    Define the same parameter in the Data Template ....
         <parameters>
    <parameter name="p_deptno" datatype="number"/>
    </parameters>
    and use this parameter in your Query:
    <sqlStatement name="QueryDept">
    <![CDATA[SELECT DEPTNO,DNAME,LOC FROM DEPT WHERE DEPTNO = :p_depnto]]>
    </sqlStatement>
    Regards
    Rainer

  • How to set specific URL for broadcasting web templates from WAD

    Hi experts,
    I have created a sample web template in WAD by using SAP BI standerd  query.When I am executing the web template,it is redirecting me to some unintended web portal.I know the correct portal URL.Can anybody tell me where the redirecting portal URL settings are maintained in BI/BEx/WAD??
    Regards,
    Mandar.

    Hi Suman,
    Thanks a lot for your valuable reply.
    By the navigation you mentioned,I was able to identify where exactly I have to change the URL prefix.However,when I am saving the changes I made to URL prefix,system is redirecting me to "Varient Attributes" screen.I don't know what exactly this screen is about.Please help..
    Regards,
    Mandar.

  • How to set selected Language from Portal dropdown in Logon to User profile

    Hi Gurus,
    I select a language in Portal Language dropdown in the Logon Page.
    After login in the content is getting displayed in the browser language.
    I want the portal content to be displayed in the selected language in the portal LogonPage.
    I checked the thread Logon page change to add a dropdown for language
    The is the requirement for me too .
    Kindly suggest me on how to set the language in the Portal user Profile so that the portal contents gets displayed in the selected languages from the dropdown .
    Thanks in Advance

    Hi Prasanna,
    The language that the portal is displayed in depends on the following
    heirarchy, with the languages at the top of the list taking precedence
    over those at the bottom:
    1. Component (iview) language (defined in the portalapp.xml)
    2. Portal Mandatory language (defined in the prtDefault.properties)
    3. User language (defined in the user#s profile).
    4. Request language (defined by the browser).
    5. Portal Default language (defined in the prtDefault.properties)
    6. System Default language (default locale defined by the OS).
    So for example, if you have your portal user language (as in point 3)
    set to Russian, but the language of the iView that is the logon page
    (as in point 1) set to English, that logon page will be displayed in
    English.
    Keeping the above in mind, please make the necessary changes to the
    configurations and check if it helps.
    Regards,
    Sowmya
    Edited by: Sowmya K on Jun 2, 2011 11:32 AM

  • How to set the expiry time of an image

    how to set the expiry time of an image from within the servlet or jsp

    I am sending an image with the page, so the set the page expiry in the browser cache we can use META tags of html or response.setDateHeader to set the Expires attribute, this setting the expiry time of the page but is not setting the expiry time of the image which is going with the page

Maybe you are looking for