Code for UpLoad program to load Custom PA infotype

I need to develope UpLoad program to load Custom PA infotype which I created with 9001.
Can you please give the complete code to Write upload program using standard available FM .
Points will be awarded........
Thanks
Raj

As this is a custom Infotype and no code is readily available, I would suugest that you try transction SHDB and record loading data into this Infotype.  This interm can be converted to a program which you can then tweek.  If I get stuck writting a BDC upload program then this is where I start.
Regards
J

Similar Messages

  • Upload program to load Custom PA infotype

    I need to develope UpLoad program to load Custom PA infotype which I created with 9001.
    Can you please give the steps to Write upload program.
    Thanks
    Raj

    This is an example of the HR_INFOTYPE_OPERATION use, in this case for a custom infotype as well.
      LOOP AT IT_9129.
        clear : W_PERNR, W_RETCODE, i9129, t_output.
    * Primeiro vamos buscar o número de empregado associado ao número do sistema anterior
        PERFORM GET_NEW_PERNR USING    IT_9129-PERNR
                                       IT_9129-BEGDA
                              CHANGING W_PERNR
                                       W_RETCODE.
        CHECK W_RETCODE = 0.
    * Aqui assignamos os valores
        MOVE-CORRESPONDING it_9129 to i9129.
        i9129-pernr = w_pernr.
        i9129-endda = w_endda.
    *   Bloquear o Empregado
        perform ENQUEUE_EPPRELE using W_PERNR .
    * Executar PA30
        CALL FUNCTION 'HR_INFOTYPE_OPERATION'
          EXPORTING
            INFTY         = '9129'
            NUMBER        = i9129-pernr
            VALIDITYEND   = i9129-endda
            VALIDITYBEGIN = i9129-begda
            RECORD        = i9129
            OPERATION     = 'INS'
            TCLAS         = 'A'
            DIALOG_MODE   = P_MODO
          IMPORTING
            RETURN        = return.
        if not return is initial.
          perform fill_error using return .
        else.
          t_output-mensagem = 'Infotipo 9129 criado com sucesso'.
        endif.
    * Output
        t_output-PERNR = w_pernr.
        t_output-PNALT = it_9129-PERNR.
        append t_output.
      ENDLOOP.

  • For uploading master data(ex:customer data) into sap,

    hi
    for uploading master data(ex:customer data) into sap,
    which methods you prefer? call
    transaction/session/lsmw/bapi? why?
    Thanks
    Rama

    Hello,
    Check this:
    COde:
    REPORT zprataptable2
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    DATA : BEGIN OF itab OCCURS 0,
            i1 TYPE i,
            lifnr LIKE   rf02k-lifnr,
            bukrs LIKE   rf02k-bukrs,
            ekorg LIKE   rf02k-ekorg,
            ktokk LIKE   rf02k-ktokk,
            anred LIKE lfa1-anred,
            name1 LIKE lfa1-name1,
            sortl LIKE lfa1-sortl,
            land1 LIKE lfa1-land1,
            akont LIKE lfb1-akont,
            fdgrv LIKE lfb1-fdgrv,
             waers LIKE lfm1-waers,
            END OF itab.
    DATA : BEGIN OF jtab OCCURS 0,
            j1 TYPE i,
            banks LIKE lfbk-banks,
            bankl LIKE lfbk-bankl,
            bankn LIKE lfbk-bankn,
             END OF jtab.
    DATA : cnt(4) TYPE n.
    DATA : fdt(20) TYPE c.
    DATA : c TYPE i.
    INCLUDE bdcrecx1.
    START-OF-SELECTION.
      CALL FUNCTION 'WS_UPLOAD'
        EXPORTING
          filename = 'C:\first1.txt'
          filetype = 'DAT'
        TABLES
          data_tab = itab.
      CALL FUNCTION 'WS_UPLOAD'
       EXPORTING
         filename                      = 'C:\second.txt'
         filetype                      = 'DAT'
        TABLES
          data_tab                      = jtab.
      LOOP AT itab.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF02K-KTOKK'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RF02K-LIFNR'
                                      itab-lifnr.
        PERFORM bdc_field       USING 'RF02K-BUKRS'
                                      itab-bukrs.
        PERFORM bdc_field       USING 'RF02K-EKORG'
                                       itab-ekorg.
        PERFORM bdc_field       USING 'RF02K-KTOKK'
                                       itab-ktokk.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0110'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFA1-LAND1'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'LFA1-ANRED'
                                      itab-anred.
        PERFORM bdc_field       USING 'LFA1-NAME1'
                                      itab-name1.
        PERFORM bdc_field       USING 'LFA1-SORTL'
                                      itab-sortl.
        PERFORM bdc_field       USING 'LFA1-LAND1'
                                      itab-land1.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0120'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFA1-KUNNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFBK-BANKN(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTR'.
        cnt = 0.
        LOOP AT jtab WHERE j1 = itab-i1.
          cnt = cnt + 1.
          CONCATENATE 'LFBK-BANKS(' cnt ')' INTO fdt.
          PERFORM bdc_field  USING fdt jtab-banks.
          CONCATENATE 'LFBK-BANKL(' cnt ')' INTO fdt.
          PERFORM bdc_field USING fdt jtab-bankl.
          CONCATENATE 'LFBK-BANKN(' cnt ')' INTO fdt.
          PERFORM bdc_field   USING fdt jtab-bankn.
          IF cnt = 5.
            cnt = 0.
            PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
            PERFORM bdc_field       USING 'BDC_CURSOR'
                                          'LFBK-BANKS(01)'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '=P+'.
            PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
            PERFORM bdc_field       USING 'BDC_CURSOR'
                                          'LFBK-BANKN(02)'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '=ENTR'.
          ENDIF.
        ENDLOOP.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFBK-BANKS(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0210'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFB1-FDGRV'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'LFB1-AKONT'
                                      itab-akont.
        PERFORM bdc_field       USING 'LFB1-FDGRV'
                                      itab-fdgrv.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0215'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFB1-ZTERM'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0220'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFB5-MAHNA'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0310'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFM1-WAERS'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'LFM1-WAERS'
                                      itab-waers.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0320'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF02K-LIFNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM bdc_dynpro      USING 'SAPLSPO1' '0300'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=YES'.
        PERFORM bdc_transaction USING 'XK01'.
      ENDLOOP.
      PERFORM close_group.
    Header file:
    1     63190      0001     0001     0001     mr     bal188     b     in     31000     a1     inr
    2     63191      0001     0001     0001     mr     bal189     b     in     31000     a1     inr
    TC file:
    1 in sb 11000
    1 in sb 12000
    1 in sb 13000
    1 in sb 14000
    1 in sb 15000
    1 in sb 16000
    1 in sb 17000
    1 in sb 18000
    1 in sb 19000
    1 in sb 20000
    1 in sb 21000
    1 in sb 22000
    2 in sb 21000
    2 in sb 22000
    Regards,
    Vasanth

  • Transaction code for creation of a specific customizing table ?

    Hi,
    What's the transaction code for creation of a specific customizing table ?
    Thanks in advance.

    Carl,
    if you can share with us from which t-code you achieve this , than it would be better for we guys.
    Amit.

  • Can anyone help me wid d codes for  Generated Program for gate pass

    can anyone help me wid d codes for  Generated Program for gate pass in MM
    Message was edited by:
            Ronei Shedi

    Hi
    There is no std business process in SAP for Gate pass for the Material entry
    before GR stock entry into the stores.
    You have to write a Z program based on the details of Purchase order tables EKKO and EKPO.
    This will mainly check whether the correct PO qty was delivered or not with proper quality.
    So use the PO tables EKKO and EKPO and fetch the data and use it
    Since this is client specific there is no feneralised program for it.
    Reward points if useful
    Regards
    Anji

  • T-codes for uploading material prices and domestic prices?

    t-codes for uploading material prices and domestic prices?
    regards

    Use Transaction VK11 and VK12 based on Condition type for price .
    Please reward if useful.

  • Need code for dialog program

    Hi All,
    My requirement is to create a selection screen with
    1. browse field - selection for the  files to be uploaded
    2. Checkbox - Test run the transaction without parking the entries
    3. Two push button Execute and Cancel
      Execute - to lunch the program
      Cancel - cancel the program and return to menu
    Please provive the code and procedure to create screen. i am new for dialog program.
    Thanks,
    Madhu

    Rather than waiting for someone here to write the code for you, you'd be better off looking at the examples in SAP as already mentioned and reading the SAP help at[http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba66935c111d1829f0000e829fbfe/frameset.htm]

  • I want code for these programs

    5)     Write a program to perform the following:
    •     Accept a number ‘N’ and a range of company codes from the user.
    •     Retrieve the first N customers from the table KNA1.
    •     For each customer, retrieve the company codes it has been maintained for, (If the company code falls within the user specified range) from the table KNB1.
    •     Display the data in the ascending order of company codes for each customer, in the following format.
    Customer 1
         Company code1
         Company code2
    Customer 2
         Company code 3
    If the user doesn’t specify a value for N, retrieve all the customers.
    6)     Write a program to display top three records from SFLIGHT which have the highest flight price for a given airline carrier. If the user doesn’t specify an airline carrier, display the information for all the airline carriers.
    Display the following details in the list.
    a)     CARRID, CONNID, FLDATE, PRICE.
    b)     Print the summary information for each flight & for each airline.
    7)     Create an include program for all the data declarations needed, to display the following information from tables SBOOK and SCUSTOM.
    CARRID     CONNID     FLDATE     CUSTOMID     NAME          WUNIT
    AI          0001          02/28/1996     00000012     RADETZKY     KG
    AI          0002          02/28/1997     00000020     BECKER     KG
    AI          0003          02/28/1998     00000035     BRUCHER     KG
    Write a program using the above include program, and display details for the user specified combination of airline carrier and connection, from the tables SBOOK and SCUSTOM in the format given above.
    8)     Write a program to perform the following:
    a)     Display the names and ages in years, of all the programmers.
    b)     Calculate and display the average selling cost for packages that have been developed in Pascal.
    c)     Display the names and dates of birth of all programmers born in January.
    d)     Determine as to which package sold the highest number of copies. Display the name and number of copies sold by that particular package.
    e)     Display the total number and names of programmers who have done the PGDCA course.
    f)     Display the details of packages whose sales (sales cost * number of copies sold) crossed the 7000 mark.
    g)     Display the revenue earned through the sales of packages developed in “C”. Revenue should be calculated as the difference between sales and the development cost.
    h)     Display the details of the packages for which development costs have been recovered, i.e. Sales for that package is greater than the cost for development of the package
    i)     Display the cost and the name of the costliest software package (with respect to dev cost) developed in each language.
    j)     Display the age of the oldest male programmer.
    k)     Display the experience (in years) of each programmer along with his or her name. (In both ascending & descending order of their experience).
    l)     Display the list of all the programmers who celebrate their birthday during the current month.
    m)     Display each language name, with average development cost, average selling cost and average price per copy of packages developed in that language.
    n)     Display all the programmers’ details along with the costliest and cheapest packages developed by them.
    o)     Display the programmer-wise details of each package, for which the Development cost has not yet been recovered i.e. the Sales revenue is less than the development cost. Display the following details in the list, Programmer name, package name, total development cost, sales revenue and the amount that is yet to be recovered for that package.
    p)     Display the details of the least & the most experienced programmers
    q)     Display the language, which is known by only one programmer.
    r)     Display the language that is used to develop the most number of packages.
    s)     Display the details of the programmers and the cheapest packages developed by them in each language.
    t)     Display the language used by each programmer to develop the highest and lowest selling cost packages.
    u)     Display the number and names of packages developed by the female programmers whose salary is more than the highest paid male programmer.
    9)     Write a program to perform the following:
    •     Accept a material type (field MTART in table MARA) from the user.
    •     Display all the materials of the user specified material type. Also display the plants that they have been maintained for, if any, in the following format:
    Material1
         Plant1
         Plant2
    Material2
         Plant1
         Plant2
    NOTE:
    a)     Plant specific data for a material is available in the table MARC
    b)     Write two programs (a) & (b) with one making use of JOINS and the other without JOINS to get the required output.
    10)     Write a program to perform the following using JOINS:
    •     Accept a sales document type from the user. (Use table VBAK)
    •     Display all the sales documents (of the user specified type) and their corresponding item details whose net value (field NETWR in table VBAP) is less than 1000, in the following format: (Use table VBAP)
    Sales document 1
                   Sales document item 1          Material 1
                   Sales document item 2          Material 2
    Sales document 2
                   Sales document item 1          Material 1
                   Sales document item 2          Material 2
    11)     Write a program to perform the following using only one SQL statement:
    •     Accept a range of carrier id and connection id from the user.
    •     Display the following flight details in the following format:
    (Use the tables SPFLI, SFLIGHT, SBOOK, SCUSTOM)
    CARRID      CONNID     CITYFROM
                                  FLDATE     PRICE
         BOOKID      CUSTOMER NAME
         BOOKID      CUSTOMER NAME          BOOKID      CUSTOMER NAME
                                  FLDATE     PRICE
         BOOKID      CUSTOMER NAME
         BOOKID      CUSTOMER NAME
         BOOKID      CUSTOMER NAME

    Devika,
    I hope u r new to ABAP world.!!
    All these questions/programs are just for your practice purpose...try to solve this... Don;t worry if error occurs or if it takes time to solve,....
    Till u get confident in abap programming practice these programs ....then BLAST the programs in real time...
    Wish u best of luck!!!
    Rgds,
    Lakshmiraj

  • Code for Percentage Display of Loading Own Content

    I need an AS3 code for an external AS file that would provide
    the percentage of loading the content of its own swf ( library
    assets, etc ) and NOT external files. And then, after the loading
    is complete, it should add an instance of the main MovieClip ( from
    the library) into the stage.
    ( So far I only found code for preloading an external swf)
    Any idea ?

    Hi Andrei1
    I already have a code that goes embedded in first frame of a
    fla file and it works. The fla has two scenes, one called
    “preloader” and the other just “scene”.
    In the “preloader” scene I have this code in the
    first frame:
    import flash.events.ProgressEvent;
    function LoadingProgress(e: ProgressEvent):void
    var percent:Number = Math.floor(
    (e.bytesLoaded*100)/e.bytesTotal );
    t.text = ""+percent;
    if(percent == 100)
    play();
    loaderInfo.addEventListener(ProgressEvent.PROGRESS ,
    LoadingProgres);
    stop();
    It also has an instance of an animation movieclip in the
    stage that shows the loading progress.
    And in the “scene” scene it has a simple
    instruction as code in the first frame:
    stop();
    And it also has an instance of the main movieclip on the
    stage.
    It works fine, but my version of a separated AS file ( using
    package/class ) is not working.

  • Step by step code for dialog program

    i created a ztable with 4 fields having some data in it.
    my requirement is:
    create a screen with 4 fields from ur ztable with SAVE and CANCEL as push buttons.
    if i enter some data in my fields and  select SAVE, a pop-up-box should appear saying whether u want to save the data or not?
    if i click 'yes' in my pop-up data should be saved in my ztable
    saying 'data is saved successfully'.else if i click 'no' it should come out of the txion.
    if i select CANCEL it should be in the same screen.

    Hi nani,
    First you need to create a screen with 4 inputs fields as you mentioned.
    To create a screen,follow these steps:
    1) Go to SE80.There you will find two drop down boxes.
    Select program in the first list box and give the name of the program you want in the second list bo.
    2)Click on SAVE.
    3)Right click on the program name and there you will find a small menu.Go to CREATE--->SCREEN.
    4)A window would open now.There give a number to the screen and a description to it and press on SAVE.Now the screen is created.
    Now you need to add the input fields in the screen.To do this follow these steps:
    1)Click on the layout button which you will finid on the top of the scrren window.This leads you to the screen painter.
    2)In the screen painter you will find a list of buttons on the left hand side.
    3)Select the button which says input/output field.
    4)Now paste the input/output field in the screen.
    5)Double click on it and a pop up will open.There you need to give the name of the field.
    Here you will have to give the name in this format: <Ztable_name>-<field_name>.
    For e.g: ztm09ekko-ebeln.
    By giving the name of the field same as the field name in the Ztable,the field will be linked to the Ztable field.
    Follow the same steps for the rest of the input/output fields creation.
    Now you need to create two push buttons.The steps are:
    1)Go to the screen layout again and now select push buttons from the menu on the left hand side.
    2)Paste in on the screen.
    3)Double click on it and a popup will open.There you need to give the name of the push button.Here you will also find a field by name Fct.Code.This is the field for the function code of the push button.
    Give an appropriate function code name like SAVE and CANCEL in your case.
    After doing all this,you need to activate the screen.
    Now to make the push buttons working,you need to write a code for it.
    To write the code,exit the screen layout and click on the flow logic tab that you  will find above.
    Go through this code and you will easily understand how to write it for your requirement.
    You can use the same code in your program just by changing the table names.
    In this code a function module is called to display the popup.The popup contains three options-Yes,No and Cancel.When selecting Yes,The details present in the input fields will be saved in the Ztables.If NO is selected in the popup,then the transaction will be exited.
    In the function module,answer holds the user command.
    e_answer needs to be created by user.The statement for it is :
    DATA :e_answer type c.
    In the function module as you can see, J indicates Yes and N indicates No.
    And if you click on the CANCEL push button,
    The same screen is retained as per your requirement.
    In the PAI module of that Screen,
    write this code:
    CASE SY-UCOMM.
    when SAVE.
    CALL FUNCTION 'C14A_POPUP_SAVE_WITH_CANCEL'
    IMPORTING
    e_answer = answer.
    IF answer = 'N'.
    ***Leaving the transaction****
    LEAVE TRANSACTION.
    ELSEIF answer = 'J'.
    ***The right side of the equation is the name of the input field in the screen.The left hand side of the ****equation is the field name in the ZTable ztm09_ekpo.**
    ztm09_ekpo-ebeln = ztm09_ekko-ebeln.    "ztm09_ekko is the name of the Z Table.
    MODIFY ztm09_ekpo.
    when CANCEL.
    set data hold on.
    endcase.
    Revert for any querries.
    Reward points if helpfull.
    Regards,
    Kaushik

  • Need code for this program in pl/sql

    Hi,
    was looking for a pl/sql code for the following case
    If there are two employees from the EMP table. i want all the names of the managers common to the two employees....
    to explain in detail : if employee1 and employee2 have the same manager mgr1....mgr1 should be displayed.
    else if employee 1 and employee2 have no immediate manager in common...meaning team leader of employee 1 and employee2 are different but the project managers for both the employee is same..in this case the project manager's name should be displayed......
    else in worst case when there are no managers common between these two employees.........the CEO who is at the highest level is common....then display CEO's name
    it's hierchiacal structure......
    thanks,
    Preethi

    Why PL/SQL? Why not look at if this can be done using SQL firstly? SQL is the preferred language for crunching Oracle data. Not PL/SQL.
    Think data sets.
    One method to do this in SQL would be to build a hierarchical list of managers for each employee. E.g.
    LEVEL MANAGER
    1     Jack
    2     John
    10     Dan the CEOOnce you have such a list for each employee, you can join these two lists on matching names. Then you simply need to find the matching join that has the lowest level.
    I'm sure there are other approaches. But unless you put together some test data, put together some SQLs and play around with this problem, you are not going to learn anything.
    And no, copying and pasting an answer that someone is inevitable to post in response is NOT learning anything new.
    So why not try and solve this problem yourself? Gain some new knowledge. That will only do your career well as your employer is after all expecting you to write the code to solve this problem - and not for members of this forum to supply the code for you.

  • How to assign Transaction code for report program?

    All,
    I have developed a custom report. I want to associate it to a transaction code. How to do it?

    Hi,
    Please follow the steps for creating a transaction for report..
    GOTO SE93
    Give the transaction code.
    Press create button..
    Enter the short description..
    Choose the radio button which says "Program and selection screen(report transaction)".
    Press Enter..
    Give the program name..
    Remove the Selection screen "1000" if you want.
    Save the transaction code..
    Regards

  • Cannot write the suitable source codes for running program

    I want to write a program that help student to compile program and run program by using some test cases. For the compiled part, i have been wrote it successfully, but for the run part, i cannot pass the test cases to the program for running. Could any ppl help me to find the problem on the followng codes, why the error will on there? how do i change it? Thanks!
    //<!--start get Program Test Case File-->
    java.io.BufferedReader TestCaseBuf = null;
    Connection con = null;
    Statement stmt = null;
    ResultSet rs = null;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection("jdbc:odbc:compas", "sa", "password");
    stmt = con.createStatement();
    String strSQL = "SELECT testValue FROM TEST_CASE WHERE progID='"+progID+"'";
    stmt = con.createStatement();
    rs = stmt.executeQuery(strSQL);
    try
    while (rs.next())
    TestCaseBuf = new java.io.BufferedReader(new java.io.InputStreamReader(rs.getBinaryStream("testValue")));                         
    finally
    if (rs != null)
         rs.close();
    if (stmt != null)
         stmt.close();
    //<!--end get Program Test Case File-->
    //<!--start run program -->
    String[ ] args2 = new String[ ]
         "java", "-cp", System.getProperty("user.dir"), FileName
    try
         Runtime rt = Runtime.getRuntime();
         Process proc = rt.exec(args2);
         java.io.BufferedReader ireader = new java.io.BufferedReader(new java.io.InputStreamReader(proc.getInputStream()));
         java.io.PrintWriter pwriter = new java.io.PrintWriter(proc.getOutputStream());
    String atestcase = null;
         String line= null;
         try
    while ((atestcase = TestCaseBuf.readLine()) != null) <------------I found that error seems on here!!!!
         pwriter.write(atestcase+"\r");
    pwriter.flush();     
    if (atestcase != null)
              if ((line = ireader.readLine()) != null)
              FileOutput = FileOutput + line +"\r\n";
    else {break; }
         } //while
         catch (java.io.IOException e)
         out.println("[IOException]. Printing Stack Trace");
         e.printStackTrace();
         pwriter.close();
         ireader.close();
    catch (java.io.IOException e)
    out.println("[IOException]. Printing Stack Trace");
    e.printStackTrace();
    //<!--end run program -->

    Whats the error message??
    Just a guess, but could be (without seeing the error) that you've already closed the TestCaseBuf reader by closing the result set, hence when you go to read it, you're reading on closed reader.
    Give this a go...Put the //<!--run program --> code into the result set while loop
    while (rs.next())
    TestCaseBuf = new java.io.BufferedReader(new java.io.InputStreamReader(rs.getBinaryStream("testValue")));
    //<!--start run program -->
    ...some code
    //<!--end run program -->
    } Hard to tell without the error message

  • Need help writing a code for this program

    Design a code that reads a sentence and prints each individual word on a different line

    tsith's suggestion is excellent. Run it and see what happens. I just did that myself and doing so I learned something new about the Scanner class.
    Before you run it, add a couple of extra System.out.println for (hopefully) illustrating debugging purposes:
    import java.lang.String;
    import java.util.Scanner;
    public class Sentence {
        // main line of program
        public static void main(String[] args) {
            boolean z;
            String a;
            Scanner keyboard = new Scanner(System.in);
            System.out.print("Enter sentence: ");
            z = keyboard.hasNext();
            while (z) {
                System.out.println("z = " + z + ". Fetching the next word...");
                a = keyboard.next();
                System.out.println(a);
            System.out.println("Done!");
    }Let us know if the program ever prints "Done!" to the console. While you are waiting, read what the javadocs has to say about the Scanner class, and pay extra attention to what it says about the hasNext() and next() methods:
    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Scanner.html

  • IFrame with code for video doesn't load in iWeb but works in Safari?

    I've got a strange problem... I have encoded several videos using H.264 as .mov files and then import them into a flash file. Flash 10 plays these files just fine. However, when I put this on an iWeb page using an iFrame the video never loads. If I go ahead and publish the pages I can open the pages with Safari and see the videos just fine. Why won't iWeb loads these videos so I at least see a preview of the first frame? Instead, the Flash skin progress bar just keeps running and never stops. The path is valid obviously since the actual pages work when viewed with Safari.
    Here is the code I'm using in the HTML snippet:
    <IFRAME SRC = "http://xxxxxxx.xxxx.net/FLASH/PL2009/PL2009.html" WIDTH="320px" HEIGHT="280px" FRAMEBORDER="0" --if "0" no border, otherwise "1" with border MARGINWIDTH ="0px" MARGINHEIGHT="0px" SCROLLING="no" --"no" no scrolling bar, "yes" show always, "auto" showed when need > Your browser does not support IFRAME </IFRAME>

    Wouldn't that lose the skin etc?
    One interesting thing I just tried is that I renamed the H.264.mov file so it had a .flv extension. I then went to Flash CS4 and opened the Flash document and re-linked to the .flv file and then re-published it. I then FTP'd all of the published files to my host and then went to iWeb. I clicked on the existing container and then clicked "Apply". Low and behold the movie loaded just fine!
    So, I'm left to assume that iWeb cannot load H.264.mov files via an iFRAME unless you change the extension. Like I said, everything actually worked on the web site it's just that iWeb didn't load the video and it was annoying to see the buffer bar in a continuos update mode.
    So what are your thoughts on this? Thanks!
    Message was edited by: Bruce Carillon1
    Message was edited by: Bruce Carillon1
    Message was edited by: Bruce Carillon1

Maybe you are looking for

  • Microsoft plug in deployment errors on grid control

    Hi, I keep getting errors when deploy microsoft_sqlserver_Databse plug in to grid control server. "The preferred credentials are not set for "server name"". I set the credential for microsoft SQL server on preference page, however, i still get same e

  • URGENT!! ObjectInput/Output stream

    guys help me please, i am writting a client/server application, and i want to send an object from the client to the server and send it back to the client. but see, when i run the program its gives java.io.StreamCorruptedException:invalid stream heade

  • Issue with importing Opportunities

    Ok, I need help!! I am importing Opportunities from a csv file. Two files with exactly the same format are imported. One imports ok, the other one says it has an unexpected error and fails all records. What am I missing??? Thanks to any help!

  • Question about the vi : Average Last Five Values

    Hello, I found the vi to make the average of the last five values here : https://decibel.ni.com/content/docs/DOC-4013 But i think that it is not really the average of the last five values... The problem in my opinion is that the shift register on the

  • The explainning of following statements.??

    i dont know the following statements meanning. can anyone help me? frist: why the java filename should be the same to the class name? second: public static void main(String[] args) what does this statement mean?,and why we always put the String array