ReportViewer Total column InScope causes repeating values in Innermost group

I have a table which has only one cell. Inside that cell it has a rectangle (design purposes only) and inside that rectangle there is my main table. Primary table is used for paging, so it has one group. Innermost table is for data view. The problem is,
that if i have ANY expression containing InScope("Matrix1_Group1") in Total column in the innermost table, i get repeating values in that table. Numbers are ok, but rows titles are repeating.
+-----------+------------+---------+----------+
| Country | Producer | [Month] | Total |
+-----------+------------+---------+----------+
| [Country] | [Producer] | SUM(Q) | <<Expr>> |
+-----------+------------+---------+----------+
| Total | SUM(Q) | <<Expr>> |
+------------------------+---------+----------+
This is the sample of my innermost table (tried my best. not allowed to insert images). I i use InScope("Matrix1_Group1") in ANY (value, Color, BackgroundColor) expression in Total column, Producer column values are repeating (the first value
is repeated in all rows).
Sample expression from cell in Total column is: =IIF(InScope("Matrix1_Group1"), Fields!Producer.Value/SUM(Fields!Producer.Value, "Matrix1_Group1"), "100%")
More information abou this problem.
It only occurs if two conditions are met: repor has paging and InScope returns true. I have to make pages in report and each page contains table and some other blocks. I use List component to create a list and use grouping. Then i put a table inside. If
table is outside any element, everything works perfectly, but if it is inside list, table, matrix or something similar allowing to create pages, the problem occurs. 
Also, if InScope allways returns FALSE and none condition is met - there is no problem. But if any InScope return TRUE - i have repeating values in innermost group.

Please have a look at the following links:
http://download-west.oracle.com/docs/html/B10602_01/orbr_summary.htm#1010648
http://download-west.oracle.com/docs/html/B10602_01/toc.htm

