Problems generating Manager's info from Employee table

Gurus,
I have a requirement in which I need to generate a report of manager's information. I did a similar report for employee information, but having problem's replicating for manager's page due to the fact that every manager is a employee
In my manager dashboard page, I am passing manager ID via prompt and it has provide his Role and count of employees working under him
Sample Table
Emp_ID     EMP_NAME      EMP_ROLE     MANAGER_ID MANAGER_NAME
1     AAA          ACCOUNTANT     4          FFF
2     BBB          PROGRAMMER     4          FFF
3     CCC          TL          4          FFF
4     FFF          MANAGER          6          YYY
5     GGG          MANAGER          6          YYY
6     YYY          SR.MANAGER     9          ZZZ
9     ZZZ          PRESIDENT
If I pass manager_ID as 4 from the dropdown prompt, then my report has to show EMP_ROLE as MANAGER and number of emps working under him as 3 (AAA,BBB and CCC)
version : OBIEE 10g

1>Create an aliases of sample table as Manager_table
2>join with sample table as
Manager_table.emp_id = Sample_Table.manager_id
3>create report as
Manager_table.emp_id , Manager_table.EMP_ROLE , count(SAMPLE_TABLE.EMP_ID)
The results you will get will be
4 Manager 3
6 SRManager 2
9 President 1
make Manager_table.emp_id is prompted and use the same in Prompts.
Let me know if it was helpful
Thanks
Edited by: Maqsood Hussain on Nov 16, 2012 3:00 AM

