Report Problem: HR Pay-roll report in particaular date (period) slab

Dear Experts,
                    I have created a zreport for payroll in which i am also using the logical database called PNP selectioon, but when we execute the report for the output, It always shows the output of one month wise only. But the requirement for the problem is that, data should display with in selected period(with in start date to end date), which is not showing the report. Kindly help me to sort out this problem as soon as possible.? If possible do suggest your advices with program code?
Warm Regards,
Amit

Plz tell where i have to manipulate.
START-OF-SELECTION.
GET PERNR.
    RP-PROVIDE-FROM-LAST p0000 space pn-begda pn-endda.
    IF pnp-sw-found EQ 0.
      MESSAGE s089(hrpadin01) WITH '0000' pernr-pernr pn-begda pN-endda.
*        There is no infotype & for personnel no & from period & to &
     PERFORM build_error TABLES hr_error
                         USING space sy-msgid sy-msgno
                         sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
     REJECT.
   ENDIF.
   RP-PROVIDE-FROM-LAST P0001 SPACE PN-BEGDA PN-ENDDA.
   IF PNP-SW-FOUND EQ 0.
     MESSAGE s089(hrpadin01) WITH '0001' pernr-pernr pn-begda pn-endda.
*   There is no infotype & for personnel no & from period & to &
    PERFORM build_error TABLES hr_error
                        USING space sy-msgid sy-msgno
                        sy-msgv1  sy-msgv2  sy-msgv3  sy-msgv4.
    REJECT.
  ENDIF.
IF PNP-SW-FOUND EQ 0.
     MESSAGE s089(hrpadin01) WITH '0002' pernr-pernr pn-begda pn-endda.
*   There is no infotype & for personnel no & from period & to &
    PERFORM build_error TABLES hr_error
                        USING space sy-msgid sy-msgno
                        sy-msgv1  sy-msgv2  sy-msgv3  sy-msgv4.
    REJECT.
  ENDIF.
PROVIDE  * FROM p0001
          * FROM P0009
          * FROM P2001
          * FROM P0014
          * FROM P0015
          BETWEEN PN-BEGDA AND PN-ENDDA.
ENDPROVIDE.
   PERFORM read_cluster.
*  IF rp-imp-cd-subrc = 0 AND sy-subrc = 0.
    PERFORM get_it_final.
* ENDIF.
END-OF-SELECTION.
  SORT it_final BY pernr.
************************************* Add On 07/06/2010 ************************************************
Loop At it_final.
      move-corresponding it_final TO it_final2.
      APPEND it_final2.
Endloop.
DESCRIBE TABLE it_final2 LINES count.
  IF count = 0.
    CALL FUNCTION 'POPUP_TO_INFORM'
      EXPORTING
        titel  = 'Process Discontinued'
        txt1   = 'No Payroll Results available for'(007)
        txt2   = 'employee/employees selected for this criteria'(008)
      EXCEPTIONS
        OTHERS = 1.
    EXIT.
  ENDIF.
  PERFORM DISPLAY_ALV.
*&      Form  READ_CLUSTER
FORM READ_CLUSTER .
  CLEAR : trgdir, trt.
  REFRESH : trgdir,trt.
  DATA : mon(2) TYPE c, year(4) TYPE c, month(10) TYPE c.
  cd-key-pernr = p0001-pernr. "Key for cluster directory
  rp-imp-c2-cu.               "Read cluster cu from c2.
  CHECK rp-imp-cd-subrc EQ 0.
  LOOP AT rgdir WHERE fpbeg >= pn-begda AND fpend <= pn-endda.
    MOVE-CORRESPONDING rgdir TO trgdir.
    APPEND trgdir.
  ENDLOOP.
SORT trgdir BY seqnr DESCENDING
                fpend DESCENDING.
LOOP at trgdir.
  READ TABLE trgdir INDEX 1.
  IF sy-subrc = 0.
    mon = trgdir-fpbeg+4(2).
    year = trgdir-fpbeg+0(4).
    CASE mon.
      WHEN  '01'.
        month = 'January'.
      WHEN '02'.
        month = 'February'.
      WHEN '03'.
        month = 'March'.
      WHEN '04'.
        month = 'April'.
      WHEN '05'.
        month = 'May'.
      WHEN '06'.
        month = 'June'.
      WHEN '07'.
        month = 'July'.
      WHEN '08'.
        month = 'August'.
      WHEN '09'.
        month = 'September'.
      WHEN '10'.
        month = 'October'.
      WHEN '11'.
        month = 'November'.
      WHEN '12'.
        month = 'December'.
    ENDCASE.
    CONCATENATE month year INTO period SEPARATED
    BY space.
ENDIF.
  rx-key-seqno = trgdir-seqnr.
  rx-key-pernr = p0001-pernr.
  rp-imp-c2-in.
*  CHECK rp-imp-in-subrc EQ 0.
  trt[] = rt[].
ENDLOOP.
ENDFORM.                    " READ_CLUSTER
*&      Form  GET_IT_FINAL
FORM GET_IT_FINAL .
  CLEAR : it_final.
loop at p0009.
  CASE p0009-zlsch.
     WHEN 'C'.
      it_final-pmode = 'Cheque'.
      it_final-zlsch = 'C'.
   WHEN 'E' OR ' '.
      it_final-pmode = 'Cash Payment'.
      it_final-zlsch = ' '.
   WHEN 'H'.
      it_final-pmode = 'HOLD'.
      it_final-zlsch = 'H'.
   WHEN 'D'.
      it_final-pmode = 'DRAFT PAYMENT'.
      it_final-zlsch = 'D'.
   WHEN 'O'.
      it_final-pmode = 'Onsite Payment'.
      it_final-zlsch = 'O'.
   WHEN 'T'.
      it_final-pmode = 'Bank Transfer'.
      it_final-zlsch = 'T'.
  ENDCASE.
*  LOOP AT ptrt.
*    CASE ptrt-lgart.
*      WHEN '/560'.
*        it_final-pnetmt = ptrt-betrg.
*      WHEN '/101'.
*        it_final-pgrsmt = ptrt-betrg.
*    ENDCASE.
*  ENDLOOP.
  LOOP AT trt.
    CASE trt-lgart.
