Help req with the code

Hi all
we are a MDMP code page system and we upgraded to ECC 6.0.
This is the error iam getting IN UCCHECK for unicode
The system could not perform a static convertibility check on the current
statement, because of untyped or generic operands. It can only carry out this
. runtime.
Whta exactly static convertibility check.
Can anyone suggest what i have to do regarding this
The error is pointing this piece of code
FORM bdc_dynpro *
--> PROGRAM *
--> DYNPRO *
form bdc_dynpro using program dynpro.
clear i_bdcdata.
i_bdcdata-program = program.
i_bdcdata-dynpro = dynpro.
i_bdcdata-dynbegin = 'X'.
append i_bdcdata.
endform.
FORM bdc_field *
--> FNAM *
--> FVAL *
form bdc_field using fnam fval.
clear i_bdcdata.
i_bdcdata-fnam = fnam.
i_bdcdata-fval = fval.
append i_bdcdata.
endform.
This is from the standard include bdcrecx1
Start new screen *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM.
Insert field *
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL <> NODATA.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
ENDFORM.
It looks the same way i wrote the code right.
Thanks
Suchitra

Hi Srinivas,
This is my actual code
Here iam not comparing FVAL with  NODATA
As its being done in SAP Standard code
FORM bdc_dynpro *
--> PROGRAM *
--> DYNPRO *
form bdc_dynpro using program dynpro.
clear i_bdcdata.
i_bdcdata-program = program.
i_bdcdata-dynpro = dynpro.
i_bdcdata-dynbegin = 'X'.
append i_bdcdata.
endform.
FORM bdc_field *
--> FNAM *
--> FVAL *
form bdc_field using fnam fval.
clear i_bdcdata.
i_bdcdata-fnam = fnam.
i_bdcdata-fval = fval.
append i_bdcdata.
endform.
I haven't used the satndard inclue bdcrecx1
which has the code as you mentioned
let me know

