Issue with select query join....

Hello,
I am facing a problem with a select query. I get a message that itab_data is not long enough.
DATA: itab_data like ptrv_head occurs 0 with header line.
SELECT *    from PTRV_HEAD
            as a inner join PA0002 as b
            on a~pernr = b~pernr
            inner join PA0001 as c
            on a~pernr = c~pernr
            INTO TABLE itab_data
       where a~PERNR in S_PERNR
       and   a~REINR in S_TRIP
       and   a~ZLAND in S_LAND
       and   a~DATV1 in S_BEGIN
       and   a~DATB1 in S_END
       and   b~NACHN in S_FIRST
       and   b~VORNA in S_LAST
       and   c~BUKRS in S_BUKRS
       and   c~KOSTL in S_KOSTL
       and   c~PERSG in S_EMPGP
       and   c~PERSK in S_SUBGP
       and   c~begda in ldbbegda
       and   c~endda in ldbendda.
Regards,
Jainam.
Edited by: Jainam Shah on Mar 27, 2009 4:13 PM
Edited by: Jainam Shah on Mar 27, 2009 4:13 PM

Hi,
Try this..
DATA: t_dfies  TYPE STANDARD TABLE OF dfies.
DATA: t_fields TYPE STANDARD TABLE OF char40.
DATA: s_dfies  TYPE dfies,
      s_fields TYPE char40.
* Get the fields
CALL FUNCTION 'DDIF_FIELDINFO_GET'
  EXPORTING
    tabname        = 'PTRV_HEAD'
  TABLES
    dfies_tab      = t_dfies[]
  EXCEPTIONS
    not_found      = 1
    internal_error = 2
    OTHERS         = 3.
IF sy-subrc <> 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Build the fields to be selected.
LOOP AT t_dfies INTO s_dfies.
  CONCATENATE 'A~' s_dfies-fieldname INTO s_fields.
  APPEND s_fields TO t_fields.
  CLEAR: s_fields.
ENDLOOP.
* Select.
SELECT (t_fields)    from PTRV_HEAD
Thanks
Naren

