Logic- report to move columns to row in a list

Hi,
I have an internal table ITAB with following data
ITAB
DATE      MATNR PLANT  QUANT
200704    100A   050   111.00
200705    100A   050   333.00
200706    100A   050   444.00
200707    100A   050   555.00
200704    100B   051   999.00
200705    100B   051   666.00
I need an report output like this
     Matnr  plnt  Apr-2007  May-2007  june-2007 July-2007
     100A    050    111.00   333.00     444.00    555.00
     100B    051    999.00   666.00        0.00    0.00
Any ideas?
Rgds
Praveen

Hi,
Try this sample..This may not entirely solve your purpose..Might be you can expand the code..Also my code will work if the date is in the third place of the interanl table declaration...before matnr and plant..As mentioned in my example..
DATA: BEGIN OF itab OCCURS 0,
        matnr   TYPE matnr,
        plant   TYPE werks_d,
        date(6) TYPE n,
        menge   TYPE menge_d,
      END OF itab.
DATA: v_text1(10) VALUE 'Apr-2007'.
DATA: v_text2(10) VALUE 'May-2007'.
DATA: v_text3(10) VALUE 'June-2007'.
DATA: v_text4(10) VALUE 'July-2007'.
DATA: v_int TYPE i.
POPULATE DATA.
itab-matnr = '100A'.itab-plant = '050'.
itab-menge = '111.000'. itab-date = '200704'.
APPEND itab.CLEAR itab.
itab-matnr = '100A'.itab-plant = '050'.
itab-menge = '333.000'. itab-date = '200705'.
APPEND itab.CLEAR itab.
itab-matnr = '100A'.itab-plant = '051'.
itab-menge = '111.000'. itab-date = '200704'.
APPEND itab.CLEAR itab.
Display the data.
SORT itab BY matnr plant date.
WRITE: /1(20) 'Material',
        22(5)  'Plant',
        28(10) v_text1,
        39(10) v_text2,
        50(10) v_text3,
        61(10) v_text4.
LOOP AT itab.
New plant.
  AT NEW plant.
    WRITE: /1(20) itab-matnr,
            22(5) itab-plant.
    v_int = 28.
  ENDAT.
  WRITE: AT v_int(10) itab-menge.
  v_int = v_int + 11.
ENDLOOP.
Thanks,
Naren