Similar Messages

  • UPDATING A TABLE WITH SAME INFO FROM ANOTHER TABLE ON THE SAME DB

    0down votefavorite
    I am trying to update a table with info from another table on the same db with same table name. I just want the info to be the same , no primary key or constraint involve just a straight replacement of records and I keep getting errors WITH THE TABLE not
    being recignize. below is my query:
    UPDATE
    VNDFIL
    SET EOBTYP
    =  VNDFIL.EOBTYP, 
    EDI_X12_835_VERSION =  VNDFIL.EDI_X12_835_VERSION
    FROM
    AGERECOVERY
    WHERE
    VNDFIL.EOBTYP
    = VNDFIL.EOBTYP
    AND
    VNDFIL
    .EDI_X12_835_VERSION
    = VNDFIL.EDI_X12_835_VERSION

    Hi rotary,
    If those two same named tables are in the same database then they have to be in different schemas. If you mean they are in the same server instance, then they may be in different databases, besides the "table not being recognized" error,
    anyway you should use the fully qualified table names, that is database.Schema.Table(If across instances, ServerName should be prefixed) to avoid the table unrecognized error.
    Using Identifiers As Object Names
    With the fully qualified names, your update statement can be like below.
    UPDATE
    db1.schema1.VNDFIL
    SET EOBTYP = srcTbl.EOBTYP, EDI_X12_835_VERSION = srcTbl.EDI_X12_835_VERSION
    FROM
    db1.schema2.VNDFIL srcTbl
    WHERE
    db1.schema1.VNDFIL.EOBTYP = srcTbl.VNDFIL.EOBTYP AND
    db1.schema1.VNDFIL.EDI_X12_835_VERSION = srcTbl.VNDFIL.EDI_X12_835_VERSION
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • How to get second maximum salary from employee table(sql query)

    how to get second maximum salary from employee table(sql query)

    dude there is no matter of structure .........that user already said its from employee table ...............its basic table in sql and there is no need to specify the table structure
    .........i think u got my point I think you are the one who didn't understand Sarma's point.
    Give a man a fish and you feed him once. Teach a man how to fish and you feed him a life long.
    >
    and the query is
    select max(sal) from emp where sal<(select max(sal)
    from emp);
    this will give the 2nd max salary from the emp tableBtw: You solution is bad, because it needs to scan and sort the table emp twice. And a better solution has been given already.
    Message was edited by:
    Sven W. - reordered statements

  • Generate xml output file from relational table

    Hi All,
    I'd like to generate an XML file from a relational table but would like to persist the XSD in Oracle does anyone have a working example?
    Edited by: houchen on Jun 2, 2009 5:34 AM

    From the FAQ on the {forum:id=34} forum, {thread:id=416001}.
    If you are wanting to register the schemas in Oracle, you will find info on that as well in the FAQ.

  • How to pull multiple lines of info from a table for a Specific Company/Address

    What I would like to do is have one Table that I enter all my information on in Numbers for incoming rent like the one below. Since I have 8 spaces to rent I will have up to 96 plus rows of information to look at. But I would like to have Numbers then on separate pages is have the individual Companies have their own rent break down on a table with the Date Recieved and the amount they payed. From there on their separate page I can have the Late Charges come into play or whatever I choose.
    Date
    Company
    Address
    Rent Recieved
    Jan 1, 2011
    X
    430
    $1,100.00
    Jan 3, 2011
    Y
    440
    $1,200.00
    Jan 5, 2011
    Z
    450
    $1,300.00
    Feb 1, 2011
    Y
    440
    $1,200.00
    Feb 3, 2011
    X
    430
    $1,100.00
    Feb 8, 2011
    Z
    450
    $1,300.00
    Mar 1, 2011
    Z
    450
    $1,300.00
    Mar 2, 2011
    X
    430
    $1,100.00
    Mar 5, 2011
    Y
    440
    $1,200.00
    The following table would be on the separate page with the formula (I do not know how to write) grabbing the info from the above table.
    Company X Rent Recieved
    Date
    Rent Recieved
    From the formula that one of you gracious smart people provide I could create a table for each of the Companies that rent from me on their own Tables on separate Tabs.
    I know I could go to each individual Tab and write it in but I will be primarily working on my iPad and this would make it easier. I can also utilize the fresh Tables to do other calculations.

    I got a soluce with no swap.
    I created a new column (E)
    In E2, the formula is :
    =B&IF(ISBLANK(A),"",MONTH(A))
    Apply Fill Down
    In table of each company, I inserted a 2nd header row so that I may store the name of the company in A1.
    In A3, the formula is :
    =IFERROR(OFFSET(Tableau 1 :: $A$1,MATCH($A$1&ROW()-2,Tableau 1 :: $E,0)-1,0),"")
    in B3, the formula is :
    =IFERROR(OFFSET(Tableau 1 :: $D$1,MATCH($A$1&ROW()-2,Tableau 1 :: $E,0)-1,0),"")
    Select A3:B3 then Fill Down.
    That's all folks !
    Yvan KOENIG (VALLAURIS, France) jeudi 19 mai 2011 17:18:32
    Please :
    Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Problem in Creating excel file from internal table

    Hi Experts,
                here iam having a proble with creating an excel file from an internal table which is having around 15 records, when iam generating an excel file, its getting only upto 255 chars, after that its breaking and new record is being started in the next row. how should i get all the contents in one row of the excel or may be extended to the next line , how to resolve this issue, can anyone give me some idea or sample code.
    Thanks & Regards,
    poorna

    ur downloading to excel using a single field...then it will download only 255 chars....may be from internla table u can download the fields and the excel sheet gets downloaded with data....check below code....
    *& Report  ZETA_EXCEL_DOWNLOAD_CLIPBOARD                               *
    report  zeta_excel_download_clipboard           .
    include ole2incl.
    data:  w_cell1     type ole2_object,
           w_cell2     type ole2_object.
    *--- Ole data Declarations
    data: h_excel     type ole2_object,        " Excel object
          h_mapl      type ole2_object,        " list of workbooks
          h_map       type ole2_object,        " workbook
          h_zl        type ole2_object,        " cell
          h_f         type ole2_object,        " font
          gs_interior type ole2_object,        " Pattern
          worksheet   type ole2_object,
          h_cell      type ole2_object,
          h_cell1     type ole2_object,
          range       type ole2_object,
          h_sheet2    type ole2_object,
          h_sheet3    type ole2_object,
          gs_font     type ole2_object,
          flg_stop(1) type c.
              Internal table Declaration
    data: begin of t_excel occurs 0,
    vkorg(20) type c, "Sales Org
    vbtyp(20) type c, "Document Category
    auart(20) type c, "Document Type
    ernam(20) type c, "Created By
    vbeln(20) type c, "Document Number
    posnr(20) type c, "Item Number
    erdat(20) type c, "Created Date
    vdatu(20) type c, "Header Requested Delivery Date
    reqdat(20) type c, "Request date
    condat(20) type c, "Confirm date
    lifsk(20) type c, "Header Block
    txt30(30) type c, "Order User Status Description
    lifsp(20) type c, "Line Block
    dispo(20) type c, "MRP Controller
    dsnam(20) type c, "MRP Controller Description
    vmsta(20) type c, "Material Sales Status
    kunnr(20) type c, "Sold To
    cname(35) type c, "Sold To Name
    regio(20) type c, "State
    cufd(10) type c, "CUD
    bstnk(20) type c, "PO#
    bsark(20) type c, "Ordering Method
    matnr(20) type c, "Material
    maktx(35) type c, "Material Description
    t200(20) type c, "T200
    vtext(20) type c, "T200 Description
    matkl(20) type c, "Material Group
    zzbomind(7) type c, "BOM Indicator
    ostat(20) type c, "Order Status
    cmgst(20) type c, "CRD
    inco1(20) type c, "Incoterms
    oqty(20) type c, "Order Quantity
    pqty(20) type c, "Open Quantity
    unit(20) type c, "UOM
    onet(20) type c, "Order Value
    pnet(20) type c, "Open Value
    curr(20) type c, "Currency key
    so_bezei like tvkbt-bezei,"Sales Office
    sg_bezei like tvgrt-bezei,"Sales Group
    bname(20) type c, "Ordering Party
    contact(20) type c, "Contact Name
    telf1(20) type c, "Contact telf1
    reqqty(20) type c, "Item Request qty
    reqval(20) type c, "Item Request value
    conqty(20) type c, "Item Confirm qty
    conval(20) type c, "Item Confirm value
    zzrev(02) type c, "Revenue recognition acceptance
    bezei(20) type c, "Revenue recognition text
    vgbel(20) type c, "Reference Order for RETURNS
    0008text(255) type c, "Internal Order Comment Text
    end of t_excel.
    data: t_excel_bckord like t_excel occurs 0 with header line,
          t_excel_bcklog like t_excel occurs 0 with header line,
          t_excel_blkord like t_excel occurs 0 with header line.
      types: data1(1500) type c,
             ty          type table of data1.
      data:  it          type ty with header line,
    it_2          type ty with header line,
    it_3          type ty with header line,
             rec         type sy-tfill,
             deli(1)     type c,
             l_amt(18)   type c.
    data: begin of hex,
             tab type x,
            end of hex.
      field-symbols: <fs>      .
      constants cns_09(2) type n value 09.
      assign deli to <fs> type 'X'.
      hex-tab = cns_09.
      <fs> = hex-tab.
    data gv_sheet_name(20) type c .
    M A C R O Declaration
    define ole_check_error.
      if &1 ne 0.
        message e001(zz) with &1.
        exit.
      endif.
    end-of-definition.
    t_excel_bckord-vkorg = 'ABC'.
    t_excel_bckord-vbtyp = 'DEF'.
    t_excel_bckord-auart = 'GHI'.
    t_excel_bckord-ernam = 'JKL'.
    t_excel_bckord-vbeln = 'MNO'.
    t_excel_bckord-0008text = 'XYZ'.
    append t_excel_bckord.
    t_excel_bckord-vkorg = 'ABC1'.
    t_excel_bckord-vbtyp = 'DEF1'.
    t_excel_bckord-auart = 'GHI1'.
    t_excel_bckord-ernam = 'JKL1'.
    t_excel_bckord-vbeln = 'MNO1'.
    t_excel_bckord-0008text = 'XYZ1'.
    append t_excel_bckord.
    t_excel_bckord-vkorg = 'ABC2'.
    t_excel_bckord-vbtyp = 'DEF2'.
    t_excel_bckord-auart = 'GHI2'.
    t_excel_bckord-ernam = 'JKL2'.
    t_excel_bckord-vbeln = 'MNO2'.
    t_excel_bckord-0008text = 'XYZ2'.
    append t_excel_bckord.
    t_excel_bcklog-vkorg = 'ABC'.
    t_excel_bcklog-vbtyp = 'DEF'.
    t_excel_bcklog-auart = 'GHI'.
    t_excel_bcklog-ernam = 'JKL'.
    t_excel_bcklog-vbeln = 'MNO'.
    t_excel_bcklog-0008text = 'XYZ'.
    append t_excel_bcklog.
    t_excel_bcklog-vkorg = 'ABC1'.
    t_excel_bcklog-vbtyp = 'DEF1'.
    t_excel_bcklog-auart = 'GHI1'.
    t_excel_bcklog-ernam = 'JKL1'.
    t_excel_bcklog-vbeln = 'MNO1'.
    t_excel_bcklog-0008text = 'XYZ1'.
    append t_excel_bcklog.
    t_excel_bcklog-vkorg = 'ABC2'.
    t_excel_bcklog-vbtyp = 'DEF2'.
    t_excel_bcklog-auart = 'GHI2'.
    t_excel_bcklog-ernam = 'JKL2'.
    t_excel_bcklog-vbeln = 'MNO2'.
    t_excel_bcklog-0008text = 'XYZ2'.
    append t_excel_bcklog.
    t_excel_bcklog-vkorg = 'ABC3'.
    t_excel_bcklog-vbtyp = 'DEF3'..
    t_excel_bcklog-auart = 'GHI3'.
    t_excel_bcklog-ernam = 'JKL3'.
    t_excel_bcklog-vbeln = 'MNO3'.
    t_excel_bcklog-0008text = 'XYZ3'.
    append t_excel_bcklog.
    t_excel_blkord-vkorg = 'ABC'.
    t_excel_blkord-vbtyp = 'DEF'.
    t_excel_blkord-auart = 'GHI'.
    t_excel_blkord-ernam = 'JKL'.
    t_excel_blkord-vbeln = 'MNO'.
    t_excel_blkord-0008text = 'XYZ'.
    append t_excel_blkord.
    t_excel_blkord-vkorg = 'ABC1'.
    t_excel_blkord-vbtyp = 'DEF1'.
    t_excel_blkord-auart = 'GHI1'.
    t_excel_blkord-ernam = 'JKL1'.
    t_excel_blkord-vbeln = 'MNO1'.
    t_excel_blkord-0008text = 'XYZ1'.
    append t_excel_blkord.
    t_excel_blkord-vkorg = 'ABC2'.
    t_excel_blkord-vbtyp = 'DEF2'.
    t_excel_blkord-auart = 'GHI2'.
    t_excel_blkord-ernam = 'JKL2'.
    t_excel_blkord-vbeln = 'MNO2'.
    t_excel_blkord-0008text = 'XYZ2'.
    append t_excel_blkord.
    t_excel_blkord-vkorg = 'ABC3'.
    t_excel_blkord-vbtyp = 'DEF3'..
    t_excel_blkord-auart = 'GHI3'.
    t_excel_blkord-ernam = 'JKL3'.
    t_excel_blkord-vbeln = 'MNO3'.
    t_excel_blkord-0008text = 'XYZ3'.
    append t_excel_blkord.
    t_excel_blkord-vkorg = 'ABC4'.
    t_excel_blkord-vbtyp = 'DEF4'..
    t_excel_blkord-auart = 'GHI4'.
    t_excel_blkord-ernam = 'JKL4'.
    t_excel_blkord-vbeln = 'MNO4'.
    t_excel_blkord-0008text = 'XYZ4'.
    append t_excel_blkord.
    loop at t_excel_bckord.
    concatenate
    t_excel_bckord-vkorg
    t_excel_bckord-vbtyp
    t_excel_bckord-auart
    t_excel_bckord-ernam
    t_excel_bckord-vbeln
    t_excel_bckord-posnr
    t_excel_bckord-erdat
    t_excel_bckord-vdatu
    t_excel_bckord-reqdat
    t_excel_bckord-condat
    t_excel_bckord-lifsk
    t_excel_bckord-txt30
    t_excel_bckord-lifsp
    t_excel_bckord-dispo
    t_excel_bckord-dsnam
    t_excel_bckord-vmsta
    t_excel_bckord-kunnr
    t_excel_bckord-cname
    t_excel_bckord-regio
    t_excel_bckord-cufd
    t_excel_bckord-bstnk
    t_excel_bckord-bsark
    t_excel_bckord-matnr
    t_excel_bckord-maktx
    t_excel_bckord-t200
    t_excel_bckord-vtext
    t_excel_bckord-matkl
    t_excel_bckord-zzbomind
    t_excel_bckord-ostat
    t_excel_bckord-cmgst
    t_excel_bckord-inco1
    t_excel_bckord-oqty
    t_excel_bckord-pqty
    t_excel_bckord-unit
    t_excel_bckord-onet
    t_excel_bckord-pnet
    t_excel_bckord-curr
    t_excel_bckord-so_bezei
    t_excel_bckord-sg_bezei
    t_excel_bckord-bname
    t_excel_bckord-contact
    t_excel_bckord-telf1
    t_excel_bckord-reqqty
    t_excel_bckord-reqval
    t_excel_bckord-conqty
    t_excel_bckord-conval
    t_excel_bckord-zzrev
    t_excel_bckord-bezei
    t_excel_bckord-vgbel
    t_excel_bckord-0008text
    into it
    separated by deli.
    append it.
        clear it.
    endloop.
    loop at t_excel_bcklog.
    concatenate
    t_excel_bcklog-vkorg
    t_excel_bcklog-vbtyp
    t_excel_bcklog-auart
    t_excel_bcklog-ernam
    t_excel_bcklog-vbeln
    t_excel_bcklog-posnr
    t_excel_bcklog-erdat
    t_excel_bcklog-vdatu
    t_excel_bcklog-reqdat
    t_excel_bcklog-condat
    t_excel_bcklog-lifsk
    t_excel_bcklog-txt30
    t_excel_bcklog-lifsp
    t_excel_bcklog-dispo
    t_excel_bcklog-dsnam
    t_excel_bcklog-vmsta
    t_excel_bcklog-kunnr
    t_excel_bcklog-cname
    t_excel_bcklog-regio
    t_excel_bcklog-cufd
    t_excel_bcklog-bstnk
    t_excel_bcklog-bsark
    t_excel_bcklog-matnr
    t_excel_bcklog-maktx
    t_excel_bcklog-t200
    t_excel_bcklog-vtext
    t_excel_bcklog-matkl
    t_excel_bcklog-zzbomind
    t_excel_bcklog-ostat
    t_excel_bcklog-cmgst
    t_excel_bcklog-inco1
    t_excel_bcklog-oqty
    t_excel_bcklog-pqty
    t_excel_bcklog-unit
    t_excel_bcklog-onet
    t_excel_bcklog-pnet
    t_excel_bcklog-curr
    t_excel_bcklog-so_bezei
    t_excel_bcklog-sg_bezei
    t_excel_bcklog-bname
    t_excel_bcklog-contact
    t_excel_bcklog-telf1
    t_excel_bcklog-reqqty
    t_excel_bcklog-reqval
    t_excel_bcklog-conqty
    t_excel_bcklog-conval
    t_excel_bcklog-zzrev
    t_excel_bcklog-bezei
    t_excel_bcklog-vgbel
    t_excel_bcklog-0008text
    into it_2
    separated by deli.
    append it_2.
        clear it_2.
    endloop.
    loop at t_excel_blkord.
    concatenate
    t_excel_blkord-vkorg
    t_excel_blkord-vbtyp
    t_excel_blkord-auart
    t_excel_blkord-ernam
    t_excel_blkord-vbeln
    t_excel_blkord-posnr
    t_excel_blkord-erdat
    t_excel_blkord-vdatu
    t_excel_blkord-reqdat
    t_excel_blkord-condat
    t_excel_blkord-lifsk
    t_excel_blkord-txt30
    t_excel_blkord-lifsp
    t_excel_blkord-dispo
    t_excel_blkord-dsnam
    t_excel_blkord-vmsta
    t_excel_blkord-kunnr
    t_excel_blkord-cname
    t_excel_blkord-regio
    t_excel_blkord-cufd
    t_excel_blkord-bstnk
    t_excel_blkord-bsark
    t_excel_blkord-matnr
    t_excel_blkord-maktx
    t_excel_blkord-t200
    t_excel_blkord-vtext
    t_excel_blkord-matkl
    t_excel_blkord-zzbomind
    t_excel_blkord-ostat
    t_excel_blkord-cmgst
    t_excel_blkord-inco1
    t_excel_blkord-oqty
    t_excel_blkord-pqty
    t_excel_blkord-unit
    t_excel_blkord-onet
    t_excel_blkord-pnet
    t_excel_blkord-curr
    t_excel_blkord-so_bezei
    t_excel_blkord-sg_bezei
    t_excel_blkord-bname
    t_excel_blkord-contact
    t_excel_blkord-telf1
    t_excel_blkord-reqqty
    t_excel_blkord-reqval
    t_excel_blkord-conqty
    t_excel_blkord-conval
    t_excel_blkord-zzrev
    t_excel_blkord-bezei
    t_excel_blkord-vgbel
    t_excel_blkord-0008text
    into it_3
    separated by deli.
    append it_3.
        clear it_3.
    endloop.
      if h_excel-header = space or h_excel-handle = -1.
    start Excel
        create object h_excel 'EXCEL.APPLICATION'.
      endif.
    PERFORM err_hdl.
    *--- get list of workbooks, initially empty
      call method of h_excel 'Workbooks' = h_mapl.
    PERFORM err_hdl.
      set property of h_excel 'Visible' = 1.
    add a new workbook
      call method of h_mapl 'Add' = h_map.
    PERFORM err_hdl.
    *GV_SHEET_NAME = '1st SHEET'.
    gv_sheet_name = 'Back Orders'.
      get property of  h_excel 'ACTIVESHEET' = worksheet.
    set property of worksheet 'Name' = gv_sheet_name .
    *--Formatting the area of additional data 1 and doing the BOLD
    call method of h_excel 'Cells' = w_cell1
    exporting
    #1 = 1
    #2 = 1.
    call method of h_excel 'Cells' = w_cell2
    exporting
    #1 = 1
    #2 = 50.
    call method of h_excel 'Range' = h_cell
    exporting
    #1 = w_cell1
    #2 = w_cell2.
    *CALL METHOD OF gs_cells 'Select' .
    get property of h_cell 'Font' = gs_font .
    set property of gs_font 'Bold' = 1 .
            data l_rc type i.
      call method cl_gui_frontend_services=>clipboard_export
        importing
          data                 = it[]
        changing
          rc                   = l_rc
        exceptions
          cntl_error           = 1
          error_no_gui         = 2
          not_supported_by_gui = 3
          others               = 4.
      call method of h_excel 'Cells' = w_cell1
        exporting
          #1 = 1
          #2 = 1.
      call method of h_excel 'Cells' = w_cell2
        exporting
          #1 = 1
          #2 = 1.
    PERFORM err_hdl.
       call method of h_excel 'Range' = range
        exporting
          #1 = w_cell1
          #2 = w_cell2.
      call method of range 'Select'.
    PERFORM err_hdl.
      call method of worksheet 'Paste'.
    PERFORM err_hdl.
    CALL METHOD OF h_excel 'QUIT'.
    *GV_SHEET_NAME = '2ND SHEET'.
    gv_sheet_name = 'Backlog'.
    get property of h_excel 'Sheets' = h_sheet2 .
      call method of h_sheet2 'Add' = h_map.
    set property of h_map 'Name' = gv_sheet_name .
      get property of  h_excel 'ACTIVESHEET' = worksheet.
    *--Formatting the area of additional data 1 and doing the BOLD
    call method of h_excel 'Cells' = w_cell1
    exporting
    #1 = 1
    #2 = 1.
    call method of h_excel 'Cells' = w_cell2
    exporting
    #1 = 1
    #2 = 50.
    call method of h_excel 'Range' = h_cell
    exporting
    #1 = w_cell1
    #2 = w_cell2.
    get property of h_cell 'Font' = gs_font .
    set property of gs_font 'Bold' = 1 .
      call method cl_gui_frontend_services=>clipboard_export
        importing
          data                 = it_2[]
        changing
          rc                   = l_rc
        exceptions
          cntl_error           = 1
          error_no_gui         = 2
          not_supported_by_gui = 3
          others               = 4.
      call method of h_excel 'Cells' = w_cell1
        exporting
          #1 = 1
          #2 = 1.
      call method of h_excel 'Cells' = w_cell2
        exporting
          #1 = 1
          #2 = 1.
    PERFORM err_hdl.
       call method of h_excel 'Range' = range
        exporting
          #1 = w_cell1
          #2 = w_cell2.
      call method of range 'Select'.
    PERFORM err_hdl.
      call method of worksheet 'Paste'.
    *GV_SHEET_NAME = '3rd SHEET'.
    gv_sheet_name = 'Blocked Orders'.
    get property of h_excel 'Sheets' = h_sheet3 .
      call method of h_sheet3 'Add' = h_map.
    set property of h_map 'Name' = gv_sheet_name .
      get property of  h_excel 'ACTIVESHEET' = worksheet.
    *--Formatting the area of additional data 1 and doing the BOLD
    call method of h_excel 'Cells' = w_cell1
    exporting
    #1 = 1
    #2 = 1.
    call method of h_excel 'Cells' = w_cell2
    exporting
    #1 = 1
    #2 = 50.
    call method of h_excel 'Range' = h_cell
    exporting
    #1 = w_cell1
    #2 = w_cell2.
    get property of h_cell 'Font' = gs_font .
    set property of gs_font 'Bold' = 1 .
      call method cl_gui_frontend_services=>clipboard_export
        importing
          data                 = it_3[]
        changing
          rc                   = l_rc
        exceptions
          cntl_error           = 1
          error_no_gui         = 2
          not_supported_by_gui = 3
          others               = 4.
      call method of h_excel 'Cells' = w_cell1
        exporting
          #1 = 1
          #2 = 1.
      call method of h_excel 'Cells' = w_cell2
        exporting
          #1 = 1
          #2 = 1.
    PERFORM err_hdl.
       call method of h_excel 'Range' = range
        exporting
          #1 = w_cell1
          #2 = w_cell2.
      call method of range 'Select'.
    PERFORM err_hdl.
      call method of worksheet 'Paste'.
    *--- disconnect from Excel
      free object h_zl.
      free object h_mapl.
      free object h_map.
      free object h_excel.

  • Problem in identifying unique records from different tables

    Hello gurus,
    I am on E-Recruitment module.
    I order to get more fields in CANDIDATE_ATTR datasource I have enhanced it. I am getting additional fields from HRP5103 (Employer, Employment Start Date & Employment End Date) & from HRP5104 (Institute, City, Region). In both of the tables there are 9 primary keys out of which only two are different through which we can identify duplicate records i.e. OBJID (denote Candidate ID in both tables) & SEQNR(Number of Infotype Record with Same Key).
    I know that compounding InfoObjects (since i need to pull duplicate records from table as one candidate can have many institute & employer but they will always be referred by same OBJID) is one of the way but how to manage data through compounding coming from 2 tables.
    Also i donot want to create new objects as it will effect whole of the setup.
    Is there any other way.
    Can anyone give idea as to how to get records in BW.
    Thanks in advance.

    Hi Sundar,
    Thanks for your help. I wen tthrough the two discussions and found the following:
    1. I cannot include the primary/unique keys in the selection as it would make everything distinct. This restricts me from pointing me to the exact record that has changed.
    2. The columns would be dynamic. I want a config kind of solution where i can define the tables, columns on both the sides. And add/remove compare fields in the setup tables.
    Thanks,
    Faruq.

  • How to find the third highest salary from deptno20,from employee table

    how to find the third highest salary from deptno20,from employee table

    SELECT *
      FROM emp;
    EMPNO
    ENAME
    JOB
    MGR
    HIREDATE
    SAL
    COMM
    DEPTNO
    7369
    SMITH
    CLERK
    7902
    12/17/1980
    1000
    3
    20
    7499
    FEDERAL
    SALESMAN
    7654
    2/20/1981
    2000
    4
    30
    7521
    WARD
    SALESMAN
    7698
    2/22/1981
    3000
    4
    30
    7566
    JONES
    MANAGER
    7839
    4/2/1981
    4000
    3
    20
    7839
    MARTIN
    SALESMAN
    7698
    9/28/1981
    5421
    4
    30
    7698
    BLAKE
    MANAGER
    7698
    5/1/1981
    6222
    4
    30
    7782
    CLARK
    MANAGER
    7839
    6/9/1981
    5222
    2
    10
    7788
    SCOTT
    ANALYST
    7566
    12/9/1982
    5463
    3
    20
    7839
    KING
    PRESIDENT
    7902
    11/17/1981
    8543
    2
    10
    7844
    TURNER
    SALESMAN
    7698
    9/8/1981
    2124
    4
    30
    7876
    ADAMS
    CLERK
    7788
    1/12/1983
    2125
    3
    20
    7900
    JAMES
    CLERK
    7698
    12/3/1981
    5462
    4
    30
    7902
    FORD
    ANALYST
    7566
    12/3/1981
    2132
    3
    20
    7934
    MILLER
    CLERK
    7782
    1/23/1982
    5165
    2
    10
    SELECT sal, deptno
      FROM (SELECT   a.*,
                     DENSE_RANK () OVER (PARTITION BY deptno ORDER BY sal DESC) r
                FROM emp a
          ----  ORDER BY sal DESC
    WHERE r = 3;
    SAL
    DEPTNO
    5421
    30
    5165
    10
    2132
    20
    Regards ,
    Friend
    Message was edited by: MostWanted!!!!

  • Newbie question - trying to apply info from a table to a cell

    I'm a trucker who has purchased a MBP and want to use a spreadsheet to calculate cost for fuel. I am familiar with spreadsheets, but not that in depth. I want to be able to apply state taxes for fuel cost, but not sure how to apply it using a table. I want to use a cell to type in the state abbreviation and have the cell apply the state sales tax to my spreadsheet from a table with all the states and sale taxes. Here the table I have set up in my spreadsheet.
    STATE RATE
    AL $0.19
    AK $0.08
    AZ $0.26
    AR $0.225
    CA $0.367
    CO $0.205
    CT $0.26
    DE $0.22
    DC $0.00
    FL $0.3057
    GA $0.141
    HI $0.00
    ID $0.25
    IL $0.367
    IN $0.27
    IA $0.225
    KS $0.26
    KY $0.222
    LA $0.20
    ME $0.279
    MD $0.2425
    MA $0.21
    MI $0.28
    MN $0.20
    MS $0.18
    MO $0.17
    MT $0.2775
    NE $0.27
    NV $0.27
    NH $0.18
    NJ $0.175
    NM $0.21
    NY $0.3685
    NC $0.299
    ND $0.23
    OH $0.28
    OK $0.13
    OR $0.24
    PA $0.381
    RI $0.30
    SC $0.16
    SD $0.22
    TN $0.17
    TX $0.20
    UT $0.25
    VT $0.26
    VA $0.195
    WA $0.34
    WV $0.315
    WI $0.329
    WY $0.14
    Any help would be appreciated a great deal.
    "El Capitone"
    P.S. if you need to see the actual spreadsheet, I can send it to you by email. I tried to attach it to this message, but was unable to do so.

    El Capitone,
    I'm assuming you want to find the total amount of state taxes paid to each individual state, but I'm not sure what these rates mean or how they are to be applied. Actually, their application may vary from state to state. However, two possiblities are shown here and if this is not what you want you'll get back to us.
    1. If the rates mean $ per gallon then tax paid is is shown in column D below and the formula is:
    =IF(ISBLANK(Gals),"",Tax Rate*Gals)
    2. If the rate means a percent of the pump price after all other taxes and charges are added in, the result appears in column F:
    =IF(ISBLANK(Tot Cost),"",Tot Cost-Tot Cost/(1+Tax Rate))
    As I say, I have the feeling this problem may be more complex.
    pw

  • How can I get ALL the user info from WWW_FLOW_FND_USER -table?

    Hi.
    I use HTML DB authentication and therefore all my user information is stored in HTML DB tables. I can use :APP_USER to get USER_NAME, but in my application I need to have also USER_ID, FIRST_NAME, LAST_NAME and EMAIL_ADDRESS fields from database. I don't want to change any database/schema security level so I cannot read directly from WWW_FLOW_FND_USER -table when I am inside in SCOTT -schema/sec.level.
    How to read all the information?

    Thank you for your help, but I cannot find any information about backage wwv_flow_user_api on OTN or in HTML DB documentation.
    Where to start?

  • Retrieve and display info from 3 tables

    Been struggling with this for some days now. Setting up a calendar with football fixtures. For some reason, the team names do not appear in the table and this is really killing me. I thought I knew something about sql and php, guess not.
    So for building up this page, I use 3 tables, Season, Teams & Calendar containing a.o. these columns. The first table, season, has only 1 record/row, being the season that's up, in this case 2010-2011:
    Season
    id (primary key - AI)
    current
    Teams
    id (primary key - AI)
    season
    leagueid
    teamid (unique value)
    teamname
    Calendar
    id (primary key - AI)
    season
    leagueid
    hometeamid
    awayteamid
    So, what the query should look like is, based on that 1 record from the table season, it has to select all games from the table calendar, selecting all the columns as displayed above. Now that's the easiest part, the hardest part is, replacing the hometeamid AND awayteamid by their names from the teams table. The teamid you see in the table teams is also used in the table calender. Below some basic input from the tables in question, to get a better feel of it:
    Season
    1
    2010-2011
    Teams
    ID
    Season
    League ID
    Team ID
    Team Name
    1
    2010-2011
    u12
    1245-u12aa
    Team XYZ
    2
    2010-2011
    u8a
    9521-u8a
    Team ABC
    3
    2010-2011
    u12
    1245-u12a
    Team HFH
    Calendar
    ID
    Season
    League ID
    Hometeam ID
    Awayteam ID
    1
    2010-2011
    u12
    1245-u12aa
    5874-u12a
    2
    2010-2011
    u12
    9521-u12ab
    7436-u12ab

    So far you have 4 tables, so the links between the 4 tables is:
    1)id from season table(parent) is linked to seasonid from teams table(child)
    2)id from season table(parent) is linked to seasonid from calendar table(child)
    3)id from league table(parent) is linked to leagueid from teams table(child)
    So the joins between them are:
    JOIN1: season.id=teams.seasonid
    JOIN2: season.id=calendar.seasonid
    JOIN3: league.id=teams.leagueid
    To extract from multiple tables, SQL query would be as follows:(criteria 1 is optional)
    SELECT * FROM teams,season,league,calendar
    WHERE [CRITERIA 1] AND JOIN1 AND JOIN2 AND JOIN3
    To create relational tables, change all the tables ENGINE=INNODB
    then
    ALTER TABLE foreign table name ADD FOREIGN KEY(' insert foreign key') REFERENCES(' insert database.primary table.primary key ')
    ON DELETE CASCADE ON UPDATE CASCADE

  • Obtain info from nested table in function?

    Oracle9i 9.2.0.1.0/Windows 2000
    I'd like to obtain an ID from a nested table object in order to insert it into an ID field (outside the nested table I'm getting it from). I've got a function that lets me get a foreign key ID from one other table ('objtarget'); but it isn't nested:
    CREATE FUNCTION oeln.get_obj_id(
         obj_type IN oeln.objtarget.objecttarget%type
    RETURN oeln.objtarget.obj_id%type
    IS id_type oeln.objtarget.obj_id%type;
    BEGIN
    SELECT obj_id INTO id_type
    FROM oeln.objtarget
    WHERE oeln.objtarget.objecttarget = obj_type;
    RETURN(id_type);
    END;
    SELECT obj_id
    FROM oeln.objtarget
    WHERE obj_id = get_obj_id('');
    I'm getting compilation errors on functions to obtain ID's from nested tables instead. I've got the table 'opt' (includes the fields 'opt_id' & 'optics'). The 'optics' field in opt is of type o_tab(o_ty), including the field 'optinfo'. I'd like to get the opt_id out of the opt table, from input I obtain for the optinfo field: i.e.,
    SELECT opt_id
    FROM oeln.opt
    WHERE opt_id = get_opt_id('');
    In other words, I'd like to get opt_id from the opt table like I get obj_id from the objtarget table; but instead of looking it up by objecttarget I've got to look it up by optinfo, a field in a nested table object in the opt table itself. I've only gotten compilation errors on functions in order to do this. Is this an option?
    - Noel

    select * from table(v_names);
    I guess ,here you were trying to put the content of the NT into another NT, or just trying to print it.
    But, I don't think INTO Clause is mandatory here.
    Please check your modified code (w/o INTO) and the output :
    DECLARE
       TYPE string_table IS TABLE OF VARCHAR (100);
       v_names   string_table := string_table ();
       v_test    string_table := string_table ();
    BEGIN
       v_names.EXTEND (3);
       v_names (1) := 'name1';
       v_names (2) := 'name2';
       v_names (3) := 'name3';
       DBMS_OUTPUT.put_line ('Old collection - '||v_names (1));
       DBMS_OUTPUT.put_line ('Old collection - '||v_names (2));
       DBMS_OUTPUT.put_line ('Old collection - '||v_names (3));
       DBMS_OUTPUT.put_line ('Old collection - '||v_names.COUNT ());
       DBMS_OUTPUT.put_line (CHR(10));
       /* SELECT * FROM TABLE (v_names); */
       v_test := v_names;
       DBMS_OUTPUT.put_line ('New collection -- '||v_test (1));
       DBMS_OUTPUT.put_line ('New collection -- '||v_test (2));
       DBMS_OUTPUT.put_line ('New collection -- '||v_test (3));
       DBMS_OUTPUT.put_line ('New collection -- '||v_test.COUNT ());
       DBMS_OUTPUT.put_line (CHR(10));
       /* Printing using FOR LOOP */
       FOR i IN v_test.FIRST..v_test.LAST
       LOOP
         DBMS_OUTPUT.put_line ('In FOR Loop --- '||v_test (i));
       END LOOP;
    EXCEPTION
       WHEN OTHERS
       THEN
          DBMS_OUTPUT.put_line ('Error ' ||SQLERRM|| DBMS_UTILITY.format_error_backtrace);
    END;gives o/p :
    Old collection - name1
    Old collection - name2
    Old collection - name3
    Old collection - 3
    New collection -- name1
    New collection -- name2
    New collection -- name3
    New collection -- 3
    In FOR Loop --- name1
    In FOR Loop --- name2
    In FOR Loop --- name3Refer this link -- http://docs.oracle.com/cd/E11882_01/appdev.112/e17126/tuning.htm#CIHGGBGF
    Edited by: ranit B on Dec 26, 2012 2:29 PM
    -- code modified
    Edited by: ranit B on Dec 26, 2012 2:45 PM
    -- code 'again' updated -- FOR LOOP added

  • Problem during  Data Warehouse Loading (from staging table to Cube)

    Hi All,
    I have created a staging Module in owb to load my flat files to my staging tables.I have created an Warehouse module to load my staging tables to Dimension and Cube that I have created.
    My senario:
    I have a temp_table_transaction which had loaded my flat files to it .This table had loaded with 168,271,269 milion record as through this flat file.
    I have created a mapping in owb which loaded my temp_table_transaction which has join with other tables and some expression and convert function that these numbers fill to a new table called stg_tbl_transaction in my staging module.Running this mapping takes 3 hours and 45 minutes with this configue of my mapping:
    Default operation mode in running parameter of Mapp config=Set based
    My dimesion filled correctly but I have two problem when I want to transfer my staging table to my Cube:
    #1 Problem:
    i have created a cube is called transaction_cube with owb and it generated and deployed correctly.
    i have created a map to fill my cube with 168,271,268 milon recodes in staging table was called stg_tbl_transaction and deployed it to server (my cube map operating mode is set based)
    but after running this map it did not complete after 9 hour and I forced to cancel my running's map by kill its sessions .I want to know this time for loading this capacity of data is acceptable or for this capacity of data we should spend more time.Please let me know if anybody has any Issue.
    #2 Problem
    To test my map I have created a map with configure set based in operation modes and select my stg_tbl_transaction as source with 168,271,268 records in it and I have created another table to transfer and load my data in it.I wanted to test the time we should spend on this simple map but after 5 hours my data had not loaded in new table.I want to know where is my problem.Should I have set something in configue of map or anothe things.Please guide me about these problems.
    CONFIGURATION OF MY SERVER:
    i run owb on two socket xeon 5500 series with 192 GB ram and disks with RAID 10 Array
    Regards,
    Sahar

    For all of you
    It is possible to load from Infoset to Cube we did it, and it was ok.
    Data are really loaded from Infoset (Cube + master dat) to cube.
    When you create a transformation under a cube Infoset is proposed, and it works fine ....
    Now the process is no more operationnal and i don't understand why .....
    Load from infoset to cube is possible, i can send you screen shot if you want ....
    Christophe

  • FCP6 BIG PROBLEM - Media Manager Speed change from FCP5.1.4

    Hi!
    We have problem using a media manager project from FCP5.1.4 in FCP6. Almost ALL clips with speed change are messed up (all new speed around 1% to 7%). This is really a problem for us, since we always do media manager of everything we do to be able to go back and make changes.
    We have 2 MacPro 2 x 2.66Ghz, 8GB RAM, 10.4.9, Quicktime 7.1.6, FCP6, Decklink HD extreme or AJA Kona LH (with the latest driver).
    We tryed with different format: HDTV 1080i50, DVCProHD 720p59.94, SD Uncompressed 10bit, .... always the same problem.
    Is there a new way to use the MM in FCP6?
    Thank you!

    Hi! And thanx for the tip.
    But we use Media Manager everyday with speed change WITHOUT any problem (with FCP 5.1.4).
    We already try something similar, we copied the good clips (with speed change) from the ORIGINAL timeline to the media manager one, deleted the bad clip (with the wrong speed change) and pasted the good one in there place. Then we reconnected those clips with the MEDIA MANAGED one. We get a warning that the IN and OUT of the media are not the same, CLICKED continue and everything is always (well 95% of the time) OK.
    SO yes, we have the solution, but it's really really long and painful, especially with multilayered sequences.
    Right now, when I open any Media Manager in FCP 5.1.4 (created with FCP 5.1.4) everything works fine. Doing the same thing with FCP6 = speed change problem.
    Thanks again,still looking for another solution.

  • I need to make a spreadsheet based on info from specific table columns and headlines above those tab

    Hi all,
    A client of mine is requesting that I create a spreadsheet from a huge catalog that I am doing for him (this will also be done for all similar huge catalogs). The spreadsheet needs to pull information from some of the table columns, as well as the headline for each table. (This spreadsheet will then go out to some other people who will be putting this information into an online database/website for the client.) Let me be more specific and show you an example below.
    Information from InDesign Catalog:
    Tea Set
    Part #
    MFG #
    Description
    123-456
    654321
    Tea Cup
    789-010
    010987
    Saucer
    Here is how the Excel Spreadsheet needs to look:
    Part #
    MFG #
    Product Name
    Description
    Page #
    123-456
    654321
    Tea Set
    Tea Cup
    2
    789-010
    010987
    Tea Set
    Saucer
    2
    You have no idea how I have been pulling my hair out over this. Doing this manually will be a nightmare each time. My first thought was that I could assign specific cell styles to the columns (cells) and then create a TOC and then finangle with that - well, that didn't quite work, especially because of the headline I needed to pull into the spreadsheet as well. Is there ANY way I can get this information onto a spreadsheet? Knowing how wonderful InDesign is and all the tremendous capability it has, I am sure there IS a way and I just dont know how. Please PLEASE can someone point me in the right direction?
    Thank you very much in advance for your assistance:) Any help would be greatly appreciated.
    Christine

    Sorry for the delay.
    I am sure that this can somehow be done by making use of the styles. For example, when creating the TOC InDesign does a GREAT job of pulling in the styles (that are of course associated with the headlines and whatever needs to be included in the TOC) and associating them with the correct page numbers. I had experimented a little with creating specific paragraph styles and working these into the table and cell styles...then applying the Table Style to the table. I was halfway getting to where I wanted to be by creating a TOC that pulled in all of these styles and applied the corresponding page numbers (that I could somehow work into converting back into a table to then flow onto an Excel spreadsheet) but the wrench in the works was of course the Product Name. That said, I am VERY confident that this CAN be done somehow, by making use of the styles, using the same (or similar) methodology that is used to create the TOC. If only I were a pro at scripting...
    Well, it's great that you're certain and confident, but I think your confidence is misplaced.
    I had sort of hoped that running headers could be convinced to support this, but that doesn't seem to be true.
    I think you need to postprocess the data somehow. If I was doing this for real I'd probably export the document to IDML and have a seperate program read the IDML XML, find the product names and page numbers, and insert them in tables. Though...that might mess up the page numbers. And it'd be a lot of work.
    An much-faster-to-rapid-prototype solution is to have an indesign script go through the document and add in page numbers and the product names. Here's a rough prototype:
    var d,s,story,table,product,page,c2,c3,c5,i,j.k;
    d=app.activeDocument;
    s=d.stories;
    for (i=0; i<s.length; i++) {
        story = s[i];
        for (j=0; j<story.tables.length; j++) {
            table = story.tables[j];
            product = story.chara
    cters[table.storyOffset.index-2].paragraphs[0].contents;
            page = table.parent.parentPage.name;
            // $.writeln("This is table "+j+". Product name: "+product+" page "+page);
            c2=table.columns[1];
            c3=table.rows[0].columns.add(LocationOptions.AFTER, c2);
            c3.contents=product;
            c5=table.rows[0].columns.add();
            c5.contents=page;
    This doesn't handle the header rows in tables, but hopefully that's ok.
    It may get page numbers wrong on multipage tables. Probably it would be better to just use
    SpecialCharacters.AUTO_PAGE_NUMBER on the last full line (c5.contents=).
    It should also probably not just look back 2 characters from the start of the table to find the paragraph, but it's probably good enough.

Maybe you are looking for

  • Should a new custom ESB contract wsdl required for such a scenario?

    Hi, I am using AIA 2.4 for my client who is integration Web-center 11g with JDE 9.0. The question is more pertaining to design approach that one needs to take for a scenario as this- The case - an ADF page tries to create a customer in the JDE and us

  • How to send a mail that appears as meeting dialog in MS outlook?

    Hi: Is it possible for the mail adapter to send a mail that appears as a meeting dialog in Ms outlook? If yes, could you please tell how to do it? Actually I'm developing my own module. Thanks a lot.

  • How to reset table and serch criteria, Pls help to me

    I used execute with param for searching instead of Query searching I would like to reset searching criteria as well as result table. Please show to me how to tackle it. Regards KT

  • Can't view Applet, JVM download require

    I have a problem, My computer has no internet connection, so when i write one applet file and try to view it using IE (My os is windows XP pro), one dialog come out asking me to download JVM to view this applet. because i got no internet connection s

  • IPod not shown as drive

    Following problem: My iPod did not start from one day to the other. But it was shown as an usb device. So I updated the iPod with the latest iPod-update. From this time on it does not start and is not shown as usb-drive. The only reaction I get when