Difference in Query generated by OBIEE for same report

Hi,
I am using a a report(X) in a filter condition.
I am seeing a peculiar issue with OBIEE server. When i am running a report(X) alone, the query generated is different. But when i am using the same report in filter condition of other report(Y), the same report is generating some other query. The first report(X) is running fine but the second(Y) is not running at all.
Case 1(Report X) Query: The report is breaking into 3 parts for different fact tables and combining the data to give result.
Case 2(Report Y): A single query is being formed and within it is fecthing the data from different fact tables using subqueries.
Case2 is creating a lot of problem as the performance is totally poor.
Any suggesstions??
Thanks
Tataji

Hi, we haven't debugged the application or traced the query against the production server (it's in our customer's office) buy I think there's no difference since the query itself has been tested using sqldeveloper against both servers (XE 11.2 and Enterprise 11.1) and the behavior is consistent. By consistent I mean:
- The query executed via sqldeveloper against Oracle XE 11.2 runs ok and so does the application.
- The query executed via sqldeveloper against Oracle Enterprise 11.1 fails with an ORA-01790 error, and so does the application (exceptions are being logged in the Event Log).
To sum up: the same query runs ok in Oracle XE 11.2 and fails in Oracle Enterprise 11.1.
Additional information: we have tried explicit casting the NULL literals to the corresponding data types (in the UNION ALLs) and the query works fine in both versions. ¿Is there an option in ODAC to tell the query generator to write this explicit castings?
Regarding the DB schema and the LINQ query, I'll be sending them asap.
Regards,
Ernesto.