Similar Messages

  • Charts in Report Designer - choosing columns and rows for categories

    Hi,
    I am trying to create a pie chart in report designer from a data provider which has 4 rows and 4 columns. As a default the chart created is using the 1st row for data and the four columns as categories.I want the pie chart  to use the first column for categories and 2nd column for data. How do I change the default chart behaviour?
    Best regards,
    Jai

    Hi Jai,
    take a look at:
    "Class 1 Chart Types" in http://help.sap.com/saphelp_nw04s/helpdata/en/c9/08533b97037963e10000000a114084/frameset.htm
    Link is regarding WAD web item but editing is the same in Report Designer.
    Here you will get information with example query for editing pie charts and what is possible or not.
    like:
    Structure of the Data Provider for a Pie Chart
    In a pie chart, the underlying table has only one row. The values in the columns form the pie segments.
    If the table contains more than one row, the additional rows are ignored when the table is converted into a chart. However, you can define which row is to be used (see below).
    Additional the link describes how to build the query for your requirement.
    Regards
    Andreas

  • How to deactivate move columns/rows on tables obiee11

    Hi!
    I have two questions:
    1. Is possible to hide the option of next image?
    http://imageshack.us/photo/my-images/690/tabledp.jpg/
    I want to user only see table like obiee 10 and I don't want to move columns or rows...
    2. Also I want to hide information when user has the mouse in gauge chart...like next image:
    http://imageshack.us/photo/my-images/809/gaugej.jpg/
    Only for this gauge...maybe some other gauges I want to see this info...
    Thanks!

    Alex1 wrote:
    1. Is possible to hide the option of next image?
    http://imageshack.us/photo/my-images/690/tabledp.jpg/
    I want to user only see table like obiee 10 and I don't want to move columns or rows...
    No, this is not possible in OBIEE 11g. There is a bug logged for this ( Bug 10222173 - ABILITY TO DISABLE DRAG AND SORT FUNCTIONALITY OF COLUMNS )
    Regards,
    -Amith.

  • Sql report, How to access current rows 6 columns data

    I have one page having page items & SQL report having 8 columns.
    First column of report is a link for editing.
    on clicking first column, that record gets displayed on page items, which are opn same page.
    Now my problem is i have used link column of report and set 3 page items value on click of link column.\
    But i need to set values for 2 more page items.
    I tried to create computation & process but not working. i am confused about which process point to select & whether onclick page gets submitted or not.
    I tried to write jscript but not succeeded. I dont know how to get current row id in jscript & different column values of current rowid.
    any help.

    Hi,
    Thanks for reply.
    in 5 items, first three are numeric and last two are timestamp fromtime, totime.
    as I mentioned earlier if i interchange 4 & 5 items i.e. now ITEM4 is totime & ITEM5 is fromtime
    and their values. I get value for totime & not for fromtime. all records contain values for all 5 columns. no null.
    So basically their is no problem in value or data, The only problem is whatever sequence is maintained first 4 items get value & 5th item remains blenk.
    Either I type all 5 ITEM NAMES in one Item name-value pair of link or use all three pairs, 5th ITEM remain blank.

  • Interactive Report - Icon View - Dynamic Columns per Rows ?

    Hi all,
    We use the icon view functionnality in Interactive Report.
    Is there a way to display the 'columns per row' attribute as an application item and set it dynamical via PL/SQL ?
    Any suggestions?
    Thanks in advance for advices,
    Regards,
    Grégory

    Hi,
    Apex 4.0 interactive reports and images (Scott's thread)
    Have some useful information and pointers to the solution you are looking for.
    I hope this help.
    Thank you,
    Ranish

  • XL-Reporter - Financial Periods specified in row and column selections

    Hello to all,
    again I have no idea how to solve an XLR problem after I tried different ways with unwanted results and after trying to find suggestions in the samples and help files.
    As a result I need a report which looks roughly like this
           2007 2006 2005 ...
    Jan.
    Feb.
    Mar.
    Dec.
    where each cell of the matrix is the total of invoices of a selected customer over the month in the specified year.
    I mainly tried to solve this in two different ways.:
    1.)
    Definition of a parameter for finacial period: name=fp, dimension, type=financial period, attribute=code
    Column selection summary for each year: PER(code=YearAll(@fp)) resp. PER(code=YearAll(@fp-12)) ...
    Row selection expansion: BPA(CardCode=@customer) ARDT(Code=Invoice) PER(PeriodInYear=1:12) Group By PER.PeriodInYear
    In each cell of the matrix the data attribute =ixGet(SO_LineTotal) is specified.
    The cell in the first colum (month) of the matrix is =ixDimGet(PER; PeriodInYear).
    2.)
    No parameter for the financial period is defined;
    Column selection summary for each year: PER(Year=2007) resp. PER(Year=2006) ...
    The rest is the same as in 1.)
    As a result I actually get a matrix with a column for each year and a row for each month, where the first column is 1, 2, ..., 12 (this is OK).
    But for all 12 month I get the same value, which is the (correct) total value for the whole year!
    Where is the failure in my intuition?
    Many thanks for your help!
    Regards,
    Frank Romeni

    I found it works if I don't set the selection to period in the Column and row.   Here are my selections
    Row
    Row 8-9  Expanding
    PER( * )  Group By PER.PeriodInYear
    Row 9 Expanding
    FACT BPA( CardCode = @BPCode ) ARDT( Code = "Invoice" )
    Column
    Column C Expanding
    FACT FIG( SO_TaxDate >= "01/01/2007" ) PER( * )  Group By PER.Year
    then I use a Column total to total the row expansion of the SO_LineTotal  with =SUM( ixRef(C9,2) ) were C9 is the expanding SO_LineTotal.  Then I hide Row 9 in excel to hide the details.
    If you post your email I can send you the IXR report definition
    Dan

  • Increase report size (columns and rows) in portal

    Hi all,
    Hope someone can help me with this.  I don't have any experience administering the reporting portal, hopefully this is an easy question.
    The portal displaying BI queries shows only about 10 columns and 10 rows at a time.  This is annoying since users have to scroll around to see all the rows and columns.  Where can I adjust the number of columns and rows displayed?
    Thanks,
    M.

    Hi M.B.
    Open WAD ( Bex Web Application Designer ) in which , you have assigned BI query. follow the steps for changing no of rows & columns.
    Step 1.    Properties   -  > select Web Items parametes.
    Step 2.   select  Ananlysis
    Step 3.   Scroll down  -> paging  -> here you can change no of rows & columns.
    Hope it will serve your query. If problem solved , closed this thread .
    Regards,
    Anand Mehrotra.

  • FREEZE COLUMNS AND ROWS IN WEB REPORT - PLEASE ADVISE ME

    Hi Experts,
    I have a web template that contains a query. My customer wants to freeze columns and rows in this report like we do in Excel. I know that in BW 3.5 this is not a standard feature of Table item. In forum I have found some messages regarding with this issue. I inserted a JavaScript code that I have found in forum, but this does not help. A codewriter wrote some other JaveScript for example  alert(), that works but some part of taken code from forum such as defined functions do not work.
    Other solutions advised in forum such as fixing row numbers or column numbers do not fix my problem.
    My questions:
    1 -  In new version of BW, BI 7.0 have this issue with WAD in standard been solved?
    2 - Does it really possible at the same time rows and columns to freeze? I want to freeze 2 rows from top, 2 columns from left.
    Could anyone have an idea?
    Best regards,
    Songul

    Hello,
    This will be implemented with SPS13.
    https://websmp204.sap-ag.de/~sapidb/011000358700004483762006E
    And before SPS13, i frame is useful to realize what you want to do. Using 2 "Analysis" web item. and display of 1st analysis web item is restricted only thin the header of the table and the 2nd Analysis web item is used as "table". display of this "analysis" is also restricted to 10 - 30 rows.
    but this consume hardware resource.
    <sample>
               <div style="OVERFLOW: auto; WIDTH: 1000px; HEIGHT: 20px" >
                   <bi:ANALYSIS_ITEM name="ANALYSIS_ITEM_2" designwidth="400" designheight="20" >
                       <bi:DATA_PROVIDER_REF value="DP_1" />
                       <bi:NEW_LINES_COUNT value="0" />
                       <bi:NEW_LINES_POSITION value="TOP" />
                       <bi:DATA_ROW_FROM value="1" />
                       <bi:DATA_ROW_TO value="0" />
                   </bi:ANALYSIS_ITEM>
               </div>
               <div style="OVERFLOW: auto; WIDTH: 1000px; HEIGHT: 200px" >
                   <bi:ANALYSIS_ITEM name="ANALYSIS_ITEM_1" designwidth="400" designheight="200" >
                       <bi:DATA_PROVIDER_REF value="DP_1" />
                       <bi:DATA_COLUMN_FROM value="1" />
                       <bi:DATA_ROW_TO value="0" />
                   </bi:ANALYSIS_ITEM>
               </div>
    Kind regards,
    Masaaki

  • BEx analyzer don't work move columns in report (like drill down)

    Hi
        I have an issue on BEx Analyzer...    When I built one report... add some characteristics and soo on... but then I need to move the order of columns... then I try to drill down.. or move to order of column... It doesn´t work,
        I did this function before.. when the poin of the mouse it's convert with other draw... like -->
                                               <--
        But this time it's not possible...
        Then If I press the icon that say design mode... I saw that the option of navigation is active... and when I close the design mode... the functionality of move columns work...:(
        It's difficult that each time that the user need to move columns in Bex will go to design mode... just for activate.. 
        I know thta we have some function on context menu.. for move columns one by other... but not for certain position..
        Could you help me please?
        I will appreciate your help and I will assign points for your answers.
    Alice

    Hi Alice,,
    This happens some time, when i am unable to drill down by just dragging and dropping the columns. though i could not find out why. Best thing, what i do, i refresh the query and next time it works Ok.. and other th ing what you can do, right click, on the characteristics list on the left pane, go to "change drilldown", then " drill down by" there the user can select the option he is looking in for.
    Hope this helps.
    Shakeel.

  • IR Report Freeze Column Header Row

    In Interactive Report, Can we freeze the column header row ? This is a most wanted requirement asked by customers. More than 50 times requested in past month.
    Please help

    I have been playing with this problem and came up with this potential solution that has so far worked for me.
    Caveats: I am new to this type of coding so check it carefully. It only works with Internet Explorer (its what we use at work). I hope to have a Firefox version someday. Some code used was found online. I gave it proper credit in my usage.
    Instrcutions:
    In the HTMLHeader of the Edit Page, paste the code shown below. It will lock/freeze the header of an interactive report and (optionally), any number of columns to the left of the report.
    To customize it for your needs,
    1. edit the line that reads: var LOCKED_COLUMNS=2; to reflect the number of columns to be locked (0 won't lock anycolumns)
    2. edit the style section that reads:
    <code>
    div#apexir_DATA_PANEL
    width: 300px; height=200px; overflow: scroll; position:relative; float:left;
    </code>
    to reflect the width and height for you scrolling window.
    3. optionally turn of the pagination (under Pagination in the Report Attribute pagefor the region) if you want to scroll through your entire dataset without paging [possible performance implications].
    I tested this with Apex 3.2 and with several themes (1, 3 and8). Hopefully it will work for you.
    The code follows:
    =====================================
    <code>
    <script>
    // This code copied from: http://javascript.about.com/library/bldom08.htm
    document.getElementsByClassName = function(cl)
    var retnode = [];
    var myclass = new RegExp('\\b'+cl+'\\b');
    var elem = this.getElementsByTagName('*');
    for (var i = 0; i < elem.length; i++)
    var classes = elem.className;
    if (myclass.test(classes)) retnode.push(elem[i]);
    return retnode;
    // End of code copied from: http://javascript.about.com/library/bldom08.htm
    var LOCKED_COLUMNS=2;
    function applyCSS()
    var data_Table=document.getElementsByClassName('apexir_WORKSHEET_DATA');
    var tr_Tags=data_Table[0].getElementsByTagName('tr');
    for (var i=0;i<tr_Tags.length;i++)
    var tab_Cells=tr_Tags[i].childNodes;
    for (var j=0; j<LOCKED_COLUMNS; j++)
    if (tab_Cells[j].nodeName != 'TD')
    { tab_Cells[j].setAttribute('id', 'Lock_Lateral_Vertical'); }
    else
    { tab_Cells[j].setAttribute('id', 'Lock_Lateral'); }
    window.onload=applyCSS;
    </script>
    <!--[if IE]>
    <style id="Lock_CSS">
    div#apexir_DATA_PANEL
    width: 300px; height=200px; overflow: scroll; position:relative; float:left;
    table.apexir_WORKSHEET_DATA th
    position: relative; z-index: 14; display: table;
    top: expression(document.getElementById("apexir_DATA_PANEL").scrollTop-3);
    table.apexir_WORKSHEET_DATA td
    border: solid 1px grey;
    td#Lock_Lateral
    background-color: #999999; position: relative; z-index: 15; display: table;
    left: expression(document.getElementById("apexir_DATA_PANEL").scrollLeft-3);
    th#Lock_Lateral_Vertical
    position: relative; z-index: 21; display: inline;
    top: expression(document.getElementById("apexir_DATA_PANEL").scrollTop-3);
    left: expression(document.getElementById("apexir_DATA_PANEL").scrollLeft-3);
    </style>
    <![endif]-->
    </code>
    ================================
    ackness

  • Field symbol to move column of one ITAB to row of another ITAB

    Hello , I need some help on this . I have two ITAB's
    Like ITAB1 with 1  field  and
    ITAB2 with say around 100 fields and all the field name are different in ITAB2 .
    Now ITAB1 has 1 column and 100 rows data in it . I want to move all the values from the rows of ITAB1 into next to next fields of ITAB2 on a single row . Like this.
    ITAB1
    1
    2
    3
    5
    I Want to move these five rows to ITAB2  like below
    ITAB 2
    1     2      3      4     5
    Not able to use do varrying as field names of ITAB2 are diff . Also dont want to write a lengthy code for manual field to field movement . Any help . is it possible to get this done using field symbol.
    Thanks
    J

    Solved . Below thing helped me .
    field-SYMBOLS <fs> TYPE any.
    FIELD-SYMBOLS <comp> TYPE ANY.
    ASSIGN wa_it2 to <fs>.    " target ITAB work area
    loop at it1.
      ASSIGN COMPONENT sy-tabix of STRUCTURE <FS> to <comp>.
      <comp> = it1-f1.
    endloop .
    append wa_it2 to it2.
    UNASSIGN : <fs> , <comp> .
    Cheers
    J

  • How to create report with dynamic columns with static row labels

    Hi All,
    I am creating one report as per attached format. I have labels on the right side of the report
    and data in 3 columns. The data is taken dynamically from the command query.
    It gets data from 3 different result sets/command queries.
    I tried creating the report horizontally instead of vertically, but the logo image I am not able to rotate in 270degrees.
    Can anybody tell me how to create the report...??

    Hi Abhilash,
    Thanks for the quick reply.
    Actually the problem is with the image, as I am not able to rotate 270 degree. Crystal report cannot support the rotation of image.
    i have another problem, I have to create a report in which
    Lables are fixed on the left side of report and 3 columns per portrait page. Those columns are
    dynamically created and shown in the report.
    The format is like the above. Can you please help me in doing this report, as I tried it doing
    with CrossTab. I am really stuck to this report.

  • Populate columns with row values in Sql Server Reporting Services

    I have got a dataset with 2 columns named Row and Title. There are 8 rows in this dataset and I want to display those 8 titles within columns in a table. So I create a table with 8 columns and set each column's expression to
    =LookUp(Fields!Row.Value,1,Fields!Title.Value,"Titles")
    =LookUp(Fields!Row.Value,2,Fields!Title.Value,"Titles")
    =LookUp(Fields!Row.Value,3,Fields!Title.Value,"Titles")
    However only the first column displays a title. The other 7 display nothing. Is my expression wrong?

    Hi,
    Is the row datatype non-numeric?  Maybe the lookup is failing for that reason.  You coulr try adding a conversion to the field:
    =LookUp(cint(Fields!Row.Value),1,Fields!Title.Value,"Titles")
    Could you, perhaps, instead use a tablix table and put the Title column on the row group?  That would pivot the data the way that you want it.
    Mark

  • Report Break on Form with Row Selector

    Hi!
    I have just upgraded to 4.1 and created a new page with a Tabular Form (insert, Update and Delete capable).
    The first column in the report is the row selector, so when I set the "Report Break on first column", it breaks on the row selector. In previous releases, the row selector could be moved down in the Report Attributes, but in 4.1, there are now up/down arrows next to the row selector, so I can't move it to the second column!
    Help.. anyone have a solution to this?
    Thanks!
    Jodie

    Hello.
    We have exactly the same problem. Only we are using apex 4.2.
    We have a tabular form with row selector and a break column. We want to break on that break column.
    But we can't move it above row selector.
    How can we solve that problem?
    Thanks.
    Regards,
    Dejan

  • Interactive report showing only the aggregation rows

    I have an interactive report with three columns that can be selected for aggregation. When I select one of the aggregation columns, I get the break logic that summarizes the columns I selected. My question: Is there a way to select the aggregation column and see the summed values only?
    Example:
    Fields: Company, Division, Location, Employee Name, Employee Salary
    Aggregation on: Company, Division, Location.
    Company Division Location Emp Name Emp Salary
    Able 1 East Joe 100
    Able 1 East Tony 200
    Summary for Company Able, Division 1, Location East 300
    I want to be able to see everything, but when I select aggregation at the location level, I want to just see the Summary line.
    Thanks for any suggestions!

    Create a Row Count Measure, as the value being 1, in your Universe for the report. Add that Row Count into the query for the report, re-execute the query, highlight the entire report and then set a filter for that by dragging and dropping the Row Count Measure and filtering where the value > 1.
    Edited by: Dennis Scoville on Jul 27, 2009 11:29 AM

Maybe you are looking for