Adding Namespace to already existing XML

Hi,
I have created an xml by using XMLTYPE( oracle object ). Now I want to add a namespace to the existing root node. How can I achieve this?
Currently
<RESPONSE>
<TAG1>jack</TAG1>
<TAG2>mon<TAG2>
</RESPONSE>
Desired ouput
<RESPONSE xmns=''http://aloha.com">
<TAG1>jack</TAG1>
<TAG2>mon<TAG2>
</RESPONSE>
Thanks,
VJ
Edited by: AKVK on Oct 11, 2009 2:44 PM

I'm not too hot with stylesheets, but if you can't add the namespace in when you generate the XML (why not?), you would do a transform on the XML to give it a namespace.
So far I've got this...
SQL> ed
Wrote file afiedt.buf
  1  with t as (select xmltype('<RESPONSE><TAG1>jack</TAG1><TAG2>mon</TAG2></RESPONSE>') as xml from dual)
  2  --
  3  select xmltransform(xml, xmltype('<?xml version="1.0"?>
  4      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://aloha.com">
  5        <xsl:template match="*">
  6         <xsl:element name="{local-name()}">
  7           <xsl:apply-templates select="@* | node()" />
  8         </xsl:element>
  9        </xsl:template>
10      </xsl:stylesheet>')) as xml
11* from t
SQL> /
XML
<RESPONSE xmlns="" xmlns="http://aloha.com"><TAG1 xmlns="">jack</TAG1><TAG2 xmlns="">mon</TAG2></RESPONSE>
SQL>... but it's got some additional xmlns="" in the tags and I'm not sure how to get rid of those.... hmmm.... I'm guessing someone will know XSL better than me (can't be hard!)

Similar Messages

  • Adding CDATA to an existing xml and flash asset

    Hi, I am a front end web designer/developer and
    analyst...struggling with putting an accordian flash xml menu
    together. I have it done except I need to add a simple trademark
    symbol circle with r. I am struggling with how to do this since I
    am not savvy in actioncript. I assume the best way is to add it is
    with a CDATA child node, but do not know how or whatever is the
    best way to get this done since am on a tight deadline. I need
    someone to explain step by step what I have to do to get this
    simple addition resolved. Attached are the links to home page and
    code for the xml file. The left navigation is the asset that I need
    to add the trademark symbol under about, about ADHERE. Thanks so
    much in advance!!!!!!
    [URL=http://www.nodcreative.com/natrecor_sliced/natrecor_index.html]index
    page with flash xml menu asset[/URL]
    xml code:
    <?xml version="1.0" encoding="UTF-8"?>
    <accodion>
    <item name="HOME">
    </item>
    <item name="ABOUT">
    <item name= "ABOUT
    ADHERE<![CDATA[write]]>"></item>
    <item name="Medical Information" url="
    http://www.jnj.com?ref=Random">
    </item>
    <item name="About SCIOS" url="
    http://www.jnj.com?ref=Random">
    </item>
    </item>
    <item name="INTERACTIVE DOSING INFORMATION">
    <item name="Indications and Usage" url="
    http://www.jnj.com?ref=Random"></item>
    <item name="Contraindications" url="
    http://www.jnj.com?ref=Random"></item>
    <item name="Warnings" url="
    http://www.jnj.com?ref=Random"></item>
    <item name="Dosage and Administration" url="
    http://www.jnj.com?ref=Random"></item>
    </item>
    <item name="RESOURCES AND TOOLS">
    <item name="NATRECOR PI" url="
    http://www.jnj.com?ref=Random"></item>
    <item name="About Heart Failure" url="
    http://www.jnj.com?ref=Random"></item>
    <item name="Stages of Heart Failure" url="
    http://www.jnj.com?ref=Random"></item>
    <item name="NATRECOR Dosing Information" url="
    http://www.jnj.com?ref=Random"></item>
    <item name="Patient Management Resources" url="
    http://www.jnj.com?ref=Random"></item>
    </item>
    <item name="US PRESCRIBING INFORMATION">
    </item>
    <item name="IMPORTANT SAFETY INFORMATION
    ref=http://www.jnj.com">
    </item>
    <item name="REGISTRATION ref=http://www.jnj.com">
    </item>
    </accodion>
    FLASH actionscript is as follows:
    // The accordion
    var accordion = this
    // The item list
    var itemList = []
    // SETTINGS
    //-------------PROPERTIES----------------
    // Separation between the buttons
    var separation = 1.5
    // Tabulation between the buttons and the margin
    var tabulation = 10
    // if true, it cant be more than one items opened at the same
    time (only for the first buttons, POWERFUL, MENU ,ACCORDION, ets).
    var autoClose = true
    // if true, it cant be more than one subItems opened at the
    same time.
    var subItemAutoClose = true
    // if true, open and close all the subItems at the same time.
    var openAll = false
    // The height of the button
    var itemHeight = 21
    // The width of the button
    var itemWidth = 230
    // If true, show the light over the button
    var light = true
    // The ease of the menu opening
    var openEase = 2.5
    // The ease of the menu closing
    var closeEase = 2.5
    // The rollOut color fade speed
    var rollOutFade = 8
    //-------------COLORS----------------
    // The color of the button
    var buttonColor = 0xa
    // The roll over color
    var rollOverColor = 0xCCCCCC
    // The arrow color
    var arrowColor = 0xCCCCCC
    // The arrow color on roll over
    var rollOverArrowColor = 0x000000
    // The text color
    var TextColor = 0xFFFFFF
    // The text color on roll over
    var rollOverText = 0x000000
    // LOADING XML
    // The xml data
    var xmlSource:XML = new XML
    // Loading the xml
    xmlSource.onLoad = function(success:Boolean):Void {
    // When the load finishs...
    if (success) {
    // The first node of the xml
    xmlRoot = xmlSource.firstChild
    // The item nodes
    xmlItems = xmlRoot.childNodes
    // The total of items
    total = xmlItems.length
    // Creating the buttons
    for (i=0; i<total; i++){
    // Attaching the buttons
    accordion.attachMovie("item", "item" + i, i)
    // The button reference
    itemList
    = accordion["item"+i]
    // The first node of the item node
    itemList.xmlRoot = xmlItems
    // The separation between subitems
    itemList.separation = separation
    // Tabulation between the subitems and the margin
    itemList
    .tabulation = tabulation
    // subItems auto close
    itemList.subItemAutoClose = subItemAutoClose
    // The subitems height
    itemList
    .itemHeight = itemHeight
    // The subitems width
    itemList.itemWidth = itemWidth
    // shows/hides the subitems light
    itemList
    .light = light
    // The subitems color
    itemList.buttonColor = buttonColor
    // The roll over color
    itemList
    .rollOverColor = rollOverColor
    // The arrow color
    itemList.arrowColor = arrowColor
    // the arrow color on roll over
    itemList
    .rollOverArrowColor = rollOverArrowColor
    // The text color
    itemList.TextColor = TextColor
    // The roll over text color
    itemList
    .rollOverText = rollOverText
    // the opening easing
    itemList.openEase = openEase
    // The closing easing
    itemList
    .closeEase = closeEase
    // The roll over fade speed
    itemList.rollOutFade = rollOutFade
    // open all
    itemList
    .openAll = openAll
    // ignore white
    xmlSource.ignoreWhite = true;
    // Loads the .xml file
    xmlSource.load("accordion.xml");
    // Aligning the items each one below the other
    this.onEnterFrame=function(){
    // Does the align to ALL the items
    for (i=1; i<total; i++){
    // Aligning the items
    itemList._y = itemList[i-1]._y +
    itemList[i-1].mask._height + itemList[i-1].button._height +
    separation
    // The cursor position
    cursor._x = _xmouse
    cursor._y = _ymouse
    // Opens the items
    onMouseDown = function (){
    // Does this to all the buttons
    for (i=0; i<total; i++){
    // If is clicked
    if (itemList
    .button.hitTest(cursor)){
    // Shows the current item
    showCurrent(itemList)
    // Shows the button clicked
    showCurrent=function(current){
    // Does this to all the buttons
    for (i=0; i<total; i++){
    // Does this to all the buttons exept the clicked
    if (itemList
    !=current){
    // Close the other items if autoclose = true
    if (autoClose){
    // Close the other items
    itemList.openBox=false
    // fades the roll over effect of the other items
    itemList
    .over = false
    //Does this to the clcked item only
    } else {
    // If it has sub items
    if (total>0){
    //Hides them if its open
    if (itemList.openBox){
    itemList
    .openBox=false
    //Shows them if its closed
    } else {
    itemList.openBox=true
    // If it has no subitems goes to the link
    } else {
    getURL(xmlRoot.attributes.url, _self)

    Please don't cross-post in a bunch of forums. Also when
    adding code to a post, please use the attach code button. That
    keeps the formatting and makes it easier to read. Your code is far
    too long and way to unformatted to really understand quickly.
    I don't know why you would need a CDATA node to get the
    registered symbol. If the XML file you are working with is saved as
    unicode (UTF-8) the symbol should come across just fine. Just
    putting the UTF-8 at the beginning doesn't tell whatever program
    you are using to save as UTF-8!
    Do you know how to make the registered symbol? On windows it
    is ALT -0174 (use the keypad for those numbers).
    Once you've got the symbol in your XML the next step is to
    check if Flash is loading it correctly. When you are in the testing
    environment go to the Debug menu and select List Variables. The
    trace window will show all the variables -- and there are probably
    a lot! Search/Find something close to the symbol and see if the
    trace window shows the symbol correctly. If it does then Flash is
    readying it correctly and if it isn't showing you have problems
    with your textfield. If it isn't showing correctly then your XML
    file isn't UTF-8.
    If it is textfield problems I wouldn't know what to do since
    it is inside a component. Post back with your findings.

  • Is it possible to update inside of an already existing .xml file?

    I have a problem where I had to write an implementation of stack and make it read files and find errors inside the files. The only problem I am having is being able to then go into the file and fix the problem. Any chance anyone could help me out?
    Thanks

    allieyooo wrote:
    That would be great if my professor did not care about performance but that is half of our grade.So write something; test it for correctness; and then performance test it (and document the results)... If it's not upto scratch then think about "How can I speed this up".
    Performance still isn't a primary design motivation.
    I'll bet that "half the marks" are primarily aimed at adequately metricating (and documenting) performance (which can be very tricky)... and secondarily; introducing you profiling your application and redesigning & tweaking to achieve the required performance.
    What performance requirements have you got? And how big (in bytes) is the data-file? Any statement of acceptable test-beds?. Any stated limitations on the design you can use to achieve it? Resource limitations? You know; that sort of stuff.
    Can you post a more complete description of the assignment... or better a URL I can download the assignment package from. It sounds like an interesting exercise.
    Cheers. Keith.
    Edited by: corlettk on 23/04/2009 15:23 ~~ Ooops!

  • Adding namespace as prefix to existing trasport object contents

    Hi there,
    I'm dealing with the following situation:
    I've written a program, so it's already finished. Now the Idea is, unfortunately this Idea came to my mind a little late, to generate and use a namespace for all the transport objects included in the transport package, since this program will be deployed on different customer systems and I want to avoid inconsistency regarding the Y- / Z-Objects.
    I've already reserved a namespace and added it via SE03 >> Administration: Display/Change Namespaces to my system.
    Now my question:
    Is there any function or possibility to set this new namespace as prefix for all already existing objects in my transport package, or has this to be done manually for every single object?
    Any help and/or ideas in this matter will be kindly appreciated.
    Best Regards,
    Marc

    Hi Matt,
    thanks for your reply. I guess you're right, too bad
    Best regards,
    Marc

  • Adding an attribute to some pre-existing XML

    Hi all,
    I have a table with some small XML documents in a CLOB column and i'd like to add an attribute to one of the elements using SQL. Neither the table nor the XML is "mine" so I can't make any significant changes to the structure or current content - I just want to add this one attriibute.
    For example a row has this value in the CLOB column :
    <?xml version="1.0"?>
    <product>
    <detail>
    <supplier id="12345"/>
    </detail>
    </product>
    and i'd like to add a "test" attribute to the <product> element, like this :
    <?xml version="1.0"?>
    <product test="yes">
    <detail>
    <supplier id="12345"/>
    </detail>
    </product>
    I'd hoped updateXML would do it like this, but it won't (unless the attribute already exists, which alas it doesn't always) :
    select updatexml(xmltype(my_xml_column), '/product/@test', 'yes') new_xml
    from my_table
    Can anyone help me here? I've not really delved too deeply into Oracle's XML (or XML generally for that matter) and just need to perform this simple update!
    Thanks,
    Steve

    Thanks for this. I had looked (briefly!) at this package but it did seem a little over complicated for what i wanted - ideally I just wanted to write a SQL statement to do it all.
    Is there not a simpler way?
    Steve

  • Adding a new item to an already existing BOM

    Hi,
        I am having a problem adding a new item to an already existing parent BOM.I excute the following code (as per the SDK).
        Dim vProdTree As SAPbobsCOM.ProductTrees
        Set vProdTree = vCmp.GetBusinessObject(oProductTrees)
        'Set Values to the fields
        vProdTree.TreeCode = "Item1"
        vProdTree.TreeType = iProductionTree
        'Set Values to the Assembly parts of the
        'First Assembly
        vProdTree.Items.ItemCode = Excel.Row(Cell1)
        vProdTree.Items.Price = 20
        vProdTree.Items.Quantity = 1
        vProdTree.Items.Currency = "Eur"
        'Adding the Product Tree
        RetVal = vProdTree.Add
        If (RetVal <> 0) Then
            vCmp.GetLastError ErrCode, ErrMsg
            MsgBox ErrCode & " " & ErrMsg
        End If
    If there is no parent BOM production tree with keycode Item1, then when the above code is run for the first time, it works.The issue occurs when I run change my excel, Cell1 to a different value and run the program again. The error states that the code already exists, which is correct, but does not  append the item to the existing BOM.
    I have tried vProdTree.Update, but this line overwrites the original child item in the BOM, rather than appending a new item, which is what I want it to do.
    Any  help is appreciated.
    - Adrian.V

    Your issue here is how the "Items" (which is actually pointing to ProductTree_Lines object) works. It is a List of items, and when you get the object is always pointing at the first item in the list.
    So for example, to add a BOM with two items you would need to set the details of the first Item and then add a line using vProdTree.Items.Add() before setting the values for that item.
    e.g.:
    Dim vProdTree As SAPbobsCOM.ProductTrees
    Set vProdTree = vCmp.GetBusinessObject(oProductTrees)
    'Set Values to the fields
    vProdTree.TreeCode = "Item1"
    vProdTree.TreeType = iProductionTree
    'Set Values to the Assembly parts of the
    'First Assembly
    vProdTree.Items.ItemCode = Excel.Row(Cell1)
    vProdTree.Items.Price = 20
    vProdTree.Items.Quantity = 1
    vProdTree.Items.Currency = "Eur"
    'Add a second item to the BOM
    vProdTree.Items.Add
    vProdTree.Items.ItemCode = Excel.Row(Cell2)
    vProdTree.Items.Price = 50
    vProdTree.Items.Quantity = 1
    vProdTree.Items.Currency = "Eur"
    'Adding the Product Tree
    RetVal = vProdTree.Add
    If (RetVal 0) Then
    vCmp.GetLastError ErrCode, ErrMsg
    MsgBox ErrCode & " " & ErrMsg
    End If
    To do what you want to do, which is get the BOM and add a new item to it, you will need to do this:
    Dim vProdTree As SAPbobsCOM.ProductTrees
    Set vProdTree = vCmp.GetBusinessObject(oProductTrees)
    'Get your BOM by key
    vProdTree.GetByKey("Item1")
    'Add a second item to the BOM
    'First Item exists so you need to add a new row
    vProdTree.Items.Add
    vProdTree.Items.ItemCode = Excel.Row(Cell1)
    vProdTree.Items.Price = 50
    vProdTree.Items.Quantity = 1
    vProdTree.Items.Currency = "Eur"
    'Update the Product Tree
    RetVal = vProdTree.Update
    If (RetVal 0) Then
    vCmp.GetLastError ErrCode, ErrMsg
    MsgBox ErrCode & " " & ErrMsg
    End If
    Method one allows you to add multiple lines as you add the object (which makes more sense), method 2 allows you to get the object after it has been added and add multiple lines to it. This is similar to how the Document_Lines object works.

  • Adding new custom field in already existing custom tab for MM01

    Hello Guru,
    I have a requirement that add a custom field in already existing custom view of MM01. I did the following steps :
    1. I have cerated a new field in MARA using APPEND structure.
    2. I have found the function group(Y_FE_MARA) that already there other subscreens, so that I have added another subscreen in that function group and created a field from MARA in the screen.
    3. in SPRO went for the path Logistics General->Material Master->Configuring the Material->Define Structure of Data screens for Each Screen sequence
    In the 3rd step, I have choosen already existing screen sequence(Y1) and went for Data Screens and choosen for Custom tab and double click on subscreens and then I have added the program as SAPLY_FE_MARA and subscreen number(011) and saved it.
    After all the above steps, I have run MM02/MM03 then the field is not getting displayed in the screen of custom view.
    Did I miss any steps here? Please suggest me if I did something wrong.
    Thanks and Regards,
    Muralikrishna Peravali

    Hi Raymond,
    Thank you for the reply. As per the note some one already implemented the Screen Enhancement with 2 custom views. I need to add the field in any one of existing custom view. So for this I have created a Subscreen in copied function group of MGD1(Y_FE_MARA). But in the function group already 10 Subscreens were created. Is this is the problem? or else copy the FG MGD1 into another FG and create the subscreen will be feasible to my scenario?
    Please suggest me.
    Thanks and Regards,
    Muralikrishna Peravali

  • Import already existing directory structure into DFS namespace?

    Hi all,
    I'm planning to migrate three file servers to a single DFS namespace and after reading the official docs and numerous blog posts I'm still unsure about the right way to do it.
    The "main" server already has a share with a complex directory structure, called \\server1\team, and that share shall become the root of the new DFS namespace, lets call it  \\domain.local\team.
    Part of that already existing directory structure is this folder: \\server1\team\admin\communication\archive. The folder "archive" contains thousands of files in numerous folders and shall become a dfs link to another share \\server2\archive. But
    before I can create the folder "archive" as a dfs link I have to create the folder "admin" in the dfs hierarchy of course, then below that the folder "communication"
    Question: When I try to create a folder "admin" in the dfs namespace, I get the error message "the folder cannot be created in the namespace. The file exists."
    Ok, the folder "admin" indeed exists, but how can I "import" this branch of the existing directory hierarchy into the dfs namespace?
    Do I have to rename the existing folder "admin" to e.g. "admin2", then create the dfs folder "admin" and move the complete directory structure below "admin2" to "admin"? Or can I simply make the existing folder
    "admin" a dfs folder?
    Thanks in advance!
    Regards
    Christoph

    Mandy, thanks for your feedback!
    I have to describe my problem more precisely: creating the root of the new DFS namespace is *not* the problem. This worked for me exactly as you expained it. The problem appears when I try to create a folder below that root in the DFS namespace. If that
    folder already exists in the share you cannot choose how to handle security settings but you get an error message, and that's it.
    This may be helpfull to explain what I want to achieve:
    Old structure:
    \\server1\team - folder admin - subfolder "archive" - lots of subfolders and files
    Now I want to move all files and folders from "archive" to \\server2\archive and link this share into the new DFS namespace, so that our users don't notice any change when they access that archive folder.
    new structure:
    1. Create DFS namespace root: \\domain.local\team  -> \\server1\team   (works!)
                |
    2. Create folder admin  (problem!)
                |
    3. Create subfolder "archive" -> \\server2\archive (not possible becaues "admin" couldn't be created)
    I could perhaps create a DFS namespace with the root \\server1\team\admin\archive and link that to \\server2\archive, but I would like to avoid creating a new namespace for each share which from \\server2 which I mount into some subfolder of \\server1\team...
    Thanks for reading.
    Regards
    Christoph

  • Adding namespace in XML

    Hi,
    I have created an xml by using XMLTYPE( oracle object ). Now I want to add a namespace to the existing root node. How can I achieve this?
    Currently
    <RESPONSE>
    <TAG1>jack</TAG1>
    <TAG2>mon<TAG2>
    </RESPONSE>
    Desired ouput
    <RESPONSE xmns=''http://aloha.com">
    <TAG1>jack</TAG1>
    <TAG2>mon<TAG2>
    </RESPONSE>
    Thanks,
    VJ

    SELECT insertchildxml(XMLTYPE('<RESPONSE>
    <TAG1>jack</TAG1>
    <TAG2>mon</TAG2>
    </RESPONSE>'),
                          '/RESPONSE',
                          '@xmlns',
                          'http://aloha.com')
      FROM dual;Produces
    <RESPONSE xmlns="http://aloha.com"><TAG1>jack</TAG1><TAG2>mon</TAG2></RESPONSE>

  • How can i change the settings so that before download the firefox gives a propmt that same file name already exists, instead of automatically renaming duplicate files by adding .1 suffix?

    When I download a file, if a file of similar name already exists in the same download folder, the firefox downloads the file and renames it by adding numeric .1 to the file name.
    I want the firebox to give me a prompt that similar file already exist, rather than automatically renaming it by adding suffix .1.

    Downloads Options
    * https://support.mozilla.com/en-US/kb/Options%20window%20-%20General%20panel#w_downloads
    Unable to Download or Save files
    * https://support.mozilla.com/en-US/kb/Unable%20to%20download%20or%20save%20files
    Check and tell if its working.

  • Adding a field in already existing query layout

    Hi All,
    I have a requirement where I have to add couple of fields in an already existing query layout.
    Through SQ01 and layout painter I have added the fields to the layout. When I test from query painter it displays the newly added fields. But when I execute the transaction that is designated to run the query its not displaying those fields.
    What am I missing here?
    Thanks in advance.
    Thanks,
    Arun

    Arun,
    As you have done some changes to the query,the internal report generator will generate a new program correspponding to the Query which should be attached to the T-code.
    Currently the t-code might be having the earlier program name ie the program generated by the query before changes were made hence it is not displaying.
    Just check the program name of the Query and the  program name attached to the tcode.
    K.Kiran.

  • Firefox could not install the search plugin from "chrome://tnt2toolbar/content/yos.xml" because an engine with the same name already exists.

    each time I open Fire Fox I get this error "Firefox could not install the search plugin from "chrome://tnt2toolbar/content/yos.xml" because an engine with the same name already exists." and
    I can't search for anything. HELP!!!
    Thanks
    Tom

    That is a problem with an extension that tries to install a search bar. The tnt2toolbar should give you a clue about which extension. You didn't add troubleshooting information with the list of installed extensions, so I can't give a suggestion about which extension is causing this.
    You can check for problems with preferences.<br />
    Rename or delete the prefs.js file and possible numbered prefs-##.js and user.js files to reset all prefs to the default value.
    *http://kb.mozillazine.org/Preferences_not_saved
    *http://kb.mozillazine.org/Resetting_preferences
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Hi,Error when adding chart of account This entry already exists in the foll

    Hi,
    I am getting these below error while adding new chart of account.
    This entry already exists in the following tables  '' (UDO1) (ODBC -2035)  [Message 131-183]
    This entry already exists in the following tables  'G/L Accounts' (OACT) (ODBC -2035)  [Message 131-183]
    please suggest solving .  Thanks Advance.
    Regards
    Rajkumar Gupta

    Hi,
    You may check this thread:
    Re: This entry already exists in the following tables -Message
    Also check SAP Note Number: 1054713 to see if it applies to you. It might be a bug too.
    Thanks,
    Gordon

  • So is this Possible to update already existed Receiver Flat/XML File ?

    HI ,
    On Receiver File (FTP) Side ,So is this Possible to update already existed FLAT/XML File with some values using Receiver File Adapter??
    Like I have 3 Columns in a Flat File/XML File :-
    Name,  Deptid,  Expenses.
    NameA, 8000,   -
    Currently Blank -
    NameB, 1000,  -
    Currently Blank----
    Now I want to Update Existing Flat file from Receiver File Adapter
    After Execution of scenario, Fileon FTP server would be Updated like this
    Name,  Deptid,  Expenses.
    NameA, 8000,   18000
    NameB, 1000,   25000
    So is this Possible to update already existed FLAT/XML File with some values using Receiver File Adapter?

    I am dealing with similar type of scenario..
    If that way it is not possible , So please guide me what other workarounds can be done ..........???
    Does FTP Sender Support Synch Call... ???
    regards

  • This entry already exist when adding an alert

    Hi,
    I still have this error every time I send an alert to a group of recipient.
    It seems that for some reason,  some users receiving messages that aren't loging in for some times I have this error poping up when sending alerts :
    "This entry already exists in the following table (ODBC - 2035)"
    What do I have to know about sending alerts ?
    Here's the code used to send alert.
    SAPbobsCOM.CompanyService oCmpSrv = null;
    MessagesService oMessageService = null;
    SAPbobsCOM.Message oMessage = null;
    MessageDataColumns pMessageDataColumns = null;
    MessageDataColumn pMessageDataColumn = null;
    MessageDataLines oLines = null;
    MessageDataLine oLine = null;
    RecipientCollection oRecipientCollection = null;
    try
        oCmpSrv = oCompany.GetCompanyService();
        oMessageService = ((SAPbobsCOM.MessagesService)(oCmpSrv.GetBusinessService(ServiceTypes.MessagesService)));
        oMessage = ((SAPbobsCOM.Message)(oMessageService.GetDataInterface(MessagesServiceDataInterfaces.msdiMessage)));
        oMessage.Subject = Subject;
        oMessage.Text = Body;
        oRecipientCollection = oMessage.RecipientCollection;
        foreach (string RecipientName in Recipients)
            oRecipientCollection.Add();
            oRecipientCollection.Item(oRecipientCollection.Count - 1).SendInternal = BoYesNoEnum.tYES;
            oRecipientCollection.Item(oRecipientCollection.Count - 1).UserCode = GetUserCode(RecipientName, oCompany);
        // Don't add a document link if we pass -1 as parameter.
        if (ObjectType != -1)
            // get columns data
            pMessageDataColumns = oMessage.MessageDataColumns;
            // get column
            pMessageDataColumn = pMessageDataColumns.Add();
            // set column name
            pMessageDataColumn.ColumnName = ColumnName;
            // set link to a real object in the application
            pMessageDataColumn.Link = (ObjectType != -1 ? BoYesNoEnum.tYES : BoYesNoEnum.tNO);
            // get lines
            oLines = pMessageDataColumn.MessageDataLines;
            // add new line
            oLine = oLines.Add();
            // set the line value
            oLine.Value = ObjectKey;
            // set the link to BusinessPartner (the object type for Bp is 2)
            oLine.Object = ObjectType.ToString();
            // set the Bp code
            oLine.ObjectKey = ObjectKey;
        // send the message
        oMessageService.SendMessage(oMessage);
        return "";
    catch (Exception ex)
        return ex.Message;
    if I send message only to the current user there's no problem.  but since the recipient list have 3 users, the 2 other users are rarely opening SAP
    It can be the way I'm filling the recipients but I'm not sure.

    Hi,
    It's in C# but enjoy this :
    /// <summary>
                    /// Send an alert to a recipient
                    /// </summary>
                    /// <param name="RecipientName">The name of the recipient</param>
                    /// <param name="Subject">The subject of the message</param>
                    /// <param name="Body">The message</param>
                    /// <param name="ColumnName">The name of the column shown on for the document sent</param>
                    /// <param name="ObjectType">The object type : for instence (int)BoObjectTypes.oOrders</param>
                    /// <param name="ObjectKey">The DocEntry of the document to be linked to this alert</param>
                    private static string _SendAlert(string Subject, string Body, string ColumnName, int ObjectType, string ObjectKey, SAPbobsCOM.Company oCompany, System.Collections.Generic.List<string> Recipients)
                        SAPbobsCOM.CompanyService oCmpSrv = null;
                        MessagesService oMessageService = null;
                        SAPbobsCOM.Message oMessage = null;
                        MessageDataColumns pMessageDataColumns = null;
                        MessageDataColumn pMessageDataColumn = null;
                        MessageDataLines oLines = null;
                        MessageDataLine oLine = null;
                        RecipientCollection oRecipientCollection = null;
                        Recipient oRecipient = null;
                        try
                            oCmpSrv = oCompany.GetCompanyService();
                            oMessageService = ((SAPbobsCOM.MessagesService)(oCmpSrv.GetBusinessService(ServiceTypes.MessagesService)));
                            oMessage = ((SAPbobsCOM.Message)(oMessageService.GetDataInterface(MessagesServiceDataInterfaces.msdiMessage)));
                            oMessage.Subject = Subject;
                            oMessage.Text = Body;
                            oRecipientCollection = oMessage.RecipientCollection;
                            foreach (string UserCode in Recipients)
                                oRecipient = oRecipientCollection.Add();
                                oRecipient.SendInternal = BoYesNoEnum.tYES;
                                oRecipient.UserCode = UserCode;
                            // Don't add a document link if we pass -1 as parameter.
                            if (ObjectType != -1)
                                // get columns data
                                pMessageDataColumns = oMessage.MessageDataColumns;
                                // get column
                                pMessageDataColumn = pMessageDataColumns.Add();
                                // set column name
                                pMessageDataColumn.ColumnName = ColumnName;
                                // set link to a real object in the application
                                pMessageDataColumn.Link = (ObjectType != -1 ? BoYesNoEnum.tYES : BoYesNoEnum.tNO);
                                // get lines
                                oLines = pMessageDataColumn.MessageDataLines;
                                // add new line
                                oLine = oLines.Add();
                                // set the line value
                                oLine.Value = ObjectKey;
                                // set the link to BusinessPartner (the object type for Bp is 2)
                                oLine.Object = ObjectType.ToString();
                                // set the Bp code
                                oLine.ObjectKey = ObjectKey;
                            // send the message
                            oMessageService.SendMessage(oMessage);
                            return "";
                        catch (Exception ex)
                            return ex.Message;
    And make sure tou send only ONE recipient in the collection like {Recepient ONE} because sending more then one wasn't working for me and I never knew why !
    WHY WHEN EDITING THIS MESSAGE EVERYTHING IS FINE BUT WHEN LOOKING AT IT ALL THE SPACES ARE GONE ?
    Edited by: Marc Roussel on Aug 26, 2009 12:19 PM

Maybe you are looking for

  • Change Individual Material - What are the required parameters?

    All, I've just started using ES Workplace to test out some of the packaged SAP services.  I've been able to successfully use the "Find Material Basic Data by Elements" service to search for materials.  But now I'm having trouble with the "Change Indi

  • Connecting a Visio tablet to my wrt320n

    I have a wrt320n. works good with all my computers. I bought a Visio tablet and I can only hook up to an open network. I want to be able to use my router with security. Such as wpa/wpa2 or wep. I tried all connections. Only the open network is the on

  • Does Mac Mini have inferior Airport Card?

    Ok after days on the phone with numerous Apple tech reps and no answers I want to hear from other Mini users. Problem is I cannot get the Mini to pickup the Airport Extreme base station in the other room which is only 17' away, through one wall. Have

  • Detect external Monitor

    My Sprectre X360 does not detect my SyncMaster 2493HM Monitor using an HDMI cableIt does detect a newer Samsung monitor using HDMI

  • Edits won't save in iphoto

    I am having difficulty having edited a photo in iphoto.  I do the edit, click on done and the photo reverts to the original.  Help.