Similar Messages

  • Can u plz help me with the code to add BWART field to the DS:2LIS_04_P_COMP

    I want to add BWART field from AUFM table to the DS:2LIS_04_P_COMP.
    The AUFM table has key fields as :MBLNR,MJAHR and ZEILE.Can someone plz help with the code to put in the existing function module.I see that both 2LIS_04_P_COMP and AUFM have common field AUFNR process order.
    Plz help ASAP.

    I want to add BWART field from AUFM table to the DS:2LIS_04_P_COMP.
    The AUFM table has key fields as :MBLNR,MJAHR and ZEILE.Can someone plz help with the code to put in the existing function module.I see that both 2LIS_04_P_COMP and AUFM have common field AUFNR process order.
    Plz help ASAP.

  • Please help me with the code!!

    Dear All, I am going to simulate a TCP via UDP , and I have been asked for creating some specific methods , also additional helper methods are allowed but I can't avoid implementing any of the functions described below.
    I have bold the functions which are ambiguous to me.
    [click here to see the detail assignment explanation|http://www.net.t-labs.tu-berlin.de/teaching/ws0809/PD_labcourse/PDF/u5en.pdf|click here to see the detail assignment explanation]
    If you see anything wrong please post , thanks.
    &bull; rdt connect()
    This function sets all the parameters required for connecting to a server. Moreover, it opens a
    UDP socket.
    &bull; rdt listen()
    This function is the server-side counterpart of rdt connect(). It opens a UDP socket for
    incoming connections and sets all the required parameters.
    &bull; rdt send()
    This function takes an arbirary amount of data as input and writes it into a send buffer. It
    does not send anything to the network.
    &bull; rdt recv()
    This function returns the whole receive buffer. It does not really read data from the network,
    but only from the receive buffer.
    &bull; rdt select()
    This function does the whole work of moving data over the network. It behaves similar to the
    system call select(), i.e. it blocks until there is some data in the receive buffer. The received
    data can be subsequently read with rdt recv(). A flow diagram of the functionality of this
    function follows:
    &ndash; send all()
    This function sends all the data in the send buffer over the network to the receiver. If
    more than 500 bytes are present in the send buffer, more packets must be sent. The MSS
    (Maximum Segment Size) of an RDT packet is 534 bytes.
    *&ndash; select()*
    This is the well-known system call that waits until the receive buffer contains data.
    [ I don't know what to do with the buffer , and how to make it empty]
    &ndash; recv from()
    This is the well-known system all recv from() that reads data from the network.
    *&ndash; statemachine send()*
    This is a function that processes a newly received packet. In RDT 1.0 nothing is done here,
    becuase the sender does not expect any ACK packets from the receiver.
    &ndash; statemachine recv()
    This function processes incoming packets. In RDT 1.0 the header is removed and the
    payload copied to the receive buffer.
    &ndash; Payload
    rdt select() returns at this point if there&rsquo;s any data in the receive buffer. If not, it starts
    from the beginning.
    [ where the data should be returned?]
    This is my code:
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.net.DatagramPacket;
    import java.net.DatagramSocket;
    import java.net.InetAddress;
    import java.net.Socket;
    import java.net.SocketException;
    public class Ex5 {
        DatagramSocket socket , client_socket;
        DatagramPacket rcv_pkt;
        DatagramPacket send_pkt;
        byte[] sendData;
        byte[] receivedData;
        InetAddress ipaddr;
        int client_port;
        public void rdt_connect(String host , int client_port) throws IOException{
                this.client_port = client_port;
                client_socket = new DatagramSocket();
                ipaddr = InetAddress.getByName(host);
        public void rdt_listen(int port) throws SocketException{
            //byte[] buffer = new byte[1024];
            socket = new DatagramSocket(port);
            //DatagramPacket packet = new DatagramPacket(buffer, buffer.length );
        public DatagramPacket rdt_send() throws IOException{
            sendData = new byte[534];
            BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
            String inString = in.readLine();
            sendData = inString.getBytes();
            DatagramPacket send_packet = new DatagramPacket(sendData,sendData.length, ipaddr,client_port );
            return send_packet;
        public DatagramPacket rdt_recv(byte[] receivedData) throws IOException{
            //byte[] receivedData = new byte[1024];
            DatagramPacket received_packet = new DatagramPacket(receivedData, receivedData.length );
            //socket.receive(received_packet);
            return received_packet;
        public byte[] rdt_select() throws IOException{
            rcv_pkt = new DatagramPacket(receivedData,receivedData.length);
            while(!receivedData.equals(null)){
                return receivedData;
            send_all();
            return null;
        public void send_all() throws IOException{
            rcv_pkt = this.rdt_send();
            client_socket.send(rcv_pkt);
        public DatagramPacket select(){
            DatagramPacket local_rcv_pkt = null;
            while(receivedData != null){
                //local_rcv_pkt = rcv_pkt;
            return local_rcv_pkt;
        public void recv_from() throws IOException{
            rcv_pkt = select();
            socket.receive(rcv_pkt);
        public void statemachine_send(){
        public void statemachine_recv() throws IOException{
            String data = new String(rcv_pkt.getData());
            receivedData = data.getBytes();
            rcv_pkt = this.rdt_recv(receivedData);
    }

    public class Ex5 {
    DatagramSocket socket , client_socket;Surely you're not expected to implement the client and the server in the same class?
    while(!receivedData.equals(null)){
    return receivedData;
    }This is just nonsense.
    public DatagramPacket select(){See java.nio.channels.Selector.
    while(receivedData != null){
    //local_rcv_pkt = rcv_pkt;
    }More nonsense.
    I suggest if you don't understand the assignment you advise those who gave it to you, and/or review whatever supporting information you were supplied or have been taught.

  • Multiple Users Login ( Help With The Code ) Please.

    Hi all. Please help me...
    I'm using www.wix.com to create my websites.
    but since Wix.com don't able us to have member system conecet to database, i use Flash SWF As3 files...
    Please can anyone help me with the Code?
    Username=1    /Password= 1    /Url= www.1.com
    Username=2    /Password= 2    /Url= www.2.com
    Username=2    /Password= 2    /Url= www.2.com
    *If user name 1 or 2 or 3 correct. Show massage ex: Welcome back, if not correct " Bad login"
    *When login, it will open the url but in new page after the old one closed.
    + There is anyway to add " Password recovaring box too"?
    but not connected to datdabase as i said?
    Please help me, please! i areadly have code but it don't work for more than one user.
    Thank u soooo much!!
    Loai

    Here's the code i have already,,
    but i don't know how to add more than one user + when login it open new window ( popup ) i want it to open in the same window...
    Please help.
    stop();
    //hide the password
    //pass_txt.displayAsPassword = true;
    //adding event listener to the login button
    login_mc.addEventListener(MouseEvent.CLICK, loginUser);
    function loginUser(e:MouseEvent):void{
    //if both username and password are correct let the user logged in
    if(name_txt.text == "1" && pass_txt.text == "1"){
    navigateToURL( new URLRequest( "http://www.wix.com/designersgroup/tutorials/9-1" ), "_blank" );
    display_txt.text = "Going to secure area";
    else if(name_txt.text != "1" && pass_txt.text != "1"){
    display_txt.text = "Login failed!";
    if(name_txt.text == "2" && pass_txt.text == "2"){
    navigateToURL( new URLRequest( "http://www.wix.com/designersgroup/tutorials/9-2" ), "_blank" );
    display_txt.text = "Going to secure area";
    else if(name_txt.text != "2" && pass_txt.text != "2"){
    display_txt.text = "Login failed!";

  • Please help me with ABAP code

    Hi Gurus,
    Please help me with the code.
    Algorithm: This is for master data extraction. I need to append some records to I_T_DATA before the loop on I_T_DATA begins.
    ZTAB is a custom defined table with key KEY. STAB is standard table with key KEY.
    1. Create an internal table I_T_STAB similar to STAB.
    2. Loop at I_T_DATA
        Read record from ZTAB where KEY = I_T_DATA-KEY and { field1 <> I_T_DATA-field1 or field2 <> I_T_DATA-field2 <> field3 <> I_T_DATA-field3}
    If success
         Delete record from I_T_DATA.
    Else
         Continue loop.
    Copy all records of STAB to I_T_STAB.
    3. Delete records in I_T_STAB where I_T_STAB-KEY = ZTAB-KEY.
    Now
    4. Delete all records in I_T_DATA where I_T_DATA-KEY = I_T_STAB-KEY.
    Now,
    5. Append all the remaining records from step 3 in I_T_STAB to I_T_DATA.
    Please help me with the code upto this part.
    Now the actual code in exit starts.
    Loop at I_T_DATA
    Thanks,
    Regards,
    aarthi
    [email protected]

    You might get a quick answer if you were to post in the ABAP forum. 
    Moderator, please move to ABAP forum.  Thanks.
    Regards,
    Rich Heilman

  • Can you help with the code to publish Flash to my own domain.

    Thank you for your help, I publish the my site to my own domain, I do not use .Mac, I tested your code and ity works well on .Mac, can you help with the code to publish to my own domain.
    Thank you again

    You appear to have just collected a variety of code snippets and thrown them together, including a section of AS2 code ( gage.onRelease = function() {... )
    The suggestion I offered yesterday still stands.  You should find a tutorial regarding AS3 and the atan2 function.  Beyond that, what you show suggests this is a school assignment.  You should seek help from your fellow students and instructor if that is the case.

  • How to connect my app interface with the code in flash builder?

    I'm a beginner and learning my way around actionscript,mxml and flash builder.So this may seem foolish but please bear with me,I'm creating a very simple ios app using flash builder,I have created a simple app interface (A background and a custom navigation bar)using photoshop for my app,now the question is how do i import it into flash builder so that i can connect it with the code i have written? or is there another simpler way to create a app interface using other products like fireworks or catalyst?
    In short, I want to know how is an app interface created(wt software) and how is it connected with its code using flash builder.Any help would be greatly appreciated, and tutorials would be swell
    Thanks!

    Can you use stage.width or stage.stageWidth?

  • How can I print the "number lines" with the code in Visual Studio?

    How can I print the "number lines" with the code in Visual Studio?

    Hi BillionaireMan,
    What about your issue now?
    If you have resolved it, you can share the solution here, which will be beneficial for other members with the same issue.
    If you did not, please tell us more information,we will try my best to help you.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Can someone help me with this code?

    Hi all,
    I have a Flash component that links to a gallery, and I
    understand that I can create buttons to point to multiple
    galleries. (waiting too long for support from the suppliers)
    The User Guide says that I can use the following to create
    the connection:
    myThumbnailer2.loadGallery(24);
    That won't work, and it says that I need to include it in an
    onclipevent. I have no idea what i am doing and I was hoping
    someone could tell me what to script to get the text button I
    created to run this.
    Help would really be appreciated.
    Hugh

    Hi Hugh,
    You are right in that you can link to other galleries using
    the ID number (but, I assume, only TN2Admin (fCMSPro gallery
    document) defined galleries) with the code supplied.
    I think this may help - I'm a newbie with actionscript and I
    know nothing about Flashloaded so I may be way off beam here,
    but....
    First define a variable, this will be used in the 'show'
    (that's show, not load) gallery element of your code:
    var galNum: Number;
    Make as many buttons as required to launch a gallery (you say
    "each button opening one of several galleries" so I assume you want
    1 gallery per button) and give each an instance name.
    You then write the relevant code for each button function
    (assuming once more that the buttons are in the same frame) using
    the instance name (I use a separate layer in the frame to write
    actionscript and try not to attach code directly to objects - which
    then leads me to say yes you can put all the different buttons code
    in one frame)....
    myLoadGalBtn1.onRelease = function () {
    myThumbnailer2.loadGallery(24);
    galNum = 24;
    myLoadGalBtn2.onRelease = function () {
    myThumbnailer2.loadGallery(25);
    galNum = 25;
    notice the buttons have different instance names (the 1 &
    2 at the end - but you can call them what you like).
    Then you can use other code supplied to actually show the
    gallery (using the variable generated in each button click). Some
    code from Flashloaded will be along the lines of:
    myThumbnailer2.showGallery(25);
    so my guess is you can replace the actual number with the
    variable galNum inside the brackets to use the number generated by
    whatever button was pressed, like:
    myThumbnailer2.showGallery(galNum);
    Cheers
    Kol

  • Can somebody help me with this code?

    Can anyone help me with this code? My problem is that i can't
    seem to position this form, i want to be able to center it
    vertically & horizontally in a div either using CSS or any
    other means.
    <div id="searchbar"><!--Search Bar -->
    <div id="searchcart">
    <div class="serchcartcont">
    <form action='
    http://www.romancart.com/search.asp'
    name="engine" target=searchwin id="engine">
    <input type=hidden value=????? name=storeid>
    <input type=text value='' name=searchterm>
    <input type=submit value='Go'> </form>
    </div>
    </div>
    <div class="searchcont">Search For
    Products:</div>
    </div><!-- End Search Bar -->
    Pleasssssseeeeeeee Help
    Thanks

    Hi,
    Your form is defined in a div named "serchcartcont", you can
    use attributes like position and align of the div to do what you
    want to do. But there are two more dives above this dive, you will
    have define the height width of these before you can center align
    the inner most div. If you are not defining the height & width
    then by default it decide it automatically to just fit the content
    in it.
    Hope this helps.
    Maneet
    LeXolution IT Services
    Web Development
    Company

  • Please help me with the error of Java related to UNIX

    Can you help me with my code?
    I wrote a Java program and ran it in gdb, the debugger said that :
    (gdb) run handhelditems 1 1000
    Starting program: /home/wqq/crawl/handhelditems/crawl_what_i_want handhelditems 1 1000
    [Thread debugging using libthread_db enabled]
    [New Thread -1208232256 (LWP 3796)]
    [New Thread -1210332272 (LWP 3799)]
    [New Thread -1220822128 (LWP 3800)]
    [New Thread -1231311984 (LWP 3801)]
    [New Thread -1243206768 (LWP 3802)]
    [New Thread -1253696624 (LWP 3803)]
    [New Thread -1264186480 (LWP 3804)]
    [New Thread -1274676336 (LWP 3805)]
    [New Thread -1285166192 (LWP 3806)]
    [New Thread -1295656048 (LWP 3807)]
    [New Thread -1306145904 (LWP 3808)]
    [New Thread -1316635760 (LWP 3809)]
    Program received signal SIGPWR, Power fail/restart.
    [Switching to Thread -1316635760 (LWP 3809)]
    0x00196402 in __kernel_vsyscall ()
    (gdb)
    the crawl_what_i_want.java is :
    public class crawl_what_i_want {
         public static void main(String[] args){
              if(args.length!=3){
                   System.out.println("Usage: java crawl_html [site name] [start at] [end at]");
              else
                   String v1 = args[0];
                   int v2 = Integer.parseInt(args[1]);
                   int v3 = Integer.parseInt(args[2]);
                   thread thread0 = new thread(v1,v2,v3,0);
                   thread thread1 = new thread(v1,v2,v3,1);
                   thread thread2 = new thread(v1,v2,v3,2);
                   thread thread3 = new thread(v1,v2,v3,3);
                   thread thread4 = new thread(v1,v2,v3,4);
                   thread thread5 = new thread(v1,v2,v3,5);
                   thread thread6 = new thread(v1,v2,v3,6);
                   thread thread7 = new thread(v1,v2,v3,7);
                   thread thread8 = new thread(v1,v2,v3,8);
                   thread thread9 = new thread(v1,v2,v3,9);
                   thread0.start();
                   thread1.start();
                   thread2.start();
                   thread3.start();
                   thread4.start();
                   thread5.start();
                   thread6.start();
                   thread7.start();
                   thread8.start();
                   thread9.start();
    the thread.java is :
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import java.net.*;
    public class thread extends Thread
         String site_n;
         int s_at;
         int e_at;
         int for_id;
         thread(String site_n,int s_at,int e_at,int for_id){
              this.site_n = site_n;
              this.s_at = s_at;
              this.e_at = e_at;
              this.for_id = for_id;
         public synchronized void run() {
              String site = site_n;
              int fornum = for_id;
              int start = s_at;
              int end = e_at;
              //String site_name = "http://www."+site+".com";
              ArrayList url_list = new ArrayList();
              ArrayList url_id_list = new ArrayList();
              try{
                   Class.forName("com.mysql.jdbc.Driver").newInstance();
                   String getconn = "jdbc:mysql://localhost/url_set_"+site+"?user=xxxx&password=xxxx";
                   Connection conn = DriverManager.getConnection(getconn);
                   PreparedStatement stmt = conn.prepareStatement("");
                   ResultSet rs = null;
                   stmt = conn.prepareStatement("select url,url_id from urls where url_id>=? and url_id<=?");
                   stmt.setInt(1,start);
                   stmt.setInt(2,end);
                   rs = stmt.executeQuery();
                   while(rs.next())
                        url_id_list.add(rs.getString(2));
                        url_list.add(rs.getString(1));
                   if(rs!=null)
                        rs.close();
                   stmt.close();
                   conn.close();
              catch(Exception e){
                   e.printStackTrace();
              try{
                   InputStream in = null;
                   InputStreamReader rd = null;
                   BufferedReader br = null;
                   for(int i=fornum; i<url_list.size(); i=i+10){
                        String save_dir = "./" + String.valueOf(Integer.parseInt(url_id_list.get(i).toString())/10000) + "/" ;
                        try{
                             if(!(new File(save_dir).isDirectory()))
                                  new File(save_dir).mkdir();
                        catch(Exception exp){
                             exp.printStackTrace();
                        String html = "";
                        URL this_url = new URL(url_list.get(i).toString());
                    in = this_url.openConnection().getInputStream();
                    rd = new InputStreamReader(in);
                    br=new BufferedReader(rd);
                    String line = br.readLine();
                    int imgmark = 0 ;
                    while(line != null){
                        html += line + (char)13;
                        //  get image  //
                        if(line.indexOf("product image(s) bof")>0)
                             imgmark = 1;
                        if(line.indexOf("product image(s) eof")>0)
                             imgmark = 0;
                        if(imgmark == 1 && line.indexOf("img src")>=0)
                             int bofimg = line.indexOf("http://www.unix.com/images/");
                             int eofimg = line.indexOf("jpg\"")+3;
                             if(eofimg>bofimg){
                                   String imgURL = "http://www."+site+".com/" + line.substring(bofimg,eofimg);
                                   String imgdir = save_dir + url_id_list.get(i).toString() + ".jpg";
                                   getpic gp = new getpic();
                                   gp.crawlpic(imgURL,imgdir);
                        line = br.readLine();
                     br.close();
                     rd.close();
                     in.close();
                        if(html==null)
                             html = "";
                        if(html.length()>0){
                             String saveTo = save_dir+ url_id_list.get(i).toString() +".html";
                             try {
                                  new outPut(html, saveTo);
                             } catch (IOException e) {
                                  e.printStackTrace();
                             System.out.println((i+start) + ". Saved " + url_list.get(i) + " as " + (i+start) + ".html");
                        else
                             System.out.println((i+start) + ". failed at " + url_list.get(i));
                   if(br!=null)
                        br.close();
              }catch (Exception e){
                   e.printStackTrace();
    the outPut.java is :
    import java.io.*;
    public class outPut {
            public outPut(String content, String outPutFile)throws IOException{
                    FileWriter fl = null;
                    BufferedWriter bw = null;
                    try{
                            File f = new File(outPutFile);
                            if(!f.exists())
                                    f.createNewFile();
                            fl = new FileWriter(outPutFile);
                            bw = new BufferedWriter(fl);
                            bw.write(content);
                    finally{
                            if(bw!=null)
                                    bw.flush();
                            if(fl!=null)
                                    fl.flush();
                            if(bw!=null)
                                    bw.close();
                            if(fl!=null)
                                    fl.close();
    the getpic.java is
    import java.io.*;
    import java.net.*;
    public class getpic {
            public synchronized void crawlpic(String url, String savedir)throws Exception {
                InputStream in = null;
                InputStream inBuffer = null;
                OutputStream out = null;           
                try{
                    URL this_url = new URL(url);
                    in = this_url.openConnection().getInputStream();
                        inBuffer = new BufferedInputStream(in);
                        out = new FileOutputStream(savedir);
                        while(true){
                        int bytedata = inBuffer.read();
                        if(bytedata == -1)
                        break;
                        out.write(bytedata);
                finally{
                    if(out != null)
                            out.close();
                    if(inBuffer != null)
                            inBuffer.close();
                    if(in != null)
                            in.close();
    }above are all my code .
    On the other hand, the codes can be run at JDB, but it will lose some thread after run for some minute or seconds.

    Hi aarthi,
    SELECT can be used to fetch data only from database tables/views. in your case you used SELECT from an INTERNAL table,which is not allowed.
    SELECT  *
           FROM <DBTABLE NAME>
           INTO TABLE EXPORT_REC
           WHERE KEY = IMPORT_ PARAMETER AND   
           IMPORT_PARAM_DATE BETWEEN FROM_DATE AND TO_DATE.
    HERE Instead of <DBTABLE NAME>,you have to give your Database table,which stores these values.
    then your data will comes into EXPORT_REC.
    and remember to give EXPORT_REC in TABLES parameters of that FUNCTION MODULE and give associated Type for that.
    Regards
    Srikanth

  • Please help me with the homework given to me by my teacher

    hello,i am new in java programming please help me with the home work given to me by my teacher at school, help me to build an interface that can work with this code.i can build an interface but i dont just understand this code.
    //references:
    //http://forums.techguy.org/development/570048-need-write-java-program-convert.html
    import java.util.Map;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.BufferedReader;
    import java.io.FileReader;
    public class Translate
      public static void main(String [] args) throws IOException
        if (args.length != 2)
          System.err.println("usage: Translate wordmapfile textfile");
          System.exit(1);
        try
          HashMap words = ReadHashMapFromFile(args[0]);
          System.out.println(ProcessFile(words, args[1]));
    catch (Exception e)
          e.printStackTrace();
      // static helper methods
       * Reads a file into a HashMap. The file should contain lines of the format
       *    "key\tvalue\n"
       * @returns a hashmap of the given file
      @SuppressWarnings("unchecked")
      private static HashMap ReadHashMapFromFile(String filename) throws FileNotFoundException, IOException
        BufferedReader in = null;
        HashMap map = null;
        try
          in = new BufferedReader(new FileReader(filename));
          String line;
          map = new HashMap();
          while ((line = in.readLine()) != null)
            String[] fields = line.split("\\t", 2);
            if (fields.length != 2) continue; //just ignore "invalid" lines
            map.put(fields[0], fields[1]);
    finally
          if(in!=null) in.close(); //may throw IOException
        return(map); //returning a reference to local variable is safe in java (unlike C/C++)
       * Process the given file
       * @returns String contains the whole file.
      private static String ProcessFile(Map words, String filename) throws FileNotFoundException, IOException {
        BufferedReader in = null;
        StringBuffer out = null;
        try {
          in = new BufferedReader(new FileReader(filename));
          out = new StringBuffer();
          String line = null;
          while( (line=in.readLine()) != null ) {
            out.append(SearchAndReplaceWordsInText(words, line)+"\n");
        } finally {
          if(in!=null) in.close(); //may throw IOException
        return out.toString();
       * Replaces all occurrences in text of each key in words with it's value.
       * @returns String
      private static String SearchAndReplaceWordsInText(Map words, String text) {
        Iterator it = words.keySet().iterator();
        while( it.hasNext() ) {
          String key = (String)it.next();
          text = text.replaceAll("\\b"+key+"\\b", (String)words.get(key));
        return text;
       * @returns: s with the first letter capitalized
      String capitalize(String s)
        return s.substring(0,0).toUpperCase() + s.substring(1);
    }... here's the head of my pirate_words_map.txt
    hello     ahoy
    hi     yo-ho-ho
    pardon me     avast
    excuse me     arrr
    yes     aye
    my     me
    friend     me bucko
    sir     matey
    madam     proud beauty
    miss     comely wench
    stranger     scurvy dog
    officer     foul blaggart
    where     whar
    is     be
    are     be
    am     be
    the     th'
    you     ye
    your     yer
    tell     be tellin'

    Heres your answer. Run it in on your pc.
    public class Annoy
    public static void main(String[] args)
       System.out.println("I am a triple poster.");
       System.out.println("I can not understand why I can not understand the help I have receved to date on the java forums.");
    }

  • Please help me with the digital signature validation problem?

    Please help me with the digital signature validation problem?

    Hi
    Execute the program in the Debuggin mode.
    In the Debugger Window
    Select Breakpoint -> Break point at -> Breakpoint at source code Menu Item and enter the details of the program/include/line no..
    Activate the System Debugger On from the Settings Menu.
    Hope this would help you.
    Murthy
    Edited by: Kalyanam Seetha Rama Murthy on Jul 18, 2008 7:20 AM

  • What's wrong with the code?

    public void run()
    try
    {     for(;;)
         mgr = (RTPManager)RTPManager.newInstance();
         mgr.addSessionListener(this);
         mgr.addReceiveStreamListener(this);
         try{  /*****port1 = port2 = 29261, which port is only used in here
         localAddr = new SessionAddress(InetAddress.getLocalHost(), port1);
         destAddr = new SessionAddress(ipAddr, port2);
         }catch(Exception e)
              System.out.println(e + " 4");
         try{
         mgr.initialize(localAddr);
         }catch(Exception e)
         System.out.println(e + " 5");
         //set buffer
         bc = (BufferControl)mgr.getControl("javax.media.control.BufferControl");
         if (bc != null)
         bc.setBufferLength(20);
         try{
              mgr.addTarget(destAddr);
         }catch(Exception e)
         System.out.println(e + " 2");
    catch(Exception e)
         System.out.println(e+ " 3");
    the error when i run the code is like that:
    javax.media.rtp.InvalidSessionAddressException: Can't open local data port: 29261
    5
    java.io.IOException: Address already in use: Cannot bind 2
    which means there is error in :
    mgr.initialize(localAddr);
    mgr.addTarget(destAddr);
    But i don't know what's wrong with the code,
    can any one help me?

    I do not find any problem using the same ports for local and destination address with several unicasts. My problems are others.
    But note that the error is even at constructing the localAddress, I mean before trying the destinationAddress. Thus the reason cannot be the former is already in use. In fact I think the later belongs to a remote hosts. Likely, it is trying to access the destinationAddress through the localAddress, but this has not been constructed properly.

  • Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Hi Chhayank,
    the problem is not the exported xls. If you have a look inside with Notepad or something like that, you will see that your leading zeros are exported correct.Excel-settings occurs this problem, it is all about how to open the document. If you use the import-assistant you will have no problems because there are options available how to handle the different columns.
    Another solution might be to get familiar with ABAP2XLS-Project. I got in my mind, that there is a method implemented, that will help you solving this problem. But that is not a five minute job
    ~Florian

Maybe you are looking for