Similar Messages

  • Use Album Artists causes repeat values of Various Artists

    The obvious implication of the new *Use Album Artist* feature in the Colum Browser is that only Album Artist values will be listed and further that each will be listed only once, sorted by the value of Album Artist or Sort Album Artist. It may be that the previous build (where the feature was introduced) did just this but I have noticed that the current build with Group Compilations turned off will, for example, list the value Various Artists at multiple locations in the Artist column in the browser.
    For example, say we have a playlist with albums by Alice, Charlie, Eric & Grace together with a compilation featuring artists Bob, Dave & Fiona with an album artist value of "Various Arists".
    With *Use Album Artists* turned on and *Group Compilations* turned off I would expect I would expect the artist panel in the column browser to read:
    Alice
    Charlie
    Eric
    Grace
    Various Artists
    but what we actualy get is:
    Alice
    Various Artists
    Charlie
    Various Artists
    Eric
    Various Artists
    Grace
    In other words each different value used for Album Artist with compilations, Various Artist, Original Cast, etc. may be listed multiple times at multiple locations within the Artist column instead of just once as expected.
    So, is it just me? Anybody still on 9.1.0.79 or a Mac build care to confirm if they see the same?
    tt2

    Compilations need a value for album artist to keep them connected on an iPhone as I've noted elsewhere. However exploring the problem further it isn't even about compilations & various artists, it was just working with them that brought it to my attention. A more accurate description of the problem is:
    With the new *Use Album Artists* feature turned on the artist pane fails to re-sort when you change the value of Album Artist or Sort Album Artist and does not update until you close and re-open iTunes.
    E.g. Change "Albert King" to "King, Albert" in either Album Artist, Sort Album Artist or both and the entry in the Artists pane will stay put under A. Close iTunes and re-open and it will have moved to K.
    I have already sent feedback with a link to this thread. Again it would be useful if any Mac or Win 9.1.0.79 users could confirm if they see the same behaviour.
    tt2

  • SQL to sum a column while avoiding repeating values

    Dear All
    i have this table called Loans_installments that contains the client's loan installments.
    a sample of data:
    branch currency client_id loan_no inst_mat_date inst_seq original_inst_amt int_amt
    110 2 222 100 1/1/2013 1 0 50
    110 2 222 100 1/2/2013 2 0 52
    110 2 222 100 1/3/2013 3 0 54
    110 2 222 100 1/4/2013 4 500 90
    110 2 222 100 1/5/2013 5 0 50
    110 2 222 100 1/6/2013 6 0 51
    110 2 222 100 1/7/2013 7 0 50
    110 2 222 100 1/8/2013 8 600 105
    110 2 222 100 1/9/2013 9 0 50
    110 2 222 100 1/10/2013 10 0 54
    110 2 222 100 1/11/2013 11 0 50
    110 2 222 100 1/12/2013 12 700 120
    now what i want to sum the field int_amt based on original_inst_amt value (0 or has a value) and put the result on the int_amt that has an orig_inst_amt value <>0.
    the result should be like this:
    branch currency client_id loan_no inst_mat_date inst_seq original_inst_amt int_amt
    110 2 222 100 1/1/2013 1 0 0
    110 2 222 100 1/2/2013 2 0 0
    110 2 222 100 1/3/2013 3 0 0
    110 2 222 100 1/4/2013 4 500 246
    110 2 222 100 1/5/2013 5 0 0
    110 2 222 100 1/6/2013 6 0 0
    110 2 222 100 1/7/2013 7 0 0
    110 2 222 100 1/8/2013 8 600 256
    110 2 222 100 1/9/2013 9 0 0
    110 2 222 100 1/10/2013 10 0 0
    110 2 222 100 1/11/2013 11 0 0
    110 2 222 100 1/12/2013 12 700 274
    any help plz.

    Using model clause
    SQL> with t
      2  as
      3  (
      4  select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/1/2013','mm/dd/yyyy') inst_mat_date, 1  inst_seq, 0   original_inst_amt, 50 int_amt from dual
      5  union all
      6  select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/2/2013','mm/dd/yyyy') inst_mat_date, 2  inst_seq, 0   original_inst_amt, 52 int_amt from dual
      7  union all
      8  select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/3/2013','mm/dd/yyyy') inst_mat_date, 3  inst_seq, 0   original_inst_amt, 54 int_amt from dual
      9  union all
    10  select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/4/2013','mm/dd/yyyy') inst_mat_date, 4  inst_seq, 500 original_inst_amt, 90 int_amt from dual
    11  union all
    12  select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/5/2013','mm/dd/yyyy') inst_mat_date, 5  inst_seq, 0   original_inst_amt, 50 int_amt from dual
    13  union all
    14  select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/6/2013','mm/dd/yyyy') inst_mat_date, 6  inst_seq, 0   original_inst_amt, 51 int_amt from dual
    15  union all
    16  select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/7/2013','mm/dd/yyyy') inst_mat_date, 7  inst_seq, 0   original_inst_amt, 50 int_amt from dual
    17  union all
    18  select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/8/2013','mm/dd/yyyy') inst_mat_date, 8  inst_seq, 600 original_inst_amt, 105 int_amt from dual
    19  union all
    20  select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/9/2013','mm/dd/yyyy') inst_mat_date, 9  inst_seq, 0   original_inst_amt, 50 int_amt from dual
    21  union all
    22  select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/10/201','mm/dd/yyyy') inst_mat_date, 10 inst_seq, 0   original_inst_amt, 54 int_amt from dual
    23  union all
    24  select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/11/201','mm/dd/yyyy') inst_mat_date, 11 inst_seq, 0   original_inst_amt, 50 int_amt from dual
    25  union all
    26  select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/12/201','mm/dd/yyyy') inst_mat_date, 12 inst_seq, 700 original_inst_amt, 120 int_amt from dual
    27  )
    28  select branch
    29       , currency
    30       , client_id
    31       , loan_no
    32       , inst_mat_date
    33       , inst_seq
    34       , original_inst_amt
    35       , decode(original_inst_amt, 0, 0, sum(int_amt) over(partition by cnt)) int_amt
    36    from (
    37            select branch
    38                 , currency
    39                 , client_id
    40                 , loan_no
    41                 , inst_mat_date
    42                 , inst_seq
    43                 , original_inst_amt
    44                 , int_amt
    45                 , cnt
    46              from t
    47             model
    48             dimension by
    49             (
    50                inst_seq
    51             )
    52             measures
    53             (
    54                branch, currency, client_id, loan_no, inst_mat_date, original_inst_amt, int_amt, 1 cnt
    55             )
    56             rules
    57             (
    58                 cnt[any] = case
    59                                   when original_inst_amt[cv()-1] > 0 then
    60                                      cnt[cv()-1] + 1
    61                                   else
    62                                      nvl(cnt[cv()-1], cnt[cv()])
    63                               end
    64             )
    65         )
    66  /
        BRANCH   CURRENCY  CLIENT_ID    LOAN_NO INST_MAT_   INST_SEQ ORIGINAL_INST_AMT    INT_AMT
           110          2        222        100 01-JAN-13          1                 0          0
           110          2        222        100 02-JAN-13          2                 0          0
           110          2        222        100 03-JAN-13          3                 0          0
           110          2        222        100 04-JAN-13          4               500        246
           110          2        222        100 05-JAN-13          5                 0          0
           110          2        222        100 06-JAN-13          6                 0          0
           110          2        222        100 08-JAN-13          8               600        256
           110          2        222        100 07-JAN-13          7                 0          0
           110          2        222        100 09-JAN-13          9                 0          0
           110          2        222        100 11-JAN-01         11                 0          0
           110          2        222        100 10-JAN-01         10                 0          0
           110          2        222        100 12-JAN-01         12               700        274
    12 rows selected.
    SQL>

  • Invoice Forms created with Adobe X - default value for "total" column should be blank

    I am new to the forum and just finding my way around.  Thank you for any help.
    I've created an invoice template in Word, then imported it into Adobe X Pro to turn it into a form.  Pretty simple, but one thing is troubling me.  I have the usual description, quantity, price each, and total columns.  The "total" columns are defaulting with a "0" in them, and I'd prefer they default blank unless an entry is made on that line.  I have right-clicked the "total" fields properties and the default values are blank already, but a zero still shows up.  I  know it can be done because one of my earlier forms defaults to a blank space until I entered something on that line. Then it calculated.  How can I make the "total" column blank unless something is entered there?
    Secondly, when I save a form and want to go back to make changes, I'm not seeing how to do this.  It seems to save as a .pdf, and if I want to modify the form portion I have to start all over from scratch.  What am I missing?
    Thanks so much for any help.

    George, thank you for the response.
    I've entered the script, and no change.  The "total" columns still show a (zero) 0 even when I have not entered anything in that line.
    For example:
    Description             Qty     Unit Price     Total
                                                                             0
                                                                             0
                                                                             0
    etc... all the day down the form.
    I'd like the zeroes not to appear when there is nothing on the Description lines.
    Incidentally, when selecting fields to use for calculations for the "total" column, we're supposed to place a check mark in the box of the fields to be calculated - and I can't CLICK in them.  I have to use the space bar.  Is that how it is supposed to work?
    Thanks for your quick response.
    J
    I

  • Customizing grand total columns in pivot view

    Hi,
    I need to customize grand total column name in pivot view
    ex: If i have two measure order quantity and order amount when i am selecting aggregation after in column properties it is getting grand total i need to display as grand total for OQ and grand total for OA
    Please give suggestions
    Thanks,
    Kartheek.
    Edited by: 998231 on May 26, 2013 11:31 PM

    Hi Kartheek,
    In Pivot View, the default Grand Total can not be renamed to have measure specific grand total labe (The one which we specify in the pivot view either by row or column).
    But you can try having one seperate measure (in criteria) which will calculate the grand total of each measure by dimensions, which are available on the report.
    In sort you can achieve this using table and narrative view together (Not by pivot view).
    Expresion to be used for grand total in report criteria is Sum( Measure By Dim1, dim2... DimN)
    where Dim1 and dim2 are the dimesional column available on the report and measure is you OQ/OA.
    Create a table view as a default view (do not add any report level agg) and then add narrative view to display the Grand total OQ and Grand Total OA. You can add your custom lables with HTML tag, disply the 1st row only as the values will be repeated for grand total.
    If you find any other solution do let me know. As of now I can think of this as a best solution.
    Regards,
    Kashi

  • Sorting on a total column or calculated column in a pivot table

    We have a pivot table showing customer activity by month. We have added a calculated field to show the YTD average instead of a total column. Is there a way to sort on this calculated field? We have applied a sort on the measure in the criteria, and our resulting pivot table sorts by the values in the most recent month, not by the YTD average.

    I think we cant sort when we use a pivot view becoz all the rows are already fixed. Say your rows are sales and volume and columns are year 2007 and 2008, imagine if you r given the sorting ability then if number of units solds is more then it need to change the rows (but in pivot table rows are fixed). So, we cant sort in pivot tables!!

  • ALV: How do I suppress repeating values and page breaks on printed output?

    Good day, everyone!
    First, I've done a LOT of searching trying to find the answer to my question, but I'm not finding an answer.  If this has already been answered and you can point me to a URL, I would appreciate it.
    Here's my issue:  I have a rather simple ALV report.  It has the columns of Person ID, Personnel Number, For Period, In Period, and Amount.  I sort by Person ID and Personnel Number, and if the value repeats on the next line of the report, I want to suppress it (make it blank).
    I thought the answer was in the following code, where I set the GROUP attribute to asterisk:
      CLEAR sortcat_ln.
      sortcat_ln-spos      = '1'.
      sortcat_ln-fieldname = 'PERSONID_EXT'.
      sortcat_ln-up        = c_true.
      sortcat_ln-group     = '*'.
      APPEND sortcat_ln TO sortcat.
      CLEAR sortcat_ln.
      sortcat_ln-spos      = '2'.
      sortcat_ln-fieldname = 'PERNR'.
      sortcat_ln-up        = c_true.
      sortcat_ln-group     = '*'.
      APPEND sortcat_ln TO sortcat.
    It looks PERFECT on the screen -- the values are suppressed if they repeat, and everything appears together on one screen.  However, when I print the report, two things happen:  1) The values repeat on each row, even if they are the same, and 2) I get a page break after each Person ID / Personnel Number combination.
    I now realize that I can't use the GROUP attribute.  Is there some other way in ALV to blank these repeating values and keep all the rows together on one page, rather than page breaking after each value change?
    Thanks!
    Dave

    Hi
    Same requirement i had before, when i try to print preview. the output of the grid display is in grouping is ok, but when i print preview or print it doesnt cater the grouping and page breaks, so what i did i modify the internal table use in alv , after hitting the print preview/print with the format desired by the user. you can do that in user-command. see code below
    FORM user_command USING r_ucomm TYPE syucomm
                            rs_selfield TYPE slis_selfield.
      DATA lt_sort TYPE lvc_t_sort.
      CASE r_ucomm.
        WHEN '&RNT_PREV' OR '&RNT'.
          t_final_x[] = t_final[].
          PERFORM clear_redundant.
          PERFORM set_sort_criteria USING lt_sort.
        WHEN '&F03' OR '&PRINT_BACK_PREVIEW'.
          t_final[] = t_final_x[].
        WHEN OTHERS.
      ENDCASE.
    ENDFORM.                    "user_command
    hope it helps

  • No repeated values and in ascendant sort

    Hi all,
    I'm trying to put this:
    SELECT DISTINCT month FROM Concert ORDER BY month ASC;
    (no repeated values and in ascendant sort) into EJB-QL. This is what I've worked out:
    SELECT DISTINCT OBJECT(o)
    FROM Concert AS o
    ORDER BY o.month ASC
    (month is a field in the bean )
    But this (and several tries later) doesn't work.
    What's wrong with it??
    The query is for a findAll method -without- input parameters which returns a collection, is here the error??? If so, how can I solve it?
    I'm totally lost and frustrated, I'd really appreciate some light
    Thanks a lot in advance

    Your query is currect if table name and attribute name are currect.
    Can you write what type of error is comming?

  • Total column not changed between header & detailed screen

    I have a report with header data contains contracts information and detailed data contains orders, debit credit memo related to the contracts.  I write the report using CL_SALV_TABLE to display  contract value, usage  in full ALV_GRID. When I double click on a contract line, it will go to the second screen to show all orders related to that contract.  The second screen with orders information will be in a screen on a container with all standard function ( Export list to Excel, Word format etc..), sort, total and sub total) and a push button to go back to first screen.
      The report works fine but when I am on the second screen, I total and sub total the amount on that screen in order to check with total value in header record and it total up correctly by currency.
    But when I go back to the first screen, select a different contract record,  double click on the line to get to the order info screen,  all order data display correctly except that the total column still show amount from the previous detailed screen.  If I select the column again and click the total, it will total correctly.   I did refresh the data in the screen before go back to first screen but it does not solve the problem.
    DOES ANYONE HAVE A SIMILAR SYMPTON LIKE THIS? 
    Thanks for your advice.
    On the order detailed screen, I create a container with screen 100 and write PAI, PBO like this:
    Screen 100:
    process before output.
      module status_0100.
      module load_data_to_control.   "Load usage data to screen
    process after input.
    module user_command_0100.
    module status_0100 output.
      set pf-status 'PF100'.
      set titlebar 'T100'.
    endmodule.  
    module load_data_to_control output.
      if gr_cont is not bound.
        create object gr_cont
          exporting
            container_name = 'CONTAINER_100'
          exceptions
            others         = 1.
        if  sy-subrc <> 0.
          message a052(zvn) with
          ' No container object found'.
        endif.
        try.
            cl_salv_table=>factory(
            exporting
         list_display   = list_display
              r_container = gr_cont
          container_name =
            importing
              r_salv_table = gr_alv_2
            changing
              t_table = gt_orders
          catch cx_salv_msg into gr_error.
        endtry.
        perform set_functions.        " Set all standard function in screen 100
        perform set_column_order using gr_alv_2.       "Set column format, display
        perform handle_events.                       "Register events for selection mode & user commands
         Display order screen 0100
        gr_alv_2->display( ).
      else.
        gr_alv_2->refresh( ).
    endif.
    module user_command_0100 input.
      data: wa_d type gt_dtab,
            ls_contract type vbeln,
            ls_order    type vbeln,
            ls_invoice  type vbeln,
            ls_belnr type belnr_d,
            ls_row   type char10.
      data: l_text type char128.
        case  sy-ucomm.
        when 'RETURN' or 'BACK' or 'EXIT' or 'CANCEL'.
    *... refresh the table in order to see the new data
          gr_alv_2->refresh( ).
          leave to screen 0.
        when others.
      endcase.
    endmodule.                 " USER_COMMAND_0100  INPUT

    Hi ,
    When you are using the CL_SALV_TABLE, what is the use of screen 100. Better populate the evnts table in CL_SALV_TABLE
    Cheers
    Pavan

  • Display Repeated Values in a Crosstab - Design Studio 1.2

    I've a report in Design Studio from a Bex query. There are repeated values in few columns which Design Studio 1.2 refuses to display.
    note: I've already unchecked the box "Hide Repeated Key Values" in the query properties of Bex query designer and i'm able to see repeated values when I open the query in Bex analyzer.
    Design studio would not display the repeated values in the crosstab.
    Anyone encountered and fixed a similar issue before?

    Hi Stephen,
    I was not able to resolve this issue, and I had to go ahead with values not being repeated.
    I think this is a limitation of Design Studio with no fix for it in v 1.3 either, unless someone could suggest otherwise.
    Regards,
    Abbas

  • Problem in Formatting Total Column in Classic Table

    Hi,
    I am using Classic Table.
    I am able to format the column data but i am unable to format the column total value. I searched in forum and tryed something like in the following thread..
    Problem in formatting Total Value in advanced table
    since i am using Classic Tables i am unable to do it.
    I also tried the following
    OATableBean table = ....
    OATotalRowBean totalRowBean = (OATotalRowBean)table.getColumnFooter();
    System.out.println("Formattotal : "+totalRowBean);
    if (totalRowBean != null)
    oracle.cabo.ui.validate.Formatter formatter = new OADecimalValidater("#,##0.00;#,##0.00","#,##0.00;#,##0.00");
    totalRowBean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);
    in this case the total is not formatted.
    I also refered developer guide. There i found how to set value to total column.. but how to get the value its not given..
    Any body pls help in this regards
    Thanks & Regards

    Hi,
    When i am using Classic Table i am able to format column data but i am not able to format the column Total
    Code i using ;
    OATableBean table = (OATableBean) webBean.findChildRecursive("EmpTestVO12");
    table.prepareForRendering(pageContext);
    OAMessageStyledTextBean totalBean = (OAMessageStyledTextBean)table.findChildRecursive("Salary");
    if(totalBean!=null)
    Formatter formatter = new OADecimalValidater("#,##0.00;(#,##0.00)","#,##0.00;(#,##0.00)");
    totalBean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);
    //Properly formatting column data
    Whe i am using OAAdvance Table bean i am able to format the total but i am unabele to format the Column data. Using following code..
    OAAdvancedTableBean tableBean=(OAAdvancedTableBean)webBean.findChildRecursive("region2");
    tableBean.prepareForRendering(pageContext);
    OAColumnBean c1=(OAColumnBean)webBean.findChildRecursive("column12");
    if(c1!=null)
    c1.setAttributeValue(CURRENCY_CODE,"USD");
    Can anybody pls tell me how can i achieve both (column values and totals formatting) using either Classic Table or Advance Table..
    Thanks & Regards,
    Ram

  • ORA-38101: Invalid column in the INSERT VALUES Clause: "acn"

    Hi,
    Oracle version :
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    Funny issue,
    MERGE INTO tfc         cb1
                   USING (SELECT 5351    fs,
                                 1    cs
                          FROM   DUAL)       dual1
                        ON (cb1.fs           =    dual1.fs
                            AND cb1.asgn_cs  =    dual1.cs)
              WHEN MATCHED
              THEN
                   UPDATE
                   SET       cb1.acn          =    '145'         ,
                             cb1.cbs       =    (SELECT ta.as
                                                        FROM   tac ta
                                                        WHERE  ta.acn         = '145'
                                                        AND    ta.ent = 2),
                             cb1.bfs    =    3  ,
                             cb1.efd     =    '28-OCT-09'   ,
                             cb1.uui     =    'A'  ,
                             cb1.ut          =    sysdate
                   WHERE     cb1.fs       =    5351
                   AND       cb1.asgn_cs  =    1
              WHEN NOT MATCHED
              THEN
                   INSERT
                        (cb1.fund_cbs,
                         cb1.asgn_cs,
                         cb1.cbs,
                         cb1.fs,
                         cb1.bfs,
                         cb1.acn,
                         cb1.efd,
                         cb1.cre_usr_id,
                         cb1.uui
                   VALUES
                        (tfc.NEXTVAL,
                         dual1.cs,
                         (SELECT ta.as
                          FROM   tac ta
                          WHERE  ta.acn         = '145'
                          AND    ta.ent = 2),    
                         dual1.fs,
                         3,
                         '145',
                         '28-OCT-09',
                         'A',
                         'A'
                        );When i try to run this , get
    Error report:
    SQL Error: ORA-38101: Invalid column in the INSERT VALUES Clause: "acn"
    38101. 00000 - "Invalid column in the INSERT VALUES Clause: %s"
    *Cause:    INSERT VALUES clause refers to the destination table columns
    *Action:
    Now, when I try n remove the alias name from the insert clause, i.e.
    MERGE INTO tfc         cb1
                   USING (SELECT 5351    fs,
                                 1    cs
                          FROM   DUAL)       dual1
                        ON (cb1.fs           =    dual1.fs
                            AND cb1.asgn_cs  =    dual1.cs)
              WHEN MATCHED
              THEN
                   UPDATE
                   SET       cb1.acn          =    '145'         ,
                             cb1.cbs       =    (SELECT ta.as
                                                        FROM   tac ta
                                                        WHERE  ta.acn         = '145'
                                                        AND    ta.ent = 2),
                             cb1.bfs    =    3  ,
                             cb1.efd     =    '28-OCT-09'   ,
                             cb1.uui     =    'A'  ,
                             cb1.ut          =    sysdate
                   WHERE     cb1.fs       =    5351
                   AND       cb1.asgn_cs  =    1
              WHEN NOT MATCHED
              THEN
                   INSERT
                        (cb1.fund_cbs,
                         cb1.asgn_cs,
                         cb1.cbs,
                         cb1.fs,
                         cb1.bfs,
                         cb1.acn,
                         cb1.efd,
                         cb1.cre_usr_id,
                         cb1.uui
                   VALUES
                        (tfc.NEXTVAL,
                         dual1.cs,
                         (SELECT as
                          FROM   tac
                          WHERE  acn         = '145'  -------- remove alias from here i.e. 'ta'
                          AND   ent = 2),    
                         dual1.fs,
                         3,
                         '145',
                         '28-OCT-09',
                         'A',
                         'A'
                        );The above statement fine.
    Edited by: user8650395 on Mar 12, 2010 6:10 AM
    Edited by: user8650395 on Mar 12, 2010 6:19 AM

    Hi,
    Nice formatting!
    The first value in the INSERT clause looks suspicious:
    MERGE INTO tfc         cb1
                   INSERT
                        (cb1.fund_cbs,
                         cb1.asgn_cs,
                         cb1.cbs,
                         cb1.fs,
                         cb1.bfs,
                         cb1.acn,
                         cb1.efd,
                         cb1.cre_usr_id,
                         cb1.uui
                   VALUES
                        (tfc.NEXTVAL,     ...If tfc is a table name, then it can't be a sequnece name.
    Perhaps you meant something like
    ...            VALUES
                        (tfc_id_seq.NEXTVAL,     ...I hope that solves the problem.
    If not, post a little sample data (CREATE TABLE and INSERT statements) for the tables as they exist before the MERGE.
    Edited by: Frank Kulash on Mar 12, 2010 9:34 AM

  • Process works fine... how to track which column is causing error..

    hi, i have a big sp which does lets say tasks A, B, C, D...
    After every task i.e A, B, C, D I have an update or insert
    statement. The update & insert both work fine, except that I
    have coldfusion catch code for sp execution and it returns String
    or binary data would be truncated error. Normally this means
    inserting something into a column whose lenght is less than whats
    being inserted. I understand this , but how can i determine which
    column is causing problem since after tasks A,B,C,D the insert or
    update i have is working fine. It would be have easy if i couldnt
    have seen inserted or updated records, but in this case the
    functionality is working fine except that coldfusin gives an error
    which i want to avoid.
    Thanks in advance.

    quote:
    Originally posted by:
    MikerRoo
    Yes, if the database column is smalldatetime then then
    @start_date should be smalldatetime.
    However, the SP's input variable (call it say,
    "RawStartDate") can still be varchar for the reasons you stated.
    Just be sure to return the appropriate error and/or insert a valid
    smalldatetime always.
    Sorry for confusion... GetDate was just an example , it could
    another variable @end_date which is varchar(20).
    so we could have SET @start_date =
    CAST(convert(varchar(20),@enddate,101) as datetime)
    Now coming back to main problem.. I am not calling the SP
    from coldfusion. I am directly running it thru Query Analyser and
    here is what iam getting for a date value passed as '2006-05-24
    00:00:00.000'
    Server: Msg 295, Level 16, State 3, Procedure WS_AUTO_INTAKE,
    Line 263
    Syntax error converting character string to smalldatetime
    data type.
    here is the query starting at line 263
    INSERT INTO intake_seq (intake_id, intake_seq, absence_type,
    start_date, start_time, end_date, end_time)
    VALUES (@intake_id, 1, @absence_type, cast(@start_date as
    smalldatetime), DATEADD ( hh , 8, cast(@start_date as
    smalldatetime)), cast(@end_date as smalldatetime), DATEADD ( hh ,
    16, cast(@start_date as smalldatetime)) )
    You would say, ok try just datetime instead of
    smalldatetime...tried that also .. it gives this error
    Server: Msg 241, Level 16, State 1, Procedure WS_AUTO_INTAKE,
    Line 263
    Syntax error converting datetime from character string.
    Its all got to do with this value '2006-05-24 00:00:00.000'
    which is passed as one of the parameters to sp call... I tried with
    this and gives error... when i removed the last 3 zeroes with . ,
    it works fine ...example '2006-05-24 00:00:00'
    What is wrong here? Iam I missing something????
    by the way , this SP is working fine for 99% of time... its
    just that on very few occassions iam seeing the error... thats the
    reason i persisted with SP INPUT VARIABLES declared as VARCHAR
    rather than int or datetime, ....
    any ideas????
    I know I can have convert(varchar(20), @start_date,101) to
    get the format dd/mm/yy but then I have to cast it to datetime
    which will again make it in format dd/mm/yy hh:mi:ss... any other
    way to just keep it dd:mm:yy ???

  • Web Report - Hide Repeated Values

    My web report hides repeated values regardless of the query setting. 
    Is there any way to set a specific column to not hide repeated values?  Using the table API?
    Thanks!

    dear Kenneth,
    have you try to remove the check mark of properties 'suppress repeated text' in 'specific' section of your web item 'table' in web template ?
    or you can give parameter SUPPRESS_REPETITION_TEXTS for web item 'table' with value blank
    <param name='SUPPRESS_REPETITION_TEXTS' value=' '>
    doc may useful
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/13dc9190-0201-0010-71a4-a9f56cdfcc72
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b1089290-0201-0010-288c-98e4d26487ee
    hope this helps.

  • Add another column under sub total column in alv

    hi guys,
    is there any way i can add a new column under sub total column in alv function and have my own calculation for it

    Hi Radha,
    I doubt if that can be changed....because the event that i was referring to in my previous post works with ALV List display...But in any case you can try that.....
    There is an event in SLIS....(As i told you, i dont remember the name and currently i dont have access to SAP system, so i am not able to verify and let you know that event name).....
    Other thatn TOP and END of PAGE events, there is an event for sub-total text......i think it would start with "SUBTOTAL"...
    you need to use that event in your events table and pass it to ALV Grid display.
    Then create a sub-routine with that name (As you do for TOP-OF-PAGE event)....and in this event you can change the values in runtime (PROVIDED, this event gets triggered for ALV GRID).....
    If this does not work, i think calculating sub-totals while you build the internal table would be a better option....(If you have time constraint....else you can do some more research on the same)........
    Best Regards,
    Ram.

Maybe you are looking for