Modify a value of a node

Hi fellow developers
I�m trying to modify a value of a node.
But I think I�m missing something. Please help.
thanks in advance
for(int i=0;i<List.getLength();i++){
                    node=List.item(i);
                    if(node.getChildNodes().item(0).getFirstChild().getNodeValue().equals(projectNum)){
                         projectNum = node.getChildNodes().item(0).getFirstChild().getNodeValue();
                         node.getFirstChild().setNodeValue("333");

Without the dtd, it is not clear why the sample code fails but here are a few pointers that may be of use:
- The j2ee tutorial on java.sun.com:
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPDOM5.html#wp64575
has a section on 'examing the structure of a dom' .
Excerpt for the above URL:
Note: Important! Text nodes exist under element nodes in a
DOM, and data is always stored in text nodes. Perhaps the most
common error in DOM processing is to navigate to an element
node and expect it to contain the data that is stored in that
element. Not so! Even the simplest element node has a text
node under it that contains the data. For example, given
<size>12</size>, there is an element node (size), and a text
node under it that contains the actual data (12).
http://java.sun.com/j2ee/1.4/docs/tutorial/examples/jaxp/dom/samples/DomEcho02.java is a useful program to analyze the structure of a dom.
- You can try printing the DOM and analyse the structure of DOM. The following URL has a set of useful samples for xml dom processing: http://developers.sun.com/sw/building/codesamples/dom/. In particular the DOMUtils class has two useful static methods for debugging a DOM:
1. printDOM(org.w3c.dom.Node node): Prints the specified node, then prints all of its children.
2. writeXmlToFile(java.lang.String filename, org.w3c.dom.Document document): This method writes a DOM document to a file
http://developers.sun.com/sw/building/codesamples/dom/doc/DOMUtil.java
- http://forum.java.sun.com/forum.jspa?forumID=34 is the forum for java technology & xml.
Hope u find the pointers useful.

Similar Messages

  • Change Offset value of input node in APO order

    Dear experts,
    in order to accomodate overlapping scenario in APO I calculate and update offset value of input nodes of apo planned orders. To do so I use BADI /SAPAPO/RRP_SRC_EXIT method RRP_USEX_PLORD_CREATE. I activate the BADI using heuristic SAP_PP_021. it works fine for APO planned orders. However It is not possible to change production order nodes.
    I have tried using a heuristic (copy of SAP_PP_012) that uses Function Module /SAPAPO/RRP_LC_ORDER_MODIFY. However I can not change orders as I got a livecash error.
    I also tried /SAPAPO/RRP_LC_ORDER_CHANGE. In this case I did not have LC error but I still order offset value was not changed.
    do you have any idea on how to proceed? What I really want is a method to change input nodes of production orders in APO.
    Thank You,

    Hi Anup,
    In customer exit variable you will have to populate your 0FISCPER characterstics,
    You can populate it based on system date, use the FM DATE_TO_PERIOD_CONVERT and you will get current period based on your system date and Fiscal Year variant.
    After that you can just modify these values. and populate your 0FISCPER characteristics.
    If you have to do this calculations based on user input date then follow the same procedure but instead of system date you will have to pass the date entered by customer to this FM.
    Refer the following sample code snippet,
    IF i_step = 2.
          DATA:l_vy7(4) TYPE c,
               l_vm7(3) TYPE c.
          CLEAR: l_s_range,loc_var_range.
          LOOP AT  i_t_var_range    INTO  loc_var_range   WHERE  vnam = 'input var'.
            call the FM convert to period here and give user input date.
            l_vy7 = l_vy7 - 1.
            l_vm7 =  loc_var_range-low+4(3).
            CONCATENATE l_vy7 l_vm7 INTO loc_var_range-low.
            l_s_range-low      = loc_var_range-low.
            l_s_range-sign     = 'I'.
            l_s_range-opt      = 'EQ'.
            APPEND l_s_range   TO   e_t_range.
            EXIT.
          ENDLOOP.
        ENDIF.
    Regards,
    Durgesh.

  • To modify field value in a transparent table

    how would i modify the value of a field in a transparent table? my data is from internal table. while im looping in the internal table the data goes to the first record of the table not on the right record.
    what wrong with  my code?
    loop at i_tble.
      wa_tble = i_tble.
      select single angnr
      into i_angnr
      from ekko
      where ebeln eq wa_tble-ebeln.
      ekko-angnr = wa_tble-angnr.
      modify ekko.
    endloop.

    Hi,
    I am sorry but I didn't understand the purpose of this code. You are reading in a field value of ANGNR from EKKO and you want to update the same record again with the same value? Why?
    <b>Secondly, you should never update any SAP table directly like that</b>.
    Now for the reason why your update is updating the first record always.
    Your 'modify ekko' should be modified as
    MODIFY ekko TRANSPORTING angnr WHERE ebeln = wa_tble-ebeln.
    Please reward and close the post if answered.
    Regards,
    Srinivas

  • To Get the value of a node in a XML file which is outside the envelope

    Hi Everyone,
    I am uploading data in a XML file into Oracle tables. I am using oracle 9i release 2. How to get a value of a node outside the envelope.
    Here is my xml file.
    <Response>
    <TaskNo>14</TaskNor>
    <ZoneResponse>
    <GetServiceStatusResponse xmlns="http://mws.zonemws.com/Shipment/2010-10-01/">
    <GetServiceStatusResult>
    <Status>GREEN</Status>
    <Date>2011-06-03</Date>
    </GetServiceStatusResult>
    <Metadata>
    <Id>c9488a06</Id>
    </Metadata>
    </GetServiceStatusResponse>
    </ZoneResponse>
    </Response>
    This is the response xml we are getting from the supplier. I do want to store all the values in an oracle table, including TaskNo(14). TaskNo is the main value
    here. I am using dbms_xmlparser and dbms_xmldom in PL/SQL. I am able to get the values inside the envelope, but not the outside(taskno). It is not showing any errors. It is processing all
    other values. I Posted this in the XML DB section also. Please help me to solve this issue. Any help,tips and suggesstion will be highly appreciated. Thanks in advance
    --Vimal                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    I am providing some additional info like procedure, table structure and sample xml file so that you can get a clear idea about my problem and help me.
    My Procedure
    PROCEDURE xml_upload (
    p_directory IN VARCHAR2,
    p_server_directory IN VARCHAR2,
    p_filename IN VARCHAR2
    AS
    l_bfile BFILE;
    l_clob CLOB;
    l_parser DBMS_XMLPARSER.parser;
    l_doc DBMS_XMLDOM.domdocument;
    l_noderowset DBMS_XMLDOM.domnode;
    l_noderow DBMS_XMLDOM.domnode;
    l_nodecount NUMBER;
    l_Resultlist DBMS_XMLDOM.domnodelist;
    l_request_id VARCHAR2 (300);
    l_task_number NUMBER;
    l_tasknum_list DBMS_XMLDOM.domnodelist;
    l_service_list DBMS_XMLDOM.domnodelist;
    l_time_list     DBMS_XMLDOM.domnodelist;
    l_tasknode DBMS_XMLDOM.domnode;
    l_servicenode DBMS_XMLDOM.domnode;
    l_temp VARCHAR2 (1000);
    l_table_name VARCHAR2 (100);
    l_cmd_execution VARCHAR2 (1000);
    l_orig_file_with_path VARCHAR2 (1000);
    l_dest_file_with_path VARCHAR2 (1000);
    l_status custom.task_status.status%TYPE;
    l_time custom.task_status.timestamps%TYPE;
    l_rows NUMBER;
    l_message SYS.XMLTYPE;
    l_return_status NUMBER;
    TYPE tab_type IS TABLE OF custom.task_status%ROWTYPE;
    t_tab tab_type := tab_type ();
    PROCEDURE write_exception (
    p1_filename VARCHAR2,
    p_comments VARCHAR2,
    p_rows_created NUMBER
    IS
    BEGIN
    read_xml_file (p_directory, p_filename, l_message, l_return_status);
    -- Convert the xml to a clob
    l_clob := l_message.getclobval();
    -- Create a parser.
    l_parser := DBMS_XMLPARSER.newparser;
    -- Parse the document and create a new DOM document.
    DBMS_XMLPARSER.parseclob (l_parser, l_clob);
    l_doc := DBMS_XMLPARSER.getdocument (l_parser);
    -- Free any resources associated with the CLOB and Parser
    -- dbms_lob.freetemporary(v_clob);
    DBMS_XMLPARSER.freeparser (l_parser);
    l_noderowset :=
    DBMS_XMLDOM.item
    (DBMS_XMLDOM.getchildnodes (DBMS_XMLDOM.makenode (l_doc)),
    0
    l_nodecount :=
    DBMS_XMLDOM.getlength (DBMS_XMLDOM.getchildnodes (l_noderowset))
    - 1;
    t_tab.EXTEND;
    FOR i IN 0 .. l_nodecount
    LOOP
    l_noderow :=
    DBMS_XMLDOM.item (DBMS_XMLDOM.getchildnodes (l_noderowset), i);
    l_Resultlist :=
    DBMS_XMLDOM.getelementsbytagname
    (DBMS_XMLDOM.makeelement (l_noderow),
    'RequestId'
    l_request_id :=
    DBMS_XMLDOM.getnodevalue
    (DBMS_XMLDOM.getfirstchild
    (DBMS_XMLDOM.item (l_Resultlist,
    0
    END LOOP;
    FOR i IN 0 .. l_nodecount
    LOOP
    l_noderow :=
    DBMS_XMLDOM.item (DBMS_XMLDOM.getchildnodes (l_noderowset), i);
    l_service_list:=
    DBMS_XMLDOM.getelementsbytagname
    (DBMS_XMLDOM.makeelement (l_noderow),
    'Status'
    l_status:=
    DBMS_XMLDOM.getnodevalue
    (DBMS_XMLDOM.getfirstchild
    (DBMS_XMLDOM.item (l_service_list,
    0
    l_time_list:=
    DBMS_XMLDOM.getelementsbytagname
    (DBMS_XMLDOM.makeelement (l_noderow),
    'Timestamp'
    l_time:=
    DBMS_XMLDOM.getnodevalue
    (DBMS_XMLDOM.getlastchild
    (DBMS_XMLDOM.item (l_time_list,
    0
    END LOOP;
    select
    extractvalue(column_value,'/Response/TaskNumber') into l_task_number
    from
    table(xmlsequence(xmltype('<Response>
    <TaskNumber>14</TaskNumber>
    <ZoneResponse>
    <GetServiceStatusResponse xmlns="http://mws.zoneaws.com/InboundShipment/2010-10-01/">
    <GetServiceStatusResult>
    <Status>GREEN</Status>
    <Timestamp>2011-06-03T22:17:17.313Z</Timestamp>
    </GetServiceStatusResult>
    <Metadata>
    <RequestId>c9488a06-73c6-474e-b356-51d5f8feec00</RequestId>
    </Metadata>
    </GetServiceStatusResponse>
    </ZoneResponse>
    </Response>
    t_tab (t_tab.LAST).status:= l_status;
    t_tab (t_tab.LAST).timestamps:= l_time;
    t_tab (t_tab.LAST).amz_request_id:= l_request_id;
    t_tab (t_tab.LAST).tasknumber:= l_task_number;
    -- Insert data into the real Staging table from the table collection.
    FORALL i IN t_tab.first .. t_tab.last
    INSERT INTO custom.task_status VALUES t_tab(i);
    COMMIT;
    DBMS_XMLDOM.freedocument (l_doc);
    DBMS_LOB.freetemporary (l_clob);
    DBMS_XMLPARSER.freeparser (l_parser);
    DBMS_XMLDOM.freedocument (l_doc);
    DBMS_LOB.freetemporary (l_clob);
    DBMS_XMLPARSER.freeparser (l_parser);
    DBMS_XMLDOM.freedocument (l_doc);
    END rrs_xml_upload;
    Sample File:
    <Response>
    <TaskNumber>14</TaskNumber>
    <ZoneResponse>
    <GetServiceStatusResponse xmlns="http://mws.zoneaws.com/InboundShipment/2010-10-01/">
    <GetServiceStatusResult>
    <Status>GREEN</Status>
    <Timestamp>2011-06-03T22:17:17.313Z</Timestamp>
    </GetServiceStatusResult>
    <Metadata>
    <RequestId>c9488a06-73c6-474e-b356-51d5f8feec00</RequestId>
    </Metadata>
    </GetServiceStatusResponse>
    </ZoneResponse>
    </Response>
    Table: task_status
    tasknumber number,
    status varchar2(100),
    timestamps varchar2(100),
    requestid varchar2(100)
    all I want is to populate the data from xml file to the particulare table. I can do that with the above procedure.
    But In this below mentioned part of my procedure , I want to pass the file name instead of giving the entire content.
    select
    extractvalue(column_value,'/Response/TaskNumber') into l_task_number
    from
    table(xmlsequence(xmltype('<Response>
    <TaskNumber>14</TaskNumber>
    <ZoneResponse>
    <GetServiceStatusResponse xmlns="http://mws.zoneaws.com/InboundShipment/2010-10-01/">
    <GetServiceStatusResult>
    <Status>GREEN</Status>
    <Timestamp>2011-06-03T22:17:17.313Z</Timestamp>
    </GetServiceStatusResult>
    <Metadata>
    <RequestId>c9488a06-73c6-474e-b356-51d5f8feec00</RequestId>
    </Metadata>
    </GetServiceStatusResponse>
    </ZoneResponse>
    </Response>
    Alex or any other oracle pl/sql experts please help me to solve this issue.
    FYI : I am using Oracle 9.2.0.8.0
    Thanks,
    Vimal..
    Edited by: Vimal on Jun 13, 2011 4:10 PM

  • Unable to add value to model node with cardinality 0..n

    Hi All,
       Im working with Webdynpro Java.i have an issue here.i have a input field item named customer and a drop down box item location.when i give customer and location as inputs,a WSDL (named Equipment WSDL) is called.the result is a  drop down list containing equipments id
    i took a custom node location with cardinaliy 0..n.i gave static values as input for location.i need to set the location values to model node location.when i m giving a single value to custom node location,that static value is not accepted by model node location(in WSDL) whose cardinality is 0..n.
    Please suugest a solution for this issue
    With Regards,
    Ushasri.

    HI Ushashri,
    What do you mean by 'static value is not accepted by model node location'
    how you have done the mapping
    send me the hierarchy of rfc and ur value node
    With Regards
    Naidu

  • Problem getting text value of a node

    Hi
    this is my xml:
    <servizio servizioID="WS-AS-14">
    <mapping idEnte="-1" userName="administrator" name="ISTAT" nameTo="master">
         <category id="1.2.2.0" target="true" toId="01.05.01.011.000">
         <name>Descrizione1</name>
         </category>
         <category id="1.2.2.1" target="true" toId="01.05.01.011.001">
         <name>Descrizione2</name>
         </category>
         <category id="1.2.2.2" target="true" toId="01.05.01.011.002">
         <name>Descrizione3</name>
         </category>
    </mapping>
    </servizio>
    I can get the value of the attributes id and toId of the Node category
    But not the value of the Node name
    This is the code:
    Element rootElement = document.getDocumentElement();
    NodeList nodeList = element.getElementsByTagName("category");
    for(int i = 0; i < nodeList.getLength(); i++) {
    Node category = nodeList.item(i);
    NamedNodeMap categoryAttributes = category.getAttributes();
    and the i get the 2 attributes
    Node namelist = category.getFirstChild();
    String name = namelist.getNodeName();
    String value = namelist.getNodeValue();
    but name is #text
    and value is empty
    what's wrong with my code?
    thanks

    up
    thanks

  • Replacing a value of a node with CDATA (as is)

    Hi All,
    How do I replace the value of a node such that it's CDATA format is preserved and not re-encoded. Currently, when I do similar to the following:
    replace value of node doc(doc_name)/parent/node with "<![CDATA[[the data]]]>"
    the less than and greater than signs are replaced with &lt ; and &gt ; respectively, losing its CDATA section status.
    How do I replace the value such that within the resulting XML it is exactly "<![CDATA[[the data]]]>" and not "&lt ;[CDATA[]the data]]&gt ;" ?
    Thanks in advance
    Cecil
    Edited by: user5969022 on Jan 8, 2009 9:41 PM
    Edited by: user5969022 on Jan 8, 2009 9:42 PM
    Edited by: user5969022 on Jan 8, 2009 9:44 PM
    Edited by: user5969022 on Jan 8, 2009 9:45 PM

    John,
    I am aware that it's synatic sugar. However, I actually need it to look that way. Thing is after edits, the resulting XML will be read by a component (that I have no access to change) which requires that node to have CDATA (as is) as it's value.
    Anymore ideas; Anyone?
    Instead of replacing the value (ie. replace value of node doc()...), I replaced the node (ie. replace node doc()...) with something similar to: <node>CDATA-section</node>. However, as expected only the data within the CDATA section gets persisted.
    In this case could I turn something off or on such that xmldb leaves the CDATA-section as is? e.g. http://www.xquery.com/tips_and_tricks/including_CDATA_in_results.html
    Thanks,
    Cecil

  • Can I modify the value of an enviroment entry for an EJB without having to re-deploy.

    I wish to modify the value of an envrioment entry for an EJB. The entry already exists and has been created using
    <env-entry>
    <env-entry-name>myFlag</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>true</env-entry-value>
    </env-entry>
    I can access the value using code similar to the following:-
    InitialContext initialContext = new InitialContext();
    String value = (String) initialContext.lookup("myFlag");
    However if I try the following:-
    InitialContext initialContext = new InitialContext();
    initialContext.rebind("myFlag", "false");
    I get an OperationNotSupportedException thrown.
    Do I need to use LDAP directly (rather than through JNDI) to modify this value or is there another / better way? If I do need to use LDAP directly what would the code look like ?

    Hi,
    As per J2EE specification:
    Naming environment entries allow customization of a component during deployment or assembly without the need to access or change the component?s source code. The container implements the naming environment, and provides it to the component instance through a JNDI naming context.
    The Deployer can modify values of environment entries that have been previously set by the Application Component Provider and/or Application Assembler.
    Generally only those variables/properties are set in environment entries which are likely to be different on various Application server configurations/installations, so it is not required/advisable to change these entries programmatically. Any way iAS-6.0/6.5 doesn't support changing environment entries programmatically, it binds all the JNDI names during Server startup after reading it from the registry.
    For your purpose you can use a boolean variable in your code to set your flag, and may be put it into session.
    Please feel free to ask further questions.
    Sanjeev,
    Developer Support, Sun ONE Application Server-India.

  • Manually input ( or type ) the value of the node in hierarchy

    Dear all,
    I have the following requirement :
    In the query, I am using a hierarchy node variable. Now, by default, on the selection screen the valued can be passed to this hierarchy node var. by a drill down on the hierarchy on which the variable is created and selecting one of the nodes.
    Now, I would like to manually input ( or type ) the value of the node instead of performing the drilldown on the hierarchy and selecting the node..
    It is this possible for a hierarchy node variable ?
    Thanks,
    Kenps

    Hi Carlos,
    You create a Variable with following selections
    Type of variable : Hierarchy node
    processing : Manual Input/Default value
    Reference Char : Mention the CHAR that contain this hierarchy
    Define it as SIngle value & Mandatory entry.user can see all the nodes in F4 help and selects the node as he wants
    Hope it helps
    Sriman
    Edited by: Sreeman on Apr 21, 2008 8:34 PM

  • T.code F110 Created a proposal, could I modify the value date?

    Hi All,
    I need to create a proposal with tha value date successive to posting date....
    In particular, i wonder if, before running the payment i can modify the "value date" of the scheduled proposal  by hand.
    Thanks...
    Gandalf

    Hi Umberto,
    My understanding of your requirement is like this: When you make a payment to a vendor, it will be credited in his bank account say 2 days after the payment is generated in your system. Say if you have generated a payment document on 24th March, it will be credited to the vendor account on 26 th march. and you want to maintain the value date as 26th march in your payment document.
    If this is the requirement, maintain value date in FBZP settings, under bank determination, for the payment method/hosue bank and HB ID combination. You have to mention number of days to value date.
    Please let me know if this is your requirement

  • SharePoint Designer Workflow unnecessary set Modified By value as System Account.

    Hi Friends,
    I have created SharePoint Designer Workflow, it update other List Item as well same Item on Item Adding and Editing event.
    I have Developed workflow using System Account.
    While doing any change by general user in Workflow list it update Modified By value to System Account only.
    I want modified by value as General user only.
    Or No need to update modified and Modified by details.
    So please help me How I can resolve this issue.
    Thanks,
    Digambar Kashid 
    Thanks and Regards, Digambar Kashid

    Hi Digambar, that's by design, but here are some workarounds:
    http://blog.mmasood.com/2012/12/approval-worfklow-showing-system.html
    https://social.technet.microsoft.com/Forums/office/en-US/f3f9b1ff-9507-4471-935d-4ab8937839b6/oob-approval-workflow-makes-modify-by-field-as-system-account?forum=sharepointadminprevious
    cameron rautmann

  • Modify target value in contract to be more than 1 000 000 000 LE

    I am working in ECC6, MM module,
    i want ask some quistions,
    1-modify target value in contract to be more than 1 000 000 000 LE.
    2-printing all un released documents.
    3-all available reports detailed in MM.
    4-modify percentage in fields to be 3 digits instead of 2 digits.
    BR,
    Amr Awad

    Hi,
    if you need to create an appropriate content structure, you have to consider many aspects. If the amount of content is small, many of these aspects are not that important, but if the number of elements/pages are getting larger, they will get important.
    One aspect to know is the way how this content is accessed. Is your primary access pattern search or browse? In the search case the location of an element can be quite random, but when you browse you will follow an (intuitive) pattern.
    Another aspect is the the kind of access. Do you have many create/delete operations? Only read?
    Then: Are these content elements maintained by the system itself (for example by an automatic importer) or are editors required to work on these elements?
    The better you can answer such questions, the better it's possible to model a content structure. In practice of CQ5/CRX a few patterns have established like
    Natural Hierarchy (like: continent/country/state or brand/branch/product/)
    A total ordering of all elements can be established (like postal codes: There you can structure by the orders of the numbers: 5368 could become /5/3/6/8)
    A total ordering of elements is being created artificially by hashing methods. This approach cannot/should not be used for content which is maintained by humans.
    (and probably more)
    In any way I would recommend you to check David's model at http://wiki.apache.org/jackrabbit/DavidsModel
    kind regards,
    Jörg

  • How to get Value of tree node without Reload Page

    hi,
    i worked with apex 4.2 and i created Tree and tabular form to retrieve the date according the value of tree select node the code of tree something like this
    select case when connect_by_isleaf = 1 then 0
    when level = 1 then 1
    else -1
    end as status,
    level,
    "ENAME" as title,
    null as icon,
    "EMPNO" as value,
    null as tooltip,
    'f?p=36648:34:5234984107903::::P40_SELECTED_NODE:'||empno as link
    from "DEPT"."EMP"
    start with "MGR" is null
    connect by prior "EMPNO" = "MGR"
    order siblings by "ENAME
    and i put Selected Node Page Item: P40_SELECTED_NODE . the tree worked good and retrieve the data into tabular form according to tree node value
    my Question :
    1- i want to retrieve the data without submit the page where each time i select value from tree make page reload to update the tabular form with new value ,there is any way to pass the value of tree node to P40_SELECTED_NODE item and refresh tabular form without page reload .
    2- i want when selected from tree run page process according to value of tree node i tray to create Dynamic action with *(jquery selector : div.tree li>a)* but the Value of node incorrect.
    Regards
    Ahmed;

    look at this link
    Re: How to get Value of tree node without Reload Page ..!

  • FB70: How t o modify the value of BSEG-XREF before posting?

    Hi ABAP Gurus,
    Good day!
    I would like to know the correct way to modify the value of BSEG-XREF1 in FB70 (Prior to posting of document).
    Currently, I have tried using substitution. First, I copied RGGBS000 into ZRGGBS000 AND added form u300, which will modify BSEG-XREF1.  Second, I have added a step to an already existing substitution (COGS), which was set-up in transaction OBBH.  I have assigned u300 to BSEG-XREF1 (Refernce Key 1).
    The said step didn;t seem to work.  I was able to post a document and then I displayed the document.  Unfortuantely, BSEG-XREF1 hasn't been modified. So,  I tried debugging the form U300.  It doesn't stop inside that form, which means the logic that i put there was useless. By the way, the the formname that Im using can be found in two internal tables: (1) exits, and (2) etab.
    Kindly advise on what to do.   Thank you very much!
    <b>Best Regards.
    Brando</b>

    Check this sample code which i've used to substitute the field BSEG-ZUONR
    Also ensure that the callup point in <b>OBBH</b> is 2
    Don't forget to attach ur <b>ZRGGBS000</b> to the application area <b>GBLS</b> in the tcode <b>GCX2</b>
    FORM get_exit_titles TABLES etab.
      DATA: BEGIN OF exits OCCURS 50,
              name(5)   TYPE c,
              param     LIKE c_exit_param_none,
              title(60) TYPE c,
            END OF exits.
      exits-name  = 'U102'.
      exits-param = c_exit_param_field.
      exits-title = text-101.           " Ship-to-Party to Assignment field
      APPEND exits.
      REFRESH etab.
      LOOP AT exits.
        etab = exits.
        APPEND etab.
      ENDLOOP.
    ENDFORM.                    "GET_EXIT_TITLES
    FORM u102 USING zuonr TYPE bseg-zuonr.
      bseg-zuonr = <value>.
    ENDFORM.

  • Error BEA-382510 bad value for type node

    Hi,
    We have a requirement to read the xpath from the resource file placed in project folder in OSB and use that xpath to generate the report. For this I have done the following:
    1) Made the xpath entry to properties file as <xpath>$body/*/*/EMPTYPE/EMPDATA/EMPNO</xpath>
    2) Created a variable to fetch the xpath value from property file, say xpathvar
    3) Created another variable, say reportvar which will have the contents: <report>{$xpathvar/text()}</report>. This should fetch the xpath from the variable and replace it in the calling part to fetch the value of the xpath.
    4) For report generation the in key value it is ./text() from variable reportvar.
    When I test this it throws error:
    <con:errorCode>BEA-382510</con:errorCode>
    <con:reason>
    OSB Assign action failed updating variable "reportxpath": com.bea.wli.common.xquery.XQueryException: Error parsing XML: line 1, column 19: {err}XP0006: "$body/*/*/EMPTYPE/EMPDATA/EMPNO ({http://www.w3.org/2001/XMLSchema}string)": bad value for type node
    </con:reason>
    Any pointers will be highly appreciated.
    Thanks!

    I think you cant substitute xpath as you have did.
    As shown in the blog which you mentioned in the other post you may need to have a xslt transformation with xalan:evaluate to correctly process the xpath read from the properties file.
    <report>{$xpathvar/text()}</report>. Here $xpathvar having the value '$body/*/*/EMPTYPE/EMPDATA/EMPNO' will be treated as string type (this will be string as you have read from the properties file as string) and not node. And you are trying to apply the text() function on a string instead of node which is resulting in that error.

Maybe you are looking for

  • OFIAR_C02 AND 0FIAR_C03

    Need help.sap.com links for Queries section for OFIAR_C02 AND 0FIAR_C03

  • Calling PL/SQL from Server Side Rule

    Hi there, I'm wanting to call a PL/SQL procedure from a server side rule created within collaboration suite using the oesrl command line utility. I have seen examples of the XML rule which should do this together with the appropriate PL/SQL <account

  • Call BAPI_REQUISITION_CREATE from EBP.

    Hi all, I have make a copy from BAPI_REQUISITIO_CREATE, in order to call it in test mode to control the R/3 checks, this BAPI makes, before SC is ordered. Now I have to get the fields to inform the BAPI, somebody knows where the standard process call

  • Metadata applied in FCS viewable in FCP?

    We're trying to map metadata from a description field inside Final Cut Server - to the lognote field in Final Cut Pro. This way, editors can se a short description of clips in the browser inside Final Cut Pro. Has anybody successfully done this? We d

  • Botched 10.5.8 install?

    I am brand new to using my macbook pro, and have had some issues with changing my desktop background. The system preferences pane freezes then "quits unexpectedly" when i open desktop/screensaver. I have run across some suggested fixes, but none of t