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

Similar Messages

  • How to get the service name of a webservice using UDDI API

    Hi,
    Iam working on setting up a dynamic partner link in a BPEL, by passing the endpoint of a web service queried from the UDDI (Oracle Service Registry 10.3 ) using the API. Iam able to do it successfully.
    Now, for example I have two operations in my wsdl, one to createCustomer and the other to bookTicket. I need to get the operation name using UDDI API so that i can pass it along with the endpoint to the partner link. ie. When i need to createCustomer, my UDDI API code will need to get the service name createCustomer and the endpoint and I would pass them to the partnerlink and the createCustomer operation of my webservice would be called.
    Can any one help me to get the service names of the wsdl using UDDI APIs.
    Thanks,
    Ananth

    Hi sia,
    1. Table is APQI
    2. field name for session name is GROUPID
    regards,
    amit m.

  • How to get the service address from service address number

    Hi, IS-U Gurus:
    I got the service address number by passing business partner number to  BAPI 'BAPI_ISUPARTNER_GETDETAIL'
    On return table of "bapiisubpa", the first field is service number, but what we need is service address,
    How can I get the service address from service number ?
    Thanks in advance.
    Liang
    Edited by: Liang Ji on Apr 27, 2009 6:57 PM

    hi
    are u looking for business partner address?
    if so u can ref table but020, get its bp no. and then refer table but000 for its address.
    Regards,
    Sumedha

  • 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

  • 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.

  • 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 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 service master long text from the AC03

    Hi All,
    we are using the FM READ_TEXT  to read the long text for service master  which is maintained in AC03 ,Please can any one suggest me how to do the same.
    Get long description
    CALL FUNCTION 'READ_TEXT'
        EXPORTING
          id                            = LTXT
          language                = EN
          name                    =  '003000124'
          object                  = 'ASMD'
        TABLES
          lines                   = litab_line
        EXCEPTIONS
          id                      = 1
          language                = 2
          name                    = 3
          not_found               = 4
          object                  = 5
          reference_check         = 6
          wrong_access_to_archive = 7
          OTHERS                  = 8.
    Regards
    cb

    Hello
    Try this:
    CALL FUNCTION 'READ_TEXT'
        EXPORTING
          id                            = 'LTXT' " <- '' missed
          language                = 'EN' " <- '' missed
          name                    =  '000000000003000124' " <- 18 symbols must be here
          object                  = 'ASMD'
        TABLES
          lines                   = litab_line
        EXCEPTIONS
          id                      = 1
          language                = 2
          name                    = 3
          not_found               = 4
          object                  = 5
          reference_check         = 6
          wrong_access_to_archive = 7
          OTHERS                  = 8.

  • Work order interface : how to schedule the resources

    Hello,
    I am trying to reschedule a job and to replace the resources of this group by alternate resources : I have inserted one line in the WIP_JOB_SCHEDULE_INTERFACE and one line in the table and WIP_JOB_DTLS_INTERFACE.
    After importing these group, I get the following result :
    - the job is correctly reschedule (the start date is the start date I entered in the interface, and the end date is computed forward from this date).
    - the operation start date and end date are correct (same as the job dates)
    -the resources have been correctly changed (replaced by the replacement group)
    But the resource schedule dates have not changed .
    How can I have the resources reschedule using the interface ?
    Thanks in advance.

    Are you loading start_date and completion_date into wip_job_dtls_interface?
    Not the same as first_unit_start_date, last_unit_start_date, etc.

  • How to get the service from my old iphone onto the new one

    I've transfered everything from the old iphone to the new one but the service didn't transfer. I would like to be able to call and text.

    Carrier is the only one that can transfer services. If the phone takes a sim card you would need to swap it out unless its the new iphone 5 it takes a micro sim or if its a 3gs to a 4 they also have different size sim cards.

  • How to get the number of Item in Material Document?

    Hi all.
    I'm using the BAPI_GOODSMVT_CREATE, and want to get the Item number in Material Document of every entry in the internal table. How can I do that?
    Thanks in advance.

    Hi YiNing
    You can use this code after calling BAPI.
          SELECT SINGLE mblnr
           INTO CORRESPONDING FIELDS OF wa_mkpf
           FROM mkpf
           WHERE mblnr = p_mblnr.
          IF sy-subrc EQ 0.
            EXIT.
          ELSE.
            CALL FUNCTION 'RZL_SLEEP'
              EXPORTING
                seconds        = 2
              EXCEPTIONS
                argument_error = 1
                OTHERS         = 2.
          ENDIF.
    *Check material document number is in table MKPF
      CHECK wa_mkpf-mblnr IS NOT INITIAL.
      REFRESH : i_mseg[],i_ser03[],i_objk[]..
      SELECT matnr charg vfdat erfmg erfme mblnr zeile
             INTO CORRESPONDING FIELDS OF TABLE i_mseg
             FROM mseg
             WHERE mblnr = wa_mkpf-mblnr.
    Here you will get  the item in material number (ZEILE).
    Regards,
    Mukesh Kumar

  • 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 required List Item values by using Where Clause

    I have two tables named "TAX_RULES","BILL"
    1. " Tax_Rules" (Sub_Head_Code,Tax_ID,Tax_Percentage)
    { While "Sub_Head_Code" field is unique,
    Tax_ID describes that there are two kinds of Tax_IDs based on Tax_percentage which is 6% for some Sub_Head_Codes and 3.5% for the remainng Sub_Head_Codes. I have given Tax_ID 1 for 6% and Tax_ID 2 for Sub_Head_codes having 3.5%. }
    2. "BILL" (Bill_ID,Sub_Head_Code,Tax_ID,Bill_Amount)
    {While "Bill_ID" describes unique Bill Identification Number,
    Sub_Head_Code and Tax_ID are behaving like composite foreign key from Tax_Rules table}
    I have design form for both tables.
    In BILL form i am trying to get values of Tax_ID from Tax_Rules table at run-time by using WHEN-NEW-FORM-INSTANCE.
    For this whenever i select a Sub_Head_Code in Bill Form, all the Tax_IDs that i have recorded against each Sub_Head_Code which is either 1 or 2 against 6% and 3.5% respectively.
    But I want that whenever i select a "Sub_Head_Code", Only that Tax_ID which is associated with that Sub_Head_Code ahould come in the LIST ITEM.
    I have used WHERE clause but that is useless.
    Following is the Code that i have applied in the WHE-NEW-ITEM-INSTANCE Trigger at FORM LEVEL
    <CODE>
    DECLARE
         rg_n1 VARCHAR2(40) :='TAX_ID';
         rg_idn1 RecordGroup;
         gc_idn1 GroupColumn;
         errcode NUMBER;
    BEGIN
         CLEAR_LIST('BILL.TAX_ID');
         rg_idn1 := Find_Group(rg_n1);
    IF      Id_Null(rg_idn1) then
              rg_idn1 := Create_Group(rg_n1);
         gc_idn1 := Add_Group_Column(rg_idn1,'EXPLAIN',CHAR_COLUMN,60);     
              gc_idn1 := Add_Group_Column(rg_idn1,'TAX_ID',CHAR_COLUMN,3);
         END IF;
         errcode := Populate_Group_With_Query(rg_idn1,'select TAX_ID,TAX_ID from TAX_RULES');
         POPULATE_LIST('BILL.TAX_ID',RG_IDn1);
    END;
    </CODE>

    In the Tax Rules table, you state:
    "Sub_Head_Code" field is unique
    In the Bill table, you state:
    Sub_Head_Code and Tax_ID are behaving like composite foreign key from Tax_Rules table
    If the Sub_Head_Code is unique, then it's acting as a primary key, so Sub_Head_Code and Tax_ID in the Bill table are not behaving like a composite foreign key. The Sub_Head_Code is a foreign key, and the Tax_ID is irrelevant as far as keys are concerned.
    It is not clear what it is you want to do.
    If you want to display the Tax_IDs from the Bill table when you select a Sub_Head_Code from the Tax_Rules table, then change your query to:
    select TAX_ID, TAX_ID from BILL where Sub_Head_Code = :Tax_Rules.Sub_Head_Code
    If you want to display the Tax_IDs from the Tax_Rules table when you select a Sub_Head_Code from the Bill table, then change your query to:
    select TAX_ID, TAX_ID from TAX_RULES where Sub_Head_Code = :Bill.Sub_Head_Code
    If this is not what you want, then clarify what it is you want to do. Don't say:
    "I want that whenever i select a "Sub_Head_Code", Only that Tax_ID which is associated with that Sub_Head_Code"
    because it is not clear what tables you are referring to.

  • 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

