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.

Similar Messages

  • Bom explosion how to restrict the item level posnr

    Hi friends
    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 : ITAB_STB LIKE ISTPO1 OCCURS 0 WITH HEADER LINE.
    START-OF-SELECTION.
    CLEAR ISTPO. REFRESH ISTPO.
    SELECT MATNR WERKS FROM MAST INTO CORRESPONDING FIELDS OF 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                 = 'X'
         BREMS                  = 'X'
          DATUV                 = SY-DATUM
          MTNRV                 = ITAB-MATNR
          WERKS                 = P_WERKS
          EMENG                 = '1'
          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.
    WRITE: / W_TOPMAT-MATNR UNDER TEXT-H00 COLOR COL_HEADING,
             W_TOPMAT-MAKTX UNDER TEXT-H01 COLOR COL_HEADING.
    LOOP AT ISTPO .
      WRITE :/ ISTPO-POSNR,
               ISTPO-IDNRK,
               ISTPO-OJTXP,
               ISTPO-MENGE,
               ISTPO-MEINS.
    ENDLOOP.
    ENDIF.
    *ENDLOOP.
    SKIP 5.
    ENDLOOP.
       here i gave the material no , it gave the bom of that materials.
      i restricted posnr itemnumber.
    postnr   component number complonentdesct u
    010        sfg
       010
       020
    020       sfg
    030       sfg
       010
       020
        i want  to get only sfg component how to use this logic in above coding.
    very urgent. give me a solutions
    Regards
    ds

    HI,
               my requirement is to explode the summaried bom ,using tcode cs13,
    we ll get multilevel  cs12 , in my report i got cs1 explosion,
    but i need to get like cs13 ouput using select-option,
    but i got the output i would like to restrict levels
      ABC IS MATERIAL
       D
         E
         F - E and f required to make a d,
      G
        H
           I  H  and i requried to make a g,
    i want to get only H , I, E,F =====> A
    D,G IS SFG.
    Regards
    ds

  • 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

  • How to get the max(level)?

    Hi,
    The below query returns level and other selected columns.
    I need to get the max(level) 2nd column value in the below example.How to modify the query?
    Ex
    Level      max(level)     id
    1 5 101
    1 5 102
    1 5 103
    2 5 104
    2 5 105
    3 5 107
    4 5 120
    5 5 134
    5 5 280
    SELECT DISTINCT level lvl
    ,form_frms.emp_id
    ,form_frms.ing_emp_id
    ,form_frms.prve_id
    ,CASE
    WHEN (select div_dn
    from epm_prod epm
    where epm.emp_id= form_frms.ing_emp_id) ='Y' THEN DIV_DN
    WHEN NVL((select distinct 'N'
    from emp_pro_version prvv
    where prvv.is_py='Y' and
    prvv.IS_VERSION ='N' and
    prvv.emp_id=form_frms.ing_emp_id) ,'Y')='N'
    THEN 'Y'
    WHEN NVL((select distinct 'Y'
    from employee epm
    where emp.emp_id=form_frms.ing_emp_id
    and epm.status<>'NEW') ,'N') ='Y'
    THEN 'Y'
    ELSE 'N'
    END
    ELSE 'N'
    END UN_KNOWN_ID
    FROM (SELECT empvv1.prvv_id
    FROM emp_view_version empvv1
    WHERE empvv1.is_version = 'Y'
    ) form_frms
    START WITH form_frms.emp_id = :lv_emp_id
    CONNECT BY PRIOR form_frms.ing_emp_id = form_frms.emp_id
    ORDER BY level DESC, form_frms.emp_id,UNKNOWN_ID ASC;
    Edited by: shivasha on Feb 9, 2013 12:24 AM

    Maybe
    select lvl,
           max(lvl) over (order by null rows between unbounded preceding and unbounded following) max_level,
           emp_id,
           unknown_id
      from (SELECT DISTINCT
                   level lvl,
                   form_frms.emp_id,
                   form_frms.ing_emp_id,
                   form_frms.prve_id,
                   CASE WHEN (select div_dn
                                from epm_prod epm
                               where epm.emp_id = form_frms.ing_emp_id
                             ) = 'Y'
                        THEN DIV_DN
                        WHEN NVL((select distinct 'N'
                                    from emp_pro_version prvv
                                   where prvv.is_py = 'Y'
                                     and prvv.IS_VERSION = 'N'
                                     and prvv.emp_id=form_frms.ing_emp_id
                                 ),'Y'
                                ) = 'N'
                        THEN 'Y'
                        WHEN NVL((select distinct 'Y'
                                    from employee epm
                                   where emp.emp_id = form_frms.ing_emp_id
                                     and epm.status != 'NEW'
                                 ),'N'
                                ) = 'Y'
                        THEN 'Y'
                        ELSE 'N'
                   END UNKNOWN_ID
              FROM (SELECT empvv1.prvv_id
                      FROM emp_view_version empvv1
                     WHERE empvv1.is_version = 'Y'
                   ) form_frms
             START WITH form_frms.emp_id = :lv_emp_id
             CONNECT BY PRIOR form_frms.ing_emp_id = form_frms.emp_id
    ORDER BY lvl DESC,emp_id,UNKNOWN_IDRegards
    Etbin

  • How to get the inheritance level for an atribute value

    hi,
    i have to get the inheritance level for an attribute value for a given user in Org.struc.

    Hi,
    Check out table T77OMATTUS for inheritance level for an attributes
    Regards,
    Neelima

  • HOw to Get the top level of Hierarchy and count on that basis

    hi
    i have following tables
    desc hr_organizations_units_V
    organization_id PRIMARY KEY
    name
    ORGANIZATION_type
    per_org_structure_elements
    organization_id_parent FK TO hr_organizations_units_V(ORGANIZATION_ID)
    organization_id_child FK TO hr_organizations_units_V(ORGANIZATION_ID)
    I HAVE THIS QUERY TO GET PARENT CHILD
    SELECT ORGANIZATION_ID_PARENT PARENT,ORGANIZATION_ID_CHILD CHILD,ORGANIZATION_TYPE FROM PER_ORG_STRUCTURE_ELEMENTS OSE,HR_ALL_ORGANIZATION_UNITS AOU WHERE AOU.ORGANIZATION_ID = OSE.ORGANIZATION_ID_CHILD CONNECT BY PRIOR ORGANIZATION_ID_CHILD = ORGANIZATION_ID_PARENT
    START WITH ORGANIZATION_ID_PARENT = 82 -- THE GRAND PARENT
    ORDER BY ORGANIZATION_ID_PARENT
    PARENT CHILD ORGANIZATION_TYPE
    82 83 COMPANY
    82 143 COMPANY
    83 84 DIVISION
    83 134 DEPARTMENT
    83 135 DEPARTMENT
    DESC per_all_assignments_f
    ASSIGNMENT_NUMBER
    ORGANIZATION_ID FORIGN KEY TO HR_ALL_ORGANIZATION_UNITS
    THE ASSIGNMENTS ARE ASSIGNED ON DEPARTMENT LEVEL.
    MY REQUIREMENT IS THAT I WANT TO GET THE
    1)TOTAL NO OF ASSIGNMENTS ON THE DIVISION LEVEL
    2)TOTAL NO OF ASSIGNMENTS ON THE COMPANY LEVEL
    3)REPORTS LIKE PAY SLIP ETC I WANT TO GET THE ABOVE TWO LEVELS OF ORGANIZATION FOR EACH EMPLOYEE I.E DIVISION AND COMPANY OF
    OF THE EMPLOYEE'S DEPARTMENT.
    I WILL REALLY APPRECIATE ANY HELPING HAND.
    REGARDS

    Here are a few ways to get what I think you are asking for now. If this is not what you want, then please provide a complete example of what you want, including sample data, and the complete query result, including numbers, based on that data, that you want, as I have done below.
    scott@ORA92> -- test data:
    scott@ORA92> SELECT * FROM hr_all_organization_units
      2  /
    ORGANIZATION_ID NAME                                ORGANIZATIO
                 82 GRANDPARENT                         GRANDPARENT
                 83 COMPANY 83                          COMPANY
                 84 DIVISION 84                         DIVISION
                134 DEPARTMENT 134                      DEPARTMENT
                135 DEPARTMENT 135                      DEPARTMENT
                143 COMPANY 143                         COMPANY
    6 rows selected.
    scott@ORA92> SELECT * FROM per_org_structure_elements
      2  /
    ORGANIZATION_ID_PARENT ORGANIZATION_ID_CHILD
                        82                    83
                        82                   143
                        83                    84
                        84                   134
                        84                   135
    scott@ORA92> SELECT * FROM per_all_assignments_f
      2  /
    ASSIGNMENT_NUMBER ORGANIZATION_ID
                    1              83
                    2              84
                    3             134
                    4             135
                    5             143
                    6              84
    6 rows selected.
    scott@ORA92> -- method 1:
    scott@ORA92> COLUMN  name FORMAT A35
    scott@ORA92> SELECT  RPAD ('.', 5 * (LEVEL - 1), '.') || aou.name AS name,
      2           (SELECT SUM (the_count)
      3            FROM   (SELECT organization_id_parent,
      4                     organization_id_child,
      5                     COUNT (*) AS the_count
      6                 FROM   per_org_structure_elements,
      7                     per_all_assignments_f
      8                 WHERE  per_org_structure_elements.organization_id_child =
      9                     per_all_assignments_f.organization_id
    10                 GROUP  BY organization_id_parent,
    11                     organization_id_child) t
    12            START  WITH t.organization_id_child =
    13                  ose.organization_id_child
    14            CONNECT BY PRIOR t.organization_id_child =
    15                       t.organization_id_parent) AS assignments_count
    16  FROM   PER_ORG_STRUCTURE_ELEMENTS OSE,
    17           HR_ALL_ORGANIZATION_UNITS  AOU
    18  WHERE  AOU.ORGANIZATION_ID = OSE.ORGANIZATION_ID_CHILD
    19  START  WITH aou.name = '&company_name'
    20  CONNECT BY PRIOR ose.ORGANIZATION_ID_CHILD = ose.ORGANIZATION_ID_PARENT
    21  /
    Enter value for company_name: COMPANY 83
    old  19: START  WITH aou.name = '&company_name'
    new  19: START  WITH aou.name = 'COMPANY 83'
    NAME                                ASSIGNMENTS_COUNT
    COMPANY 83                                          5
    .....DIVISION 84                                    4
    ..........DEPARTMENT 134                            1
    ..........DEPARTMENT 135                            1
    scott@ORA92> -- method 2:
    scott@ORA92> COLUMN  name FORMAT A35
    scott@ORA92> WITH sub_query AS
      2  (SELECT ose.organization_id_parent, ose.organization_id_child,
      3            aou.name, COUNT (*) AS assignments
      4   FROM   per_org_structure_elements ose,
      5            hr_all_organization_units     aou,
      6            per_all_assignments_f     aaf
      7   WHERE  ose.organization_id_child = aou.organization_id
      8   AND    ose.organization_id_child = aaf.organization_id
      9   AND    aou.organization_id = aaf.organization_id
    10   GROUP  BY ose.organization_id_parent, ose.organization_id_child, aou.name)
    11  SELECT RPAD ('.', 5 * (LEVEL - 1), '.') || name AS name,
    12           (select SUM (assignments)
    13            from   sub_query
    14            start  with organization_id_child = t.organization_id_child
    15            connect by prior organization_id_child = organization_id_parent)
    16           AS assignments_count
    17  FROM   sub_query t
    18  START  WITH name = '&company_name'
    19  CONNECT BY PRIOR ORGANIZATION_ID_CHILD = ORGANIZATION_ID_PARENT
    20  /
    Enter value for company_name: COMPANY 83
    old  18: START  WITH name = '&company_name'
    new  18: START  WITH name = 'COMPANY 83'
    NAME                                ASSIGNMENTS_COUNT
    COMPANY 83                                          5
    .....DIVISION 84                                    4
    ..........DEPARTMENT 134                            1
    ..........DEPARTMENT 135                            1
    scott@ORA92> -- method 3:
    scott@ORA92> COLUMN  name FORMAT A35
    scott@ORA92> CREATE OR REPLACE VIEW sub_query AS
      2  SELECT ose.organization_id_parent, ose.organization_id_child,
      3           aou.name, COUNT (*) AS assignments
      4  FROM   per_org_structure_elements ose,
      5           hr_all_organization_units  aou,
      6           per_all_assignments_f      aaf
      7  WHERE  ose.organization_id_child = aou.organization_id
      8  AND    ose.organization_id_child = aaf.organization_id
      9  AND    aou.organization_id = aaf.organization_id
    10  GROUP  BY ose.organization_id_parent, ose.organization_id_child, aou.name
    11  /
    View created.
    scott@ORA92> SELECT RPAD ('.', 5 * (LEVEL - 1), '.') || name AS name,
      2           (select SUM (assignments)
      3            from   sub_query
      4            start  with organization_id_child = t.organization_id_child
      5            connect by prior organization_id_child = organization_id_parent)
      6           AS assignments_count
      7  FROM   sub_query t
      8  START  WITH name = '&company_name'
      9  CONNECT BY PRIOR ORGANIZATION_ID_CHILD = ORGANIZATION_ID_PARENT
    10  /
    Enter value for company_name: COMPANY 83
    old   8: START  WITH name = '&company_name'
    new   8: START  WITH name = 'COMPANY 83'
    NAME                                ASSIGNMENTS_COUNT
    COMPANY 83                                          5
    .....DIVISION 84                                    4
    ..........DEPARTMENT 134                            1
    ..........DEPARTMENT 135                            1

  • How to get the Table Level Constraints List

    hi all,
    i created a table as follows,
    create table temp(fld1 number, fld2 number, fld3 varchar2(10),
    constraint fld1_pk primary key (fld1),
    constraint fld2_uk unique (fld2) );
    table has created successfully.
    now i need to get list of constraints (constraint_names) in to Java.
    i checked user_tab_columns table and in that i got only nullable.
    how to get this one, with query;
    regards
    pavan

    Yes!
    SQL> select constraint_name, generated from user_constraints
      2  where table_name = 'EMP'
      3  /
    CONSTRAINT_NAME                GENERATED
    SYS_C003996                    GENERATED NAME
    SYS_C003997                    GENERATED NAME
    EMP_PRIMARY_KEY                USER NAME
    EMP_SELF_KEY                   USER NAME
    EMP_FOREIGN_KEY                USER NAME
    5 rows selected.
    SQL>Cheers
    Sarma.
    Message was edited by:
    Radhakrishna Sarma

  • 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

  • Work Order Smartforms.. How to get the Service level Items...

    Hi Experts,
    I am working on Work Order Smartform... I got everything but i am stucking at Service level Items... There is one Table called ESLL.. I am trying to fetch the data from that table but its not printing.. So, please help me regarding this issue.. any logic to implement it..
    Thanks in Advance
    Regards,
    Murlaikrishna

    Hi Karthik,
    For every PO we have item level data... in that we have Service level data tab. But there is no link between PO and Service level items to fetch, I have used the tables EKPO and ESLL for fetching the data from service level by usin PACKNO field.
    When I am writing the select statement for ESLL, service Item level data is not printing from ME23N...
    Thanks in Advance,
    Regards,
    Muralikrishna

  • How to get the count for every 30 mins

    Hi,
    Following is the table format:
    Time ******************** logged in users
    9/5/2006 8:38:22 PM**** 2
    9/5/2006 8:38:44 PM**** 4
    9/5/2006 8:40:22 PM**** 1
    9/5/2006 8:41:22 PM**** 3
    9/5/2006 8:52:22 PM**** 6
    9/5/2006 9:02:22 PM**** 5
    9/5/2006 9:04:24 PM**** 3
    9/5/2006 9:08:26 PM**** 4
    9/5/2006 9:10:28 PM**** 6
    What I need is number of users logged in for every 30 min
    like 9/5/2006 9:00:00(8:30 to 9:00) is 16
    9/5/2006 9:30:00(9:00 to 9:30) is 18
    Can any one help me in this regard?
    -Raj

    The trick is to group your times to every 30 min.
    Unfortunatly there is no way to TRUNC(30 min).
    But you can build this function yourself using some mathematical logic and trunc to build the groups.
    Look at this code piece:
    select trunc(sysdate) + trunc((sysdate - trunc(sysdate))*24*2)/24/2
    from dualInstead of sysdate use your date column and group by the expression.
    Added example using Dave's test data
    WITH t AS
            SELECT TO_DATE ('9/5/2006 8:38:22 PM', 'fmdd/mm/yyyy hh:mi:ss pm') tm,
                   2 num
              FROM DUAL
            UNION
            SELECT TO_DATE ('9/5/2006 8:38:44 PM', 'fmdd/mm/yyyy hh:mi:ss pm') tm,
                   4 num
              FROM DUAL
            UNION
            SELECT TO_DATE ('9/5/2006 8:40:22 PM', 'fmdd/mm/yyyy hh:mi:ss pm') tm,
                   1 num
              FROM DUAL
            UNION
            SELECT TO_DATE ('9/5/2006 8:41:22 PM', 'fmdd/mm/yyyy hh:mi:ss pm') tm,
                   3 num
              FROM DUAL
            UNION
            SELECT TO_DATE ('9/5/2006 8:52:22 PM', 'fmdd/mm/yyyy hh:mi:ss pm') tm,
                   6 num
              FROM DUAL
            UNION
            SELECT TO_DATE ('9/5/2006 9:02:22 PM', 'fmdd/mm/yyyy hh:mi:ss pm') tm,
                   5 num
              FROM DUAL
            UNION
            SELECT TO_DATE ('9/5/2006 9:04:24 PM', 'fmdd/mm/yyyy hh:mi:ss pm') tm,
                   3 num
              FROM DUAL
            UNION
            SELECT TO_DATE ('9/5/2006 9:08:26 PM', 'fmdd/mm/yyyy hh:mi:ss pm') tm,
                   4 num
              FROM DUAL
            UNION
            SELECT TO_DATE ('9/5/2006 9:10:28 PM', 'fmdd/mm/yyyy hh:mi:ss pm') tm,
                   6 num
              FROM DUAL)
    SELECT   SUM (num), trunc(tm) + trunc((tm - trunc(tm))*24*2)/24/2 halfhours
        FROM t
    GROUP BY trunc(tm) + trunc((tm - trunc(tm))*24*2)/24/2;
    Row#     SUM(NUM)     HALFHOURS
    1     16     09.05.2006 20:30:00
    2     18     09.05.2006 21:00:00Message was edited by:
    Sven Weller

  • How to get commerce item level taxAmount,shipTo details and etc?

    Hi ,
    How to get the commereceItem level taxAmount ,shipTo address details,price includes vat or not and discounts.
    Regards,
    Satya.

    Hi SatyaVenkat,
    You can call commerceItem.getShippingGroupRelationships(). It will return a list of commerceItem shippingGroupsRelationships.
    So, with it you will be able to get all commerceItem information, about shippingGroups (that contains shippingAddress), priceInfo (that contais tax and discounts) and so on.
    Hope it helps

  • How can I get the battery level of a connected Bluetooth device on my iPhone 4S?

    My Bluetooth device is the Merkury Hexagon Bluetooth speaker, I want to know how to get the its battery level, In the manual, it says there: "Speaker battery indicator will show right on your media device (iOS support only)
    Additional details:
    - I have the latest iOS
    - Not jailbroken
    - The speaker doesn't have a "battery indicator" on it

    this is not a build in part of any bluetooth profiles so to get that feature one needs third party software from the maker of the bluetooth device installed on the device in question
    so maybe you should look for apps made for mercury hexagon in app store?

  • 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

  • How to get the multidementional hierarchy level number ?

    Dear all,
    Could anyone tell me how to receive the hierarchy level number like the picture below:
    [click here for the Screenshot|http://yaoxin.de/download/level.jpg]
    as you can see, when i mouse hove on a level, it shows the level number.
    but, I want to get the level number 2 (node number 2) in query designer, but i can't find anywhere to show that.
    thank you for your kind help !
    Edited by: Xin Yao on Aug 26, 2011 1:04 PM

    hi Charlie Belt,
    Thank you very much for your answer.
    And yes, I do wish to perform a calculation based (aggregation) on the hierarchy level.
    How can I continue working on that?
    yao
    wish you have a nice weekend!

  • DSC Alarms: how to get the current alarm levels / setpoints

    I have a VI that can get the alarm levels for shared variables as they are set in the project library.
    But I have programmatically changed the values for the alarm levels, so the Distributed System Manager shows different levels as compared to what my VI displays.  I want the updated or current alarm levels - the ones that are retrieved by Read Alarms (called setpoints).
    I could use Read Alarms, but that only shows the shared variables that are in alarm.  I want all the shared variables in a process that is currently deployed.
    Any suggestions?
    BTW, is Distributed System Manager the same tool as Shared Variable Monitor?  I can't find the Shared Variable Monitor on my system.
    G

    Hi Gretchen,
    To answer your second question first, Shared Variable Monitor was the old name for what became Distributed System Manager. There was also some added functionality beyond just shared variables with DSM, so the name got changed. 
    As for suggestions regarding your application, I could use a little bit of clarification. I understand you're programmatically changing the alarm values and you want to display the values of your shared variables and their respective alarm states, correct? Also, when you're running your VI DSM does not update with the new alarm values (what happens when you hit the refresh button?). 
    I found a couple examples that may be useful moving forward Example 1, Example 2. These cover using shared variables and DSC's alarming features.
    Tim W.
    Applications Engineering
    National Instruments
    http://www.ni.com/support 

Maybe you are looking for

  • Jabber voicemail issue

    When we click on the voicemail icon within Jabber, we get "You are not signed in to your voicemail account. Go to the phone accounts tab..." When I go to File>Options>phone accounts and and enter my AD credentials for username and password, it says t

  • How to get phone out of restore mode or atleast switch on if i do not want to update ?

    I was on a call when my cell went into restore mode. When i connected it with itunes, it offered restore with an update. i got a sucky connection so it's not able to get the download in one go. so the real problem here is, how do i start my phone or

  • No response available

    Hi, this may seem like an obvious question but... here it goes anyway. PI is used to call receiver (web service) at an external company through soap channel. Sometimes, not often, I receive errors such as   <?xml version="1.0" encoding="UTF-8" standa

  • BI Estimation Model

    Many of you had gone through the BI implementation. I am looking for a Project effort estimation tool that is refined and worked for you. Please post your estimation experience with your model. If you have tool (probably Excel based), please send it

  • PGI Reversal for difference in POD

    HI I have a question with regard to Proof of Delivery We created sales order for 5 Qtys Created Delivery for 5 Qtys PGI done for 5 Qtys Physically delivered 4 Qtys POD confirmation for 4 Qtys with Difference Reason Billing for 4 Qtys But what will ha