Similar Messages

  • Issue with Select Query in the Delivery userexit USEREXIT_SAVE_DOCUMENT

    Hi All,
    I am facing a strang issue with delivery userexit
    1) I have a delivery user exit MV50AFZ1 - USEREXIT_SAVE_DOCUMENT.
    2) In this user exit. I have written a select query as shown below
    *Get the already delivered data
        SELECT vbeln
               vgbel
               vgpos
               erdat
               erzet
               lfimg
          FROM lips
          INTO TABLE t_lips
           FOR ALL ENTRIES IN t_xlips_reference
         WHERE vgbel EQ t_xlips_reference-vgbel
           AND vgpos EQ t_xlips_reference-vgpos.
        IF sy-subrc EQ 0.
        ENDIF.
    3) The use of the above select query is to find out if there is any delivery that has already been created for the reference slaes order for which the current delivery is being created.
    4) The issue here is that for the FIRST DELIVERY, this select query should fail becuase there is no delivery created earlier and LIPS table would not have data. But, I am seeing some data getting populated in the internal table. The data that I am seeing in the internal table is the data of XLIPS which is nothing but the one that is about to get saved in the database after finishing this userexit.
    5) STRANGE Point is that this is working fine in case if I create delivery using the transaction VL01N. But, if I create delivery using VL10A program I am facing this issue.
    << Removed >>
    Thanks,
    Babu Kilari
    Edited by: Rob Burbank on Jun 16, 2010 4:22 PM

    Then why don't you add
    AND vbeln NE likp-vbeln

  • Performance issue with select query

    Hi friends ,
    This is my select query which is taking so much time to retrive the records.CAn Any one help me in solving this performance issue.
    *- Get the Goods receipts  mainly selected per period (=> MKPF secondary
      SELECT msegebeln msegebelp mseg~werks
             ekkobukrs ekkolifnr ekkozterm ekkoekorg ekko~ekgrp
             ekkoinco1 ekkoexnum
             lfa1name1 lfa1land1 lfa1ktokk lfa1stceg
             mkpfmblnr mkpfmjahr msegzeile mkpfbldat mkpf~budat
             mseg~bwart
    *Start of changes for CIP 6203752 by PGOX02
             mseg~smbln
    *End of changes for CIP 6203752 by PGOX02
             ekpomatnr ekpotxz01 ekpomenge ekpomeins
             ekbemenge ekbedmbtr ekbewrbtr ekbewaers
             ekpolgort ekpomatkl ekpowebaz ekpokonnr ekpo~ktpnr
             ekpoplifz ekpobstae
             INTO TABLE it_temp
        FROM mkpf JOIN mseg ON msegmblnr EQ mkpfmblnr
                           AND msegmjahr EQ mkpfmjahr
                  JOIN ekbe ON ekbeebeln EQ msegebeln
                           AND ekbeebelp EQ msegebelp
                           AND ekbe~zekkn EQ '00'
                           AND ekbe~vgabe EQ '1'
                           AND ekbegjahr EQ msegmjahr
                           AND ekbebelnr EQ msegmblnr
                           AND ekbebuzei EQ msegzeile
                  JOIN ekpo ON ekpoebeln EQ ekbeebeln
                           AND ekpoebelp EQ ekbeebelp
                  JOIN ekko ON ekkoebeln EQ ekpoebeln
                  JOIN lfa1 ON lfa1lifnr EQ ekkolifnr
        WHERE mkpf~budat IN so_budat
          AND mkpf~bldat IN so_bldat
          AND mkpf~vgart EQ 'WE'
          AND mseg~bwart IN so_bwart
          AND mseg~matnr IN so_matnr
          AND mseg~werks IN so_werks
          AND mseg~lifnr IN so_lifnr
          AND mseg~ebeln IN so_ebeln
          AND ekko~ekgrp IN so_ekgrp
          AND ekko~bukrs IN so_bukrs
          AND ekpo~matkl IN so_matkl
          AND ekko~bstyp IN so_bstyp
          AND ekpo~loekz EQ space
          AND ekpo~plifz IN so_plifz.
    Thanks & Regards,
    Manoj Kumar .Thatha
    Moderator message - Please see Please Read before Posting in the Performance and Tuning Forum before posting and please use code tags when posting code - post locked
    Edited by: Rob Burbank on Feb 4, 2010 9:03 AM

    Hi friends ,
    This is my select query which is taking so much time to retrive the records.CAn Any one help me in solving this performance issue.
    *- Get the Goods receipts  mainly selected per period (=> MKPF secondary
      SELECT msegebeln msegebelp mseg~werks
             ekkobukrs ekkolifnr ekkozterm ekkoekorg ekko~ekgrp
             ekkoinco1 ekkoexnum
             lfa1name1 lfa1land1 lfa1ktokk lfa1stceg
             mkpfmblnr mkpfmjahr msegzeile mkpfbldat mkpf~budat
             mseg~bwart
    *Start of changes for CIP 6203752 by PGOX02
             mseg~smbln
    *End of changes for CIP 6203752 by PGOX02
             ekpomatnr ekpotxz01 ekpomenge ekpomeins
             ekbemenge ekbedmbtr ekbewrbtr ekbewaers
             ekpolgort ekpomatkl ekpowebaz ekpokonnr ekpo~ktpnr
             ekpoplifz ekpobstae
             INTO TABLE it_temp
        FROM mkpf JOIN mseg ON msegmblnr EQ mkpfmblnr
                           AND msegmjahr EQ mkpfmjahr
                  JOIN ekbe ON ekbeebeln EQ msegebeln
                           AND ekbeebelp EQ msegebelp
                           AND ekbe~zekkn EQ '00'
                           AND ekbe~vgabe EQ '1'
                           AND ekbegjahr EQ msegmjahr
                           AND ekbebelnr EQ msegmblnr
                           AND ekbebuzei EQ msegzeile
                  JOIN ekpo ON ekpoebeln EQ ekbeebeln
                           AND ekpoebelp EQ ekbeebelp
                  JOIN ekko ON ekkoebeln EQ ekpoebeln
                  JOIN lfa1 ON lfa1lifnr EQ ekkolifnr
        WHERE mkpf~budat IN so_budat
          AND mkpf~bldat IN so_bldat
          AND mkpf~vgart EQ 'WE'
          AND mseg~bwart IN so_bwart
          AND mseg~matnr IN so_matnr
          AND mseg~werks IN so_werks
          AND mseg~lifnr IN so_lifnr
          AND mseg~ebeln IN so_ebeln
          AND ekko~ekgrp IN so_ekgrp
          AND ekko~bukrs IN so_bukrs
          AND ekpo~matkl IN so_matkl
          AND ekko~bstyp IN so_bstyp
          AND ekpo~loekz EQ space
          AND ekpo~plifz IN so_plifz.
    Thanks & Regards,
    Manoj Kumar .Thatha
    Moderator message - Please see Please Read before Posting in the Performance and Tuning Forum before posting and please use code tags when posting code - post locked
    Edited by: Rob Burbank on Feb 4, 2010 9:03 AM

  • Performance issue with select query and for all entries.

    hi,
    i have a report to be performance tuned.
    the database table has around 20 million entries and 25 fields.
    so, the report fetches the distinct values of two fields using one select query.
    so, the first select query fetches around 150 entries from the table for 2 fields.
    then it applies some logic and eliminates some entries and makes entries around 80-90...
    and then it again applies the select query on the same table using for all entries applied on the internal table with 80-90 entries...
    in short,
    it accesses the same database table twice.
    so, i tried to get the database table in internal table and apply the logic on internal table and delete the unwanted entries.. but it gave me memory dump, and it wont take that huge amount of data into abap memory...
    is around 80-90 entries too much for using "for all entries"?
    the logic that is applied to eliminate the entries from internal table is too long, and hence cannot be converted into where clause to convert it into single select..
    i really cant find the way out...
    please help.

    chinmay kulkarni wrote:Chinmay,
    Even though you tried to ask the question with detailed explanation, unfortunately it is still not clear.
    It is perfectly fine to access the same database twice. If that is working for you, I don't think there is any need to change the logic. As Rob mentioned, 80 or 8000 records is not a problem in "for all entries" clause.
    >
    > so, i tried to get the database table in internal table and apply the logic on internal table and delete the unwanted entries.. but it gave me memory dump, and it wont take that huge amount of data into abap memory...
    >
    It is not clear what you tried to do here. Did you try to bring all 20 million records into an internal table? That will certainly cause the program to short dump with memory shortage.
    > the logic that is applied to eliminate the entries from internal table is too long, and hence cannot be converted into where clause to convert it into single select..
    >
    That is fine. Actually, it is better (performance wise) to do much of the work in ABAP than writing a complex WHERE clause that might bog down the database.

  • Issue with select query for secondary index

    Hi all,
    I have created a secondary index A on mara table with fields Mandt and Packaging Material Type VHART.
    Now i am trying to write a report
    Tables : mara.
    data : begin of itab occurs 0.
    include structure mara.
    data  : end of itab.
    *select * from mara into table itab*
    CLIENT SPECIFIED where
      MANDT = SY-MANDT and
      VHART = 'WER'.
    I'm getting an error
    Unable to interpret "CLIENT". Possible causes of error: Incorrect spelling or comma error.          
    if i change to my select query     to
    *select * from mara into table itab*
      where
      MANDT = SY-MANDT and
      VHART = 'WER'.
    I'm getting an error
    Without the addition "CLIENT SPECIFIED", you cannot specify the client     field "MANDT" in the WHERE condition.
    Let me know if iam wrong and we are at 4.6c
    Thanks

    Like I already said, even if you have added the mandt field in the secondary index, there is no need the use it in the select statement.
    Let me elaborate on my reply before. If you have created a UNIQUE index, which I don't think you have, then you should include CLIENT in the index. A unique index for a client-dependent table must contain the client field.
    Additional info:
    The accessing speed does not depend on whether or not an index is defined as a unique index. A unique index is simply a means of defining that certain field combinations of data records in a table are unique.
    Even if you have defined a secondary index, this does not automatically mean, that this index is used. This also depends on the database optimizer. The optimizer will determine which index is best and use it. So before transporting this index, you should make sure that the index is used. How to check this, have a look at the link:
    [check if index is used|http://help.sap.com/saphelp_nw70/helpdata/EN/cf/21eb3a446011d189700000e8322d00/content.htm]
    Edited by: Micky Oestreich on May 13, 2008 10:09 PM

  • Issue with select query to fetch data using Join from two tabels

    Hello All-
    I want to fetch the ShowName as "SUN NIGHTLY NEWS" and EpisodeName as "091706"
    based on the condition a.TitleNo=b.TitleNo and a.seriesNo=b.TitleNo.
    If i use the only first condition-a.TitleNo=b.TitleNo than output is displayed as-
    SchedItemNo |      Showname|      EpisodeName
    2702154     |     091706     |     091706
    If i use the second Condition-a.seriesNo=b.TitleNo than Output is displayed as-
    SchedItemNo|     Showname      |     EpisodeName
    2702154     |     SUN NIGHTLY NEWS |     SUN NIGHTLY NEWS
    Than i tried following Query to use the Union based on two conditions:-
    Select distinct a.SchedItemNo,b.TitleName,b.TitleName as EpisodeName
    from ScheduleItem a,Titles b where a.TitleNo=b.TitleNo and
    a.ScheditemNo in ('2702154')
    Union All
    Select distinct a.SchedItemNo,b.TitleName,b.TitleName as EpisodeName
    from ScheduleItem a,Titles b where b.TitleNo=a.SeriesNo and
    a.ScheditemNo in ('2702154')
    than it display the following result-
    SchedItemNo|     Showname |     EpisodeName
    2702154     |     091706          |     091706
    2702154     |     SUN NIGHTLY NEWS |     SUN NIGHTLY NEWS
    Here also values are not what i want :(
    I want the result to be displayed as using SQL:-
    SchedItemNo |     Showname      |     EpisodeName
    2702154     |     SUN NIGHTLY NEWS |     091706
    Please help me out!
    Thanks in Advance for putting your efforts.Looking forward for your replies.

    SQL> create table scheduleitem
      2  as
      3  select 2702154 scheditemno, 1 titleno, 11 seriesno from dual
      4  /
    Tabel is aangemaakt.
    SQL> create table titles
      2  as
      3  select 1 titleno, '071706' titlename from dual union all
      4  select 11, 'SUN NIGHTLY NEWS' from dual
      5  /
    Tabel is aangemaakt.
    SQL> Select distinct a.SchedItemNo,b.TitleName,b.TitleName as EpisodeName
      2  from ScheduleItem a,Titles b where a.TitleNo=b.TitleNo and
      3  a.ScheditemNo in ('2702154')
      4  /
                               SCHEDITEMNO TITLENAME        EPISODENAME
                                   2702154 071706           071706
    1 rij is geselecteerd.
    SQL> Select distinct a.SchedItemNo,b.TitleName,b.TitleName as EpisodeName
      2  from ScheduleItem a,Titles b where b.TitleNo=a.SeriesNo and
      3  a.ScheditemNo in ('2702154')
      4  /
                               SCHEDITEMNO TITLENAME        EPISODENAME
                                   2702154 SUN NIGHTLY NEWS SUN NIGHTLY NEWS
    1 rij is geselecteerd.
    SQL> Select distinct a.SchedItemNo,b.TitleName,b.TitleName as EpisodeName
      2  from ScheduleItem a,Titles b where a.TitleNo=b.TitleNo and
      3  a.ScheditemNo in ('2702154')
      4  Union All
      5  Select distinct a.SchedItemNo,b.TitleName,b.TitleName as EpisodeName
      6  from ScheduleItem a,Titles b where b.TitleNo=a.SeriesNo and
      7  a.ScheditemNo in ('2702154')
      8  /
                               SCHEDITEMNO TITLENAME        EPISODENAME
                                   2702154 071706           071706
                                   2702154 SUN NIGHTLY NEWS SUN NIGHTLY NEWS
    2 rijen zijn geselecteerd.
    SQL> select a.SchedItemNo "SchedItemNo"
      2       , show.TitleName "Showname"
      3       , episode.TitleName "EpisodeName"
      4    from ScheduleItem a
      5       , Titles episode
      6       , Titles show
      7   where a.TitleNo = episode.TitleNo
      8     and a.SeriesNo = show.TitleNo
      9  /
                               SchedItemNo Showname         EpisodeName
                                   2702154 SUN NIGHTLY NEWS 071706
    1 rij is geselecteerd.Regards,
    Rob.

  • Issue with Select options in select statement - ABAP Question

    Hi
    I am facing an issue with select options. Select statement is returning sy-subrc as 4.
    I wrote the program as below:
    SELECT-OPTIONS:
    s_kunnr FOR bsad-kunnr,
    s_lifnr FOR bsak-lifnr,
    s_gjahr FOR bsad-gjahr,
    s_bukrs FOR bsad-bukrs,
    s_saknr FOR bsad-saknr,
    s_budat FOR bsak-budat.
    In start of selection I have written the select statement as
    SELECT * FROM bsak INTO TABLE lt_bsak
    WHERE bukrs IN s_bukrs AND lifnr = s_lifnr AND gjahr IN s_gjahr AND budat IN s_budat AND saknr IN s_saknr.
    In selection screen I have not entered any values and executed the program. I am not getting any result. When I debug that, sy-subrc is 4 at above select statement. But table has records.
    If am removing the "lifnr = s_lifnr " condition in select then select is returning values.
    I am not getting where I made the mistake. Please suggest.
    Thank you
    Hanu

    Hi,
    The problem here with where condition select option lifnr = s_lifnr.
    Use below select query.
    SELECT * FROM bsak INTO TABLE lt_bsak
    WHERE bukrs IN s_bukrs
        AND lifnr     IN s_lifnr
        AND gjahr   IN s_gjahr
        AND budat  IN s_budat
        AND saknr  IN s_saknr.
    s_lifnr is a select option and you are passing it as parameter lifnr = s_lifnr.
    if you want to pass this s_lifnr as single vale then pass in below mentioned way.
    lifnr = s_lifnr-low
    BR,
    Vijay

  • Issue with the query

    Hi Friends,
    I am having a problem with this query. The query is to fetch all the elements for the employees. The elements that need to be fetched are set up in the flex sets.
    In the table fnd_flex_values there are columns start_date_active and end_date_active fields and these are null. In the below query when I use the condition
    and trunc(sysdate) between NVL(ffv.start_Date_active,TO_DATE('01-JAN-1951','DD-MON-YYYY')) and NVL(ffv.end_Date_active,TO_DATE('31-DEC-4712','DD-MON-YYYY'))
    the query fetches the results in 5seconds
    but when I replace the same query with the statement
    and to_date(to_char(ppa.date_earned,'DD-MON-YYYY'),'DD-MON-YYYY') between NVL(ffv.start_Date_active,TO_DATE('01-JAN-1951','DD-MON-YYYY')) and NVL(ffv.end_Date_active,TO_DATE('31-DEC-4712','DD-MON-YYYY'))
    the query takes a lot of time. Infact it gets timed out
    Columns start_date_active and end_date_active fields are date type. Can anyone say what is the issue with this query
    When I give the sysdate instead of ppa.date_earned date
    select papf.person_id, papf.full_name, papf.employee_number
    ,petf.element_name, pivf.name,
    prrv.result_value, ppa.date_earned,ppa.effective_date, to_char(ppa.date_earned,'DD-MON-YYYY') date_earned, paaf.assignment_id, petf.effective_start_date
    ,petf.effective_end_date, ffv.*
    from per_all_people_f papf
    ,per_all_assignments_f paaf
    ,pay_payroll_actions ppa
    ,pay_assignment_actions paa
    ,pay_element_types_f petf
    ,pay_input_values_f pivf
    ,pay_run_results prr
    ,pay_run_result_values prrv
    ,per_person_type_usages_f pptuf
    ,per_person_types ppt
    ,fnd_flex_values ffv
    ,fnd_flex_value_sets ffvs
    where 1=1
    and papf.person_id = paaf.person_id
    and trunc(ppa.date_earned) between trunc(papf.effective_start_date) and trunc(papf.effective_end_date)
    and trunc(ppa.date_earned) between trunc(paaf.effective_start_date) and trunc(paaf.effective_end_date)
    and paa.assignment_id = paaf.assignment_id
    and paa.action_status='C'
    and ppa.payroll_id = 61
    --and ppa.consolidation_set_id = 108
    and ppa.payroll_action_id = paa.payroll_action_id
    and prr.assignment_action_id = paa.assignment_action_id
    and prr.element_type_id = petf.element_type_id
    -- and trunc(ppa.date_earned) between trunc(petf.effective_start_date) and trunc(petf.effective_end_date)
    and trunc(sysdate) between petf.effective_start_date and petf.effective_end_date
    and prrv.run_result_id = prr.run_result_id
    and prrv.input_value_id = pivf.input_value_id
    and     prr.status in ('P','PA')
    and pivf.name ='Pay Value'
    and ppa.date_earned between pivf.effective_start_date and pivf.effective_end_date
    and ppa.time_period_id=145
    and paaf.person_id = pptuf.person_id
    and pptuf.person_type_id = ppt.person_type_id
    and ppt.user_person_type = nvl('Employee',ppt.user_person_type)
    and trunc(ppa.date_earned) between pptuf.effective_start_date and pptuf.effective_end_date
    and petf.element_name = ffv.flex_value
    and ffv.flex_value_set_id = ffvs.flex_value_set_id
    and ffv.enabled_flag ='Y'
    and ffvs.flex_value_set_name='GROUP_ELEMENTS'
    and trunc(sysdate) between NVL(ffv.start_Date_active,TO_DATE('01-JAN-1951','DD-MON-YYYY')) and NVL(ffv.end_Date_active,TO_DATE('31-DEC-4712','DD-MON-YYYY'))
    -- and trunc(ppa.effective_date) between nvl(ffv.start_Date_active,trunc(ppa.effective_date)) and NVL(ffv.end_Date_active,trunc(ppa.effective_date))
    -- and to_date(to_char(ppa.date_earned,'DD-MON-YYYY'),'DD-MON-YYYY') between NVL(ffv.start_Date_active,TO_DATE('01-JAN-1951','DD-MON-YYYY')) and
    order by ffv.parent_flex_value_low, papf.employee_number;
    Thanks

    ʃʃp wrote:
    /* Formatted on 2012/06/11 13:34 (Formatter Plus v4.8.8) */
    SELECT DISTINCT fr_ir_code, fr_fc_code1, product1, param_rep_prd, no_of_links_start_ir, no_of_supps_start_ir
               FROM comm_exst_rp_comit_aggr_irview
              WHERE fr_ir_code = 'AS01'
                AND srta_period = 2
                AND srta_year = 2011
                AND param_rep_prd = '2011-2'
                AND DECODE (:bind_variable, 'All', 1, 0) = DECODE (:bind_variable, 'All', 1, 1)
           GROUP BY fr_ir_code, fr_fc_code1, product1, param_rep_prd, no_of_links_start_ir, no_of_supps_start_ir
    UNION
    SELECT DISTINCT fr_ir_code, fr_fc_code1, product1, param_rep_prd, no_of_links_start_irda AS no_of_links_start_ir,
                    no_of_supps_start__irda AS no_of_supps_start_ir
               FROM comm_exst_rp_comit_aggr_irview
              WHERE fr_ir_code = 'AS01'
                AND srta_period = 2
                AND srta_year = 2011
                AND param_rep_prd = '2011-2'
                AND da_status = 'N'
                AND DECODE (:bind_variable, 'All', 1, 0) = DECODE (:bind_variable, 'All', 0, 0)
           GROUP BY fr_ir_code, fr_fc_code1, product1, param_rep_prd, no_of_links_start_irda, no_of_supps_start__irdaYes Union is one of the best solutions for handling two queries.
    As per my understanding DECODE function use is:
    DECODE (value,<if this value>,<return this value>,
    <if this value>,<return this value>,
    <otherwise this value>)
    But I am little bit jumbled for understanding below two lines in the query..
    1)
    AND DECODE (:bind_variable, 'All', 1, 0) = DECODE (:bind_variable, 'All', 1, 1)
    2)
    AND DECODE (:bind_variable, 'All', 1, 0) = DECODE (:bind_variable, 'All', 0, 0)Can you please tell me how the comparision is done using DECODE function?

  • Issues with Bex query structures and Crystal Reports/Webi

    Hi experts,
    I'm having an issue with Bex Query structures and nulls. I've built a Crystal Report against a Bex query that uses a Bex Query structure. The structure looks like the following
    Budget $
    Budget %
    Actual $
    Actual %
    Budget YTD
    etc
    if I drag the structure into the Crystal Report detail section with a key figure it displays like this
    Budget $     <null>
    Budget %     <null>
    Actual $     300
    Actual %     85
    Budget YTD     250
    the null values are displayed (and this is what is required). However if I filter using a Record selection or group on a profit centre then the nulls along with the associated structure component are not displayed.
    Actual $     300
    Actual %     85
    Budget YTD     250
    Webi is also behaving similarly. Can anyone explain why the above is happening and suggest a solution either on the Bex side of things or on the Crystal Reports side of things? I'm confused as to why nulls are displayed in the first example and not the second.
    Business Objects Edge 3.1 SP2
    SAP Int Kit SP2
    OS: Linux
    BW 701 Level 6
    Crystal Reports 2008 V1
    Thanks
    Keith

    Hi,
    Crystal Reports and Web Intelligence will only show data which is in the cube. You could have an actual 0 or Null entry whithout grouping but by changing the selection / grouping in the report the data does not include such entry anymore.
    ingo

  • How to create a DB Adapter with select query having inner query

    Hi All,
    I am trying to create a DB Adapter with select query. The query has some inner queries in it. It is just like this select a, b, c, (select d from e) d, (select e from e) e from tablename.
    The problem here is with the xsd generated for this query. Xsd is not getting generated properly for all the fields it is just getting generated till c element and when it encounters
    the inner query it is stopping the generation of xsd. So for the above query the xsd is something similar to the below
    <xs:complexType name="rewOutput">
    <xs:sequence>
    <xs:element name="a" type="xs:string" nillable="true"/>
    <xs:element name="b" type="xs:string" nillable="true"/>
    <xs:element name="c" type="xs:string" nillable="true"/>
    <xs:element name="select_d" type="xs:string" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    as shown above the xsd is just getting generated till the first inner query. What should be done to get the full fledged xsd. Should it be manually built ?? Please help me on this.
    Thanks In Advance.
    Edited by: 959766 on Nov 30, 2012 1:20 AM

    Hi,
    I don't think the parser will be able to understand your query properly... I would try building the xsd manually...
    Cheers,
    Vlad

  • Issues with selection tools using PS CS6

    OK, I'm having issues with selections in Photoshop CC…   This video shows my issue (which I never had with CS3).  Basically, I go to select an area within an image, and then the selection area disappears, and when I go to move the selection area I am unable to get the selection to "drop".  This happens regardless of whether I'm using my wacom tablet or my trackpad.  My mac is a 2009 macbook pro running 10.8.5.  Updated my OS and wacom tablet with the latest drivers.  I've gone into preferences and disabled the GPU, but to not avail.  Haven't run into this issue at work using CS6 (but i'm on a windows box there) Any ideas?  Any help would be greatly appreciated ;-) http://www.youtube.com/watch?v=FGPla7V9QI8

    say, SAKNR is 10 character field and ur appending only 6 characters, then it will give such type of errors normally.
    before inserting the data to ur Z table use function module... CONVERSION_EXIT_ALPHA_INPUT

  • Issue in select query with where clause

    Hi guys,
    I'm facing an issue while using select query with the where clause. When I'm selecting all the data from the table it returns the correct result. But when I'm using the where clause to get the specific rows from the table it returns no rows. But the data I'm trying to fetch using the where condition exists in the table.
    Here is my query which causing the issue,
    select * from mytable where myfield = 'myvalue'
    But if I use the following query it returns the result correctly.
    select * from mytable
    Also the myfield value 'myvalue' exists in the table.
    I have tried by running this query in both SQL Developer and SQL Plus. I have tried this query in mssql as well. It works perfectly and returns correct result sets for both the queries I have mentioned above. I'm unable to predict the issue as I'm new to ORACLE. Please help.
    Thanks,
    Ram.

    Hi Ram,
    I experienced an issue similar to this with a varchar2 field. Some of our records had a hidden newline character at the end of them, which was making queries like the one below fail:
    select * from employees
    where email = '[email protected]'The best way I found to detect this was to use
    select 'XX'||email||'XX' from employeesTo make sure that there were no newlines. But that is just a guess. If you could provide some example table data and the outputs of your selects, it would be helpful.
    Jeff

  • Selection Screen pop up issue - with jump query RRI

    Hi Experts,
    I am facing one issue regarding Jump Query(RRI) functionality.
    I have one query and also one drill down query.
    I need to jump from the first query to the drill down query.
    To achieve this , I have added the first query as sender in RSBBS T-Code and added the drill down query as Receiver.
    I have also done the variable assignment from the Assignment Details tab.
    Now the Jump functionality is working.
    But , whenever I am jumping to the receiver query , The selection screen pop up is appearing.
    I don't want this selection screen to appear during jump.
    Please help me in this regard.
    Thanks,
    Biswarup

    Hi ,
    For testing purpose , I have used a single query as sender as well as receiver query.
    So , the characteristics set is same.
    The query is a simple query, with only one input variable.
    and I have assigned it, from variable assignment.
    But still the selection screen pop up is coming , when trying to jump.
    Please suggest.
    Regards,
    Biswarup

  • Issue in select query

    HI All experts,<br><br>
    i have  a program in which i have a select query <pre>
    SELECT  b~vertrag
              a~anlage
              a~operand
              a~saison
              a~ab
              a~ablfdnr
              a~bis
              a~wert1
      FROM ettifn AS a INNER JOIN ever AS b
      ON aanlage = banlage
      INTO TABLE li_captran PACKAGE SIZE p_pack
      WHERE a~anlage IN s_anlage
        AND a~ab <= l_date
        AND a~bis >= l_date
        AND a~operand IN ('ID-CAPLOAD','ID-OBLT')
        AND b~einzdat <= l_date
        AND b~auszdat >= l_date.</pre><br><br>
    this query is taking a lot of time in running and we are facing lot of performance related issues
    <br><br>
    kindly guide me how i can break this into som simpler query
    <br><br>
    ettifn has 10 million records
    ever has around 5 million records .
    <br><br>
    also please tell me how much data i can store into an internal table
    can i store 5 million records in an internal table ??????
    is it good in terms of performance of a program if not please tell me what is the better way of doing dat .
    <br><br>
    also tell me how secondry indexes help in improving performance of select query
    is it good to maintain number of secondry indexes in a standard table or it decreases performance of a standard table .
    <br><br>
    <pre>
      TYPES: BEGIN OF ty_eanlh,
              anlage LIKE eanlh-anlage,
              bis LIKE eanlh-bis,
              tariftyp LIKE eanlh-tariftyp,
             END OF ty_eanlh.
      DATA: l_date TYPE datum.
      DATA: li_eanlh TYPE HASHED TABLE OF ty_eanlh WITH UNIQUE KEY anlage
                                                                   bis
                                                   WITH HEADER LINE.
      DATA: li_captran TYPE HASHED TABLE OF ty_captran WITH UNIQUE KEY vertrag
                                                                       anlage
                                                                       operand
                                                                       saison
                                                                       ab
                                                                       ablfdnr
                                                        WITH HEADER LINE.
      DATA: l_tariftyp LIKE eanlh-tariftyp.
    l_date = p_date + 6.
      l_date = p_date + 5.          "As per Terry's Request 1/23/2009
      CHECK NOT p_cap IS INITIAL.
    Get Operand Values
      SELECT  b~vertrag
              a~anlage
              a~operand
              a~saison
              a~ab
              a~ablfdnr
              a~bis
              a~wert1
      FROM ettifn AS a INNER JOIN ever AS b
      ON aanlage = banlage
      INTO TABLE li_captran PACKAGE SIZE p_pack
      WHERE a~anlage IN s_anlage
        AND a~ab <= l_date
        AND a~bis >= l_date
        AND a~operand IN ('ID-CAPLOAD','ID-OBLT')
        AND b~einzdat <= l_date
        AND b~auszdat >= l_date.
        IF sy-subrc EQ 0 AND NOT li_captran[] IS INITIAL.
       Get Rate Category
          SELECT anlage
                 bis
                 tariftyp
          FROM eanlh INTO CORRESPONDING FIELDS OF TABLE li_eanlh
          FOR ALL ENTRIES IN li_captran
          WHERE anlage = li_captran-anlage
            AND ab <= l_date
            AND bis >= l_date.
       Get POD ID
          SELECT a~anlage
                 a~int_ui
                 a~dateto
                 a~timeto
                 b~ext_ui
          INTO TABLE i_pod
          FROM euiinstln AS a INNER JOIN euitrans AS b
          ON aint_ui = bint_ui
          FOR ALL ENTRIES IN li_captran
          WHERE a~anlage = li_captran-anlage.
          IF sy-subrc EQ 0 AND NOT i_pod[] IS INITIAL.
            SORT i_pod BY anlage.
            SELECT vertrag
                   int_ui
                   serviceid
            FROM eservice
            INTO TABLE i_servicect
            FOR ALL ENTRIES IN i_pod
            WHERE int_ui = i_pod-int_ui
              AND service_start <= l_date
              AND service_end >= l_date
              AND service = 'ESUP'.
          ENDIF.
          LOOP AT li_captran.
            i_ct-anlage = li_captran-anlage.
            READ TABLE li_eanlh WITH KEY anlage = li_captran-anlage.
            IF sy-subrc EQ 0.
              i_ct-tariftyp = li_eanlh-tariftyp.
              READ TABLE i_rate WITH KEY tariftyp = i_ct-tariftyp.
              IF sy-subrc NE 0.
                CONTINUE.
              ENDIF.
            ELSE.
              i_ct-tariftyp = '0000'.
            ENDIF.
            READ TABLE i_pod WITH KEY anlage = li_captran-anlage.
            IF sy-subrc EQ 0.
              READ TABLE i_servicect WITH KEY int_ui = i_pod-int_ui.
              IF sy-subrc EQ 0.
                i_ct-serviceid = i_servicect-serviceid.
              ENDIF.
            ENDIF.
            IF li_captran-operand = 'ID-CAPLOAD'.
              i_ct-cap = li_captran-wert1.
            ELSEIF li_captran-operand = 'ID-OBLT'.
              i_ct-tran = li_captran-wert1.
            ENDIF.
            COLLECT i_ct.
            CLEAR: li_captran, i_ct.
          ENDLOOP.
        ENDIF.
      ENDSELECT.</pre><br><br>
      this code is taking a lot of time to execute and decreasing the system performance .<br><br>
    please guide me how can i increase the performance of this code .<br><br>
    Thanks in advance<br><br><br><br>
    Edited by: Matt on Oct 11, 2009 9:45 PM

    Hi matt ,
    no i am not thru bcoz of formatting i just trying to remove it and i just marked it answered so that it will not come in my unanswered because unanswered questions are limited.
    also could you please help me in this question .
    now how can i change this question to unanswerd .
    plz guide me
    Thanks in advance

  • Select query join problem

    hey guys,
    i've used a select query to get details from KNA1, KNVV, ADRC, KNVP, pa0002. tables by joining. but i'm getting only about 170 records. there are more than 3000 records in the database. for each tables. here is my select query
    SELECT KNA1KUNNR KNA1NAME1 KNA1NAME2 ADRCSTR_SUPPL1 ADRCSTR_SUPPL2 ADRCSTR_SUPPL3 ADRCCITY1 KNVVVWERK KNVPPERNR PA0002VORNA PA0002NACHN KNVVVKBUR KNVVKDGRP KNA1STCD1 KNA1~STCEG
        INTO CORRESPONDING FIELDS OF TABLE IT_FINAL FROM KNA1
        INNER JOIN KNVV ON KNA1KUNNR = KNVVKUNNR
        INNER JOIN ADRC ON KNA1ADRNR = ADRCADDRNUMBER
        INNER JOIN KNVP ON KNA1KUNNR = KNVPKUNNR
        INNER JOIN PA0002 ON KNVPPERNR = PA0002PERNR
        WHERE KNA1KUNNR IN S_KUNNR AND KNVVVWERK in P_VWERK AND PA0002PERNR IN S_PERNR AND KNVVVKBUR IN S_VKBUR AND KNVV~KDGRP IN S_KDGRP.
    can anyone tell me the problem in the above query.
    thanks.

    Hi
    you are using tables KNA1, KNVV, ADRC, KNVP, pa0002.
    Create internal table for each table mentioned above with all the primary keys and find the links between them
    then select data in one table and select data from another table into your internal table for all the entries exists in firs internal table.
    go for below links.
    http://www.sapdev.co.uk/abap/commands/select_forallentries.htm
    http://wiki.sdn.sap.com/wiki/display/ABAP/FORALLENTRIES-Home+page
    http://help.sap.com/abapdocu_70/en/ABENWHERE_LOGEXP_ITAB.htm
    Thanks
    lalit

Maybe you are looking for

  • A problem when referring to a stored procedure in a crystal report

    Hi all, I've checked that when calling one stored-procedure within a crystal report, one sequence will be selected for 2 times. Thus 2 will be added to the corr. sequence No. And I've also directly ran such procedure in 'SQL/Plus' that follows, to ma

  • Problem help me

    Hi iam having a problem my flash movie is there is Movieclip symbol when i click it the number of times i click it should be displayed in a dynamic text box the code used is not working i entered this code in the movie clip symbol named "ball 2" onCl

  • Location of XML files

    I am looking into using the XML SQL utility to generate XML documents. Is it possible for the XML documents to be output to any location?

  • Error on Material Creation.. XK01

    Hi Gurus... Am new to SAP Logistics & MM When i create Material master (XK01).. I get the following Error msg.. E:0:001 Material shud start with zsan Pls help to solve this Error

  • Error msg in migo

    hi, while doing migo for subcontracting PO with account assignment 'E' sale order the subitem is not coming and giving error msg ''The system could not copy the sub-items in this line'' what could be the possible reason for this particular msg. Rgd,