How we get the lower level employee under particular level employee

Hi ,
i have query like
select lpad(' ', 3*level) || empno, level
from
scott.emp
start with
mgr is null
connect by
prior empno=mgr
output:-
LPAD('',3*LEVEL)||EMPNO     LEVEL
7839     1
7566     2
7788     3
7876     4
7902     3
7369     4
7698     2
7499     3
7521     3
7654     3
7844     3
7900     3
7782     2
7934     3
i want to get all hierarchy under particular employee id i entered during runtime. eg. if i entered 7566     then it should display the following output.
7566     2
7788     3
7876     4
7902     3
7369     4
is it possible , please suggest.
thanks
kam

Hello,
How about trying like this?
SELECT LPAD(' ', 3*LEVEL) || empno, LEVEL
FROM scott.emp
START WITH empno=7566 -- Or any value from where you want to start
CONNECT BY PRIOR empno=mgr -Ammad

Similar Messages

  • How to get the transport request for a particular standard text?

    Hi,
    i want to know, how we get the transport request which associated for standard text.
    Please note already the standard text is assigned to the TR using RSTXTRAN program.
    i have a std text. i want to find the related TR for that!
    rds,
    Siva.

    Refer the link. It might tellsa about attaching to transport request but using the way you can find also -
    Re: How To Transport STANDARD TEXTS??
    Regards,
    Amit
    Reward all helpful replies

  • How to get the other columns of a particular mininum value

    <p>I have a multiple rows per account in a table. I build a object minimum(col1) in the Business Object universe. I need to get the corresponding values of a min(col1) for each account. Problem is when i pull the min(col1) and other column, it always gives every combination of the min(col1) for each account. How do i get only the corresponding values.</p><p>Example</p><p>Acct         Col1     col2     col3 </p><p>1              34       3         4</p><p>1              45        5        6</p><p>2               3         7         8</p><p>output should be</p><p>1           45    5   6</p><p>2         3       7   8</p><p>How i accomplish with data providers or free hand sql combinations</p><p>&#160;</p><p>Thanks</p><p>&#160;</p><p>&#160;</p>

    you can do this very quickly by creating a crosstab with the Acct as the Row, and Col1,2,3 as the Columns, and the Maximum of your field as the summary.

  • How to get the text elements for a particular program

    Hi All,
    I want to get the all text elements , selection texts for a particular program...How to get.
    I have used one FM READ_TEXTELEMENT_FROM_REPORT , but not much useful..
    please help me..
    Regards,
    raj

    Hi..
    You may use this statement to read the text elements:
    DATA: i_reptx  TYPE STANDARD TABLE OF textpool   WITH HEADER LINE.
    READ TEXTPOOL (reports) INTO i_reptx. " reports is the report name.
    Best Regards,
    Pradeep.

  • How to get the Inspection lot for a particular serial number ?

    Hi all,
    Can anyone help me to get the Instpection Lot number from the given serial number ?
    Regards,
    Shankar

    Hi again,
    1. goto se11, open the table ,
      in display mode.
    2. click button INDEXES
      on application toolbar.
      a new window will come
    3.  choose CREATE
       a new window will come
    4. in index name, type Y01
    5. a new window will come
    6. there give the field name for serial number
    7. also give short description for the index.
    8. save and activate
    9 thats all
    regards,
    amit m.

  • How to get the page number in the break section?

    Hi expert,
    The user wants the page number came right after the Break group name if the break section contains more than 1 page. E.g.
    ABC Compnay
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    BCD Company, p 1
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    BCD Company, p 2
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    CDE Company
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    How to get the page number in section break level?

    Hi Wes
    * Create a Field on the margin.
    * Set its "Source" to "Page Number"/"Physical Page Number".
    * Click "Page Numbering" button.
    * In "Reset At" list box, choose the Repeating frame that surrounds your detail group in the layout.
    This should cause Reports to increment the page number until the "Company" repeating frame resets.
    Regards
    Sripathy

  • How to get the class name of a page in oracle apex

    Hi All,
    Can anyone please let me know how we can get the class name of a page or region in oracle apex? I would also like to know how we get the DOM object ID for particular item.
    I appreciate any help on this.
    Regards
    Raj

    RajEndiran wrote:
    Can anyone please let me know how we can get the class name of a page or region in oracle apex?What do you mean with class name? The name of the template (e.g. the css style class name)?
    I would also like to know how we get the DOM object ID for particular item.Use firebug or inspect the source code of the rendered page to see the object IDs. Other then then, the typical ID of page items is the name of the item. For regions you can set your own ID.

  • How to get the Class name of an API method?

    Like most of us, it's difficult to know where every method within a Java class is. Also, many of the same methods are scattered throughout Java Classes. I know of two methods that retreive this... getClass().getName(). But, you must have an object to use these. Is there a way to find out what Class contains a method or Class variable thru an Applet or Java Application?? Obviously, I can look at API Docs; but this takes time.
    Tks Randy

    RajEndiran wrote:
    Can anyone please let me know how we can get the class name of a page or region in oracle apex?What do you mean with class name? The name of the template (e.g. the css style class name)?
    I would also like to know how we get the DOM object ID for particular item.Use firebug or inspect the source code of the rendered page to see the object IDs. Other then then, the typical ID of page items is the name of the item. For regions you can set your own ID.

  • Bom explosion how to get the least level  every stufe = 1

    material number : 2t67363633
         following is the bom of that materials
       the below ouput is i got it from cs12
    .1 010 6631030681
    ..2 010 INL025000650
    ..2 020 IN6631030681
    .1 020 6650002622
    ..2 010 950002621GV
    .1 030 6682500491
    .1 040 712758079
    but in cs13 the following output i got only the following for the same materials
    .1 010 6631030681
    ..2 010 INL025000650 -
    i got this
    ..2 020 IN6631030681 -
    i got this
    .1 020 6650002622
    ..2 010 950002621GV  -
    i got this
    .1 030 6682500491    -
    i got this
    .1 040 712758079     -
    i got this
    requirement is take the least items in every level1 items
    supouse if the level1 item doesnt have any subitems ,we ll take this one  also
    following is the detiails for the senario,using this to restrict and how to get the cs13 above output
    level  fld2    fld3    fld4 fld5   fld6 fld7 componentname
    .1  0000001  00000097 001  00002  0001 010 6631030681  -
    ..2 0000001  00000093 002  00002  0001 010 inl025000650
    ..2 0000002  00000093 002  00004  0002 020 in6631030681-1560
    .1  0000002  00000097 001  00004  0002 020 6650002622
    ..2 0000001  00000095 002  00002  0001 010 950002621gv
    .1  0000003  00000097 001  00006  0003 030 6682500491
    <b> .1  0000004  00000097 001  00008  0004 040 712758079</b>
    i here attached my code for ur review
    i got the output without the last leve i bold it. is there any logic to solve the problem
    TABLES : MAST.
    DATA: BEGIN OF ISTPO OCCURS 1000.
            INCLUDE STRUCTURE STPOX.
          DATA: END OF ISTPO.
    DATA: W_TOPMAT LIKE CSTMAT.
    SELECT-OPTIONS : P_MATNR FOR MAST-MATNR.
    PARAMETERS     : P_WERKS TYPE MAST-WERKS.
    DATA : BEGIN OF ITAB OCCURS 0,
               MATNR LIKE MAST-MATNR,
               WERKS LIKE MAST-WERKS,
               END OF ITAB.
    DATA: IT_STB LIKE ISTPO OCCURS 0 WITH HEADER LINE.
    data : istpofinal like istpo occurs 0 with header line.
    data : istpotemp like istpo occurs 0 with header line.
    START-OF-SELECTION.
    CLEAR ISTPO. REFRESH ISTPO.
    SELECT MATNR WERKS FROM MAST INTO TABLE ITAB
                       WHERE MATNR  IN P_MATNR AND WERKS = P_WERKS.
    LOOP AT ITAB.
    CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
        EXPORTING
          CAPID                 = 'PP01'
          MEHRS                 = 'X'
         MMAPS                 = ' '
         MDMPS                 =  ' '
         BREMS                  = 'X'
          DATUV                 = SY-DATUM
          MTNRV                 = ITAB-MATNR
          WERKS                 = P_WERKS
          EMENG                 = '1'
          STKKZ                 = ' '
          FBSTP                 = ' '
          FTREL                 = ' '
        IMPORTING
          TOPMAT                = W_TOPMAT
        TABLES
          STB                   = ISTPO
        EXCEPTIONS
          ALT_NOT_FOUND         = 1
          CALL_INVALID          = 2
          MATERIAL_NOT_FOUND    = 3
          MISSING_AUTHORIZATION = 4
          NO_BOM_FOUND          = 5
          NO_PLANT_DATA         = 6
          NO_SUITABLE_BOM_FOUND = 7
          OTHERS                = 8.
      IF SY-SUBRC = 0.
    WRITE:/ 'MaterialNumber' ,21 'Description'.
    SKIP 1.
    endif.
    WRITE: / W_TOPMAT-MATNR UNDER TEXT-H00 COLOR COL_HEADING,
             W_TOPMAT-MAKTX UNDER TEXT-H01 COLOR COL_HEADING.
    data : ttabix like sy-tabix,
            tstufe like stpox-stufe.
      data : len type i.
    istpotemp[] = istpo[].
      describe table istpotemp lines len.
    LOOP AT ISTPO .
    WRITE :/ ISTPO-STPOZ,
               ISTPO-STLKN,
               ISTPO-POSNR,
               ISTPO-IDNRK,
               ISTPO-OJTXP,
               ISTPO-MENGE,
               ISTPO-MEINS.
    if sy-tabix = len.
    move-corresponding istpo to istpofinal.
    append istpofinal.
    exit.
    endif.
    ttabix = sy-tabix - 1 .
    if tstufe ge istpo-stufe.
    read table istpotemp index ttabix.
    move-corresponding istpotemp to istpofinal.
    append istpofinal.
    endif.
    tstufe = istpo-stufe.
    ENDLOOP.
    *endif.
    endloop.
    skip 3.
    loop at istpofinal.
         WRITE :/ ISTPOFINAL-STPOZ,
                ISTPOFINAL-STLKN,
                ISTPOFINAL-POSNR,
                ISTPOFINAL-IDNRK,
                ISTPOFINAL-OJTXP,
                ISTPOFINAL-MENGE,
                ISTPOFINAL-MEINS.
    endloop.

    Hi Shiba,
    We got the required list,
    But while using select-option to view multiple values the list of datas in the ISTPOFINAL gets displayed like the given below.
    example
    Material1
    .........Component 1
    .........Component 2
    Material 2
    .........Component 1......... From Material 1
    .........Component 2......... From Material 1
    .........Component 3
    .........Component 4
    Material 3
    .........Component 1......... From Material 1
    .........Component 2......... From Material 1
    .........Component 3......... From Material 2
    .........Component 4......... From Material 2
    .........Component 5
    .........Component 6
    Like this it goes on for the entire list at the tie of displaying the ISTPOFINAL.
    We tried evn by deleting the adjacent duplicate values still it gets displayed.
    is there any problm with the loop or is it the problm with the ending of the loop.
    Pls suggest us.
    LOOP AT ITAB.
    CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
        EXPORTING
          CAPID                 = 'PP01'
          MEHRS                 = 'X'
          MMAPS                 = ' '
          MDMPS                 =  ' '
         BREMS                  = 'X'
          DATUV                 = SY-DATUM
          MTNRV                 = ITAB-MATNR
          WERKS                 = P_WERKS
          EMENG                 = '1'
          STKKZ                 = ' '
          FBSTP                 = ' '
          FTREL                 = ' '
        IMPORTING
          TOPMAT                = W_TOPMAT
        TABLES
          STB                   = ISTPO
          MATCAT                = MATCAT
        EXCEPTIONS
          ALT_NOT_FOUND         = 1
          CALL_INVALID          = 2
          MATERIAL_NOT_FOUND    = 3
          MISSING_AUTHORIZATION = 4
          NO_BOM_FOUND          = 5
          NO_PLANT_DATA         = 6
          NO_SUITABLE_BOM_FOUND = 7
          OTHERS                = 8.
    WRITE: / W_TOPMAT-MATNR UNDER TEXT-H00 COLOR COL_HEADING,
             W_TOPMAT-MAKTX UNDER TEXT-H01 COLOR COL_HEADING.
    data : ttabix like sy-tabix,
            tstufe like stpox-stufe.
      data : len type i.
    istpotemp[] = istpo[].
      describe table istpotemp lines len.
    loop at istpo.
    CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
        EXPORTING
          CAPID                 = 'PP01'
          MEHRS                 = 'X'
          MMAPS                 = ' '
          MDMPS                 =  ' '
         BREMS                  = 'X'
          DATUV                 = SY-DATUM
          MTNRV                 = ISTPO-IDNRK
          WERKS                 = P_WERKS
          EMENG                 = '1'
          STKKZ                 = ' '
          FBSTP                 = ' '
          FTREL                 = ' '
        IMPORTING
          TOPMAT                = W_TOPMAT
        TABLES
          STB                   = ISTPOTEMP
         MATCAT                = MATCAT
        EXCEPTIONS
          ALT_NOT_FOUND         = 1
          CALL_INVALID          = 2
          MATERIAL_NOT_FOUND    = 3
          MISSING_AUTHORIZATION = 4
          NO_BOM_FOUND          = 5
          NO_PLANT_DATA         = 6
          NO_SUITABLE_BOM_FOUND = 7
          OTHERS                = 8.
    if sy-subrc ne 0.
    move-corresponding istpo to istpofinal.
    append istpofinal.
    clear: istpo, istpofinal.
    else.
    continue.
    clear: istpo, istpofinal.
    endif.
    *break-point.
    delete adjacent duplicates from istpofinal.
    endloop.
    loop at istpofinal.
         WRITE :/ ISTPOFINAL-STPOZ,
                ISTPOFINAL-STLKN,
                ISTPOFINAL-POSNR,
                ISTPOFINAL-IDNRK,
                ISTPOFINAL-OJTXP,
                ISTPOFINAL-MENGE,
                ISTPOFINAL-MEINS.
    clear: istpofinal.
    endloop.
    endloop.

  • For some artists in my Music app on my I-phone, the songs do not appear when I search by the artist.  However, if I search the album name, all the songs show.  How do I get the songs to show under songs?

    For some artists in my Music app on my I-phone, the songs do not appear when I search by the artist.  However, if I search the album name, all the songs show.  How do I get the songs to show under songs?

    Hi Spam_Valley,
    I understand that you are having issues with your music displaying correctly. This may be an issues with the metadata stored within that song, and iTunes interpretation of that info.
    We may need to repair this. See the following resources for information:
    iTunes 10 for Windows: If song titles don’t appear correctly
    http://support.apple.com/kb/PH1468
    Fixing Incorrect Song or Album Listings in iTunes
    http://support.apple.com/kb/TA24677
    Thanks,
    Matt M.

  • How to get the line in the template (smartform) with out using under score

    Hi,
         How to get the line in the template (smartform) with out using under score,
         and how to print the box (line the check box - small squre box (which is used ot mark the tick by the user in front of the item).
         Please provide the valueble answer as early as possible.
    Thanks,
    Ravi

    Hi Ravi,
    Line -
    Use a SMATSTYLE for this purpose.in the smartstyle create a paragraph or character with underline atribute.Then call the smartstyle in the text.
    Search SDN with Key <b>UNDERSCORE</b>.. will get few more posts on the same.
    For Checkbox - refer link
    Re: Quick Question on Smartforms
    Re: putting tick mark into check box in smartform
    Reward points if this Helps.
    Manish
    Message was edited by:
            Manish Kumar

  • Urgent:::how to get the employee hierarchy

    hi all.
    let me know how to get the employee hierarchy in HR organizational management.
    like when we give emp id it shows developer name---superior( team lead name)-superior(project lead name)---
    points will be rewarded for valuable answer.

    Hi,
    1) You can use the relation '002' in the table HRP1001, between the position of developer (objid) and get the position of team lead (sobid field). With the position of the team lead got in SOBID field... with the relation '008' get the person name.
    2) You can use the transaction PPOM_OLD to view the reporting structure...
    Regards,
    Meera

  • How to get the domain level values in web ui pick list

    Hi Gurus,
                I was added one field through EEWB transaction and i was maintained the values in domain level.now my requirement is i was added this field in web ui.but i don't know how to get the values which are we maitained in domain level. pls send me the solution it is very needful for me..
    Regards,
    Bixamaiah.B

    Hi Bussa,
    Refer to the documentation on drop-down Boxes in UI here:
    CRM Web Client UI Framework [original link is broken]
    This should help you, but do get back if you face any issues in implementing the same.
    Regards,
    Padma Guda

  • When plugging in an iPad in Apple Configurator, it is not being read under USB Connected so I can't update it.  Any ideas on how to get the system to read the iPad?

    When plugging in an iPad in Apple Configurator, it is not being read under USB Connected so I can't update it.  The iPhoto window opens up and reads the photos on the iPad, so it is connecting to the computer.  Earlier today I wasn't having any problems.  I have shut down the iPad and the computer and started over, but that didn't help.  Any ideas on how to get the system to read the iPad so I can update the apps on it?

    Hi, is the problem just to update your apps on your iPad? Here is what you should check. Is the iTunes on your computer updated to the latest version? Does your iPad needs to be updated? Do you have enough storage on your iPad to do the update? On your device is your iCloud back up checked?
    Go to Settings - iCloud - Backup/Storage - see if its checked, and try unchecking it before connecting it to the computer.
    Please let me know if you need any further assistance.

  • How to get the measure total at row level for another measure calculation in DAX?

    Hi There,
    Using DAX, I am trying to get an expression for a calculated measure as follow:
    So basically, I would like to get the AMeasure total highlighted in yellow in the A2Measure calculation:
    Smeasure -(Ameasure total * WMeasure) where Ameasure total is the one highlighted. 
    I think my question would be how to get the total of a measure in order to used in the calculation of another measure.
    Thanks and best regards,
    Joss

    Hi Joss83,
    If you're trying to get the result for [AMeasure] at the total level (i.e. 5.09 in your example) you can do this by creating a version of this measures that is evaluated after ignoring the filters (indirectly or explicitly) placed on
    the 'Customer' and 'Player' columns. You may also need to ignore the filters place on some other tables or columns that must be ignored in order for the correct total to be returned.
    Without knowing much more about your data model, I can only take a vague guess as to what this calculation would look like in your scenario:
    AMeasureTotal:=
    CALCULATE(
    [AMeasure],
    ALL(Customer[Customer]),
    ALL(Player[Player])
    You can read more about the 'ALL' DAX function here:
    http://technet.microsoft.com/en-us/library/ee634802.aspx
    Hope this helps,
    Michael

Maybe you are looking for