Maybe you are looking for

  • Problem input parameter

    Hello I have a requirement, is that I have a infobjeto operation hour that has the hours that a transaction took place, and I had to build a structure with a range of times, but that touched me to the transformation of one substring operation time to

  • Trouble with Visible/Invisible Fields on PDF Form

    I created a fillable, calculating pdf form in Adobe Acrobat Pro 9, but ran into some issues, so I'm taking a stab at LiveCycle that I've never used before today.  By reviewing sample template forms, I'm able to pick up the tricks of the trade, but I'

  • Itunes will start to sync...then shut down

    i just bought a new 32 gig 3gs, and im tryin to sync the photos and apps that i had on my computer already. but as soon as i start to sync, a dialog box pops up that says itunes has stopped working. i totally un-installed itunes twice, re-installed t

  • SAP SAPFV45A encounters "Time_Out" while deleting thousands of items

    I am getting the error - "ABAP/4 runtime error - TIME_OUT" whenever I try to create a CN refering to a Billing Doc with 7000+ line items. Steps to re-produce - 1. At the Create Sales Order screen, enter the field value below - Type 'CR', SalesOrg 'SG

  • Events created on my 700p will not transfer to my desktop!

    It has cost me work!!!!!! If I modify the event after trying to sync it will transfer, but not with simply creating the event. Events created on the desktop will transfer to 700p. I'm using Missing sync. Please help!!!!!! 1.33 gig powerbook, 1.25 ram