Selective Total --- URGENT

Hi,
my crosstab report have only one measure (ex. QTY); my problem is show the total only for "selective" values (for example: only for some year), in the other case I want "NULL".
When I apply the total, this appear on all the "year" and I can't put a condition over this values to selective the "years" that I want to be show (or not show).
Use "decode or case when clause" on "quantity" don't resolve my need. In fact this cause that "quantity" will be NULL for the "year" where I don't want the total; this, is not corret.
I want "hide" the total for "selective" values, IT IS POSSIBLE?
Thanks,
Ugo

Hi,
I've resolved the problem in this way:
I've created two select with union all clause, like this:
----------------------custom folder-------------------------------
select ds_commessa, ds_scenario, DS_VALUE
from dw_ods.ods_mbo_commessa
where DS_TIPO_COSTO='COSTI MEDI'
and ds_label='DIR'
and cd_scenario in (1,2)
and ds_commessa = DW_ODS.SETPARAM.GET_PARAM1
union all
select 'Totale' as ds_commessa, ds_scenario, sum(DS_VALUE)
from dw_ods.ods_mbo_commessa
where DS_TIPO_COSTO='COSTI MEDI'
and ds_label='DIR'
and cd_scenario in (1)
and ds_commessa = DW_ODS.SETPARAM.GET_PARAM1
group by ds_scenario
where the second select "append" the "total row" at the end of the report; this is ok.
Now, I've this problem:
I have insert "parameters" into the report (like explained in note id 304192.1) and also this work fine, BUT this method seem right only with SINGLE parameter and NOT with multiple values for the parameter ( IN operator)...
can u help me?
I'would modify the query like "...ds_commessa IN DW_ODS.SETPARAM.GET_PARAM1 "
Ugo