*      WHEN '/560' OR '/559' OR '/557'.
*       clear:it_final-netmt.
*        IF p0009-zlsch EQ space AND trt-lgart EQ '/560'.
*          it_final-netmt = trt-betrg.
*        ENDIF.
*        IF ( p0009-zlsch EQ 'T' OR p0009-zlsch EQ 'C' ) AND trt-lgart EQ '/559'.
*          it_final-netmt = trt-betrg.
*        ENDIF.
*        IF p0009-zlsch EQ 'E' AND trt-lgart EQ '/557'.
*          it_final-netmt = trt-betrg.
*        ENDIF.
*  break abap.
      WHEN '/560'.
        it_final-netmt = trt-betrg.
      WHEN '1001'.
        it_final-w1001 = trt-betrg.
      WHEN '1002'.
        it_final-w1002 = trt-betrg.
      WHEN '1003'.
        it_final-w1003 = trt-betrg.
      WHEN '1004'.
        it_final-w1004 = trt-betrg.
      WHEN '1005'.
        it_final-w1005 = trt-betrg.
      WHEN '1006'.
        it_final-w1006 = trt-betrg.
      WHEN '1007'.
        it_final-w1007 = trt-betrg.
      WHEN '1008'.
        it_final-w1008 = trt-betrg.
      WHEN '1009'.
        it_final-w1009 = trt-betrg.
      WHEN '1010'.
        it_final-w1010 = trt-betrg.
      WHEN '1011'.
        it_final-w1011 = trt-betrg.
      WHEN '1012'.
        it_final-w1012 = trt-betrg.
      WHEN '1013'.
        it_final-w1013 = trt-betrg.
      WHEN '1014'.
        it_final-w1014 = trt-betrg.
      WHEN '1015'.
        it_final-w1015 = trt-betrg.
      WHEN '1016'.
        it_final-w1016 = trt-betrg.
      WHEN '1017'.
        it_final-w1017 = trt-betrg.
      WHEN '1018'.
        it_final-w1018 = trt-betrg.
      WHEN '1019'.
        it_final-w1019 = trt-betrg.
      WHEN '1020'.
        it_final-w1020 = trt-betrg.
      WHEN '1022'.
        it_final-w1022 = trt-betrg.
      WHEN '1023'.
        it_final-w1023 = trt-betrg.
      WHEN '4002'.
        it_final-w4002 = trt-betrg.
      WHEN '/101'.
        it_final-grsmt = trt-betrg.
      WHEN '/3F1'.
        it_final-pfamt = trt-betrg.
      WHEN '/3E1'.
        it_final-esimt = trt-betrg.
      WHEN '/460'.
        it_final-incmt = trt-betrg.
      WHEN '/3P3'.
        it_final-prfmt = trt-betrg.
    ENDCASE.
  ENDLOOP.
  LOOP AT p2001.
    CASE p2001-subty.
      WHEN 'ADVA'.
        it_final-advlv = it_final-advlv + p2001-abwtg.
*      WHEN 'ANNU'.
*        it_final-annlv = it_final-annlv + p2001-abwtg.
*      WHEN 'LWPL'.
*        it_final-lwplv = it_final-lwplv + p2001-abwtg.
       WHEN 'MATR'.
        it_final-matlv = it_final-matlv + p2001-abwtg.
      WHEN 'OPTL'.
        it_final-optlv = it_final-optlv + p2001-abwtg.
      WHEN 'PROB'.
        it_final-prblv = it_final-prblv + p2001-abwtg.
      WHEN 'PT04' OR 'PT06' OR 'PT08' OR 'PT28' OR 'PT30' OR 'PT35' OR 'PT40' OR 'PT45'.
        it_final-ptnlv = it_final-ptnlv + p2001-abwtg.
      WHEN 'SP30' OR 'SPCL'.
        it_final-spllv = it_final-spllv + p2001-abwtg.
    ENDCASE.
  ENDLOOP.
PROVIDE * FROM P2001 BETWEEN PN-BEGDA AND PN-ENDDA.
  IF P2001-SUBTY = 'ANNU'.
     it_final-annlv = it_final-annlv + p2001-abwtg.
  ENDIF.
    IF P2001-SUBTY = 'LWPL'.
       it_final-lwplv = it_final-lwplv + p2001-abwtg.
    ENDIF.
ENDPROVIDE.
  LOOP AT p0014.
     CASE p0014-subty.
     WHEN '2006'.
       it_final-miscded = p0014-BETRG.
     WHEN '2007'.
        it_final-advrec = p0014-BETRG.
*     WHEN '0588'.
*        it_final-arier = p0014-lgart.
     ENDCASE.
  ENDLOOP.
LOOP AT p0015.
     CASE p0015-subty.
     WHEN '2006'.
       it_final-miscded = p0015-BETRG.
     WHEN '2007'.
        it_final-advrec = p0015-BETRG.
*     WHEN '0588'.
*        it_final-arier = p0015-lgart.
     ENDCASE.
  ENDLOOP.
  it_final-totlv = it_final-advlv + it_final-annlv + it_final-lwplv + it_final-matlv +
                   it_final-optlv + it_final-prblv + it_final-ptnlv + it_final-spllv.
  it_final-pernr = p0001-pernr.
  it_final-ename = p0001-ename.
  it_final-btrtl = p0001-btrtl.
  it_final-bkplz = p0009-bkplz.
  it_final-bankl = p0009-bankl.
*  it_final-vargr = it_final-pgrsmt - it_final-grsmt.
*  it_final-varnt = it_final-pnetmt - it_final-netmt.
*PROVIDE * FROM P2001 BETWEEN PN-BEGDA AND PN-ENDDA.
  READ TABLE p0027 WITH KEY pernr =  pernr-pernr
                            subty = '01'.
  it_final-kostl = p0027-kst01.
  SELECT SINGLE ktext INTO it_final-ktext
  FROM cskt
  WHERE kostl EQ it_final-kostl
  AND   spras EQ 'E'.
  SELECT SINGLE btext INTO it_final-btext
  FROM t001p
  WHERE werks EQ p0001-werks
  AND   btrtl EQ p0001-btrtl
  AND   molga EQ '40'.
  SELECT SINGLE banka INTO it_final-bname FROM bnka
  WHERE banks EQ 'IN' AND
        bankl EQ p0009-bankl.
  it_final-ac_no = p0009-bankn.
  DATA:month like T009B-BUMON,
       yr  like T009B-BDATJ,
       totday like T009B-BUTAG.
      yr = pn-begda(4).
      month = pn-begda+4(2).
  CALL FUNCTION 'NUMBER_OF_DAYS_PER_MONTH_GET'
    EXPORTING
      PAR_MONTH       = month
      PAR_YEAR        = yr
   IMPORTING
     PAR_DAYS        = totday.
it_final-ondays = totday - it_final-lwplv.
APPEND it_final.
*ENDPROVIDE.
ENDLOOP.
Edited by: akg.amit on Mar 10, 2011 9:48 AM