Similar Messages

  • How to generate Excle file for a report runningin a Batch job

    Hello All,
    Can we generate Excle file for a report running in a Batch job.
    Kindly send reply to     [email protected]
    Thanks in Advance.
    Cheers,
    Sundeep

    Dear Sundeep,
    I'm providing you with the following piece of code ... Its working fine for me ... hopefully it suits your requirement ...
    D A T A D E C L A R A T I O N *
    TYPES: BEGIN OF TY_EXCEL,
    CELL_01(80) TYPE C,
    CELL_02(80) TYPE C,
    CELL_03(80) TYPE C,
    CELL_04(80) TYPE C,
    CELL_05(80) TYPE C,
    CELL_06(80) TYPE C,
    CELL_07(80) TYPE C,
    CELL_08(80) TYPE C,
    CELL_09(80) TYPE C,
    CELL_10(80) TYPE C,
    END OF TY_EXCEL.
    DATA: IT_EXCEL TYPE STANDARD TABLE OF TY_EXCEL,
    WA_EXCEL TYPE TY_EXCEL..
    E V E N T : S T A R T - O F - S E L E C T I O N *
    START-OF-SELECTION.
    Here you populate the Internal Table.
    Display - Top of the Page.
    PERFORM DISPLAY_TOP_OF_PAGE.
    E V E N T : E N D - O F - S E L E C T I O N *
    END-OF-SELECTION.
    SET PF-STATUS 'GUI_STATUS'.
    E V E N T : A T U S E R - C O M M AN D *
    AT USER-COMMAND.
    CASE SY-UCOMM.
    WHEN 'EXPORT'.
    Exporting the report data to Excel.
    PERFORM EXPORT_TO_EXCEL.
    ENDCASE.
    *& Form DISPLAY_TOP_OF_PAGE
    text
    --> p1 text
    <-- p2 text
    FORM DISPLAY_TOP_OF_PAGE .
    SKIP.
    WRITE: /05(128) SY-ULINE,
    /05 SY-VLINE,
    06(127) 'O R I C A'
    CENTERED COLOR 1,
    132 SY-VLINE.
    WRITE: /05(128) SY-ULINE,
    /05 SY-VLINE,
    06(127) 'Shift Asset Depreciation - Period/Year-wise Report.'
    CENTERED COLOR 4 INTENSIFIED OFF,
    132 SY-VLINE.
    WRITE: /05(128) SY-ULINE.
    E X C E L O P E R A T I O N
    CLEAR: IT_EXCEL[],
    WA_EXCEL.
    PERFORM APPEND_BLANK_LINE USING 1.
    WA_EXCEL-cell_02 = ' XYZ Ltd. '.
    APPEND WA_EXCEL TO IT_EXCEL.
    CLEAR: WA_EXCEL.
    WA_EXCEL-cell_02 = 'Shift Asset Depreciation - Period/Year-wise Report.'.
    APPEND WA_EXCEL TO IT_EXCEL.
    PERFORM APPEND_BLANK_LINE USING 1.
    ENDFORM. " DISPLAY_TOP_OF_PAGE
    *& Form APPEND_BLANK_LINE
    text
    -->P_1 text
    FORM APPEND_BLANK_LINE USING P_LINE TYPE I.
    DO P_LINE TIMES.
    CLEAR: WA_EXCEL.
    APPEND WA_EXCEL TO IT_EXCEL.
    enddo.
    ENDFORM.
    *& Form EXPORT_TO_EXCEL
    text
    --> p1 text
    <-- p2 text
    FORM EXPORT_TO_EXCEL .
    DATA: L_FILE_NAME(60) TYPE C.
    Create a file name
    CONCATENATE 'C:\' 'Shift_Depn_' SY-DATUM6(2) '.' SY-DATUM4(2)
    '.' SY-DATUM+0(4) INTO L_FILE_NAME.
    Pass the internal table (it_excel which is already populated )
    to the function module for excel download.
    CALL FUNCTION 'WS_EXCEL'
    exporting
    filename = L_FILE_NAME
    tables
    data = IT_EXCEL
    exceptions
    unknown_error = 1
    others = 2.
    if sy-subrc <> 0.
    message e001(ymm) with 'Error in exporting to Excel.'.
    endif.
    ENDFORM. " EXPORT_TO_EXCEL
    *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    When you click the button - Export to Excel ( GUI-Status) you'll be able to export the content of the Internal Table to an Excel file .......
    Regards,
    Abir
    Don't forget to award points *

  • Run a query multiple times in the same report for different nodes in Hier

    Hi,
    I have created a query as per my requirements. But my issue is I need to run the report for all the profit centers in a hierarchy. Right now I enter a node value of the hierarchy in the variable and I get the result. But I want to run it for each node in the hierarchy and display the result in the same report.Is it possible to do so in web using information broadcaster or any BI 7.0 tools. Has anyone done similar to this in web. I would prefer the web route rather than the excel but if excel is the only answer I will follow the excel path.
    Looking forward to your suggestions on this.
    Thanks,
    Kal

    Hello Kal,
    if the number of Profit Centers is limited, you could probably work with query views (one for each PC) and include all these into your Web Template.
    If this is not appropriate, I don´t know if there is any way of programming possible.
    Regards
    Cornelia

  • How apex generate LOV values for Interactive report

    Scott,
    For interactive report, does APEX full table/index scan to generate the LOV drop down list every time user click the column header? If I set max row count to 100, does LOV values only derived from the first 100 rows that apex hits?
    If I enter SQL query in "list of value definition", will that sql get executed every time users click the column header or the result is cached?
    For standard and interactive report, does APEX parse (soft/hard) the sql statement again when user do pagination?

    Hi N.Raj,
    {thread:id=2245456}
    Yes you have to Configure BI Publisher or other.
    {thread:id=2242147}
    Hope it helps!
    Regards,
    Kiran

  • Query engine failed error for crytal report refreshing to new params in jsp

    Using licensed weblogic 8.1 server in production mode. Weblogic workhsop has inetegrated supprot for crystal reports 9. Using standalone report & accessing sql server through odbc, i got result for different parameters passed.
              Problem Area : Passing parameter to have specific report causes unexpected query engine failed error in com.crystaldecisions.report.web.viewer.CrystalViewer class. If viewer.refresh method is commented, then static (already saved) report is displayed through jsp. But using viewer.refresh method for dynamic report genertaion for new parameters through jsp gives above error.

    Hello
              I'm experiencing the same problem. Please let me know if you've any solution.

  • Defining a query with characteristic 0BCS_TASK for Status Reporting

    Hello,
    there is a new  characteristic available for Status Reporting called 0BCS_TASK. In the master data of that info object we defined all possible tasks. Now i want to recreate a query but showing just the tasks from the Consmonitor and sorted like they are arranged in the Consmonitor. Is there a way how to do it as i want? Can use 0BCS_TASK within a structure and the entries i want to show as a selection?
    I tried it with a Structure and and had the values of that charcteristic as a Selction but it did not work.
    Thanks in advance and kind regards,
    Murat

    HI Lillia,
    I don't see a file attached - is there one?
    Anyway, some feedback from our project - we decided not to use this status report funcitonality for the following reasons:
    1. The interested parties have access to the monitor (UCMON) and understand it well enough to gauge progress from there without needing a separate report
    2. If required they could use Print (Ctrl+P) then System---> List --> Save --> Local File --> to export to .txt or .xls
    (NB it really isn't required here so make sure this method would meet your requirements first)
    Then we saved the effort and maintenance of building the new infoprovider and queries.

  • How to create 2 transaction codes for same report program with diff title

    Hi All -
      I have created report program and create 2 transaction codes with different short description. I want to display the Tcodes decriptions instead of program attributes title.
    Can anyone pls tell me how to do this?
    Thanks,
    Kannan

    Hi Kannan,
    define 2 titlebars t1 and t2 for the report. In report initialization,
    IF sy-tcode = 't1'
      SET TITLE t1.
    ELSE.
      SET TITLE t2.
    ENDIF.
    Regards,
    Clemens

  • Sinlge select query in different schemas for same table(Indentical Structu)

    Scenario :
    Table XYZ is created in Schema A
    After an year, the old data from the previous year would be moved to different schema. However in the other schema the same table name would be used.
    For eg
    Schema A contains table XYZ with data of 2012 yr
    Schema B contains table XYZ with data of 2011 yr
    Table XYZ in both the schemas have identical structure.
    So can we fire a single select query to read the data from both the tables in effective way.
    Eg select * from XYZ where date range between 15-Oct-2011 to 15-Mar-2012.
    However the data resides in 2 different schema altogether.

    Thanks for the reply
    Creating an view is an option.
    But my problem, there is ORM layer(either Hibernate or Eclipse Top Link) between the application and the database.
    So the queries would be formed by the ORM layer and are not hand generated.
    So i cannot use view.
    So is there any option that would allow me to use single query on different schema's ?

  • Sinlge select query in diff schemas for same table(Indentical Structure)

    Scenario :
    Table XYZ is created in Schema A
    After an year, the old data from the previous year would be moved to different schema. However in the other schema the same table name would be used.
    For eg
    Schema A contains table XYZ with data of 2012 yr
    Schema B contains table XYZ with data of 2011 yr
    Table XYZ in both the schemas have identical structure.
    So can we fire a single select query to read the data from both the tables in effective way.
    Eg select * from XYZ where date range between 15-Oct-2011 to 15-Mar-2012.
    However the data resides in 2 different schema altogether.
    Creating an view is an option.
    But my problem, there is ORM layer(either Hibernate or Eclipse Top Link) between the application and the database.
    So the queries would be formed by the ORM layer and are not hand generated.
    So i cannot use view.
    So is there any option that would allow me to use single query on different schema's ?

    Hi,
    970773 wrote:
    Scenario :
    Table XYZ is created in Schema A
    After an year, the old data from the previous year would be moved to different schema. However in the other schema the same table name would be used.
    For eg
    Schema A contains table XYZ with data of 2012 yr
    Schema B contains table XYZ with data of 2011 yr
    Table XYZ in both the schemas have identical structure.
    So can we fire a single select query to read the data from both the tables in effective way.That depends on what you mean by "effective".
    Eg select * from XYZ where date range between 15-Oct-2011 to 15-Mar-2012.
    However the data resides in 2 different schema altogether.You can do a UNION, so the data from the two years appears together. The number of actual tables may make the query slower, but it won;t change the results.
    Given that you have 2 tables, the fact that they are in different schemas doesn't matter. Just make sure the user running the query has SELECT privileges on both of them.
    Creating an view is an option.Is it? You seem to say it is not, below.
    But my problem, there is ORM layer(either Hibernate or Eclipse Top Link) between the application and the database.
    So the queries would be formed by the ORM layer and are not hand generated.
    So i cannot use view.So creating a view is not an option. Or is it?
    So is there any option that would allow me to use single query on different schema's ?Anything that you can do with a view, you can do with sub-queries. A view is merely a convenience; it just saves a sub-query, so you don't have to re-code it every time you use it. Assuming you have privilges to query the base tables, you can always avoid using a view by repeating the query that defines the view in your own query. It will not be any slower

  • How to alter Select Query while altering selectionscreen for same output?

    Hi,
    i have to change the selection screen fields with some new fields , but i dont know how to change the selection query accordingly, because i need the same output with the same fields but with a different set of fields in the selection screen.
    The original code is
    TYPES: BEGIN OF ty_output,
           mblnr TYPE mseg-mblnr,
           mjahr TYPE mseg-mjahr,
           zeile TYPE mseg-zeile,
           bwart TYPE mseg-bwart,
           werks TYPE mseg-werks,
           lgort TYPE mseg-lgort,
           ebeln TYPE mseg-ebeln,
           ebelp TYPE mseg-ebelp,
           lfbnr TYPE mseg-lfbnr,
           lfpos TYPE mseg-lfpos,
           sjahr TYPE mseg-sjahr,
           dmbtr TYPE mseg-dmbtr,
           menge TYPE mseg-menge,
           matnr TYPE mseg-matnr,
           mtart TYPE mara-mtart,
           matkl TYPE mara-matkl,
           bismt TYPE mara-bismt,
           meins TYPE mara-meins,
           bedat TYPE ekko-bedat,
           waers TYPE ekko-waers,
           wkurs TYPE ekko-wkurs,
           verkf TYPE ekko-verkf,
          EFFWR TYPE EKPO-EFFWR,
           tax TYPE ekpo-effwr,
           maktx TYPE makt-maktx,
           budat TYPE mkpf-budat,
           usnam TYPE mkpf-usnam,
           m_menge TYPE ekpo-menge,
           ablad TYPE mseg-ablad,
           wempf TYPE mseg-wempf,
           END OF ty_output.
    TYPES: BEGIN OF ty_mseg_103,
           mblnr TYPE mseg-mblnr,
           mjahr TYPE mseg-mjahr,
           zeile TYPE mseg-zeile,
           bwart TYPE mseg-bwart,
           werks TYPE mseg-werks,
           lgort TYPE mseg-lgort,
           ebeln TYPE mseg-ebeln,
           ebelp TYPE mseg-ebelp,
           lfbnr TYPE mseg-lfbnr,
           lfpos TYPE mseg-lfpos,
           sjahr TYPE mseg-sjahr,
           dmbtr TYPE mseg-dmbtr,
           menge TYPE mseg-menge,
           matnr TYPE mseg-matnr,
           mtart TYPE mara-mtart,
           matkl TYPE mara-matkl,
           bismt TYPE mara-bismt,
           meins TYPE mara-meins,
           bedat TYPE ekko-bedat,
           waers TYPE ekko-waers,
           wkurs TYPE ekko-wkurs,
           verkf TYPE ekko-verkf,
          EFFWR TYPE EKPO-EFFWR,
           tax TYPE ekpo-effwr,
           maktx TYPE makt-maktx,
           budat TYPE mkpf-budat,
           usnam TYPE mkpf-usnam,
           m_menge TYPE ekpo-menge,
           ablad TYPE mseg-ablad,
           wempf TYPE mseg-wempf,
           END OF ty_mseg_103.
    TYPES: BEGIN OF ty_mseg_105,
           mblnr TYPE mseg-mblnr,
           mjahr TYPE mseg-mjahr,
           zeile TYPE mseg-zeile,
           bwart TYPE mseg-bwart,
           werks TYPE mseg-werks,
           lgort TYPE mseg-lgort,
           ebeln TYPE mseg-ebeln,
           ebelp TYPE mseg-ebelp,
           lfbnr TYPE mseg-lfbnr,
           lfpos TYPE mseg-lfpos,
           sjahr TYPE mseg-sjahr,
           dmbtr TYPE mseg-dmbtr,
           menge TYPE mseg-menge,
           matnr TYPE mseg-matnr,
           mtart TYPE mara-mtart,
           matkl TYPE mara-matkl,
           bismt TYPE mara-bismt,
           meins TYPE mara-meins,
           bedat TYPE ekko-bedat,
           waers TYPE ekko-waers,
           wkurs TYPE ekko-wkurs,
           verkf TYPE ekko-verkf,
           effwr TYPE ekpo-effwr,
           tax TYPE ekpo-effwr,
           maktx TYPE makt-maktx,
           budat TYPE mkpf-budat,
           ablad TYPE mseg-ablad,
           wempf TYPE mseg-wempf,
           END OF ty_mseg_105.
    DATA: Begin with W_                                                 *
    DATA : it_fcat TYPE slis_t_fieldcat_alv. " alv field catalog
    DATA  : listhead TYPE slis_t_listheader WITH HEADER LINE.
    DATA: event TYPE slis_t_event WITH HEADER LINE.
    INTERNAL TABLES: Begin with IT_                                     *
    DATA : it_output TYPE STANDARD TABLE OF ty_output WITH KEY mblnr mjahr,
           it_mseg_103 TYPE STANDARD TABLE OF ty_mseg_103,
           it_mseg_105 TYPE STANDARD TABLE OF ty_mseg_103,
           it_mseg_106 TYPE STANDARD TABLE OF ty_mseg_103,          " LNTDEV1 ADDED
           it_mara TYPE STANDARD TABLE OF ty_mara,
           it_ekko TYPE STANDARD TABLE OF ty_ekko,
           it_ekpo TYPE STANDARD TABLE OF ty_ekpo,
           it_makt TYPE STANDARD TABLE OF ty_makt,
           it_mkpf TYPE STANDARD TABLE OF ty_mkpf WITH KEY mblnr.
    WORKAREAS: Begin with WA_                                           *
    DATA : wa_fcat LIKE LINE OF it_fcat.
    DATA : wa_output LIKE LINE OF it_output,
           wa_mara LIKE LINE OF it_mara,
           wa_ekko LIKE LINE OF it_ekko,
           wa_ekpo LIKE LINE OF it_ekpo,
           wa_makt LIKE LINE OF it_makt,
           wa_mkpf LIKE LINE OF it_mkpf,
           wa_mseg_103 LIKE LINE OF it_mseg_103,
           wa_mseg_105 LIKE LINE OF it_mseg_105,
           wa_mseg_106 LIKE LINE OF it_mseg_106.                        " LNTDEV1 ADDED
    DATA : w_menge LIKE ekpo-menge.
    FIELD-SYMBOLS: Begin with FS_                                       *
    PARAMETERS: Begin with PR_                                          *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS  : pr_werks LIKE mseg-werks OBLIGATORY.
    SELECT-OPTIONS : so_budat FOR mkpf-budat.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECT-OPTIONS: Begin with SO_                                      *
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
    SELECT-OPTIONS : so_mtart FOR mara-mtart.
    SELECT-OPTIONS : so_matkl FOR mara-matkl.
    SELECT-OPTIONS : so_matnr FOR mara-matnr.
    SELECT-OPTIONS : so_bismt FOR mara-bismt.
    SELECT-OPTIONS : so_ebeln FOR mseg-ebeln.
    SELECT-OPTIONS : so_verkf FOR ekko-verkf.
    SELECT-OPTIONS : so_bedat FOR ekko-bedat.
    SELECT-OPTIONS : so_mblnr FOR mseg-mblnr.
    SELECTION-SCREEN END OF BLOCK b2.
    *AT SELECTION-SCREEN.
    *SO_BUDAT-HIGH = SO_BUDAT-HIGH + 1.
    Query for getting all the Document Segment: Material data from MSEG *
    Table which having Movement Types 103 and put into it_mseg table,   *
    Filtering by reference document and material document number        *
    Filtering by selection criteria (Material Docu No, Purchase order   *
    and Plant)                                                          *
    START-OF-SELECTION.
      SELECT pmblnr smblnr p~mjahr zeile bwart lfbnr werks lgort ebeln
             ebelp lfpos sjahr dmbtr usnam menge sbudat pmatnr q~mtart
             pablad pwempf
             FROM mseg AS p INNER JOIN mara AS q
               ON pmatnr = qmatnr
               JOIN mkpf AS s ON smblnr EQ pmblnr
               INTO CORRESPONDING FIELDS OF
             TABLE it_mseg_103
             WHERE bwart EQ 103
             AND p~matnr IN so_matnr
             AND werks EQ pr_werks
             AND ebeln IN so_ebeln
             AND q~mtart IN so_mtart
             AND p~mblnr IN so_mblnr
             AND s~budat IN so_budat.
      IF sy-subrc = 0.
      ENDIF.
      SELECT pmblnr smblnr p~mjahr zeile bwart lfbnr werks lgort ebeln
             ebelp lfpos sjahr dmbtr usnam menge sbudat pmatnr q~mtart
             pablad pwempf
             FROM mseg AS p INNER JOIN mara AS q
               ON pmatnr = qmatnr
               JOIN mkpf AS s ON smblnr EQ pmblnr
               INTO CORRESPONDING FIELDS OF
             TABLE it_mseg_105
          WHERE bwart EQ 105 OR bwart EQ 104 OR bwart EQ 124 OR bwart EQ 124
             AND p~matnr IN so_matnr
             AND werks EQ pr_werks
             AND ebeln IN so_ebeln
             AND q~mtart IN so_mtart
             AND p~mblnr IN so_mblnr
             AND s~budat IN so_budat.
      IF sy-subrc = 0.
      ENDIF.
      LOOP AT IT_MSEG_103 INTO WA_MSEG_103.
        READ TABLE IT_MSEG_105 INTO WA_MSEG_105 WITH KEY LFBNR =
                                               WA_MSEG_103-MBLNR.
          IF SY-SUBRC <> 0.
            APPEND WA_MSEG_103 TO IT_OUTPUT.
          ENDIF.
       ENDLOOP.
      SELECT pmblnr smblnr p~mjahr zeile bwart lfbnr werks lgort ebeln  
             ebelp lfpos sjahr dmbtr usnam menge sbudat pmatnr q~mtart
             pablad pwempf
             FROM mseg AS p INNER JOIN mara AS q
               ON pmatnr = qmatnr
               JOIN mkpf AS s ON smblnr EQ pmblnr
               INTO CORRESPONDING FIELDS OF
             TABLE it_mseg_106
             WHERE bwart EQ 106
             AND p~matnr IN so_matnr
             AND werks EQ pr_werks
             AND ebeln IN so_ebeln
             AND q~mtart IN so_mtart
             AND p~mblnr IN so_mblnr
             AND s~budat IN so_budat.
      LOOP AT it_mseg_103 INTO wa_mseg_103.
        READ TABLE it_mseg_106 INTO wa_mseg_106 WITH KEY
                                           lfbnr = wa_mseg_103-mblnr.
        IF sy-subrc = 0.
          APPEND wa_mseg_106 TO it_output.
          clear wa_mseg_106.
        ENDIF.
      ENDLOOP.                        
    Present selection criteria is
    1. Plant
    2. Posting Date
    3. Material Type
    4. Material Group
    5. Material No.
    6. Old Material No.
    7. PO Order No.
    8. Old PO No.
    9. PO Date
    10. Material Document No.
    New selection criteria is
    1. PO no.
    2. PO date
    3. PO value (Ex: >=10000 <=50000)
    4. Purch org
    5. Doc type
    6. Vendor
    7. Material
    8. Account assignment category
    9. Order

    Hi,
    i have to change the selection screen fields with some new fields , but i dont know how to change the selection query accordingly, because i need the same output with the same fields but with a different set of fields in the selection screen.
    The original code is
    TYPES: BEGIN OF ty_output, mblnr TYPE mseg-mblnr, mjahr TYPE mseg-mjahr, zeile TYPE mseg-zeile, bwart TYPE mseg-bwart, werks TYPE mseg-werks, lgort TYPE mseg-lgort, ebeln TYPE mseg-ebeln, ebelp TYPE mseg-ebelp, lfbnr TYPE mseg-lfbnr, lfpos TYPE mseg-lfpos, sjahr TYPE mseg-sjahr, dmbtr TYPE mseg-dmbtr, menge TYPE mseg-menge, matnr TYPE mseg-matnr, mtart TYPE mara-mtart, matkl TYPE mara-matkl, bismt TYPE mara-bismt, meins TYPE mara-meins, bedat TYPE ekko-bedat, waers TYPE ekko-waers, wkurs TYPE ekko-wkurs, verkf TYPE ekko-verkf, * EFFWR TYPE EKPO-EFFWR, tax TYPE ekpo-effwr, maktx TYPE makt-maktx, budat TYPE mkpf-budat, usnam TYPE mkpf-usnam, m_menge TYPE ekpo-menge, ablad TYPE mseg-ablad, wempf TYPE mseg-wempf, END OF ty_output. TYPES: BEGIN OF ty_mseg_103, mblnr TYPE mseg-mblnr, mjahr TYPE mseg-mjahr, zeile TYPE mseg-zeile, bwart TYPE mseg-bwart, werks TYPE mseg-werks, lgort TYPE mseg-lgort, ebeln TYPE mseg-ebeln, ebelp TYPE mseg-ebelp, lfbnr TYPE mseg-lfbnr, lfpos TYPE mseg-lfpos, sjahr TYPE mseg-sjahr, dmbtr TYPE mseg-dmbtr, menge TYPE mseg-menge, matnr TYPE mseg-matnr, mtart TYPE mara-mtart, matkl TYPE mara-matkl, bismt TYPE mara-bismt, meins TYPE mara-meins, bedat TYPE ekko-bedat, waers TYPE ekko-waers, wkurs TYPE ekko-wkurs, verkf TYPE ekko-verkf, * EFFWR TYPE EKPO-EFFWR, tax TYPE ekpo-effwr, maktx TYPE makt-maktx, budat TYPE mkpf-budat, usnam TYPE mkpf-usnam, m_menge TYPE ekpo-menge, ablad TYPE mseg-ablad, wempf TYPE mseg-wempf, END OF ty_mseg_103. TYPES: BEGIN OF ty_mseg_105, mblnr TYPE mseg-mblnr, mjahr TYPE mseg-mjahr, zeile TYPE mseg-zeile, bwart TYPE mseg-bwart, werks TYPE mseg-werks, lgort TYPE mseg-lgort, ebeln TYPE mseg-ebeln, ebelp TYPE mseg-ebelp, lfbnr TYPE mseg-lfbnr, lfpos TYPE mseg-lfpos, sjahr TYPE mseg-sjahr, dmbtr TYPE mseg-dmbtr, menge TYPE mseg-menge, matnr TYPE mseg-matnr, mtart TYPE mara-mtart, matkl TYPE mara-matkl, bismt TYPE mara-bismt, meins TYPE mara-meins, bedat TYPE ekko-bedat, waers TYPE ekko-waers, wkurs TYPE ekko-wkurs, verkf TYPE ekko-verkf, effwr TYPE ekpo-effwr, tax TYPE ekpo-effwr, maktx TYPE makt-maktx, budat TYPE mkpf-budat, ablad TYPE mseg-ablad, wempf TYPE mseg-wempf, END OF ty_mseg_105. *----------------------------------------------------------------------* * DATA: Begin with W_ * *----------------------------------------------------------------------* DATA : it_fcat TYPE slis_t_fieldcat_alv. " alv field catalog DATA : listhead TYPE slis_t_listheader WITH HEADER LINE. DATA: event TYPE slis_t_event WITH HEADER LINE. *----------------------------------------------------------------------* * INTERNAL TABLES: Begin with IT_ * *----------------------------------------------------------------------* DATA : it_output TYPE STANDARD TABLE OF ty_output WITH KEY mblnr mjahr, it_mseg_103 TYPE STANDARD TABLE OF ty_mseg_103, it_mseg_105 TYPE STANDARD TABLE OF ty_mseg_103, it_mseg_106 TYPE STANDARD TABLE OF ty_mseg_103, " LNTDEV1 ADDED it_mara TYPE STANDARD TABLE OF ty_mara, it_ekko TYPE STANDARD TABLE OF ty_ekko, it_ekpo TYPE STANDARD TABLE OF ty_ekpo, it_makt TYPE STANDARD TABLE OF ty_makt, it_mkpf TYPE STANDARD TABLE OF ty_mkpf WITH KEY mblnr. *----------------------------------------------------------------------* * WORKAREAS: Begin with WA_ * *----------------------------------------------------------------------* DATA : wa_fcat LIKE LINE OF it_fcat. DATA : wa_output LIKE LINE OF it_output, wa_mara LIKE LINE OF it_mara, wa_ekko LIKE LINE OF it_ekko, wa_ekpo LIKE LINE OF it_ekpo, wa_makt LIKE LINE OF it_makt, wa_mkpf LIKE LINE OF it_mkpf, wa_mseg_103 LIKE LINE OF it_mseg_103, wa_mseg_105 LIKE LINE OF it_mseg_105, wa_mseg_106 LIKE LINE OF it_mseg_106. " LNTDEV1 ADDED DATA : w_menge LIKE ekpo-menge. *----------------------------------------------------------------------* * FIELD-SYMBOLS: Begin with FS_ * *----------------------------------------------------------------------* *----------------------------------------------------------------------* * PARAMETERS: Begin with PR_ * *----------------------------------------------------------------------* SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME. PARAMETERS : pr_werks LIKE mseg-werks OBLIGATORY. SELECT-OPTIONS : so_budat FOR mkpf-budat. SELECTION-SCREEN END OF BLOCK b1. *----------------------------------------------------------------------* * SELECT-OPTIONS: Begin with SO_ * *----------------------------------------------------------------------* SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME. SELECT-OPTIONS : so_mtart FOR mara-mtart. SELECT-OPTIONS : so_matkl FOR mara-matkl. SELECT-OPTIONS : so_matnr FOR mara-matnr. SELECT-OPTIONS : so_bismt FOR mara-bismt. SELECT-OPTIONS : so_ebeln FOR mseg-ebeln. SELECT-OPTIONS : so_verkf FOR ekko-verkf. SELECT-OPTIONS : so_bedat FOR ekko-bedat. SELECT-OPTIONS : so_mblnr FOR mseg-mblnr. SELECTION-SCREEN END OF BLOCK b2. *AT SELECTION-SCREEN. * *SO_BUDAT-HIGH = SO_BUDAT-HIGH + 1. *---------------------------------------------------------------------* * Query for getting all the Document Segment: Material data from MSEG * * Table which having Movement Types 103 and put into it_mseg table, * * Filtering by reference document and material document number * * Filtering by selection criteria (Material Docu No, Purchase order * * and Plant) * *---------------------------------------------------------------------* *---------------------------------------------------------------------* START-OF-SELECTION. *---------------------------------------------------------------------* SELECT p~mblnr s~mblnr p~mjahr zeile bwart lfbnr werks lgort ebeln ebelp lfpos sjahr dmbtr usnam menge s~budat p~matnr q~mtart p~ablad p~wempf FROM mseg AS p INNER JOIN mara AS q ON p~matnr = q~matnr JOIN mkpf AS s ON s~mblnr EQ p~mblnr INTO CORRESPONDING FIELDS OF TABLE it_mseg_103 WHERE bwart EQ 103 AND p~matnr IN so_matnr AND werks EQ pr_werks AND ebeln IN so_ebeln AND q~mtart IN so_mtart AND p~mblnr IN so_mblnr AND s~budat IN so_budat. ** IF sy-subrc = 0. ENDIF. SELECT p~mblnr s~mblnr p~mjahr zeile bwart lfbnr werks lgort ebeln ebelp lfpos sjahr dmbtr usnam menge s~budat p~matnr q~mtart p~ablad p~wempf FROM mseg AS p INNER JOIN mara AS q ON p~matnr = q~matnr JOIN mkpf AS s ON s~mblnr EQ p~mblnr INTO CORRESPONDING FIELDS OF TABLE it_mseg_105 WHERE bwart EQ 105 OR bwart EQ 104 OR bwart EQ 124 OR bwart EQ 124 AND p~matnr IN so_matnr AND werks EQ pr_werks AND ebeln IN so_ebeln AND q~mtart IN so_mtart AND p~mblnr IN so_mblnr AND s~budat IN so_budat. IF sy-subrc = 0. ENDIF. LOOP AT IT_MSEG_103 INTO WA_MSEG_103. READ TABLE IT_MSEG_105 INTO WA_MSEG_105 WITH KEY LFBNR = WA_MSEG_103-MBLNR. IF SY-SUBRC 0. APPEND WA_MSEG_103 TO IT_OUTPUT. ENDIF. ENDLOOP. SELECT p~mblnr s~mblnr p~mjahr zeile bwart lfbnr werks lgort ebeln ebelp lfpos sjahr dmbtr usnam menge s~budat p~matnr q~mtart p~ablad p~wempf FROM mseg AS p INNER JOIN mara AS q ON p~matnr = q~matnr JOIN mkpf AS s ON s~mblnr EQ p~mblnr INTO CORRESPONDING FIELDS OF TABLE it_mseg_106 WHERE bwart EQ 106 AND p~matnr IN so_matnr AND werks EQ pr_werks AND ebeln IN so_ebeln AND q~mtart IN so_mtart AND p~mblnr IN so_mblnr AND s~budat IN so_budat. LOOP AT it_mseg_103 INTO wa_mseg_103. READ TABLE it_mseg_106 INTO wa_mseg_106 WITH KEY lfbnr = wa_mseg_103-mblnr. IF sy-subrc = 0. APPEND wa_mseg_106 TO it_output. clear wa_mseg_106. ENDIF. ENDLOOP.
    Present selection criteria is 1. Plant 2. Posting Date 3. Material Type 4. Material Group 5. Material No. 6. Old Material No. 7. PO Order No. 8. Old PO No. 9. PO Date 10. Material Document No. New selection criteria is 1. PO no. 2. PO date 3. PO value (Ex: >=10000 <=50000) 4. Purch org 5. Doc type 6. Vendor 7. Material 8. Account assignment category 9. Order
    I hope the code is readable now.
    Thanks in advance.

  • Can we generate two invoice  for same product in two different currency

    dear all gurus,
    actually we are in export sales
    so we are generating export invoice.
    my client is asking for another invoice in INR too this is called comercila invoice
    with this i ve to generate the ARE form
    so how to do this three things
    1.export invoice in foreign currency
    2.commercial invoice in INR
    3.ARE form with referance to this export sales
    with regards
    subrat

    Hi Subrat,
    I really dont know how this scenario can be handled.
    2invoices for the same order is not allowed legally also. So if the user is asking for it, may be first they need to discuss this with their legal department.
    If they say ok, then you may think of only an output, where you can change the values with a standard exchange etc. But having 2invoices in the system of different currencies for a single sales order will lead to lot of problems in reporting.
    Can somebody throw some light on this, on how to enable this without any problems.

  • Query Designer: diferent selection for same key figure

    Hi,
    I have some queries that compare many key figures (Total sales, margins,...) between different periods for the same plant or between different plant for the same period or between different periods and plants. For do that I have 2 key figures for each concept (Total sales 1, Total sales 2, Margin 1, Margin 2,....) And two selection variable for each characteristic (plant 1, plant 2, period 1, period 2).
    So I put a selection for "1 characteristics" for each "1 key figures" and a selection for "2 characteristics"  for each "2 key figures". Simple but laborious.
    My customer, than want to maintain queries himself, ask me for a more "smart" way to do that. Can anybody help me?

    Hi,
    What i can suggest you is to make three new columns and respectively name then small team medium tam and big team.
    For first column wirte a condiiton like (SPOC < 10 ) * 1
    Second column condition (SPOC >10 AND SPOC < 30 )*1
    Third column condition (SPOC >30 )*1
    Make use of boolean operators to make these conditions.
    SO whenever your conditions satisfies it will give 1 there in there respective columns and for rest it will be blank.
    If your requirement is different then please sample output of your report.
    Hope it helps.
    Regards,
    AL

  • Batch is being Generate two Record for Same Vendor in Payable

    Gusy, (Oracle Payable)
    We have entered six validate invoice with same site,vendor,Payment mod and currency as well but when we see batch in payment window ,it is being show two record insted of one transaction ,howerver system should show one record.
    Please help me to rectify this problem or any solution.
    Thanks in advance.

    Please confirm if you are on version 12.0.4 and the vendor is an employee type supplier. We had faced similar issue in the provided condition.
    Vinit

  • Getting error in Portal "Error while generating the PDF" for BI Report

    Hi Experts,
    we are gettign the error while trying to generate the PDF file from the Reports.
    Earlier it was working fine Adobe Reader 8 , currently we have upgrated Adobe Reader 9 in our system.
    After this upggradation browser "*Failed to open PDF in Browser"*
    Could you please suggest me how to diagnostic the error. Do we need to configre something in the Portal or in the Backend BI system for this.
    Please suggest me the needful on this?
    thanks
    Narpal

    Hello,
    i am facing the same problem and found help by 925741:
    "Error while generating PDF"
    There is no more information available when clicking on the error.
    Used Software:
    Adobe 8
    SAP_ABA             700       0018      SAPKA70018     Cross-Application Component
    SAP_BASIS           700       0018      SAPKB70018     SAP Basis Component
    SAP_BW     700       0020     SAPKW70020     SAP NetWeaver BI 7.0
    PI_BASIS       2005_1_70 0018      SAPKIPYJ7I       PI_BASIS 2005_1_700   
    BI_CONT     703     0013     SAPKIBIIQ3     Business Intelligence Content
    Any other ideas?
    Thanks,
    Rainer
    Edited by: Rainer SIGG on Mar 9, 2009 4:41 PM
    Edited by: Rainer SIGG on Mar 9, 2009 5:27 PM
    Edited by: Rainer SIGG on Mar 9, 2009 5:42 PM

  • Generating dynamic columns for a report

    Hi all,
          Can anybody pls. tell me how to output dynamic columns in a report. my req. is that i've to generate so many columns as there are no. of unique(a particular field value) rows in my internal table. for e.g say suppose i've 5 rows in my internal table which has 2 fields, one short text & it's corresponding value. so now my report output shud have 5 columns with the short text as the column heading & the their corresponding values below each column heading. i heard it can be done thru field-symbols. can anyone pls. guide me.

    Hi Sushma,
    This piece of code might be useful.
    The following sections will help you to understand the steps required to define a Dynamic ALV.
    Following symbol signifies:
    Þ                    Important
    Main Steps Required
    The following are the main steps that are to be performed for defining a dynamic Alv
    1.       Defining a field catalog
    2.       Defining the dynamic table
    3.       Filling data into the table
    4.       Displaying ALV list
    Defining a field catalog
    The purpose of defining a field catalog first in case of Dynamic ALV is somewhat different than in case of normal ALV. In case of Dynamic ALV the field catalog is used to define the final internal table that will hold the data, and would be used to display the final output.
    Þ It is very important to remember that the field catalog table be refreshed first, else it might give an error.
    For example:
    DATA: T_FIELDCAT TYPE LVC_T_FCAT,
    L_FIELDCAT TYPE LVC_S_FCAT.
       Refresh T_FIELDCAT.
      CLEAR L_FIELDCAT.
      L_FIELDCAT-FIELDNAME = 'LIFNR'.
      L_FIELDCAT-INTTYPE = ''.
      L_FIELDCAT-OUTPUTLEN  = 10.
      L_FIELDCAT-COLTEXT  = TEXT-002.
      APPEND L_FIELDCAT TO T_FIELDCAT.
    Defining the dynamic table.
    This table will hold the final data that needs to be displayed. To declare the table the following things need to be done.
    Declare a field symbol
    Displaying Alv List
    This is done in the same way as we do for normal Alv. Call function “REUSE_ALV_GRID_DISPLAY” and pass the field catalog table in the export parameters and the dynamic table in Tables.
    Reward Points if it is helpful.
    Reagrds,
    Kiran I

Maybe you are looking for

  • Opening and Closing Stock Calculation In SAP BPC 10.0 NW

    Hello Experts, Need your guidance on this calculation. BI Cube: Receipts and Issues only Available on day basis BPC Report / Cube Context Product = Product1, Product2, Account = receipts, Issues, Opening Stock, Closing stock, Flow = Other Audittrail

  • Financial Analytics 7.9.6 - Reconciling to EBS 11.5.10 Data Source

    Hi all, Thank you for taking the time to review this post. Environment BI Apps: Financial Analytics 7.9.6 Source system: EBS 11.5.10 Question I have completed the BAW ETL load from my EBS 11.5.10 source system and am trying to reconcile the data in t

  • Debugging the Job

    Hi Experts, I have submitted a job in background using submit via job. Is it possible to debug the program which i have called through submit via job? Thanks Harshad.

  • How to pass a cyrillic word to a servlet?

    Hello, i want to send a bulgarian word from an html document (via form)to a servlet, but it does`t receive it in bulgarian. Anyone know how to make it? Thanks

  • Can any one do this

    3 5 14 22 30 44 6 12 15 16 31 44 11 17 21 29 30 40 26 35 38 43 47 49 3 5 9 13 14 38 2 3 27 29 39 44 9 17 32 36 42 44 2 5 21 22 25 32 7 17 23 32 38 42 6 16 20 30 31 47 4 16 25 26 31 43 1 7 37 38 42 46 15 18 29 35 38 48 16 19 21 29 36 45 5 8 10 18 31 3