Similar Messages

  • Matrix reports total -- urgent

    hi
    I want to make a matrix report with the total column reset at report level,i.e. the group total for each row. But instead of printing it at the end of the report, i want it to be printed on the first page before the matrix cell fields start. Now the problem is that on the consecutive pages, the space occupied by this total column is coming blank i.e there's a gap between the matrix column(printed down) and the matrix cells. I dont want this gap at all. Is there any way by which i can make the matrix cells shift to the left so that this gap is not there in the second and the consecutive pages.

    This doesn't work.Had already tried it but it always gives the errors that the matrix repeating frame cannot anchored with other objects though I select it as the parent frame. Also, if I try anchoring it to some other object it gives wierd results

  • Can i use Functions in Header/Footer ( want to have pagewise totals) - Urgent

    hi there,
    I want to show pagewise totals. is it possible to use functions (sum,count etc.) in the Header / footer of a workbook ? Otherwise, pls. suggest a workaround is possible.
    I am using Discoverer Ver. 4.1.37.00.0 Desktop edition.
    Thanx,
    Rajesh.

    EDIT: I notice I am giving instructions for Numbers 3.0 but the OP may have Number '09.  Same ideas apply but the instructions are not quite the same.
    Depends on which axis.  I do not know your expertise level so I may explain some things you already know.
    To change the Y axis scale, select the chart and go to the axis tab in the format sidebar. Click on Y Axis. Put in your minimum and maximum values for the "scale". Then choose the numer of "steps" for the Y axis.
    For the X Axis:
    Most charts are "category" charts.  That is, on the chart the X Axis data is evenly spaced. The X Axis data could be numbers it could be text, it doesn't matter, it is evenly spaced across the bottom.  For these charts, there is no changing the X axis scale; the question itself doesn't make any sense. The X axis data is typically put into a header column/row (as you have noticed).
    There is one chart type, the Scatter Chart, that has a scalable X axis. It makes a true X-Y chart. The scaling for the X axis is done the same way as the Y axis.  Note that for a scatter chart, the X axis data cannot be in a header row/column.

  • Clear TableView Selected rows - Urgent

    Hi All,
    I have a stateful BSP application. I have a tableview in that applications. I have the multiselect option in that table. Is there any way to clear the previous selected rows of the table. The table is getting new data without any problems but the previously selected line remain on the table Would appreciate if anyone could help me out as it is Urgent !!
    Best Regards,
    Sudhi

    Hi Sudhi,
    You can follow up using this sample code. Here you can set a flag variable which is updated in onInputProcessing event.
    Layout:
    <htmlb:form>
         <%
            if flag is initial.
          %>
          <htmlb:tableView id              = "tab1"
                           table           = "<%= itab %>"
                           visibleRowCount = "8"
                           design          = "ALTERNATING"
                           footerVisible   = "TRUE"
                           selectionMode   = "multiSelect"
                           keepSelectedRow = "true" >
          </htmlb:tableView>
          <%
            endif.
          %>
          <%
            if flag eq 1.
          %>
          <htmlb:tableView id              = "tab2"
                           table           = "<%= itab %>"
                           visibleRowCount = "8"
                           design          = "ALTERNATING"
                           footerVisible   = "TRUE"
                           selectionMode   = "multiSelect"
                           keepSelectedRow = "true" >
          </htmlb:tableView>
          <%
            clear flag.
          %>
          <%
            endif.
          %>
          <htmlb:button id      = "but01"
                        text    = "Click"
                        onClick = "myEvent" />
        </htmlb:form>
    OnInputProcessing:
    DATA: tv TYPE REF TO cl_htmlb_tableview.
    DATA: event TYPE REF TO cl_htmlb_event.
    event = cl_htmlb_manager=>get_event( runtime->server->request ).
    IF event->id = 'but01' AND event->event_type = 'click'.
      tv ?= cl_htmlb_manager=>get_data(
                      request      = runtime->server->request
                      name         = 'tableView'
                      id           = 'tab1' ).
      IF tv IS NOT INITIAL.
        DATA: tv_data TYPE REF TO cl_htmlb_event_tableview.
        tv_data = tv->data.
        DATA : itab2 TYPE TABLE OF selectedrow,
             ind TYPE selectedrow,
             row_s TYPE zdi_so.
        CALL METHOD tv_data->get_rows_selected
          RECEIVING
            selected_rows = itab2.
      ENDIF.
      IF itab2 IS NOT INITIAL.
        DATA :rw LIKE LINE OF itab.
        LOOP AT itab2 INTO ind.
               flag = '1'.
          DELETE itab INDEX ind-index.
        ENDLOOP.
      ENDIF.
    ENDIF.
    Hope this helps,
    Regards,
    Ravikiran.
    Message was edited by: Ravikiran C

  • Help needed in selection screen - Urgent

    Hi Experts,
    I have a selection screen. I have three radi buttons in that selection screen. Based on the selection of the radio buttons I need to activate corresponding selection screen parameters.
    e.g : if radiobutton1 is selected, njo activation needed,
           if radiobutton2 is selected, activate selection screen parameter p_one,
           if radiobutton3 is selected, activate selection screen parameter p_two.
    All three radiobuttons are attached to the same radio button group.
    I have assigned the parameters p_one, p_two, p_three to MODIF ID as follows.
    p_one - NULL
    p_two - t01
    p_three - t02.
    on the selection of a radio button I want the corresponding parameter to get activated.
    please help me.
    Regards,
    Arul jothi A.

    hi
    jothi
    AT SELECTION-SCREEN OUTPUT.                                      
      CASE SY-TCODE.                                                 
        WHEN 'ZEDI6'.                                                
          LOOP AT SCREEN.                                             
            CASE SCREEN-GROUP4.                                      
              WHEN '001'.                  "Sales order select       
                SCREEN-ACTIVE = '1'.       "1=Active, 0=Don't display
                MODIFY SCREEN.                                       
              WHEN '002'.                  "Delivery select          
                SCREEN-ACTIVE = '0'.       "1=Active, 0=Don't display
                MODIFY SCREEN.                                        
              WHEN '003'.                  "Invoice select           
                SCREEN-ACTIVE = '0'.       "1=Active, 0=Don't display
                MODIFY SCREEN.                                       
              WHEN '004'.                  "PO Select                
                SCREEN-ACTIVE = '0'.       "1=Active, 0=Don't display
                MODIFY SCREEN.                                       
    regards
    praveen

  • How to do the ALV report output in groups and caluculate the tOTALS(URGENT

    Hi
    In my ALV report output .I have to group the output based on the DAYS field
    0-10 days in one group
    10-30 days in one group
    above 30 days one group
    There is also a field by name "AMOUNT" in my output.
    I have to calculate SUBTOTALs at the end of every group and at the end of the report i should caluculate GRAND TOTAL.
    Please remember that i should not use any any BLOCKED ALVs and for Totals i should not use the SYMBOLS provided in the application toolbar of the report
    Thanks in Advance

    Please don't repost your questions...
    Check out my answer in your other post.
    How to make the ALV report in groups  and caluculate the TOTALS
    Regards,
    Naimesh Patel

  • Multiple records in select options-Urgent help

    Hi all,
       Iam using the following function module to get the set values. I need to pass multiple values in select options(ie) select options with no intervals. to the function module parameter Shortname. I have declared the variable which has to be passed as
         S_SETID   FOR  SETHEADER-SETNAME NO INTERVALS.
      The problem is when i use S_SETID-LOW the value is passed to the function module , but if multiple data is entered in the input then how to pass all the data to the function module. Please Help.

    Hi,
    Declare the Range in the Function module , then you can pass that Select-option fields to that ranges and use that in the Function module.
    Or you can use the RANGE_C8 for the Select-optios in the Function module, you can declare the Internal table with the type of RANGE_C8 in the tables parameter, then pass the Select-option to this Internal table
    If you want more length field then search based on RANGE_* then you will get all the Range Structure.
    Regards
    Sudheer

  • Detailed pop up screen in selection screen - urgent

    hai experts,
    how can we give a detailed pop up screen in selection screen.
    My requirement is,
    To display Details of spool Nos taken for current porogram to take print out from end user.
    from OWN SPOOL REQUEST displays all other programs........
    can any one give a right solution?
    reward will avail for use full answer.
    thanks in advance.
    regards,
    jai.m

    Hi Jai
    May be you can use this FM POPUP_WITH_TABLE_DISPLAY_OK with the list of spool number populated into internal table.
    If you are particulary looking for selection screen, then decalre your selection screen as below
    Selection-screen begin of screen 9000.
    Selection-screen end of screen.
    Then use the statement Call selection-screen 9000 starting at x y.
    Hope this helps !
    Regards
    Ranganath

  • Restricting values F4 help in selection screen-Urgent

    Hi,
    can anyone pls tell how can I ristrict the values for search help in any field in selection screen.
    please tell me the way to hide some values in F4 help in selection screen so that user can not see those data for selection.
    Regards

    i think u can not hide the data.........
    create own f4 help............restrict the data and then pass it the f4 internal table....
    fro exp;;;;;
    types : begin of ty_tab,
              post_code1 like adrc-post_code1,
             end of ty_tab.
      data : it_tab type ty_tab occurs 0.
      data : lt_field type table of dfies,
             lw_field type dfies.
      select post_code1 from adrc into corresponding fields of table it_tab.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
          exporting
            retfield        = 'POST_CODE1'
            dynpprog        = sy-repid
            dynpnr          = sy-dynnr
            dynprofield     = 'LI_LIST1'
            value_org       = 'S'
          tables
            value_tab       = it_tab
         field_tab       = lt_field
          exceptions
            parameter_error = 1
            no_values_found = 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.
    Regards
    Anbu

  • How to replace the values in variable selection Screen urgent plz

    Hi all,
    I am having a requirement. where the user need pass the value in the variable, Here v r having option like '1' and '2' which represent 'month' and 'ytd'.
    While selecting user view as 1,2 .Now my requirement is to replace the value 1=monthly and 2=ytd while the user passing the value to avoid the confusion.
    Is it possible if so plz let me know
    Regards

    Dear Venkat.
    You please try the following steps:
    1. Say the InfoObject is 0EMPLOYEE against which you have created the variable, which user is trying to select value against, when they execute the report.
    2. Goto RSA1-> InfoObject tab-> Select InfoObject 0EMPLOYEE.
    3. Selcet the following options:
       Query Execution Filter Val. Selectn  -  'Only Posted Value for Navigation'
       Filter Value Repr. At Query Exec. -      'Selector Box Without Values'
    Please let me know if there is any more issue. Feel free to raise further concern
    Thnx,
    Sukdev K

  • Code for selection screen,  urgent

    Hi Everyone,
      I need code for selection screen.
      I have four radio buttons, p1, p2,p3,p4(assume)
    If I select second radiobutton, remaining three radiobuttons should be in disable mode and also the information under them should be in disable mode. Give the coding details. Thanks in advance. U will be rewarded.
    Regards,
    Nagaraju

    Hi,
    REPORT ZTEST222 .
    PARAMETERS : p_add  RADIOBUTTON GROUP radi
                             USER-COMMAND radio MODIF ID MOD,
      p_disp RADIOBUTTON GROUP radi DEFAULT 'X'  MODIF ID pod,
      p_chng RADIOBUTTON GROUP radi MODIF ID rad,
      p_er_log RADIOBUTTON GROUP radi MODIF ID cod.
    SELECT-OPTIONS : s_idn    FOR  vendor   MODIF ID mod,
                                   s_pcode  FOR ws_c_pcode MODIF ID pod.
    PARAMETERS:  p_plant    LIKE  zaw_pol_plan-plant   MODIF ID rad,
                 p_zzvend   LIKE  zaw_pol_plan-zzvendor   MODIF ID cod.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF p_add EQ 'X'.
          IF screen-group1 EQ 'MOD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    IF p_disp EQ 'X'.
          IF screen-group1 EQ 'POD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    IF p_chng EQ 'X'.
          IF screen-group1 EQ 'RAD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    IF p_er_log EQ 'X'.
          IF screen-group1 EQ 'COD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    Pls. reward if useful
        ENDLOOP.
    Pls. reward if useful

  • Infoset query ('At Selection-Screen') - Urgent

    Hi All,
    The below code for selection criteria 'At Selection-Screen' for an infoset-query works ok, but i find 2 problems, can someone help.
    1. When user presses F4, i wanted the output to display
       SG Singapore
       IN   India
       But at the moment it just displays
       SG
       IN
    2. If the user enters any other value apart from the above 2 i do not want the query to execute, instead show something like enter a valid value. But at the moment if i enter another country code manually just to test eg: US, the query runs with this selection which i do not want.
    Hope my problem is clear, await inputs.
    Code:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR VEN_CTY-LOW.
            IT_LAND-VEN_CTY = 'SG'.
            IT_LAND-LTEXT   = 'Singapore'.
              APPEND IT_LAND.
            IT_LAND-VEN_CTY = 'IN'.
            IT_LAND-LTEXT   = 'India'.
              APPEND IT_LAND.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD   = 'VEN_CTY'
          VALUE_ORG  = 'S'
        TABLES
          VALUE_TAB  = IT_LAND
          RETURN_TAB = IT_RETURN
        EXCEPTIONS
          PARAMETER_ERROR = 1
          NO_VALUES_FOUND = 2.
    IF SY-SUBRC = 0.
        READ TABLE IT_LAND INDEX 1.
        MOVE IT_RETURN-FIELDVAL TO VEN_CTY-LOW.
    ENDIF.

    Hi vivek,
    for the 2nd problem,
    create a range for ingapor and india say r_range.
    and
    r_range will have two values say india, singapore.
    loop at VEN_CTY.
    if ven_cty not in r_range.
    display error message.
    exit.
    endloop.
    try this and let me know.
    reward if helpful.
    thanks .
    ranya

  • Incorrect Display of Totals (Urgent ! Plz Assist)

    Hi everyone,
      Please help me out as this is very urgent at the moment.
       When I display
       PLANT
       STORAGE LOC
       WAREHOUSE NO
       PROFIT CENTRE
       MATERIAL
       No of Bins -> 7338.6821235
       When I display the same report just with
       PROFIT CENTRE
       No of Bins -> 7099.809557752
       WHY IS THIS HAPPENING ?
       I suspect because No of Bins is based on a Formula variable that uses Replacement Path of Attribute MATERIAL.
      So when MATERIAL is not displayed in the Report then it will not accurately display the results.
      Any views on this please ? What can I do otherwise ?

    Hi Ganesh
       I can`t change this "precision" because No of Storage Bins is a Calculated Key Figure which is based on a Formula Variable that uses Replacement Path of tyep Attribute
      Even I change this to Before Aggregation it does work.
      Should I try making this as a navigational attribute in my cube.
      Then will I still face this problem ?

  • Dynamic Query for 'Select IN' -- URGENT!!!

    I've got the following Select statement -
    SELECT Employee_Name, SSN FROM Company
    WHERE EMPLOYEE_NAME IN (c_Employee_Name) ;
    Here c_Employee_Name is a Returned RefCursor from another function. It gives error as Type mismatch.
    Is there anyway I can run one SELECT statement for all the Employee_Name returned by the function?
    Any sample code will be great.
    Thanks a lot,
    Suman

    If you have a packaged function that returns a ref cursor,
    something like this:
    CREATE OR REPLACE PACKAGE package_name
    AS
      TYPE c_employee_name IS  REF cursor;
      FUNCTION function_name
        (p_tables      IN  VARCHAR2,
         p_columns     IN  VARCHAR2 DEFAULT '*',
         p_where       IN  VARCHAR2 DEFAULT ' 1 = 1 ',
         p_others      IN  VARCHAR2 DEFAULT NULL)
        RETURN package_name.c_employee_name;
    END package_name;
    CREATE OR REPLACE PACKAGE BODY package_name
    AS
      FUNCTION function_name
        (p_tables      IN  VARCHAR2,
         p_columns     IN  VARCHAR2 DEFAULT '*',
         p_where       IN  VARCHAR2 DEFAULT ' 1 = 1 ',
         p_others      IN  VARCHAR2 DEFAULT NULL)
        RETURN package_name.c_employee_name
      IS
        v_sql              VARCHAR2 (4000) := NULL;
        v_results          package_name.c_employee_name;
      BEGIN
        v_sql :=
           ' SELECT ' || p_columns
        || ' FROM '   || p_tables
        || ' WHERE '  || p_where || ' '
        || p_others;
        OPEN v_results FOR v_sql;   
        RETURN v_results;
      END function_name;
    END package_name;
    Then, you can use a procedure, something like the
    one below, to call the function and loop through
    the ref cursor to concatenate a string of employee
    names to be used in the select statement.  You can
    then open another ref cursor for that select statment
    and process the results however you like.  I used
    dbms_output in the following example:
    CREATE OR REPLACE PROCEDURE procedure_name
    AS
      c_employee_names  package_name.c_employee_name;
      v_employee_name   company.employee_name%TYPE;
      v_employee_names  VARCHAR2 (4000) := NULL;
      v_delimiter       VARCHAR2 (1) := NULL;
      v_sql             VARCHAR2 (4000) := NULL;
      TYPE cursor_type IS REF CURSOR;
      cursor_name cursor_type;
      v_ssn             company.ssn%TYPE;
    BEGIN
      c_employee_names := package_name.function_name
                            ('company', 'employee_name');
      LOOP
        EXIT WHEN c_employee_names%NOTFOUND;
        FETCH c_employee_names INTO v_employee_name;
        v_employee_names := v_employee_names
        || v_delimiter
        || v_employee_name;
        v_delimiter := ',';
      END LOOP;
      v_employee_names := REPLACE (v_employee_names, ',', ''',''');
      v_sql := ' SELECT employee_name, ssn'
            || ' FROM   company'
            || ' WHERE  employee_name IN ('''
            || v_employee_names
            || ''')';
      OPEN cursor_name FOR v_sql;
      LOOP
        EXIT WHEN cursor_name%NOTFOUND;
        FETCH cursor_name INTO v_employee_name, v_ssn;
        DBMS_OUTPUT.PUT_LINE (v_employee_name || ' ' || v_ssn);
      END LOOP;
      CLOSE cursor_name;
    END procedure_name;
    To execute the procedure that calls the function:
    SET SERVEROUTPUT ON
    EXEC procedure_name

  • Maximum no. of columns allowed in SELECT clause - Urgent please

    Hi,
    I am constructing SQL query dynamically in a stored proc. based on user inputs. I am getting following error when I have around 400 columns in my SELECT clause. FROM, WHERE, GROUP BY clauses are same eventhough I have 30 columns and I don't have any problems here. Can anyone please let me know what is maximum no. of columns allowed in a query. I am working on Oracle 9i Release2.
    Thanks in advance.

    ORA-01467 sort key too longIt's not the SELECT clause that causes this, it's most likely the GROUP BY clause. Basically, the columns in the GROUP BY clause have to fit comfortably within a single database block. Does that sound like it might be a problem with your query?
    Cheers, APC
    Message was edited by:
    APC

Maybe you are looking for

  • Filename in XFDF - Acrobat 9?

    While submitting the PDF form field data, do we have to manually add the 'f href' element in the XFDF when running on Acrobat 9? Or, is it the acrobat javascript method 'submitForm' which generates the XFDF with field names and 'f href' ? Please let

  • Snort error since recent mysql update

    Is anybody else seeing this error message when they execute snort?  I'm not sure if this is my setup or a bug that needs to be reported. "snort: error while loading shared libraries: libmysqlclient.so.14: cannot open shared object file: No such file

  • Applet, Connector/J, unable to load driver

    I have written an Applet that is using the Connector/J com.mysql.jdbc.Driver to connect. When I compile and run the Applet with VisualCaf� and the AppletViewer, it is able to load the driver, access the database, exectue queries, etc. The problem occ

  • HT1695 How do I connect my ipad4 to connectify?

    I am able to select the network but safari still says there is no connection. I am able to connect via my iphone 4.

  • Select statement is very slow ?

    I have the table created in Oracle: CREATE TABLE tllog (autoid NUMBER(10,0) NOT NULL, txnum VARCHAR2(10), txdate DATE, brid VARCHAR2(4), tlid VARCHAR2(4), offid VARCHAR2(4), cfrid VARCHAR2(4), chkid VARCHAR2(4), tltxcd VARCHAR2(4), off_line VARCHAR2(