Similar Messages

  • Reg:pay roll

    Hi Expertrs,
    Can anybody help me out the step by step process to complete pay roll process.
    Regards,
    vreddy

    Hai..
    Pls find some of the steps that are most commonly used in the Payroll Configurations :
    The steps are identical for Attendances also.
    The Configuration for Payroll:
    The Configuration of payroll needs to be done at different places in IMG. They can be divided into 6 main steps for ease of handling.
    They are
    o Configuring Payroll area
    o Basic Pay
    o Wage types
    o Pay roll organization
    o infotypes
    o Payroll run
    1.Configuration of Payroll Area
    o Create Payroll Area
    o Create Control record
    o Default Payroll Area.
    2.Configuration of Basic Pay:
    o Define EE subgroup grouping for PCR and CAP.
    o Check Payscale Type .
    o Check Payscale Area.
    o Check Assignment of Payscale structure to Enterprise Structure.
    o Modify feature TARIF.
    o Create Payscale groups and levels
    o Define pay scale salary ranges
    3.Configuration of Wage types:
    o Create a Basic pay wage type
    o Check the wage type group “Basic Pay”
    o Check entry permissibility per infotype
    o Check Wage type characteristics
    o Define Employee subgroup grouping for primary wage type
    o Define Personnel Subarea grouping for primary wage type
    o Define Wage type permissibility per PS and ESG.
    o Define Enterprise structure for wage type models.
    o Revise Default wage types
    o Define valuation of base wage types.
    4.Configuration of Pay roll Organisation:
    o View the period modifiers
    o View the existing Date modifiers
    o Generate the Pay roll periods
    5.Configuration of Infotypes
    o Create the necessary infotypes through PA 40/PA30.
    6.Payroll Run:
    SAP Easy Access->Human Resources->Payroll-> Americas->USA->Payroll-> Simulation.
    PATHS
    Assigning Personnel Calculation Rules to Employee subgroups
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Define EE Subgroup Grouping for PCR and Coll.Agrmt Prov.
    Defining the Collective Agreement Provision for Employee Subgroups
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Define EE Subgroup Grouping for PCR and Coll.Agrmt Prov.
    Defining Pay Scale Types and Areas
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Check Pay Scale Type
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Check Pay Scale Area
    Assigning Pay Scale Types and Areas to Personnel Subareas
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Check Assignment of Pay Scale Structure to Enterprise Structure.
    Defining Pay Scale Groups and Levels
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Revise Pay Scale Groups and Levels
    TARIF Feature
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Determine Default for Pay Scale Data
    Wage Type Copy Function
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Wage Types &#61664; Create Wage Type Catalog
    Checking the Wage Type Group for Basic Pay
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Wage Types &#61664; Check Wage Type Group ‘Basic Pay’
    Checking the Permissibility of Wage Types
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Wage Types &#61664; Check Wage Type Catalog &#61664; Check Entry Permissibility per Infotype
    Checking Wage Type Characteristics
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Wage Types &#61664; Check Wage Type Characteristics
    Employee Subgroup Groupings for Primary Wage Types
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Wage Types &#61664; Employee Subgroups for Primary Wage Type
    Personnel Subarea Groupings for Primary Wage Types
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Wage Types &#61664; Personnel Subareas for Primary Wage Type
    Wage Type Permissibility per Personnel Subarea and Employee Subgroup
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Wage Types &#61664; Define Wage Type Permissibility for each PS and ESG
    Defining Default Values for Wage Types and the Wage Type Model
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Wage Types &#61664; Revise Default Wage Types
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Wage Types &#61664; Enterprise Structure for Wage Type Model
    Defining Valuation of Base Wage Types
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Wage Types &#61664; Define Valuation of Base Wage Types
    Assigning Bonus Wage Types (Module Name TARIF, VARIANT B-D) to Pay Scale Groups and Levels
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Pay Scale Groups and Levels
    Defining Annual Salaries (if this is relevant for your country)
    IMG: Personnel Management &#61664; Personnel Administration &#61664; Payroll Data &#61664; Basic Pay &#61664; Define Annual Salary
    The above steps will be usefull till Gross Part of the payroll

  • Problem in filling jasper report with XML Data source

    Hello!
    I am trying to build a report uxing xml data source..Please verify following code:
    String outFileName = "c:/Report1.pdf";
    File xmlFileName = new File("C:/Program Files/JasperSoft/iReport-1.2.5/report.jrxml");
    String recordPath = "/SiteDetails/Site";
    JasperDesign jasperDesign = JRXmlLoader.load(xmlFileName);
    JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
    JRXmlDataSource jrxmlds = new JRXmlDataSource(new File("c:/NewSite.xml"),recordPath);
    HashMap hm = new HashMap();
    try
    JasperPrint print = JasperFillManager.fillReport(jasperReport,hm,jrxmlds);
    JRExporter exporter = new net.sf.jasperreports.engine.export.JRPdfExporter();
    exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME,outFileName);
    exporter.setParameter(JRExporterParameter.JASPER_PRINT,print);
    exporter.exportReport();
    catch (JRException jre)
    jre.printStackTrace();
    catch (Exception e)
    e.printStackTrace();
    My Xml file is:
    <?xml version="1.0" encoding="UTF-8"?>
    <SiteDetails>
    <Site>
    <Name>Site1</Name>
    <Addr>Bangalore</Addr>
    <supersiteid>null</supersiteid>
    </Site>
    <Site>
    <Name> Site2</Name>
    <Addr> Madras</Addr>
    <supersiteid>Site1</supersiteid>
    </Site>
    </SiteDetails>
    I want to display details of Siteand Address..My program works fine but displays only 1 (first) record...What should i do to display the full file..do i need to navigate thru the file and give that as an input to fillReport ()method...

    Hi,
    Have a look at below URL.
    http://ireport.sourceforge.net/cap7.html#7.4
    Regards
    VInK

  • List of emp for whom rebate is not considered in pay roll

    hi experts,
    can any one help me to get the list of employees for whom rebate is not considered for income tax calculation in pay roll run.
    its urgent.
    thanks in advance
    shiva

    As suggested try with wage type reporter identify the wage type for rebate and execute it for all employee so that you will get information for whom it is considered.
    Regards
    Venkatesh

  • HCM- Data before pay roll run

    Hi,
    I want to confirm one scenario as below.
    Third party is requesting Pay roll data(which exactly the same after payroll run) 4 days prior to the payroll run for the current pay period.So that they will have a look and approve it.I am not sure whether it is possible or not. If you had an experience or thoughts please share it.
    Appreciate if you give some standard report names if available to get this data.
    Thanks,
    Ravi Visarapu.

    Thanks for your reply. I am not sure that simulated data can be down load to file or not.
    If yes, would you please mention the way that i have to follow up
    One more thing, does the simulation calculates the actual time hours payperiod start date to the current date(execution date) ,not to the period end date.right?__

  • How will you do for November pay roll before release the Note:2082383.

    < Japanese translation is below.>
    Dear Experts (Especially for Responsible for Japan pay roll),
    Please le me know how you will deal with November pay roll before releasing note:2082383.
    (The legal change of non-taxable amount of Commuting Allowance for Car.)
    Note 2082383 is going to be released by SAP on November 30.
    However, Japanese low has effected since October 20 2014.
    How will you deal for November pay roll for Japan before note releasing ?
    Will you change V_T5J64 table by your self according to Cabinet Order #338?
    Or will you just wait until SAP releasing this note ?
    Do you think that SAP will provide any report for this recovery way for November pay roll if we wait SAP note releasing ?
    Regards,
    Mayumi
    < Japanese version >
    Expertの皆様
    先日、官報#338が出され、10/20 より施行されていると存じます。
    SAPの当該ノートは11月30日にしかリリースされないようですが、皆様、11月の給与はどのように行いますか?
    V_T5J64を官報の情報に合わせて変更し、当座11月の給与を回しますか?
    それともSAPのノートリリースを待ちますか?
    SAPのノートリリースでは、11月の給与が古い方法で施行されたことによるリカバリレポートなど出るのでしょうか?
    以上、皆様の対応方法をお尋ねいたしたく。
    よろしくお願いいたします。
    Mayumi

    Hi,
    Ask SAP directly with regards to the way they will handle this and whether they will produce a report to recover. Speak to the Japanese revenue and explain to them that you are in this predicament and I am sure they will be able to give you a leeway till November, but still be able to report on the Oct figures.
    Off course you can try the config changes yourself. Pilot the note in Dev and see if the figures make any sense. But this will be dual work as when the note gets released in Nov you will have to revisit your configs and undergo a complete check. Get in touch with SAP in my opinion! 
    Aran  

  • Discoverer report returns no data from a certain time

    Using Discoverer 10g,a discoverer report which returned data normally last month gets to return no data now.
    We have four same environments, and two of them has this problem, two is OK.
    And the SQL of the discoverer of the four environments are the same.
    We have no any changment of this discoverer and related EUL for more than one year....
    How should we investigate into this issue.
    For example ,a point we should notice or something...
    Could somebody give us a suggestion?
    Thank you.

    Thanks for your qiuck reply.
    1.empty table that is joined in the query.The four environments has almost the same data,it is not the cause.
    2.security issue with the data, maybe the security definitions are different from one environment to another.we are now invesgate into this cause.
    and there is a sql of the discoverer's EUL which shows no data in a enviroment(in this enviroment discoverer report gets no data), but in another enviroment data can show.
    the sql is as following.
    =============
    SELECT loc_bu.org_id
    ,loc_bu.location_id building_id
    ,loc_bu.building building_name
    ,loc_bu.location_code building_number
    ,loc_fl.location_id floor_id
    ,loc_fl.location_code floor_number
    ,loc_fl.floor floor_name
    ,loc_of.location_id office_id
    ,loc_of.location_code office_number
    ,loc_of.office office_name
    ,loc_of.suite office_suite
    ,loc_of.location_alias office_alias
    ,loc_of.assignable_area office_assignable_area
    ,loc_of.space_type_lookup_code office_space_type_code
    ,lst.meaning office_space_type
    ,loc_of.function_type_lookup_code office_function_type_code
    ,fun.meaning office_function_type
    ,(SELECT ffv.description
    FROM fnd_flex_values_vl ffv
    ,fnd_flex_value_sets ffvs
    WHERE ffv.flex_value = loc_of.attribute1
    AND ffv.flex_value_set_id = ffvs.flex_value_set_id
    AND ffvs.flex_value_set_name = 'MB_PN_ON') occupancy_exception_flag
    ,loc_of.active_start_date
    ,loc_of.active_end_date
    --ADD BY KEVIN 2008/6/26 START
    ,loc_of.attribute7 division_code_office
    ,(SELECT ffv.description
    FROM fnd_flex_values_vl ffv
    ,fnd_flex_value_sets ffvs
    WHERE ffv.flex_value = loc_of.attribute7
    AND ffv.flex_value_set_id = ffvs.flex_value_set_id
    AND ffvs.flex_value_set_name = 'MB_PN_DIVISION') division_description_office --ヌヨ-ホ・ヒオテ・
    --ADD BY KEVIN 2008/6/26 END 
    FROM pn_locations loc_bu
    ,pn_locations loc_fl
    ,pn_locations loc_of
    ,fnd_lookups fun
    ,fnd_lookups lst
    WHERE loc_bu.location_id = loc_fl.parent_location_id
    AND loc_bu.location_type_lookup_code IN ('LAND', 'BUILDING')
    AND nvl(loc_bu.attribute6, '99') <> '01'
    AND loc_fl.location_id = loc_of.parent_location_id
    AND loc_fl.location_type_lookup_code IN ('FLOOR', 'PARCEL')
    AND nvl(loc_fl.attribute6, '99') <> '01'
    AND loc_of.location_type_lookup_code IN ('OFFICE', 'SECTION')
    AND nvl(loc_of.attribute6, '99') <> '01'
    AND loc_of.function_type_lookup_code = fun.lookup_code(+)
    AND fun.lookup_type(+) = 'PN_FUNCTION_TYPE'
    AND loc_of.space_type_lookup_code = lst.lookup_code(+)
    AND lst.lookup_type(+) = decode(loc_of.location_type_lookup_code,
    'OFFICE',
    'PN_SPACE_TYPE',
    'SECTION',
    'PN_PARCEL_TYPE')
    AND nvl(loc_of.space_type_lookup_code,'99') <> '07';
    ====================
    Ps.before excute this sql, we always first excute following command.
    ====
    begin
    fnd_client_info.set_org_context(117);
    end;
    ====
    The analyst of our team is not very good at the security problem, could you help us?
    Thanks a lot.

  • ORACLE reports Build 10g - Data Model - query - If statement in Alias ?

    I have the following select statement. It has the alias Survivors, Deaths and "All
    With the ORACLE reports Build 10g - Data Model - I have the following query statement. I require the alias to change. Can the following be done.
    Cases". Is it posible to use :P_LANGUAGE variable to say that -- IF :P_LANGUAGE = FRENCH THEN alias are Survivants for survivors, Décès for Deaths, Tous_les_cas for All Cases. Please advise
    SELECT ALL T_NTR_MULTIBAR.CAT, T_NTR_MULTIBAR.NUM_CASES_LEFTBAR AS Survivors,
    T_NTR_MULTIBAR.NUM_CASES_MIDDLEBAR AS Deaths, T_NTR_MULTIBAR.NUM_CASES_RIGHTBAR AS "All Cases"
    FROM T_NTR_MULTIBAR
    WHERE INSTANCE_NUM = :P_INSTANCENUM
    order by ORDERS

    It is no problem, you can automatically change the complete query before the report is running, which delivers you different kind of values. But the alias names does not change in the group of the data-model, although two query are running with different alias names at different times. In the data model you see the alias names of the first implemented select statement, which are the column fields in the layout.

  • SSRS report not displaying data in correct order

    Guys,
    I have a SSRS 2012 report not displaying returned records from SQL in the correct order.  Running the stored procedure in SSMS and supplying the parameter values returns the data correctly and running Query Designer in SSRS using the stored procedure
    on the dataset in question, likewise returns the data correctly.  Only when I run the actual report does the data display incorrectly(always last name order).  I've done similar reporting using very similar stored procedures and I've never had this
    problem.  Below is the stored procedure.  "@SortBy" is the parameter with the sorting value. 1=Due Date; 2=Denial Amt and 3=Last name and is passed by SSRS to SQL.  Wish I could supply screen shots.  
    Thanks for any help,
    Dave
    ALTER PROCEDURE [dbo].[RAC_PT_List]
    @Level as int,
    @SortBy as int,
    @PTLName as varchar(30) = NULL,
    @User as varchar(10) = NULL
    AS
    SELECT pat.headerID,
    pat.PT_LName + ', ' + pat.PT_FName AS PTName,
    pat.PT_AcctNo,
    rco.RCO_CLMREF,
    rco.RCO_AppealLevel,
    rco.RCO_LevelNo,
    rco.RCO_AuditorStatus,
    let.LET_DEN_DueDate,
    CONVERT(varchar(12),let.LET_DEN_DueDate) as DueDate,
    let.LET_DEN_Dollars,
    let.userID
    FROM Master_PT_List pat
    INNER JOIN Master_RCO_Work rco on RCO.PT_headerID = pat.headerID
    INNER JOIN Master_Letters let on LET.PT_headerID = pat.headerID
    WHERE (@PTLName IS NULL OR(pat.PT_LName LIKE + '%' + @PTLName + '%'))
    AND (rco.RCO_LevelNo = @Level)
    AND (let.userID = @User)
    --AND (rco.RCO_AuditorStatus <> 'Closed' and rco.RCO_AdminStatus <> 'Closed')
    ORDER BY 
    CASE WHEN @SortBy = '1' THEN LET_DEN_DueDate
    END
    DESC,
    CASE WHEN @SortBy = '2' THEN let.LET_DEN_Dollars
    END
    DESC,
    CASE WHEN @SortBy = '3' THEN pat.PT_LName
    END

    Hi DaveMac1960,
    According to your description, when you render data in report, you find it always shows the data with unexpected order. Right?
    In Reporting Services, if we don't set any sorting in tablix, it will order the data as your query in SSMS or Query Builder. In some scenario, for example, we add parent group for data rows, it will have the rows sort by the group on data field by default,
    and the "order by" in your query will be ignored. So please check the Sorting tab in Tablix Properties, in this scenario, we suggest you delete any sorting in the Sorting tab so that the "Order By" clause can work.
    Reference:
    Sort Data in a Data Region (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to create a report using XML data source from Crystal Report Designer

    Hi,
    Iu2019m having Crystal Report Designer XI R2 SP4. Iu2019m trying to create a report using XML data source stored on disk. This is a customer order report and the xml is structured in such a way that it has an order details header part (master) and then it has several order lines (detail). One order line can have several order line characteristics (detail-detail). So what I need to know is now I can design this layout from the designer. If this was done using views I can do it with sub-reports but using xml data this seems to be different. Can you help me to design this layout? I have included the xml and xsd as well.
    Thank you in advance.
    Regards,
    Chanaka
    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <CUSTOMER_ORDER_CONF_REP_REQUEST xmlns:xsi="http://www.w3.org/2001/XMLSchema" xmlns="urn:ifsworld-com:customer_order_conf_rep">
        <CUSTOMER_ORDER_CONF_REP>
            <ORDER_NO>D555809</ORDER_NO>
            <PRINTED_DATE>2009-03-26T08:52:54</PRINTED_DATE>
            <AUTHORIZE_NAME>Chanaka</AUTHORIZE_NAME>
            <CUSTOMER_NO>CU-1473-INV</CUSTOMER_NO>
            <CUST_NAME>Mr.Johan Matts</CUST_NAME>
            <SHIP_ADDR_1>93,Main Street</SHIP_ADDR_1>
            <SHIP_ADDR_2>Negambo Road</SHIP_ADDR_2>
            <SHIP_ADDR_3>Watthala</SHIP_ADDR_3>
            <SHIP_ADDR_4>SRI LANKA</SHIP_ADDR_4>
            <BILL_ADDR_1>93,Main Street</BILL_ADDR_1>
            <BILL_ADDR_2>Negambo Road</BILL_ADDR_2>
            <BILL_ADDR_3>Watthala</BILL_ADDR_3>
            <BILL_ADDR_4>SRI LANKA</BILL_ADDR_4>
            <CUSTOMER_PO_NO>112984638</CUSTOMER_PO_NO>
            <CUSTOMER_FAX>112984639</CUSTOMER_FAX>
            <CUSTOMER_EMAIL>abcbababab</CUSTOMER_EMAIL>
            <ORDER_LINES>
                <ORDER_LINE>
                    <LINE_NO>1</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP11</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>iPod</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>1200</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>1200</PRICE_TOTAL>
                    <DISCOUNT>0</DISCOUNT>
                    <PRICE_QTY>1</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID xsi:nil="1"/>
                            <CHARACTERISTIC_VALUE xsi:nil="1"/>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
                <ORDER_LINE>
                    <LINE_NO>2</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP24</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>XGA Projector</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>500</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>1500</PRICE_TOTAL>
                    <DISCOUNT>0</DISCOUNT>
                    <PRICE_QTY>3</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free Instalation</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
                <ORDER_LINE>
                    <LINE_NO>3</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP02</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>Sony DVD Player</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>1000</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>1000</PRICE_TOTAL>
                    <DISCOUNT>0</DISCOUNT>
                    <PRICE_QTY>1</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free 5 DVDs</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
                <ORDER_LINE>
                    <LINE_NO>4</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP99</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>Flatscreen TV</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>1500</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>1350</PRICE_TOTAL>
                    <DISCOUNT>10</DISCOUNT>
                    <PRICE_QTY>1</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free Delivery</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>2</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>1 year additional warranty</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
                <ORDER_LINE>
                    <LINE_NO>5</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP56</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>Sony MP3 Player</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>200</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>400</PRICE_TOTAL>
                    <DISCOUNT>0</DISCOUNT>
                    <PRICE_QTY>2</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free carry belt</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>2</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free promotional 4GB memory bar</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>3</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>No warranty on memory bar</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
            </ORDER_LINES>
        </CUSTOMER_ORDER_CONF_REP>
    </CUSTOMER_ORDER_CONF_REP_REQUEST>
    XSD
    <?xml version="1.0" encoding="UTF-8"?>
    <?report  module="ORDER" package="CUSTOMER_ORDER_CONF_REP" ?>
    <xs:schema targetNamespace="urn:ifsworld-com:customer_order_conf_rep" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:ifsworld-com:customer_order_conf_rep" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="CUSTOMER_ORDER_CONF_REP_REQUEST">
    <xs:complexType>
    <xs:all minOccurs="1" maxOccurs="1">
    <xs:element name="CUSTOMER_ORDER_CONF_REP">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="50">
    <xs:element name="ORDER_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="PRINTED_DATE" type="xs:dateTime" nillable="true" minOccurs="0"/>
    <xs:element name="AUTHORIZE_NAME" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_PO_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUST_NAME" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SHIP_ADDR_1" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SHIP_ADDR_2" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SHIP_ADDR_3" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SHIP_ADDR_4" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="BILL_ADDR_1" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="BILL_ADDR_2" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="BILL_ADDR_3" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="BILL_ADDR_4" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_FAX" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_EMAIL" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="ORDER_LINES" nillable="true" minOccurs="0">
    <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:element name="ORDER_LINE">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="39">
    <xs:element name="LINE_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SALE_UNIT_PRICE" type="xs:float" nillable="true" minOccurs="0"/>
    <xs:element name="PRICE_TOTAL" type="xs:float" nillable="true" minOccurs="0"/>
    <xs:element name="DISCOUNT" type="xs:float" nillable="true" minOccurs="0"/>
    <xs:element name="PRICE_QTY" type="xs:float" nillable="true" minOccurs="0"/>
    <xs:element name="CUSTOMER_PART_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="4000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_PART_DESC" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="4000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="ORDER_LINE_CHARACTERSTICS" nillable="true" minOccurs="0">
    <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:element name="CHARACTERISTIC_ITEM">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="6">
    <xs:element name="CHARACTERISTIC_ID" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CHARACTERISTIC_VALUE" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:all>
    </xs:complexType>
    </xs:element>
    </xs:schema>

    Hi Sourashree,
    Thank you for the response and ideas you have given me so far. I can get the fetch the data from the data source without any problem. That is I do the following,
    1.     New Report
    2.     From Create New Connection-> XML
    3.     Provide the u201CLocal XML Fileu201D and have u201CSpecify Schema Fileu201D checked -> Next
    4.     Provide the u201CLocal Schema Fileu201D  -> Finish
    Then I can see the following under XML
    + CUSTOMER_ORDER_CONF_REP_REQUEST
            CUSTOMER_ORDER_CONF_REP_REQUEST
         CUSTOMER_ORDER_CONF_REP_REQUEST/CUSTOMER_ORDER_CONF_REP
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE/ORDER_LINE_CHARACTERSTICS
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE/ORDER_LINE_CHARACTERSTICS/CHARACTERSTIC_ITEM
    And from here if I add the following three I can get all the fields I need to the report
         CUSTOMER_ORDER_CONF_REP_REQUEST/CUSTOMER_ORDER_CONF_REP
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE/ORDER_LINE_CHARACTERSTICS/CHARACTERSTIC_ITEM
    Then I come to the Linking section. Here I canu2019t link anything. There is a common field called u201CInternal_IDu201D but I canu2019t link using it. So I get a message when I click Next. From here I add all the fields.
    For this point onwards only I need help. How do I group, add fields and design the layout so I can get an report output as follows.
    Date
    Order number                                   Authorized code
    Customer No
    Name
    Phone
    Fax email
    Shipping address 1                              Billing Address 1
    Shipping address 2                              Billing Address 2
    Shipping address 3                              Billing Address 3
    Shipping address 4                              Billing Address 4
    Order Line 1 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026                      LINE_NO     CUSTOMER_PART_NO          CUSTOMER_PART_DESC     SALE_UNIT_PRICE     PRICE_QTY     DISCOUNT     PRICE_TOTAL
    Characteristic details belonging to Order line 1       CHARACTERISTIC_ID 1  CHARACTERISTIC_VALUE1
                                           CHARACTERISTIC_ID 2  CHARACTERISTIC_VALUE2
                                           CHARACTERISTIC_ID 3  CHARACTERISTIC_VALUE3
    Order Line 2 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    Characteristic details belonging to Order line 2
    Order Line 3 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    Characteristic details belonging to Order line 3
    Order Line 4 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    Characteristic details belonging to Order line 4
    Order Line 5 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    Characteristic details belonging to Order line 5
    How can I achieve this kind of a layout using the give xml and xsd? Should I use grouping if so how should I do the grouping?
    I have included the full xml and xsd in the first mail I posted but I canu2019t see it now. I can include that again if you want.
    Regards,
    Chanaka

  • Report not displaying data from one of the infoproviders

    Hi Experts,
    Issue: Report not displaying data from one of the infoproviders
    I have a report 'ReportA' which has multiprovider MP1 as the source.
    MP1 has two Infocubes IC1, IC2 in its design.
    Now, when i execute the report, data from IC1 is displayed. But no data from IC2 is displayed.
    Is there a setting i need to enable in MP1 ? or is there anything else that needs to be enabled ?
    Please reply.
    Regards,
    Suraj S Nair

    Hi All,
    When i display data directly from the multi provider, without any restrictions, i cannot view the data from infocube IC2.
    I feel its not an issue with the Query. It must be a problem with the setting in the Multiprovider MP1.
    Infocube IC2 is a copy of Infocube IC1. Multiprovider MP1 first only had IC1 in its design. It was recently IC2 was also included.
    I checked the Characteristics, all of them are assigned corectly.
    Now, this issue sure has something to do wiht the setting of Multiprovider or please correct me if wrong.
    Regards,
    Suraj S Nair

  • Crystal Report Using ECC Data has Auth error in Infoview

    We've created a Crystal report that successfully accesses ECC data from a function module in our Dev environment when the report is executed from within Crystal Designer.  When we try to execute the same report against the same development ECC system from within InfoView we get the following error:
    ERROR: The Database Logon Information for this report is either incomplete or incorrect. 
    The connection information is the same as it is in designer. We are able to successfully run Crystal Reports over BW data within InfoView. Any ideas about what might be wrong?
    Doug

    Ingo,
    The consumers of the report do have ECC access for order and inventory management so licensing should not be an issue.
    We were able to resolve the issue. The problem was with our version of SAP GUI on the BO Dev server.
    We had to update our u201CServices.dllu201D and our u201CSAPLogonTree.xmlu201D file with an accurate version.  Once that was done, the report executed as expected in InfoView using LDAP.
    Thanks,
    Doug
    Edited by: Douglas Eberle on Jun 13, 2011 6:54 PM

  • GL Trial Balance Report Query with date Effectivity

    We have a requirement to show the GL Trial Balance report with Effective dates as Parameters.
    Current Analysis:
    The Journals get updated with corresponding CCID in GL_BALANCES table when the Journal is posted. GL_BALANCE is SOB specific, if the SOB has month as period then the balances in GL_BALANCES would get updated against the month(period).
    To overcome the period problem, we explored the option of using a View based on GL_JE_HEADERS and GL_JE_LINES for 'Posted' Journal Batches of a SOB. We are checking whether the GL_JE_HEADERS.default_effective_date lies between the :p_from_date and :p_to_date which is sent to the Report as a parameter. The above idea does not return expected data when the custom Trial Balance Report is run.
    Following is the Query we have written for it:
    SELECT cc.segment4 ACCOUNT, bal.code_combination_id,
    bal.begin_balance_dr
    + SUM (NVL (gljel.accounted_dr, 0)) opening_bal_dr,
    bal.begin_balance_cr
    + SUM (NVL (gljel.accounted_cr, 0)) opening_bal_cr,
    ffv.description,
    (SELECT SUM (NVL (gljel.accounted_dr, 0))
    FROM gl_je_headers gljeh,
    gl_je_lines gljel,
    gl_code_combinations gcc
    WHERE gljeh.default_effective_date BETWEEN :p_from_date
    AND :p_to_date
    AND gljeh.je_header_id = gljel.je_header_id
    AND gljel.code_combination_id = gcc.code_combination_id
    AND gljel.period_name = gljeh.period_name
    AND gljel.set_of_books_id = :p_set_of_books_id
    AND gljeh.status = 'P'
    AND gljel.status = 'P'
    AND gljeh.actual_flag = 'A'
    --AND gljel.code_combination_id =
    -- bal.code_combination_id
    AND gcc.segment4 = cc.segment4
    GROUP BY gcc.segment4) c_dr,
    (SELECT SUM (NVL (gljel.accounted_cr, 0))
    FROM gl_je_headers gljeh,
    gl_je_lines gljel,
    gl_code_combinations gcc
    WHERE gljeh.default_effective_date BETWEEN :p_from_date
    AND :p_to_date
    AND gljeh.je_header_id = gljel.je_header_id
    AND gljel.period_name = gljeh.period_name
    AND gljel.code_combination_id = gcc.code_combination_id
    AND gljel.set_of_books_id = :p_set_of_books_id
    AND gljeh.status = 'P'
    AND gljel.status = 'P'
    AND gljeh.actual_flag = 'A'
    AND gcc.segment4 = cc.segment4
    GROUP BY gcc.segment4) c_cr
    FROM gl_period_statuses per,
    gl_code_combinations cc,
    gl_balances bal,
    gl_je_headers gljeh,
    gl_je_lines gljel,
    fnd_flex_values_vl ffv,
    fnd_flex_value_sets ffvs
    WHERE cc.chart_of_accounts_id = :p_chart_of_accts_id
    AND bal.currency_code = :p_currency
    AND bal.actual_flag = 'A'
    AND bal.period_name = per.period_name
    AND cc.template_id IS NULL
    AND cc.code_combination_id = bal.code_combination_id
    AND per.set_of_books_id = :p_set_of_books_id
    AND per.application_id = 101
    AND :p_from_date BETWEEN per.start_date AND per.end_date
    AND gljeh.period_name = per.period_name
    AND gljeh.default_effective_date <= :p_from_date
    AND gljeh.je_header_id = gljel.je_header_id
    AND gljel.period_name = gljeh.period_name
    AND gljel.set_of_books_id = :p_set_of_books_id
    AND ffv.flex_value_set_id = ffvs.flex_value_set_id
    AND ffvs.flex_value_set_name = 'JSWEL_ACCOUNT'
    AND gljeh.status = 'P'
    AND gljel.status = 'P'
    AND cc.summary_flag = ffv.summary_flag
    AND cc.segment4 = ffv.flex_value
    AND gljeh.actual_flag = 'A'
    AND gljel.code_combination_id = bal.code_combination_id
    GROUP BY bal.begin_balance_dr,
    bal.begin_balance_cr,
    cc.segment4,
    ffv.description,
    bal.code_combination_id
    The problem is that not all expected columns are being queried. Kindly advise as appropriate.
    Note: I have also posted this thread on the Financials forum. Posting here to present the query to a larger audience with the expectation that my query would be answered.
    Thanks & Regards
    Sumit

    suggest to create customize TB report.

  • GL Trial Balance Report with Effective Dates as Parameters

    We have a requirement to show the GL Trial Balance report with Effective dates as Parameters.
    Current Analysis:
    The Journals get updated with corresponding CCID in GL_BALANCES table when the Journal is posted. GL_BALANCE is SOB specific, if the SOB has month as period then the balances in GL_BALANCES would get updated against the month(period).
    To overcome the period problem, we explored the option of using a View based on GL_JE_HEADERS and GL_JE_LINES for 'Posted' Journal Batches of a SOB. We are checking whether the GL_JE_HEADERS.default_effective_date lies between the :p_from_date and :p_to_date which is sent to the Report as a parameter. The above idea does not return expected data when the custom Trial Balance Report is run.
    Following is the Query being used:
    SELECT cc.segment4 ACCOUNT, bal.code_combination_id,
    bal.begin_balance_dr
    + SUM (NVL (gljel.accounted_dr, 0)) opening_bal_dr,
    bal.begin_balance_cr
    + SUM (NVL (gljel.accounted_cr, 0)) opening_bal_cr,
    ffv.description,
    (SELECT SUM (NVL (gljel.accounted_dr, 0))
    FROM gl_je_headers gljeh,
    gl_je_lines gljel,
    gl_code_combinations gcc
    WHERE gljeh.default_effective_date BETWEEN :p_from_date
    AND :p_to_date
    AND gljeh.je_header_id = gljel.je_header_id
    AND gljel.code_combination_id = gcc.code_combination_id
    AND gljel.period_name = gljeh.period_name
    AND gljel.set_of_books_id = :p_set_of_books_id
    AND gljeh.status = 'P'
    AND gljel.status = 'P'
    AND gljeh.actual_flag = 'A'
    --AND gljel.code_combination_id =
    -- bal.code_combination_id
    AND gcc.segment4 = cc.segment4
    GROUP BY gcc.segment4) c_dr,
    (SELECT SUM (NVL (gljel.accounted_cr, 0))
    FROM gl_je_headers gljeh,
    gl_je_lines gljel,
    gl_code_combinations gcc
    WHERE gljeh.default_effective_date BETWEEN :p_from_date
    AND :p_to_date
    AND gljeh.je_header_id = gljel.je_header_id
    AND gljel.period_name = gljeh.period_name
    AND gljel.code_combination_id = gcc.code_combination_id
    AND gljel.set_of_books_id = :p_set_of_books_id
    AND gljeh.status = 'P'
    AND gljel.status = 'P'
    AND gljeh.actual_flag = 'A'
    AND gcc.segment4 = cc.segment4
    GROUP BY gcc.segment4) c_cr
    FROM gl_period_statuses per,
    gl_code_combinations cc,
    gl_balances bal,
    gl_je_headers gljeh,
    gl_je_lines gljel,
    fnd_flex_values_vl ffv,
    fnd_flex_value_sets ffvs
    WHERE cc.chart_of_accounts_id = :p_chart_of_accts_id
    AND bal.currency_code = :p_currency
    AND bal.actual_flag = 'A'
    AND bal.period_name = per.period_name
    AND cc.template_id IS NULL
    AND cc.code_combination_id = bal.code_combination_id
    AND per.set_of_books_id = :p_set_of_books_id
    AND per.application_id = 101
    AND :p_from_date BETWEEN per.start_date AND per.end_date
    AND gljeh.period_name = per.period_name
    AND gljeh.default_effective_date <= :p_from_date
    AND gljeh.je_header_id = gljel.je_header_id
    AND gljel.period_name = gljeh.period_name
    AND gljel.set_of_books_id = :p_set_of_books_id
    AND ffv.flex_value_set_id = ffvs.flex_value_set_id
    AND ffvs.flex_value_set_name = 'JSWEL_ACCOUNT'
    AND gljeh.status = 'P'
    AND gljel.status = 'P'
    AND cc.summary_flag = ffv.summary_flag
    AND cc.segment4 = ffv.flex_value
    AND gljeh.actual_flag = 'A'
    AND gljel.code_combination_id = bal.code_combination_id
    GROUP BY bal.begin_balance_dr,
    bal.begin_balance_cr,
    cc.segment4,
    ffv.description,
    bal.code_combination_id
    Kindly suggest if I am missing anything. I am sure that the great guns here can help me out.
    Thanks
    Sumit

    suggest to create customize TB report.

  • Report Writer Missing Data for Cost Center+Investment Internal Order

    Hi Gurus,
    I have met a problem on Report writer. T-code KSBB -> Report for Cost Center Group by Cost Elements in diff months.
    The report can be drilled down to call KSB1 to give line items on the cost element by cost center/group.
    The problem is the drill-down report missed the line items for investment orders. ( Compared with manually use KSB1)
    The overhead internal order line items are fine.
    For example, document 001-Apr:
    Dr. Cost Element 1009                 $900  -- BA 90  Cost Center 90000 Investment order 9001
         Cr. Other cost elements.                  $900
    Document 002-Apr
    Dr. Cost Element 1009                 $800 -- BA90 Cost Center 90000 Overhead order 7001
         Cr. Other cost elements                      $800
    In KSBB report, the cost center group for 90000 in cost element 1009 in Apr only has $800.
    And the drilled down report which called KSB1 has the line item for docuemnt 002.
    However, when I run KSB1 directly, the total amount for cost element 1009 in cost center 90000 is $1700.
    Here is what I checked:
    1. I have my ABAPer checked the KSBB program and KSB1 program to debug them in DEV ( DEV and PRD has the same problem). The different to get the data is that in KSB1, it has selected a value type 11 ( Googled: field name is WRTTP, Down payments as expenses. In program: WRTTP means Statistically Actual ) and 04 ( Googled: Actual True Posting. In program: 04 in WRTTP means Actual posting).
    But in KSBB, it only select 04 when I clicked the drill down report to call KSB1.
    2. I am thinking that the cause was on different types of internal order:
    Overhead internal orders are statistical orders.  Investment orders are actual orders.
    Could you help to throw some light on the problem?
    Thank you very much.
    Emma

    Hi,
    Cost Centre vise Report you can take from KSB1
    Internal Order Vise Report you can take fro KOB1
    Regards,
    Sridhar Sha

Maybe you are looking for

  • Can you choose your photos from your computer to be imported into your iPhone?

    Unfortunately I do not have a Mac computer.  I have a Windows 7 computer.  I have some select photos that I want to be imported into my iPhone so I can use them as a wallpaper background.  Last time I imported pictures from my computer to my iPhone,

  • My IPod Shuffle wont charge or turn on...do I need to get a new one?...

    Hi, I recently got a Ipod Shuffle for christmas. It came in a small box, with headphones and a USB cable. I don't know what generation it is, I guess 3rd or 4th, but honestly, I dont know. But I lost it and found it again about a week later. It was t

  • How to change a customer exit variable in columns

    Hallo Experts, i have a query with two columns. In the first column is a customer exit variable, who get filled with the actual calyear. In the second column is the same variable with an offset -1. When i execute the query, in the first column i can

  • Huge customer service failure

    After more than eleven years with Verizon Wireless, I was shocked by the events of this past week. I have a phone that a family member uses.  On Saturday, he came to me and said that he was unable to text.  I called techincal support.  After about 30

  • Reports in two steps

    Hello The report should be created in two steps. First, data should be summarized up to po level and later the average of all po should be calculated with drill down by material group. See example :                                            Life cyc