Can I pass a command to the DOS prompt  from my program?

Hi everyone,
I'm a Java newbee..and have a relatively small doubt:
Can I pass any DOS command to the console,say "for setting a class path " to the DOS PROMPT LIKE "PATH = %PATH%;D:\BEA\WEBLOGIC700\USER_PROJECTS\DOMAIN3" from a simple java program?
Thank u in advance,
moritala.

Yes you can call a command in a DOS command shell although obviously not in a platform independant manner.
However it won't have the effect you want it to. The command shell will open, you will set the classpath and then that shell will close - the classpath setting will not affect the already running java application (the one that opened the command shell). To load classes not on the classpath create a custom ClassLoader and use that to load the classes from your new location (this is, in essence how application servers allow multiple applications to have their own sets of classes without interference).
BTW what does this have to do with JDBC?
Hope this helps
Talden

Similar Messages

  • How can I pass a value to the command prompt?

    I was wondering how can I pass a value to the command prompt with Windows and Linux? I'm more interested in Linux's system than Windows though. Is there a way to return info from the command prompt?

    Here is a snippet from http://mindprod.com/jglossexec.html that explains how in detail.
    Runtime.getRuntime().exec("myprog.exe") will spawn an external process that runs in parallel with the Java execution. In Windows 95/98/ME/NT/2000/XP, you must use an explicit *.exe or *.com extension on the parameter. It is also best to fully qualify those names so that the system executable search path is irrelevant, and so you don't pick up some stray program off the path with the same name.
    To run a *.BAT, *.CMD, *.html *.BTM or URL you must invoke the command processor with these as a parameter. These extensions are not first class executables in Windows. They are input data for the command processor. You must also invoke the command processor when you want to use the < > | piping options, Here's how, presuming you are not interested in looking at the output:
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat" );
    Runtime.getRuntime( ).exec ("cmd.exe /E:1900 /C MyCmd.cmd" );
    Runtime.getRuntime( ).exec ("C:\\4DOS601\\4DOS.COM /E:1900 /C MyBtm.btm" );
    Runtime.getRuntime( ).exec ("D:\\4NT301\\4NT.EXE /E:1900 /C MyBtm.btm" );
    There are also overloaded forms of exec(),
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null);
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null, "C:\\SomeDirectory");
    The second argument can be a String [], and can be used to set environment variables. In the second case, "C:\\SomeDirectory" specifies a directory for the process to start in. If, for instance, your process saves files to disk, then this form allows you to specify which directory they will be saved in.
    Windows and NT will let you feed a URL string to the command processor and it will find a browser, launch the browser, and render the page, e.g.
    Runtime.getRuntime( ).exec ("command.com http://mindprod.com/projects.html" );
    Another lower level approach that does not require extension associations to be quite as well set up is:
    Runtime.getRuntime( ).exec ("rundll32 url.dll,FileProtocolHandler http://mindprod.com/projects.html" );
    Note that a URL is not the same thing as a file name. You can point your browser at a local file with something like this: file://localhost/E:/mindprod/jgloss.html or file:///E|/mindprod/jgloss.html.
    Composing just the right platform-specific command to launch browser and feed it a URL to display can be frustrating. You can use the BrowserLauncher package to do that for you.
    Note that
    rundll32.exe url.dll,FileProtocolHandler file:///E|/mindprod/jgloss.html
    won't work on the command line because | is reserved as the piping operator, though it will work as an exec parameter passed directly to the rundll32.exe executable.
    With explicit extensions and appropriately set up associations in Windows 95/98/ME/NT/2000/XP you can often bypass the command processor and invoke the file directly, even *.bat.
    Similarly, for Unix/Linux you must spawn the program that can process the script, e.g. bash. However, you can run scripts directly with exec if you do two things:
    Start the script with #!bash or whatever the interpreter's name is.
    Mark the script file itself with the executable attribute.
    Alternatively start the script interpreter, e.g.
    Runtime.getRuntime( ).exec (new String[]{"/bin/sh", "-c", "echo $SHELL"}";

  • Error when I execute an application with the java command in a DOS prompt

    Hi:
    I have a trouble. I edit the most simple program in Java: hello.java
    In DOS prompt, I compile the program. The result is the file hello.class
    c:\> javac hello.java
    However, I try to execute this program with the command java
    c:\> java hello
    and the DOS prompt send me an error like this: Java.exe has a problem and must be closed.
    I press the option "Don't send". After this, the DOS prompt returns empty and it doesnt execute the application:
    c:\>
    By the way, in an IDE editor like Gel, the file hello.java is compiled and executed correctly without problems.
    I edited other simple Java files, I compiled them succesfully and I can't run them in a DOS pormpt. The result is the same dialog box: "Java.exe has a problem and must be closed".
    The question is: Why don't these programs run in a DOS prompt?
    My Operating System is Microsoft Windows XP and the Java compiler version is: 1.6.0_13
    Thanks in advanced.

    Hi again:
    What happens when you type "java -version"?
    Answer:
    java version "1.2"
    Classic VM (build JDK-1.2-V, native threads)
    What is the value of your %PATH%?
    Answer:
    Path=E:\oracle\product\10.2.0\db_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Archivos de programa\Archivos comunes\Adaptec Shared\System;C:\Archivos de programa\Executive Software\DiskeeperLite\;C:\Archivos de programa\QuickTime\QTSystem\;C:\Archivos de programa\Java\jdk1.6.0_13\bin;C:\Archivos de programa\Microsoft SQL Server\80\Tools\Binn\;e:\Microsoft SQL Server\90\Tools\binn\;C:\BITWARE\;C:\Archivos de programa\Archivos comunes\Ahead\Lib\
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    Have you considered running Linux?
    Answer: No, because Linux is more complex.
    Additional information:
    My Operating System is: Microsoft Windows XP Profesional Version 2002, Service Pack 3, running on an Intel Pentium 4, CPU 2.4 Ghz, RAM: 2.23 Gb

  • How do you get to the DOS prompt so that you can type in the info to help get into itunes store???  One post said search cmd, right click, run as administrator but where is the search cmd??

    Have been struggling for days trying to get into the itunes store.  Have contacted support with no help.  I have been reading how some have typed something into a DOS prompt and have resolved their issues.  One stated to "search cmd, right click, and run as admininstrator" but where is this?  There was also a post about typing something into the DOS prompt....how do I get to this?  Can someone please help??? SOOOOO FRUSTRATING.  Thanks much...Carrie (Mike's wife:))

    One stated to "search cmd, right click, and run as admininstrator" but where is this?
    In the search field in your Vista start menu, type cmd
    Next, right-click on the cmd that comes up and select "Run as administrator".

  • How can i pass a parameter to the query to filter the result of this lookup

    Hello,
    i'm developping a web application with JDeveloper 10.1.2 and JHeadStart.
    i realy need to know how can i filter the lookup (LOV) query result.
    in other word, when i click on the lookup, it show all the row that exist in may data base table.
    what i want is how can i pass a parameter to the query to filter the result of this lookup ?
    Thank you

    Hi,
    have a look if this helps
    http://oracle.com/technology/products/jdev/tips/fnimphius/restrictlovlist/restrictlov.html
    Frank

  • How can I pass environment variables to the child process?

    How can I pass environment variables to the child process? This is what I tried and it didn't work.
         static public void main (String[] args) throws Exception {
              ProcessBuilder b = new ProcessBuilder("java", "-cp", ".", "Child");
              Map<String, String> map = b.environment();
              map.put("custom.property", "my value");
                 b.redirectErrorStream(true);
              Process p = b.start();
              BufferedReader reader = new BufferedReader (new InputStreamReader(p.getInputStream()));
              String line = null;
              while (null != (line = reader.readLine())) {
                   System.out.println(line);
         public static void main(String[] args) {
              System.out.println("The value of custom.property is : " + System.getProperty("custom.property"));
         }and the result is:
    The value of custom.property is : null

    Complete test:
         static public void main (String[] args) throws Exception {
              ProcessBuilder b = new ProcessBuilder("java", "-Dcustom.property=my property value", "-cp", ".", "Child");
              Map<String, String> map = b.environment();
              map.put("custom.property", "my environment value");
                 b.redirectErrorStream(true);
              Process p = b.start();
              BufferedReader reader = new BufferedReader (new InputStreamReader(p.getInputStream()));
              String line = null;
              while (null != (line = reader.readLine())) {
                   System.out.println(line);
         public static void main(String[] args) {
              System.out.println("Property value of custom.property is : " + System.getProperty("custom.property"));
              System.out.println("Environment value of custom.property is : " + System.getenv("custom.property"));          
         }

  • Can do applets at the Dos prompt but how in JBuilder7 ? HELP ! ! !

    Dear People,
    After two days of successfully doing applets at the Dos prompt
    I am trying to do a first applet in JBuilder7 Personal Edition
    I did
    1) New
    2) applet (double click)
    3) renamed the .java file and .html file so the names
    matched the name of my class.
    4) typed in my source code
    The error message said
    "cannot access directory objectdraw"
    but when I do:
    Tools | Configure Libraries | Required Libraries
    I see the objectdraw library listed
    Your assistance is appreciated
    below is the applet code
    Stan
    package stan_an_eventful_approach_ch1_makebox;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import objectdraw.*;
    public class MakeBox extends WindowController
    public void begin()
    public void onMousePress(Location point)
    new FilledRect(30,150,30,20,canvas);
    }

    Borland has an excellent set of newsgroups and very helpful assistants (known as TeamB). I suggest you visit borland.com and ask there.

  • Can i pass parameter or global variable in view from 6i form

    hi master
    sir can i pass parameter or global variable in view from 6i form
    i use view for some diff column calculation within the date then i use
    where date between data1 and date2
    in view but view not create
    please give me idea how i pass external value in view
    thank
    aamir

    Hi Antony!
    I feel it may not produce the right results if you
    dont include the where clause and using only group by
    in view.You felt? Please clear, logical thoughts put here, not feelings.
    (It may very well have all the Debit, Credit
    for all the Accid where as the user wants only for
    r some date range)Data range is determinated in Form by user, so if view should give final data set then you must back
    on Ranjana first question: How to pass parameter or global variable to view from 6i form?
    And also as Ranjit pointed out, If you have only
    accid, sum(debit), sum(credit) in View, wheres this
    enddate ??Of course, column entdate (or enddate?) must be included in view...
    Cheers!

  • How can I remove multiple copies of the same song from the iTunes listing?

    How can I remove multiple copies of the same song from the iTunes listing. The program seems to be picking up the same songs from, for example, my user area and my public area in the C drive

    As above, Apple's official advice is here... HT2905 - How to find and remove duplicate items in your iTunes library, however it is a manual process and the article fails to explain some of the potential pitfalls.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve/merge ratings, play counts and playlist membership. See this thread for background and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed)
    tt2

  • On iTunes 11, how can I access home sharing if the music is from a CD? Is there any way I can download these songs if (A) I no longer have the CD, or (B) I do not want to pay $25 a year for iTunes Match?

    On iTunes 11, how can I access home sharing if the music is from a CD on a different computer using Home Sharing? Is there any way I can download these songs if (A) I no longer have the CD, or (B) I do not want to pay $25 a year for iTunes Match?

    Yes, you can copy songs that you ripped from a CD to your Home Sharing computer.
    Turn on Home Sharing first on both computers.  To do that, go to File > Home Sharing > Turn on Home Sharing.  Enter your Apple ID and password.
    Now go to your computer that you want to copy the songs to and connect to your Home Share.  You can do that by clicking on the popover button located at the left top corner right below the play control buttons.  Click on it and scroll to the bottom until you see your Home Share and select it.
    Go to Music in your Home Share.  Select the songs that you want to copy in your Home Share and click Import at the bottom right corner.

  • How can I create a drawing like the one pictured from a photo?

    How can I create a drawing like the one pictured from a photo?

    OK, you are getting closer. Now, use your result, and place a Layer above that. Use the Pen Tool to create the "pen strokes" basically tracing over your background image. Then, when you have created each Path (or Sub-Path), choose Stroke Path, with probably the Pencil Tool and a Brush size that is small enough.
    Not sure which versions of PS these are good for, but here are some plug-ins, that might be helpful.
    AKVIS Sketch
    EdgeLine
    Sketch Effects
    Sketch Master
    I see that one of my old favorites, Flaming Pear's India Ink is not around any more.
    Good luck,
    Hunt

  • Where can I find instructions to remove the SIM card from my iPad?

    Where can I find instructions to remove the SIM card from my iPad?

    Try this discussion
    https://discussions.apple.com/message/25109634#25109634

  • Can you please how to retrive the new netprice from the new validity period

    Hi,
    When you display  a contract using ME33K and you click on  a item and view its conditions(shift+F6), there might be 2 validity periods for a given item.
    and each period will have different netprice in it.
    One will be old date before the PO was created and the other new one which has validity till 31.12.999..We want to fetch the netprice for the new validity date but currently the program is fetching this data from the table EKPO which is having the netprice of the old date only..
    Can you please how to retrive the new netprice from the new validity period

    Thank you so much.
    But I need more help specific to my problem.
    Let me describe the same.
    Suppose the PO creation date is 04.07.2007
    The conditions for an item in a contract for the PO are as follows;
    1. Validity from 04.07.2007 validity to 04.07.2007 Netprice = 100.00
    2. Validity from 05.07.2007 validity to 31.12.9999 Netprice = 200.00
    We need to always fetch the netprice from the validity period which always matches with the PO creatio date. here the value 100.00 should be the correct netpr as the PO creation date matches with the first validity period.
    But the program is fetching the netprice 200.000 which belongs to the second validity period. That is beacuse the select statement which fetches the data for contracts collects on the basis of EKKO-kdate and ekko-kdtab.the fields kdate and kdtab retrieves the validity period of the contract which is from 04.07.2007 to 31.072007. This data is then used to retrieve the netpr data from EKPO and it fetched 200.00 as it retrives the netprice of current data in contract validity and h not with respect to PO creation date.
    This data is then used to fetch the get the netpr data from EKPO.
    <u>what we need is the netprice for that validity period of item(Conditions) that matches with the PO creation date</u>..
    Below is the code where I'm selecting the data from ekko and ekpo for the contracts data..Can you please add the code snippet to the below attachesd subroutine to get the required data from KONV and KONP so that we can retrieve the correct Netprice.
    FORM select_contracts USING p_s_cebeln LIKE s_cebeln[]
                                p_c_k_bstyp  TYPE ebstyp
                                p_p_bukrs    TYPE bukrs
                                p_p_ekorg    TYPE ekorg
                                p_p_ekgrp    TYPE bkgrp
    *Begin of Mod-004
                                fp_p_cernam   type ty_r_ernam
                               p_p_cernam   TYPE ernam
    *End of Mod-004
                                p_s_werks    LIKE s_werks[]
                                p_s_matnr    LIKE s_matnr[]
                                p_s_lifnr    LIKE s_lifnr[]
                                p_s_val_dt   LIKE s_val_dt[].
    *mod-002
        data : l_amount   type BAPICURR_D,   " Net price
               l_waers    TYPE waers,        " Currency Key
               l_eff_amount type BAPICURR_D. " Effective value
          data: l_v_netpr type bprei.
    *mod-002
    SELECT  ebeln
              bukrs
              bstyp
              aedat
              ernam
              lifnr
              zterm
              ekorg
              ekgrp
              waers
              wkurs
              <b>kdatb
              kdate</b>
              inco1
              INTO TABLE i_ekko
              FROM ekko
              WHERE    ebeln IN p_s_cebeln
                   AND bstyp EQ p_c_k_bstyp
                   AND bukrs EQ p_p_bukrs
                   AND ekorg EQ p_p_ekorg
                   AND ekgrp EQ p_p_ekgrp
    *Begin of Mod-004
                  AND ernam EQ p_p_cernam
                   AND ernam IN fp_p_cernam
    *End of Mod-004
                   AND lifnr IN p_s_lifnr
                   AND ( kdatb IN p_s_val_dt OR kdate IN p_s_val_dt ).
      IF sy-subrc EQ 0.
    Populates internal table i_ekpo using EKPO table.
        SELECT   ebeln
                 ebelp
                 loekz
                 txz01
                 matnr
                 werks
                 ktmng
                 menge
                 meins
                 bprme
                 netpr
                 peinh
                 webaz
                 mwskz
                 uebto
                 untto
                 erekz
                 pstyp
                 knttp
                 repos
                 webre
                 konnr
                 ktpnr
                 ean11
                 effwr
                 xersy
                 aedat
                 prdat
                   INTO TABLE i_ekpo
                   FROM ekpo
                   FOR ALL ENTRIES IN i_ekko
                   WHERE ebeln = i_ekko-ebeln
                     and aedat = i_ekko-aedat
                     AND werks IN p_s_werks
                     AND matnr IN p_s_matnr.
    LOOP AT i_ekpo INTO rec_ekpo.
          MOVE rec_ekpo-ebeln  TO rec_contr-ebeln.
          MOVE rec_ekpo-ebelp  TO rec_contr-ebelp.
          MOVE rec_ekpo-loekz  TO rec_contr-loekz.
          MOVE rec_ekpo-txz01  TO rec_contr-txz01.
          MOVE rec_ekpo-matnr  TO rec_contr-matnr.
          MOVE rec_ekpo-werks  TO rec_contr-werks.
          MOVE rec_ekpo-ktmng  TO rec_contr-ktmng.
          MOVE rec_ekpo-menge  TO rec_contr-menge.
          MOVE rec_ekpo-meins  TO rec_contr-meins.
          MOVE rec_ekpo-bprme  TO rec_contr-bprme.
         MOVE rec_ekpo-netpr  TO rec_contr-netpr.
         move l_v_netpr        TO rec_contr-netpr.
    mod-002
          read table i_ekko into rec_ekko with key
                           ebeln = rec_ekpo-ebeln.
            l_waers =  rec_ekko-waers.
    CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_EXTERNAL'
      EXPORTING
        currency              =  l_waers
        amount_internal       =  rec_contr-netpr
    IMPORTING
       AMOUNT_EXTERNAL       =  l_amount.
                rec_contr-netpr = l_amount.
    mod-002
          MOVE rec_ekpo-peinh  TO rec_contr-peinh.
          MOVE rec_ekpo-webaz  TO rec_contr-webaz.
          MOVE rec_ekpo-mwskz  TO rec_contr-mwskz.
          MOVE rec_ekpo-uebto  TO rec_contr-uebto.
          MOVE rec_ekpo-untto  TO rec_contr-untto.
          MOVE rec_ekpo-erekz  TO rec_contr-erekz.
          MOVE rec_ekpo-pstyp  TO rec_contr-pstyp.
          MOVE rec_ekpo-knttp  TO rec_contr-knttp.
          MOVE rec_ekpo-repos  TO rec_contr-repos.
          MOVE rec_ekpo-webre  TO rec_contr-webre.
          MOVE rec_ekpo-konnr  TO rec_contr-konnr.
          MOVE rec_ekpo-ktpnr  TO rec_contr-ktpnr.
          MOVE rec_ekpo-ean11  TO rec_contr-ean11.
          MOVE rec_ekpo-effwr  TO rec_contr-effwr.
    mod-002
          CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_EXTERNAL'
       EXPORTING
          currency              =  l_waers
          amount_internal       =  rec_contr-effwr
       IMPORTING
          AMOUNT_EXTERNAL       =  l_eff_amount.
               rec_contr-effwr = l_eff_amount.
    *mod-002
          MOVE rec_ekpo-xersy  TO rec_contr-xersy.
          APPEND rec_contr TO i_contr.
          CLEAR: rec_ekpo,rec_contr.
    mod-002
          CLEAR : rec_ekko,l_amount, l_eff_amount,l_waers.
    mod-002
        ENDLOOP.
    Modifying i_contr using i_ekko.
        SORT i_ekko BY ebeln.
        LOOP AT i_contr INTO rec_contr.
          READ TABLE i_ekko INTO rec_ekko WITH KEY
                              ebeln = rec_contr-ebeln
                              BINARY SEARCH.
          MOVE rec_ekko-bukrs  TO  rec_contr-bukrs.
          MOVE rec_ekko-bstyp  TO  rec_contr-bstyp.
          MOVE rec_ekko-aedat  TO  rec_contr-aedat.
          MOVE rec_ekko-ernam  TO  rec_contr-ernam.
          MOVE rec_ekko-lifnr  TO  rec_contr-lifnr.
          MOVE rec_ekko-zterm  TO  rec_contr-zterm.
          MOVE rec_ekko-ekorg  TO  rec_contr-ekorg.
          MOVE rec_ekko-ekgrp  TO  rec_contr-ekgrp.
          MOVE rec_ekko-waers  TO  rec_contr-waers.
          MOVE rec_ekko-wkurs  TO  rec_contr-wkurs.
          MOVE rec_ekko-kdatb  TO  rec_contr-kdatb.
          MOVE rec_ekko-kdate  TO  rec_contr-kdate.
          MOVE rec_ekko-inco1  TO  rec_contr-inco1.
          MODIFY i_contr FROM rec_contr.
        ENDLOOP.
      ENDIF.
      REFRESH: i_ekko,
               i_ekpo.
      CLEAR  : rec_ekko,
               rec_ekpo,
               rec_contr.
    ENDFORM.      "select_contracts
    Thanks.

  • Solaris 10: How do I get to the {ok} prompt from here?

    My Sparc box which is running Solaris 10 stopped working due (I think) to a power outage. Now I can't get it to boot up. I'm not interested in trying to recover the contents of the hard-disk. I just want to make the machine usable again. So I am trying to install the OS from the CD Rom drives. I have removed the hard drives so that it doesn't try to boot off them
    This is what I see on the serial connection:
    INIT: create: Permission denied
    create: Permission denied
    create: Permission denied
    create: Permission denied
    create: Permission denied
    create: Permission denied
    create: Permission denied
    create: Permission denied
    create: Permission denied
    create: Permission denied
    INIT:
    ->
    What I need to know is how do I get to the {Ok} prompt from here?
    How do I get to the Ok prompt from here?
    Edited by: 994606 on Mar 20, 2013 12:10 PM
    Edited by: 994606 on Mar 20, 2013 12:12 PM

    Use a serial cable to connect to the server, then with either putty or teraterm connected power on the server. When it displays something similar to this:
    Sun Fire V890, No Keyboard
    Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
    OpenBoot 4.30.4.c, 32768 MB memory installed, Serial etc
    etc.
    etc.
    Use the putty special command to send a break signal or use teraterm control --> send break. The server will drop to the ok prompt.
    This is how I do it on all our servers as required and works a treat.
    Thanks.

  • To update the Associate node from se38 program

    Hi Expert,
    I am trying to update the bobf root node and associate node under it.
    This is BOBF EHFND_DATA_AMOUNT custom enhanced z_***** , i can able to update the root node but for associate node created after enhancement its not updating.
    Code i used is
               APPEND INITIAL LINE TO lt_mod ASSIGNING <ls_mod>.
              <ls_mod>-node        = if_ehs_ih_ehfnd_data_am_c=>SC_NODE-/SDR/EHS_IH_AMNPPE_ITEM.
    *          /sdr/if_ehs_ih_ehfnd_data_am_c=>sc_association-root-ehs_ih_amnppe_item.
              <ls_mod>-change_mode = /bobf/if_frw_c=>SC_MODIFY_CREATE.
              <ls_mod>-key         = lr_s_amnppe_item->key.
              <ls_mod>-data        = lr_s_amnppe_item.
              <ls_mod>-association = /IF_EHS_IH_EHFND_DATA_AM_C=>SC_ASSOCIATION-/SDR/EHS_IH_AMNPPE_ITEM-/SDR/EHS_IH_AMNPPE_ITEM.
              <ls_mod>-source_node = if_ehfnd_amn_c=>SC_NODE-ROOT.
              <ls_mod>-source_key  = lv_key.
              <ls_mod>-root_key    = lv_key.
    *      Create the Amount record:
          CALL METHOD lo_driver->mo_svc_mngr->modify
            EXPORTING
              it_modification = lt_mod
            IMPORTING
              eo_change       = lo_change
              eo_message      = lo_message.
                "Check for errors:
          IF lo_message IS BOUND.
            IF lo_message->check( ) EQ abap_true.
              lo_driver->display_messages( lo_message ).
              RETURN.
            ENDIF.
          ENDIF.
          "Apply the transactional changes:
          CALL METHOD lo_driver->mo_txn_mngr->save
            IMPORTING
              eo_message  = lo_message
              ev_rejected = lv_rejected.
          IF lv_rejected EQ abap_true.
            lo_driver->display_messages( lo_message ).
            RETURN.
          ENDIF.
    but the above code is not helping to update the associate node from se38 program.
    Regards
    Sasikumar S
    Can anybody help me on that thanks in advance.

    Hi Sasi,
    According to what you have written above, You want to update a Z node under a root node.
    But in the coding for association you have written a standard node.
    Give the name of the Z interface which is created and in that you will have the 'Z' custom created node.
    Try this.
    ls_mod>-association = "Z Interface"=>SC_ASSOCIATION-"root_node"-znode.
    Hope this helps you.
    Regards,
    Sanket Vaity.

Maybe you are looking for