Problem in displaying rows using hGrid

Hi everyone,
I'm having diffilculties in creating hGrid
-> I have one table with columns Employe_number, Last_name, and Manager_id.
-> Created EO
-> Created VO and VL
I expect to retrieve a row similar to figure below
Lastname..........................................Emplno
Victor.............................................1
.....Rockwell......................................2
..........Ford.....................................21
...............Mel.................................211
.....Chan..........................................3
..........Madison..................................31But I only get the direct report
Lastname..........................................Emplno
Victor...............................................1
.....................................................2
.....................................................3People under Rockwell and Chan are not populated..
This is similar to tutorial's hGridPG but I gues I missed out something.
Appreciate for any help.
Thanks,
Elmer
Edited by: Elmer on Jan 30, 2010 12:13 AM

Hi everyone,
I was able to solve this problem. It's the value i put in the ancestor node.
From /oracle/apps/per/xxTree/webui/MainPG.TreeRN
To /sm/oracle/apps/per/xxTree/webui/MainPG.TreeRN
Elmer

Similar Messages

  • Problem in displaying data using ALV interactive using OOPS

    Hi friends,
    I have created one interactive report using oops..
      on my selection screen i have a select-option  TABNAME for DD02L table with no intervals option.
    ie : i enter table names in that field..
    for example i enter VBAP
                                   MARA,
                                   MARC.       etc
    when i execute i get a basic list which gives some details about the tables.
    now on my basic list when i double click on any row then ie : say if i click on 2nd row , in the back ground based on the index on which i have click iam reading that particular row from the table and from that using the table name iam displaying the all the fields of the table in the ist secondary list....
    Till now its working fine but once when i go back to the back to the basic list and when i click another row... here even if click another row its displaying the same fields of the table which was ist click.
    ie : say ist time i have clicked mara then later vbap.....But its displaying me the mara details instead it should display vbap details...
    I have used refresh_table_display method also.... But its not working fine...
    How can i correct it...
    Regards,
    Kumar.

    Hello Kumar
    I can only guess that you call the second screen (perhaps '0200') within the event handler method for event DOUBLE_CLICK. This is not really a good idea. Instead use a simple trick to overcome this refreshing problem:
    METHOD handle_double_click.
    " Save the row perhaps in a static attribute of your event handler method, e.g.
    .  lcl_eventhandler=>ms_row = e_row.  " ms_row defined as static attribute of event handler class
    " Trigger PAI with a defined ok-code:
      CALL METHOD cl_gui_cfw=>set_new_ok_code
        EXPORTING
         ok_code = 'DETAIL_LIST'.
    ENDMETHOD.
    This method call triggers PAI of your screen which otherwise does not occur after an event has been raised.
    MODULE user_command_0100 PAI.
      CASE gd_okcode.
        WHEN 'DETAIL_LIST'.
           perform DISPLAY_DETAIL_LIST.  " and call screen '0200'
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.
    The next time you make a double click a new row/index is filled into the static attribute. By triggering PAI (followed by PBO) you ensure a flushing (= refreshing) before the secondary list is displayed.
    Regards
      Uwe

  • Problem with Display.setCurrentItem() using J2ME-Polish

    Hi,
    I am fairly new to J2ME-polish and have encountered a situation that I am having a problem with. I am loading a form with a number of String Items. When I display the form I would like to focus to the last String Item that has been placed on the form. I have been using Display.setCurrentItem() in J2ME but when I try using it in J2ME-Polish I receive this message :"de.enough.polish.ui.Screen (3022): Screen: unable to focus item (did not find it in the container or is not activatable ) "
    Below is a snippet of my code.
            // si14 in a StringItem defined earlier in the code
            // It is the last stringItem placed into the form
            form.append(si14);
            display = Display.getDisplay(this);
         display.setCurrent(form);
         display.setCurrentItem(form.get(0));Thanks

    http://forums.sun.com/thread.jspa?threadID=686256&messageID=10864566

  • Problem in displaying row vale as column name

    Hello Experts,
    Please help me,its very urgent....
    i want to dispaly a column value as a column name.
    i have two column into selete statement and i want to dispaly one column value as a column name and other column value as a single row.
    My query is :
    SELECT MAX(DECODE (NAME,'virtualDeviceId',VALUE))vdid ,
    MAX(DECODE (NAME,'virtualDeviceType',VALUE)) vdevtype,
    MAX(DECODE (NAME,'domainName',VALUE)) vdevtype1,
    MAX(DECODE (NAME,'sCTPPortSip',VALUE)) vdevtype2,
    MAX(DECODE (NAME,'signallingIpAddress',VALUE)) vdevtype,
    MAX(DECODE (NAME,'signallingNetworkMask',VALUE)) vdevtype,
    MAX(DECODE (NAME,'uDPPort',VALUE)) vdevtype,
    MAX(DECODE (NAME,'uDPPortEnum',VALUE)) vdevtype,
    MAX(DECODE (NAME,'sCTPPort',VALUE)) vdevtype,
    MAX(DECODE (NAME,'sCTPPortM3UA',VALUE)) vdevtype FROM(          
    SELECT extractvalue(VALUE(l),'/S109:trafficParameters/S109:name'
    , 'xmlns="http://itprogrammes.intra.bt.com/pdb/capabilities/ManageDaaliResource/2005/11/16" xmlns:header="http://wsi.nat.bt.com/2005/06/StandardHeader/" xmlns:S97="http://ccm.intra.bt.com/2005/11/16/LIB/Info/CCM/AnalysisModel/Services" xmlns:S109="http://ccm.intra.bt.com/2005/11/16/LIB/Info/MTOSI"') NAME,
         extractvalue(VALUE(l),'/S109:trafficParameters/S109:value'
    , 'xmlns="http://itprogrammes.intra.bt.com/pdb/capabilities/ManageDaaliResource/2005/11/16" xmlns:header="http://wsi.nat.bt.com/2005/06/StandardHeader/" xmlns:S97="http://ccm.intra.bt.com/2005/11/16/LIB/Info/CCM/AnalysisModel/Services" xmlns:S109="http://ccm.intra.bt.com/2005/11/16/LIB/Info/MTOSI"') VALUE
         FROM INTERFACE_MESSAGE_DESTINATION imd ,TABLE(xmlsequence(EXTRACT(XMLTYPE(imd.remote_request),'/activateConnection_Payload/jobBody/subnetworkConnection/S109:aEndTerminationPoint/S109:managedElement/S109:physicalTerminationPoint/S109:connectionTerminationPoint/S109:trafficDescriptor/*'
    , 'xmlns="http://itprogrammes.intra.bt.com/pdb/capabilities/ManageDaaliResource/2005/11/16" xmlns:header="http://wsi.nat.bt.com/2005/06/StandardHeader/" xmlns:S97="http://ccm.intra.bt.com/2005/11/16/LIB/Info/CCM/AnalysisModel/Services" xmlns:S109="http://ccm.intra.bt.com/2005/11/16/LIB/Info/MTOSI"'))) l
    WHERE message_id ='NIAS/0000041608') GROUP BY VALUE ;
    output is :
    Col1 Col2 col3 col4 col5 col
    1.'1001105'          '1001105'                                   
    2. 'MGC'                                        
    3.'value' 'value' 'value'
    output display : MGC in Col2 and in row 2, 'values' are in col4 and col5 and in row 3.
    I want all values in a single row.
    Please help me
    Surender Rana

    It is ugly to force multiple rows into a single row. But it can be done and can be done dynamically as the following approach shows.
    SQL> create or replace type TStrings as table of varchar2(4000);
    2 /
    Type created.
    SQL>
    SQL> create or replace function ForceColumns( cur SYS_REFCURSOR ) return TStrings is
    2 setCols TStrings;
    3 setResults TSTrings;
    4 begin
    5 setResults := new TStrings();
    6 loop
    7 fetch cur into setCols;
    8 exit when cur%NOTFOUND;
    9
    10 if setCols.Count > 0 then
    11 setResults.Extend( setCols.Count );
    12 for i in 1..setCols.Count
    13 loop
    14 setResults( setResults.Count-i+1 ) := setCols(i);
    15 end loop;
    16 end if;
    17 end loop;
    18
    19 return(setResults);
    20 end;
    21 /
    Function created.
    SQL>
    SQL> select
    2 ForceColumns(
    3 CURSOR(
    4 select TStrings(object_id,object_name,object_type) from user_objects where rownum <= 5
    5 )
    6 ) as RESULT_SET
    7 from dual
    8 /
    RESULT_SET
    TSTRINGS('TABLE', 'A', '70998',
    'PROCEDURE', 'ABC', '54360',
    'TABLE', 'ANIMALS', '84829',
    'TABLE', 'B', '69604',
    'PROCEDURE', 'BUILDNAMEMAP', '70155')
    SQL>Note that as the row can contain any number of columns, it needs to be dynamic. This approach uses a collection type called TStrings to achieve this.

  • ADF faces - Urgent! - problem in display row-detail

    Hi all, I've maka a post yesterday but I still can't resolve the problem.
    I have a page that display data from the database.
    The amount of data is variable, so I configure the iterator as follow:
    <methodIterator id="XLB_find_user_OLIter" Binds="XLB_find_user_OL.result"
    DataControl="Session_EJB_TDBLocal" RangeSize="10"
    BeanClass="TDB.model.OltdbView" Refresh="always"
    CacheResults="false"/>
    The table have a single selection column and a view detail button.
    when user click the button, the following method is called (in the backing bean):
    public String ElaboraAtt_action() {
    OperationBinding bind=this.bindings.getOperationBinding("XLB_changeToWorkingOn_olTdb");
    int ret=(Integer)bind.execute();
    if(ret==0){
    XLB_changeToWorkingOn_olTdb make some operation on the record and return a result code.
    the bind for XLB_changeToWorkingOn_olTdb is:
    <methodAction id="XLB_changeToWorkingOn_olTdb"
    InstanceName="Session_EJB_TDBLocal.dataProvider"
    DataControl="Session_EJB_TDBLocal"
    MethodName="XLB_changeToWorkingOn_olTdb"
    RequiresUpdateModel="true" Action="999"
    ReturnName="Session_EJB_TDBLocal.methodResults.Session_EJB_TDBLocal_dataProvider_XLB_changeToWorkingOn_olTdb_result">
    <NamedData NDName="username" NDValue="${userState.name}"
    NDType="java.lang.String"/>
    <NamedData NDName="callid" NDValue="${showOl_backing.currentCallid}"
    NDType="java.lang.String"/>
    </methodAction>
    where showOl_backing is the backing bean.
    In the backing bean, the code for current callid is:
    public String getCurrentCallid() {
    JUCtrlValueBindingRef tableRowRef=(JUCtrlValueBindingRef) this.getOl_table().getRowData();
    return (String) tableRowRef.getRow().getAttribute("callid");
    The problem is:
    If the rows change between the rendered page and the next submit, the row retourned from getCurrentCallid() is wrong.
    I've seen that, before start to execute the action, ADF refresh the table with the new values, so I think that the selection is made with an index, but on new values...
    I've tried almous any solution...
    Thanks!
    Luca

    ...ok...finally...I've done...
    simply, i've setted cache resut to true in the iterator.
    When af:pool refresh the table, or when a refresh button is click, a method call execute the operationBindings, and the result are refreshed...
    Hi all!

  • Problem of displaying data using the two RFMs

    Hi All,
    I have an application:
    a) Displaying of table using  BAPI1
    b) Updating the same table and returning the status whether the updation was successful or not.
    for this we have two BAPIs:
    1. BAPI 1: Two import parameters are imported and some  export parameters are displayed.
    2.BAPi 2 : In this rows under the export parameters of BAPI 1 become the import parameters and they update the table and Flag returns the value whether its successful or not?
    I have done the first part of displayin the table.
    How should i update the table in second scenario as i have to use the rows under the export parameters as import parameters?
    Any suggestions on this
    Thanks in advance
    Srikant

    Hi
       So you are able to execute the first BAPI and get the results in a Table say TABLE1.
    Now you want to pass the values in Table1 as Import parameters to BAPI2.
    If that is the case then do the following.
    After you execute BAPI1 and fill TABLE1 with values.
    Loop the table1 and pass the values to BAPI2 as import parameters. Note that in BAPI2 if you are passing multiple values then your import parameter must be declared under the Table Parameter Tab in the RFC.
    Hope that is what you are looking for.
    Let me know if you require any other clarifications.
    regards
    ravi

  • Problem in displaying rows in a table.

    Hi
    i have a query region and a results table .
    i have a details button in results table which will fetch results in to the details table.
    once i click the details button of a selected row i get the results into details table.
    now the problem is after applying (commiting transaction) if i click on the another rows details button details table results are not changing..
    what might be the problem...

    Hi,
    i have a vendor name which is lov item.from there i will get the vendorid
    In islovevent() i am capturing that value and passing the same to the initdetails in amimpl
    which in turn calls initquery in voimpl
    the problem is page details are refrshing fine if i dont add a row to the table .the problem arises only when i add a row...
    when i add a row and try saving it.it saves properly. but when i go to vendor lov and selects another vendor ..the details are remianing same....
    the code i used for above :
    CO CODE:
    if (pageContext.isLovEvent())
    String lovInputSourceId = pageContext.getLovInputSourceId();
    if ("SearchVendorName".equals(lovInputSourceId))
    String vendorId=pageContext.getParameter("VendorIDfrm");
    Serializable[] parameters={vendorId };
    am.invokeMethod("initExemptionDetails",parameters);
    AM CODE:
    public void initExemptionDetails(String vendorid){
    ExemptionVOImpl vo = getExemptionVO1();
    if (vo == null) {
    throw new OAException("CLE", "CLE_F272_VO_NULL");
    vo.initExemptionQuery(vendorid);
    VOIMPL CODE:
    public void initExemptionQuery(String vendor_id){
    setWhereClause(null);
    reset();
    setNamedWhereClauseParam("VENDOR_ID",Integer.parseInt(vendor_id));
    executeQuery();
    AND LAST BUT NOT LEAST WHICH IS CAUSING THE ERROR CODE FOR ADDING A ROW:
    ExemptionVOImpl vo = getExemptionVO1();
    if (vo != null)
    vo.setMaxFetchSize(0);
    vo.executeQuery();
    Row row = vo.createRow();
    if (vo.getFetchedRowCount() == 0)
    vo.insertRow(row);
    else
    { vo.insertRowAtRangeIndex(vo.getRowCountInRange(),row); }
    vo.setCurrentRow(row);
    row.setNewRowState(row.STATUS_INITIALIZED);
    please help me out:::

  • LCD Problem -- Replace display or use MBP as desktop?

    Internal video is usually dead on my MBP 3,1 -- dark grey screen (but not black) with various vertical stripes. External display works fine. Internal display periodically comes back to life for no apparent reason but then fades back to its usual unhelpful state over time or if it is touched, however lightly. Per Apple, I do not have a defective nVidia card. Initally, Apple proposed their $310 fix which I've had twice before (paid by Amex)-- once for a SuperDrive another time for a logic board. Then noticing two slight dings in the case, the Apple genius said that the machine wasn't eligible for the $310 deal, as such machines had to be pristine. This notwithstanding the fact that Apple had previous logged the dings as cosmetic. At that point, the new display went up to $700 and I was told that I'd need a new logic board if I wanted a meaningful warranty. Obviously, I'm not spending $1200 on a three year old laptop. So I decided to do it myself, something the Apple genius conceded made sense.
    I've replaced the data cable with no success. My next step is to replace the inverter cable, although I doubt this will do anything because the brightness controls on my dead LCD seem to work fine. That leaves me with inverter (unlikely) and the actual LCD to replace.
    Do I go ahead with the LCD which runs from $150-250. If it succeeds, I may get several more months out of my Mac. If I don't, I'm looking at a new logic board which I won't buy, leaving me out $300.
    I'd be tempted to suck it up and pay too much for a new Mac but I really need a 15" model with an Expresscard adapter slot -- something that no longer exists. If I buy a new laptop which would be hardship right now, it would likely be a Lenovo W510 (i7 processor, 500gb hard drive, good display for photo editing, etc.) all for $1785. My preference though is to keep this laptop going and put those funds toward a Mac desktop which I also need.
    Any suggestions on the display replacement? Shall I go out and do it? What is the likelihood that I'll do it but won't succeed. Could the fault lie with the motherboard, as well?
    Thanks for your suggestions.
    Max
    ps - Time is of the essence. I need to resolve this over the next week.

    Thanks for the clear-headed analysis. Ordinarily, I would agree with you especially since I never actually sell old electronics. I just give them to friends and family who are behind me on the technology curve. Here's some additional information.
    I've been using the MBP primarily for Photoshop but am finding with CS5 that it is slow. It's my only real computer. I have a Lenovo S10e that runs OSX but that's for fun. I have four external hard drives that use eSATA connectors (I shot 600gb of photos last year alone.) I'm starting to work with video and the MBP stutters on playback. So I've accepted that a MacPro or something like that with a high-end monitor is in my near future. I have to travel next week for an assignment with a working laptop.
    I've priced the current line of MBP's and am looking at $3000 which I'd rather put toward my desktop. I can come up with the money but that will set back the desktop project and leave me with a laptop that isn't cut out for the bulk of my work. The 17" which accepts ExpressCards doesn't come in an i7 configuration and isn't very portable. If I go with a 15" model, I still need to keep my old machine around to transfer files on an as-needed basis to a Firewire hard drive.
    I've seen many posts in these forums about the nVidia issue with users describing symptoms similar to my own. The solutions have included replacing the data cable, inverter cable, inverter, display and (less often and usually at Apple's expense) the motherboard. Assuming that I can live with the consequences that something else will inevitably break, the question I'd like to find an answer to is whether based upon:
    the display occasionally functioning perfectly;
    (ii) the external display working perfectly; and
    (iii) the graphics card passing Apple's diagnostic test
    I can assume that the motherboard is ok - for the moment. (I realize that every time I reopen the case to change wires, disassemble the display, etc. I'm increasing the likelihood that one day the motherboard won't be ok.)
    Any thoughts?
    Thanks again for your help.
    Max

  • Problem in displaying data using Radiobuttons?

    Hi All,
    I have a requirement where along with some input fields in have three radiobuttons and under each of the radiobuttons there are date fields, now when i click on the first radiobutton the second date field has to be disabled and the a report o/p has to be generated, again when i click on the second radibutton the first date field has to be disbaled and second report o/p has to be generated and when the third one is clicked both the date fields has to be disabled and the third report o/p has to be generated.
    I have written the code for disabling the fields, the problem is when i click on the second radiobutton it does not disable the first date field and is taking a long time in execution and the control is terminating the program.
    The report o/p logic has been written in three different subroutine forms. Please tell me how i can overcome this problem. I am attaching my code in this mail.
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_bukrs for v1 modif id ABC,
                    s_vkorg for v2 obligatory modif id ABC,
                    s_vtweg for v3 obligatory modif id ABC,
                    s_spart for v4 obligatory modif id ABC,
                    s_fkart for v5 obligatory modif id ABC.
    selection-screen end of block b1.
    selection-screen begin of block b2 with frame title text-002.
    selection-screen begin of line.
    parameters: p1 radiobutton group g1 default 'X' user-command ucomm.
    selection-screen end of line.
    parameters:s_date type sy-datum modif id XYZ.
    selection-screen skip 1.
    selection-screen begin of line.
    parameters:p2 radiobutton  group g1.
    selection-screen end of line.
    parameters:s_date1 type sy-datum modif id XYZ.
    selection-screen skip 1.
    selection-screen begin of line.
    parameters:p3 radiobutton group g1.
    selection-screen end of line.
    selection-screen skip 1.
    selection-screen end of block b2.
    At Selection-Screen Output.
    loop at screen.
    if p1 = 'X' and
    screen-name = 'S_DATE1' or screen-group1 = 'ABC' .
    screen-input = 0.
    modify screen.
    elseif p2 = 'X'
    and screen-name = 'S_DATE' or screen-group1 = 'ABC'.
    screen-input = 0.
    modify screen.
    elseif p3 = 'X' or screen-group1 = 'ABC'.
    check screen-group1 = 'XYZ'.
    screen-active = 0.
    modify screen.
    endif.
    endloop.
    At Selection-Screen.
    if p1 = 'X'.
    perform dailysummaryinvoice.
    elseif p2 = 'X'.
    perform blockedinvoices.
    elseif p3 = 'X'.
    write:/ 'Display'.
    endif.
    refresh: s_bukrs,
           s_vkorg,
           s_vtweg,
           s_spart,
           s_fkart.
    Please help.
    Regards,
    MD

    Hi friend,
    Check this code i hope it ll be hep full for u.
    *& Report  ZDTK_FI_CRDB
    *& AUTHOR            : D TARUN KUMAR
    *& FUNC CONSULTANT   : ABDUL GANI
    *& TRANSPORT REQ NO. : RD1K902089
    *& PACKAGE           : ZTARUN
    *& TRANSACTION CODE  : ZCRDB
    *& DESCRIPTION : CREDIT DEBIT NOTE FOR CUSTOMER OR VENDOR.
    REPORT  ZDTK_FI_CRDB NO STANDARD PAGE HEADING
                                LINE-COUNT 65(5)
                                LINE-SIZE 80
                                MESSAGE-ID ZTAR_FI
    *&       STRUCTURE DECLARATION
    TYPES : BEGIN OF TY_ADDR,
                    BUKRS TYPE BUKRS,          "COMPANY CODE
                    LIFNR TYPE LIFNR,          "VENDOR NO
                    KUNNR TYPE KUNNR,          "CUSTOMJER NO
                    NAME1 TYPE NAME1,          "NAME1
                    NAME2 TYPE NAME2,          "NAME2
                    ORT01 TYPE ORT01,          "CITY
                    ORT02 TYPE ORT02,
                    PSTLZ TYPE PSTLZ,          "POSTAL CODE
                    STRAS TYPE STRAS,          "STREET
                    ADRNR TYPE ADRNR,          "ADDRESS NO
                    TELF1 TYPE TELF1,          "TELEFHONE NO
                    TELF2 TYPE TELF2,          "TELEFHONE NO 2
                    TELFX TYPE TELFX,          "FAX
             END OF TY_ADDR,
          BEGIN OF TY_LFA1,
                   KUNNR TYPE KUNNR,          "CUSTOMJER NO
                   NAME1 TYPE NAME1,          "NAME1
                   NAME2 TYPE NAME2,          "NAME2
                   ORT01 TYPE ORT01,          "CITY
                   ORT02 TYPE ORT02,
                   PSTLZ TYPE PSTLZ,          "POSTAL CODE
                   STRAS TYPE STRAS,          "STREET
                   ADRNR TYPE ADRNR,          "ADDRESS NO
                   TELF1 TYPE TELF1,          "TELEFHONE NO
                   TELF2 TYPE TELF2,          "TELEFHONE NO 2
                   TELFX TYPE TELFX,          "FAX
            END OF TY_LFA1,
           BEGIN OF TY_DOCM,
                    GJAHR TYPE GJAHR,
                    BELNR TYPE BELNR_D,
                    BUDAT TYPE BUDAT,
                    BLDAT TYPE BLDAT,
                    BLART TYPE BLART,
                    BSCHL TYPE BSCHL,
                    SHKZG TYPE SHKZG,
                    XBLNR TYPE XBLNR,
                    DMBTR TYPE DMBTR,
                    SGTXT TYPE SGTXT,
                    REBZG TYPE REBZG,
                    REBZJ TYPE REBZJ,
                    KUNNR TYPE KUNNR,
                    LIFNR TYPE LIFNR,
             END OF TY_DOCM.
    *&       TABLE DECLARATION
    DATA : T_ADDR TYPE STANDARD TABLE OF TY_ADDR,
    *&       WORK AREA  DECLARATION
           W_ADDR TYPE TY_ADDR,
           W_DOCM TYPE TY_DOCM,
          W_LFA1 TYPE TY_LFA1,
    *&       GLOBLE VARIABLE DECLARATION
           G_KUNNR TYPE KUNNR,
           G_LIFNR TYPE LIFNR,
           DCAMT TYPE DMBTR.
    *&       INITIALIZATION
    INITIALIZATION.
    CLEAR :
    *REFRESH :
    *&       SELECTION SCREEN DECLARATION
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP 1.
    PARAMETERS : S_BUKRS TYPE BSID-BUKRS OBLIGATORY DEFAULT '1000'.
    PARAMETERS : S_BELNR TYPE BELNR_D OBLIGATORY DEFAULT '1600000070'.
    PARAMETERS : S_GJAHR TYPE GJAHR OBLIGATORY DEFAULT '2008'.
    PARAMETERS : ASON TYPE BUDAT OBLIGATORY DEFAULT SY-DATUM.
    PARAMETERS : S_KUNNR TYPE KUNNR MODIF ID GP1.
    PARAMETERS : S_LIFNR TYPE LIFNR MODIF ID GP2.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN : END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS R1  RADIOBUTTON GROUP RAO DEFAULT 'X' USER-COMMAND hit.
    SELECTION-SCREEN COMMENT (50) TEXT-003 FOR FIELD R1.
    PARAMETERS R2  RADIOBUTTON GROUP RAO.
    SELECTION-SCREEN COMMENT (50) TEXT-004 FOR FIELD R2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN END OF BLOCK B2.
    *SELECTION-SCREEN: BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-005.
    *SELECTION-SCREEN SKIP 1.
    *SELECTION-SCREEN BEGIN OF LINE.
    *PARAMETERS R3  RADIOBUTTON GROUP RAJ DEFAULT 'X' USER-COMMAND hit.
    *SELECTION-SCREEN COMMENT (50) TEXT-006 FOR FIELD R1.
    *PARAMETERS R4  RADIOBUTTON GROUP RAJ.
    *SELECTION-SCREEN COMMENT (50) TEXT-007 FOR FIELD R2.
    *SELECTION-SCREEN END OF LINE.
    *SELECTION-SCREEN SKIP 1.
    *SELECTION-SCREEN : END OF BLOCK B3.
    *&       AT SELECTION SCREEN
    AT SELECTION-SCREEN.
           PERFORM VALIDATE_SELECTION.
    *&       AT SELECTION SCREEN OUTPUT
    AT SELECTION-SCREEN OUTPUT.
           PERFORM SCREEN_OUTPUT.
    *&       START OF SELECTION
    START-OF-SELECTION.
    IF R1 = 'X'.
            PERFORM GET_DOCUMENT_L.
    ELSEIF R2 = 'X'.
            PERFORM GET_DOCUMENT_K.
    ENDIF.
    *&       END OF SELECTION
    END-OF-SELECTION.
    PERFORM DISPLAY.
    *&       TOP OF PAGE
    *TOP-OF-PAGE.
          PERFORM PAGE_HEADER.
    *&      Form  VALIDATE_SELECTION
          text
    form VALIDATE_SELECTION .
    DATA : L_BUKRS TYPE BSID-BUKRS.
    SELECT SINGLE BUKRS FROM KNB1
                        INTO L_BUKRS
                       WHERE BUKRS = S_BUKRS.
    *IF SY-SUBRC <> 0.
    *MESSAGE E001.
    *LEAVE LIST-PROCESSING.
    *ENDIF.
    DATA : L_KUNNR TYPE BSID-KUNNR.
    SELECT SINGLE KUNNR FROM BSID
                        INTO L_KUNNR
                       WHERE KUNNR = S_KUNNR.
    *IF SY-SUBRC <> 0.
    *MESSAGE E002.
    *LEAVE LIST-PROCESSING.
    *ENDIF.
    endform.                    " VALIDATE_SELECTION
    *&      Form  SCREEN_OUTPUT
          text
    form SCREEN_OUTPUT .
        IF R1 = 'X'.
          LOOP AT SCREEN.
            if screen-group1 = 'GP1'.
              SCREEN-active = '0'.
    *SCREEN-INTENSIFIED = '0'.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ELSE.
          LOOP AT SCREEN.
            IF SCREEN-group1 = 'GP2'.
              SCREEN-active = '0'.
    *SCREEN-INTENSIFIED = '1'.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ENDIF.
    endform.                    " SCREEN_OUTPUT
    *&      Form  GET_DOCUMENT_L
          text
    FORM GET_DOCUMENT_L .
    DATA : MESSG(60).
    SELECT SINGLE BUKRS
                  LIFNR
                  GJAHR
                  BELNR
                  BUDAT
                  BLDAT
                  BLART
                  BSCHL
                  SHKZG
                  DMBTR
                  SGTXT
                  REBZG
                  REBZJ FROM BSIK
                        INTO CORRESPONDING FIELDS OF W_DOCM
                       WHERE BUKRS = S_BUKRS AND
                             GJAHR = S_GJAHR AND
                             BELNR = S_BELNR.
    SELECT SINGLE DMBTR FROM BSIK INTO DCAMT
                       WHERE BELNR = W_DOCM-REBZG AND
                             GJAHR = W_DOCM-REBZJ.
    IF NOT W_DOCM IS INITIAL.
            PERFORM GET_LFA1.
    ELSE.
    SELECT SINGLE BUKRS
                  LIFNR
                  GJAHR
                  BELNR
                  BUDAT
                  BLDAT
                  BLART
                  BSCHL
                  SHKZG
                  DMBTR
                  SGTXT
                  REBZG
                  REBZJ FROM BSAK
                        INTO CORRESPONDING FIELDS OF W_DOCM
                       WHERE BUKRS = S_BUKRS AND
                             GJAHR = S_GJAHR AND
                             BELNR = S_BELNR.
    SELECT SINGLE DMBTR FROM BSAK INTO DCAMT
                       WHERE BELNR = W_DOCM-REBZG AND
                             GJAHR = W_DOCM-REBZJ.
          IF NOT W_DOCM IS INITIAL.
                  PERFORM GET_LFA1.
          ELSE.
          CONCATENATE 'THERE IS NO DOCUMENT NO' S_BELNR S_GJAHR 'FOR VENDOR' INTO  MESSG
                       SEPARATED BY SPACE.
          MESSAGE I011 WITH MESSG.
          LEAVE LIST-PROCESSING.
          ENDIF.
    ENDIF.
    ENDFORM.                    " GET_DOCUMENT_L
    *&      Form  GET_LFA1
          text
    FORM GET_LFA1 .
    SELECT SINGLE LIFNR
                  NAME1
                  NAME2
                  ORT01
                  ORT02
                  PSTLZ
                  STRAS
                  ADRNR
                  TELF1
                  TELF2
                  TELFX FROM LFA1 INTO CORRESPONDING FIELDS OF W_ADDR
                          WHERE LIFNR = W_DOCM-LIFNR.
    ENDFORM.                    " GET_LFA1
    *&      Form  GET_DOCUMENT_K
          text
    FORM GET_DOCUMENT_K .
    DATA : MESSG(60).
    SELECT SINGLE BUKRS
                  KUNNR
                 LIFNR
                  GJAHR
                  BELNR
                  BUDAT
                  BLDAT
                  BLART
                  BSCHL
                  SHKZG
                  DMBTR
                  SGTXT
                  REBZG
                  REBZJ FROM BSID
                        INTO CORRESPONDING FIELDS OF W_DOCM
                       WHERE  BUKRS = S_BUKRS AND
                              GJAHR = S_GJAHR AND
                              BELNR = S_BELNR.
    SELECT SINGLE DMBTR FROM BSID INTO DCAMT
                       WHERE BELNR = W_DOCM-REBZG AND
                             GJAHR = W_DOCM-REBZJ.
    IF NOT W_DOCM IS INITIAL.
            PERFORM GET_KNA1.
    ELSE.
    SELECT SINGLE BUKRS
                  KUNNR
                 LIFNR
                  GJAHR
                  BELNR
                  BUDAT
                  BLDAT
                  BLART
                  BSCHL
                  SHKZG
                  DMBTR
                  SGTXT
                  REBZG
                  REBZJ FROM BSAD
                        INTO CORRESPONDING FIELDS OF W_DOCM
                       WHERE  BUKRS = S_BUKRS AND
                              GJAHR = S_GJAHR AND
                              BELNR = S_BELNR.
    SELECT SINGLE DMBTR FROM BSAD INTO DCAMT
                       WHERE BELNR = W_DOCM-REBZG AND
                             GJAHR = W_DOCM-REBZJ.
          IF NOT W_DOCM IS INITIAL.
                  PERFORM GET_KNA1.
          ELSE.
          CONCATENATE 'THERE IS NO DOCUMENT NO' S_BELNR S_GJAHR 'FOR CUSTOMER' INTO  MESSG
                       SEPARATED BY SPACE.
          MESSAGE I011 WITH MESSG.
          LEAVE LIST-PROCESSING.
          ENDIF.
    ENDIF.
    ENDFORM.                    " GET_DOCUMENT_K
    *&      Form  GET_KNA1
          text
    FORM GET_KNA1 .
    SELECT SINGLE KUNNR
                  NAME1
                  NAME2
                  ORT01
                  ORT02
                  PSTLZ
                  STRAS
                  ADRNR
                  TELF1
                  TELF2
                  TELFX FROM KNA1 INTO CORRESPONDING FIELDS OF W_ADDR
                          WHERE KUNNR = W_DOCM-KUNNR.
    ENDFORM.                    " GET_KNA1
    *&      Form  DISPLAY
          text
    FORM DISPLAY .
    LONG TEXT *************************
    *DATA : BEGIN OF inline OCCURS 0,
    *END OF inline.
    *TYPES: BEGIN OF TY_LONGT,
                   tdformat TYPE tdformat,
                   tdline TYPE tdline,
          END OF TY_LONGT.
    *DATA : TLONGT TYPE STANDARD TABLE OF TY_LONGT,
          WLONGT TYPE TY_LONGT.
    DATA: BEGIN OF DTEXT OCCURS 50.
    *DATA: MATNR LIKE PBIM-MATNR.
    INCLUDE STRUCTURE TLINE.
    DATA: END OF DTEXT.
    DATA: BEGIN OF HTEXT.
    INCLUDE STRUCTURE THEAD.
    DATA: END OF HTEXT.
    DATA: BEGIN OF LTEXT OCCURS 50.
    INCLUDE STRUCTURE TLINE.
    DATA: END OF LTEXT.
    DATA: TNAME LIKE THEAD-TDNAME.
    CONCATENATE S_BUKRS W_DOCM-BELNR S_GJAHR '002' INTO  TNAME.
    *SEPARATED BY SPACE.
    DATA : W_STXL TYPE STXL.
    SELECT SINGLE * FROM STXL INTO W_STXL
                             WHERE TDNAME = TNAME.
    IF NOT W_STXL IS INITIAL.
    *SELECT * FROM PBIM WHERE WERKS IN S_WERKS.
    *MOVE PBIM-BDZEI TO TNAME.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        CLIENT                        = SY-MANDT
        ID                            = W_STXL-TDID
        LANGUAGE                      = W_STXL-TDSPRAS
        NAME                          = TNAME
        OBJECT                        = W_STXL-TDOBJECT
      ARCHIVE_HANDLE                = 0
      LOCAL_CAT                     = ' '
    IMPORTING
        HEADER                        = HTEXT
      TABLES
        LINES                         = LTEXT
    EXCEPTIONS
      ID                            = 1
      LANGUAGE                      = 2
      NAME                          = 3
      NOT_FOUND                     = 4
      OBJECT                        = 5
      REFERENCE_CHECK               = 6
      WRONG_ACCESS_TO_ARCHIVE       = 7
      OTHERS                        = 8
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT LTEXT.
    IF LTEXT-TDLINE NE ''.
    MOVE LTEXT-TDLINE TO DTEXT-TDLINE.
    APPEND DTEXT.
    ENDIF.
    ENDLOOP.
    ENDIF.
    LONG TEXT *************************
    CUSTOMER / VENDOR NO *************************
    DATA : CUVE(10).
    IF R1 = 'X'.
    CUVE = W_ADDR-LIFNR.
    ELSEIF R2 = 'X'.
    CUVE = W_ADDR-KUNNR.
    ENDIF.
    CUSTOMER / VENDOR NO *************************
    CR / DR DATA *************************
    IF DCAMT IS INITIAL.
    SELECT SINGLE DMBTR FROM BSIS INTO DCAMT
                       WHERE BELNR = W_DOCM-REBZG AND
                             GJAHR = W_DOCM-REBZJ .
                          ( KOART = 'D' OR KOART = 'K' ).
    ENDIF.
    CR / DR DATA *************************
    DATA: CNAME TYPE BUTXT.
    SELECT SINGLE BUTXT FROM T001 INTO CNAME
                       WHERE BUKRS = S_BUKRS.
    DATA : NAME(60),
           STREET(60),
           TELFX(60).
    CONCATENATE W_ADDR-NAME1 W_ADDR-NAME2 INTO  NAME
    SEPARATED BY SPACE.
    CONCATENATE W_ADDR-ORT01 W_ADDR-ORT02 'POSTAL CODE :' W_ADDR-PSTLZ INTO  STREET
    SEPARATED BY SPACE.
    CONCATENATE 'Tel No.:' W_ADDR-TELF1 W_ADDR-TELF2 'FAX :' W_ADDR-TELFX INTO  TELFX
    SEPARATED BY SPACE.
    DATA : CRDB(20),
           CRDBA(16),
           BALC TYPE DMBTR.
    IF W_DOCM-SHKZG = 'S'.
    CRDB = 'Debit Note No. :'.
    CRDBA = 'DEBIT'.
    BALC = DCAMT + W_DOCM-DMBTR.
    ELSEIF W_DOCM-SHKZG = 'H'.
    CRDB = 'Credit Note No. :'.
    CRDBA = 'CREDIT'.
    BALC = DCAMT - W_DOCM-DMBTR.
    ENDIF.
    SKIP 5.
    *FORMAT INVERSE.
                ULINE 03(77).
    WRITE : 03 SY-VLINE, 80 '|',
            /03 SY-VLINE, NAME, 60 'No.:' COLOR 7, CUVE COLOR 7, 80 '|',
            /03 SY-VLINE, W_ADDR-STRAS, 80 '|',
            /03 SY-VLINE, STREET, 80 '|',
            /03 SY-VLINE, TELFX, 80 '|',
            /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 05 CNAME COLOR 2,  80 '|',
            /03 SY-VLINE, 36 CRDB RIGHT-JUSTIFIED, 59 W_DOCM-BELNR, 71 W_DOCM-GJAHR, 80 '|',
            /03 SY-VLINE, 58 'DATE :', W_DOCM-BUDAT, 80 '|',
            /03 SY-VLINE, 80 '|'. ULINE 03(77).
    WRITE : /03 SY-VLINE, 80 '|'.
    IF NOT DTEXT IS INITIAL.
    LOOP AT DTEXT.
    WRITE : /03 SY-VLINE, 05 DTEXT-TDLINE COLOR 1, 80 '|'.
    ENDLOOP.
    ELSEIF W_DOCM-SGTXT NE ''.
    WRITE : /03 SY-VLINE, 05 W_DOCM-SGTXT COLOR 1, 80 '|'.
    ELSE.
    WRITE : /03 SY-VLINE, 80 '|'.
    ENDIF.
    WRITE : /03 SY-VLINE, 80 '|',
    *WRITE : /03 SY-VLINE, TNAME, 80 '|',
           /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 08 'WORKING OF INTEREST CALCULATION AS ON                                   ' COLOR 4,
             47 ASON COLOR 4, '  [ 360 DAYS BASIS ]' COLOR 4, 80 '|',
            /03 SY-VLINE, 80 '|'. ULINE 03(77).
    WRITE : /03 SY-VLINE, 11 'DATE', 23 'INVOICE', 41 CRDBA, 55 'BALANCE', 64 'DAYS', 70 'INTEREST', 80 '|',
            /03 SY-VLINE, 23 ' AMOUNT', 41 'AMOUNT', 55' AMOUNT', 70 ' @ 8.00% ', 80 '|',
            /03 SY-VLINE, 80 '|'. ULINE 03(77).
    WRITE : /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 06 W_DOCM-BUDAT, 15 DCAMT, 32 W_DOCM-DMBTR, 47 BALC, 80 '|',
            /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 80 '|'. ULINE 03(77).
    WRITE : /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 10 'PREPARED BY', 35 'ACCOUNTANT', 60 'MANAGER', 80 '|',
            /03 SY-VLINE, 80 '|',
            /03 SY-VLINE, 80 '|'. ULINE 03(77).
    ENDFORM.                    " DISPLAY
    Thanks & Regards,
    D Tarun Kumar.
    Edited by: Devalla Tarun Kr. on Aug 28, 2008 3:40 PM

  • Problem in displaying PDF using JSP

    I stream a PDF to the browser in my JSP. I set the content type in response header to "application/pdf".
    The pdf gets displayed most of the times. Sometimes the browser displays some junk characters.
    Need help in preventing the browser displaying these junk characters occassionally
    Thanks,
    Ramesh

    <%@ page import="java.io.*" %>
    <%@page import="java.io.BufferedInputStream"%>
    <%@page import="java.io.DataInputStream"%>
    <%@page import ="java.io.File"%>
    <%@page import="java.io.FileInputStream"%>
    <%@page import="java.io.FileNotFoundException"%>
    <%@page import="java.io.IOException"%>
    <%
    int i;
    boolean fileexist = false;
    File filename = null;
    BufferedInputStream br = null;
    FileInputStream fr = null;
    OutputStream fout = response.getOutputStream();
    BufferedOutputStream bout = new BufferedOutputStream(fout);
    filename = new File("C:/Documents and Settings/Zunotech011/My Documents/NetBeansProjects/pdfread/build/web/whitepaper.pdf");
    fileexist = (filename.exists() && filename.canRead());
    if (fileexist)
    response.setContentType("application/pdf");
    response.setHeader("Content-disposition","attachment; filename='newfile.doc'");
    byte[] bytes = new byte[256];
    fr = new FileInputStream(filename);
    out.print(fr);
    while ( (i = fr.read(bytes)) > 0)
    bout.write(bytes,0,i);
    fr.close();
    bout.close();
    else
    %>

  • Problem in displaying images using JLabel in Netbeans

    hi all,
    i am trying to display an image on JLabel in Netbeans.The image is visible in the design view but not displayed in the runtime.Can anyone help me out with suggestions???

    Duplicate - answer here http://forum.java.sun.com/thread.jspa?threadID=5153605&messageID=9578626#9578626

  • Need help in displaying Rows to Columns

    Hi,
    I am facing problem in displaying Rows to Columns
    I am using pivot function:
    select *
    from
    (select vendor_name
    from tablea)
    pivot
    (count(vendor_name)
    for vendor_name in ('a,b,'c'));
    its working fine showing vendor_name and count
    but when i want to display the output as:(How to include the Salalry column in the query?)
    Name:{a b c}
    Sal Total:(400,600,800}
    Any help will be needful for me

    Not sure what you mean:
    select  *
      from  (select deptno,sal from emp)
      pivot(sum(sal) for deptno in (10,20,30))
            10         20         30
          8750      10875       9400
    SQL> SY.

  • Problem in displaying the data of columns into rows in sap script

    hi,
    i am working on a sap script and i have to display the dat which is displayed in column into rows but it is not displaying it properly.
    eg, C
        12.1
        Si
        5.5
    it is displaying the data right now like this but i want to display the  data like this:-
    eg, C      Si
        12.1   5.5
    plzzprovide me guidelines how to solve this problem.

    hi,
    i am using this code to display the data:-
    plzz provide me guidelines where i am getting wrong?
    TOPparCOMPONENT DESP,,,,,, INS. LOT #, , , , , , MIC,,,,,,,,,, MIC VALUEparENDTOPparFINAL
    PROTECT
    IF &I_FINAL-PRUEFLOS& NE '000000000000'
    &I_FINAL-MAKTX(23)&&i_final-prueflos(12Z)&
    &I_FINAL-kurztext(25)&
    &I_FINAL-original_input(8)&
    ELSE
    &I_FINAL-MAKTX(23)&     
    &I_FINAL-kurztext(25)&
    &I_FINAL-original_input(8)&
    ENDIF
    ENDPROTECT
    ITEMHEAD
    POSITION WINDOW
    SIZE WIDTH +0 . 4 CH HEIGHT +1 LN
    BOX FRAME 10 TW
    BOX HEIGHT '1.35' LN INTENSITY 20
    IF &PAGE& = '1'
    BOX XPOS '0' CH YPOS '0' CM WIDTH '0' CM HEIGHT '43' LN FRAME '10' TW
    For horizontal line at top
    BOX XPOS '0' CH YPOS '0' CM WIDTH '75' CH HEIGHT '0' LN FRAME '10' TW
    COLUMN LINES...
    END OF COLUMN LINES...
    BOX XPOS '0' CH YPOS '43' LN WIDTH '75' CH HEIGHT '0' LN FRAME '10'TW
    BOX XPOS '75' CH YPOS '0' LN WIDTH '0' CH HEIGHT '43' LN FRAME '10'TW
    ELSE
    COLUMN LINES...
    END OF COLUMN LINES...
    BOX XPOS '0' CH YPOS '0' CM WIDTH '0' CM HEIGHT '47' LN FRAME '10' TW
    BOX XPOS '0' CH YPOS '0' CM WIDTH '75' CH HEIGHT '0' LN FRAME '10' TW
    BOX XPOS '0' CH YPOS '0' CM WIDTH '45' CM HEIGHT '0' LN FRAME '10' TW
    BOX XPOS '20' CH YPOS '0' CM WIDTH '0' CM HEIGHT '47' LN FRAME '10' TW
    BOX XPOS '0' CH YPOS '47' LN WIDTH '75' CH HEIGHT '0' LN FRAME '10'TW
    BOX XPOS '75' CH YPOS '0' LN WIDTH '0' CH HEIGHT '47' LN FRAME '10'TW
    ENDIF
    LINEFEED
    NEWPAGE
    NEW-PAGE
    provide me guidelines to solve this problem.
    Edited by: ricx .s on Mar 13, 2009 5:58 AM

  • Problem with "PL/SQL Dynamic Content" and displaying rows

    hi,
    im new to APEX, and pl/sql [but not web dev or sql].
    ive found the bit in APEX that lets you add data from your DB using the 'CREATE' > 'PL/SQL Dynamic Content'.
    maybe there's a better option for people who dont know pl/sql? i dont know?
    however, i think i can getting working with a little bit of help but im stumbling around in the dark a bit here.
    ok so this is the pl/sql ive come up with to show three example values on page 23 of my aplplication:
    BEGIN
    SELECT ID, NAME, OWNER
    FROM COM_MAILSHOTS
    INTO :P23_ID, :P23_NAME, :P23_OWNER;
    END;
    im getting the error:
    1 error has occurred 
    ORA-06550: line 5, column 21: PL/SQL: ORA-00933: SQL command not properly ended ORA-06550: line 4, column 1: PL/SQL: SQL Statement ignored
    thanks for reading!

    Metabaron wrote:
    hi,
    im new to APEX, and pl/sql [but not web dev or sql].
    ive found the bit in APEX that lets you add data from your DB using the 'CREATE' > 'PL/SQL Dynamic Content'.
    maybe there's a better option for people who dont know pl/sql? i dont know?
    The easiest (and best) way to "display rows" is using a report. Dynamic PL/SQL regions are more complex and are required much less frequently.
    The Oracle® Database 2 Day + Application Express Developer's Guide tutorial explains how to create reports and other basic APEX techniques.

  • Problem with displaying BLOB images on JSP page using a servlet

    hi. I have a big problem with displaying BLOB images using JSP. I have a servlet that connects to the oracle database, gets a BLOB image , reads it, and then displays it using a BinaryStream. The problem is , this works only when i directly call that servlet, that is http://localhost:8080/ImageServlet. It doesn't work when i try to use that servlet to display my image on my JSP page (my JSP page displays only a broken-image icon ) I tried several coding approaches with my servlet (used both Blob and BLOB objects), and they work just fine as long as i display images explicitly using only the servlet.
    Here's what i use : ORACLE 10g XE , Eclipse 3.1.2, Tomcat 5.5.16 , JDK 1.5
    here is one of my image servlet's working versions (the essential part of it) :
                   BLOB blob=null;
              rset=st.executeQuery("SELECT * FROM IMAGES WHERE ID=1");
              while (rset.next())
                   blob=((OracleResultSet)rset).getBLOB(2);
              response.reset();
              response.setContentType("image/jpeg");
              response.addHeader("Content-Disposition","filename=42.jpeg");
                    ServletOutputStream ostr=response.getOutputStream();
                   InputStream istr=blob.getBinaryStream(1L);
                    int size=blob.getBufferSize();
              int len=-1;
                    byte[] buff = new byte[size];
                         while ((len=istr.read( buff ))!=-1 ) {
                   ostr.write(buff,0,len);
             response.flushBuffer();
             ostr.close(); and my JSP page code :
    <img src="/ImageServlet" border="0"  > If you could just tell me what i'm doing wrong here , or if you could show me your own solutions to that problem , i would be very greatful ,cos i'm realy stuck here , and i'm rather pressed for time too. Hope someone can help.

    I turns out that it wasn't that big of a problem after all. All i had to do was to take the above code and place it into another JSP page instead of into a servlet like i did before. Then i just used that page as a source for my IMG tag in my first JSP. It works perfectly well. Why this doesn't work for servlets i still don't know, but it's not a problem form me anymore . Ofcourse if someone knows the answer , go ahead and write. I would still appriceatte it.
    here's the magic tag : <img src="ImageJSP.jsp" border="0"  > enjoy : )

Maybe you are looking for

  • 'authentication control-direction in' in authentication CLOSED mode

    Switch: 4510R+E, running a DEV version based off 3.6.0 ISE: 1.2.0.899 patch 7 Hi, I have been working on a weird issue where some of my clients would randomly drop their IP address and the only way I could get it back was to move their port to authen

  • Entities not refreshed

    Hi I have a list of entities (say Customers) presented to the user. I edit one (say change the Name), save it and go back to the list. Some times I see the new value, sometimes I see the old. I refresh the page and I sometimes I see the new, sometime

  • Why can't Premiere Pro CC start?

    It never moves past the loading screen and just crashes. It's run flawlessly in the past, just this night it's being difficult. I've tried rebooting Creative Cloud by logging in and out - and of course the PC. I've also tried running it in compabilit

  • Screen wont work with the nokia 5530

    I basically turn on my phone and then screen is not touchable anymore and message comes up with ' 2 new messages' and i try to show it but i cant because the touch screen is not working. It just happened randomly and i only got this phone at Christma

  • Does iPhone 4S that will be selling in mexico come with SIRI... in english of course

    Does iPhone 4S that will be selling in mexico come with SIRI... in english of course