Add Forecasting column to a Query

Hi,
The user wants to add a forecasting column to a query that has the actual and plan costs. He wants the option to change the values of this column in the query. Can I use any planning cubes for this?
My plan is to make a copy of the cube that has the the budget data, but make it real time. Add a column in the query with this cube. Make this column editable.
Will this work? Will the history of the changes be stored in the cube, or is it a overwrite function?
Any input will be appreciated.
Thanks
Sam

Hi,
Yes you are on the right path. Using real time cubes, you can build an input ready query using which user can make manual entries. But you need not copy your budget data (not to be edited) to real time cube. Its better to keep it and the plan data in real time cube seperatel; build a multiprovider over both the cubes and build your planning application over the multi.
Regarding storing history of changes, it does get preserved in planning cube, but you need to check if the default planning functionality satisfies your reporting requirements. If not, you might need to implement this in your planning model.

Similar Messages

  • ADD a column in a query

    Hi
    I want to add a column in my query.
    This column is the sum of the net value and the tax ..please how can I do this without refering to ABAP development..
    thanks in advance

    This is not an SD question and you might want to use Search (and include other forums) in the future.
    There is no ABAP needed for such basic calculations in queries. In SQ01, this can be done in the 'Select field' screen (it's the 3rd screen where you select which fields will be included in the query.
    First, assign short names to your Net Value and Tax fields. Go to the menu Edit -> Short Names -> Turn On/off. This should open another column to the right from the field names. Enter the names, say NET and TAX.
    Then create a new local field. Same menu, Edit -> Local field -> Create. Give the field some name (TOTAL), assign a type ('Same field as -> use Net field or whatever is suitable). Enter formula NET + TAX and save.

  • HOW TO ADD NEW COLUMN IN EXISTING QUERY

    hi,
    i m working on oracle reorts 10g. i have a multiple query based report. now i want to add a new column in query 1 and order by on that new column .
    i added column in query but when i see that group i dont find that column in that group.wt do i need to do to visible that column in query1 group thats y the order by on that column is not working i think.
    tell how to solve it ?
    thanks

    Hi,
    The new column you have added might be in the least level group of that query.
    Drag it to the desired group level, first postion and set the break order for that item in the property pallette..
    (If still the item not coming, check whether you have put 'comma' in the select query after writing the column name)
    Simply giving the column in the order-by clause will not work in report.
    In Report, record display order is completely based on the break-order of the items given in query-groups
    If you change accordingly it will work
    Regards
    Dora

  • Need to add new column in SAP Query - Please guide me in this regard

    Dear All,
    In SAP Query, I need to put a new coulmn of each record for the difference of Billing date and PGI date as a work days.
    eg: Billing Date = 02.05.2008
         PGI Date = 08.05.2008
    Take a Variable i.e. Days = Billing Date - PGI Date that will display as 5 days by excluding Saturday and Sunday.
    After doing calculation of these work days for each record, we need a to add a new coulmn in that record as field lable as "Work Days" and display.
    Please Guide me in this regard
    Regards,
    Sateesh.

    Hi Rama,
    In SQ01 when you are in the fields (first would be attributes, when you click next it takes you to field groups, and again when you click next if takes you to fields tab) check the following menu path
    EDIT -> LOCAL FIELD -> CREATE
    You can define the formula as per your requirement and populate the field.
    Hope this is helpful.
    Thanks,
    Pavan

  • Query to add a column in between existing cols of a table?

    HI All,
    I have two questions.
    1. Query to add a column in between existing cols of a table? (not at the end. This is view of an order of output fields in a report)
    2. How do I swap the contents of two columns in a table. Suppose in a table tab there are 2 cols , col1,col2 populated with some data.
    I need a query(probably) to swap the col1 and col2 values . NOT AS A RESULT SET, BUT IT NEEDS TO GET CHANGED IN THE TABLE.
    Please help !

    > 1. Query to add a column in between existing cols of
    a table? (not at the end. This is view of an order of
    output fields in a report)
    Not really sensible ito DBMS - it does not care how you want to view the data. The sequence and formats of columns are what you/the application need to specify in the SQL's projection clause.
    Also keep in mind to achieve this, the DBMS will need to rewrite the entire table to fit this new column in-between existing columns. This is not the best of ideas.
    The projection of rows is dealt with SQL statements - not with the physical storage implementation.
    > 2. How do I swap the contents of two columns in a
    table. Suppose in a table tab there are 2 cols ,
    col1,col2 populated with some data.
    I need a query(probably) to swap the col1 and col2
    values . NOT AS A RESULT SET, BUT IT NEEDS TO GET
    CHANGED IN THE TABLE.
    This seems to work:
    SQL> create table foo_tab( c1 varchar2(10), c2 varchar2(10) );
    Table created.
    SQL> insert into foo_tab select TO_CHAR(rownum), TO_CHAR(object_id) from user_objects where rownum < 11;
    10 rows created.
    SQL> commit;
    Commit complete.
    SQL> select * from foo_tab;
    C1 C2
    1 55816
    2 55817
    3 55818
    4 55721
    5 105357
    6 105358
    7 105359
    8 105360
    9 105361
    10 60222
    10 rows selected.
    SQL> update foo_tab set c1=c2, c2=c1;
    10 rows updated.
    SQL> select * from foo_tab;
    C1 C2
    55816 1
    55817 2
    55818 3
    55721 4
    105357 5
    105358 6
    105359 7
    105360 8
    105361 9
    60222 10
    10 rows selected.
    SQL>

  • How to modify an existing query to add a column

    Hi all, I have an existing query :
    SELECT 2 as SOURCE_SYSTEM_ID, LI.IPROD AS SYSTEM_ID, LI.IPROD AS PART_NUMBER, LI.IDESC AS PART_DESCRIPTION, IsNULL((SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE (LZ.CCTABL = 'SIRF2') AND LI.IREF02 = LZ.CCCODE), '') AS PLANT_CODE, LIS.ISSTSD
    AS lifecycle_status, CASE LI.ILDTE WHEN 0 THEN convert(date, GETDATE()) ELSE (SUBSTRing(convert(varchar, LI.ILDTE), 1,4)+'-'+SUBSTRing(convert(varchar,LI.ILDTE), 5,2)+'-'+SUBSTRing(convert(varCHAR,LI.ILDTE), 7,2)) END AS LAST_ACTIVITY_DATE,
    LZPA.DATA AS PRODUCTION_TYPE, (CASE (LI.IITYP) WHEN '6' THEN 'SERVICE' ELSE 'ITEM' END) AS ITEM_TYPE, LI.IVEND AS PRIMARY_VENDOR, (SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='UNITMEAS' AND LZ.CCCODE=LI.IUMS AND LZ.CCLANG = '') AS
    UOM_INVENTORY, (SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='UNITMEAS' AND LZ.CCCODE=LI.IUMS AND LZ.CCLANG = '') AS UOM_BOM, (SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='UNITMEAS' AND LZ.CCCODE=LI. IUMR
    AND LZ.CCLANG = '') AS UOM_SELL, (SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='UNITMEAS' AND LZ.CCCODE=LI.IUMP AND LZ.CCLANG = '') AS UOM_PURCHASE, IsNULL((SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='BUYER'
    AND LZ.CCCODE=LI.IPURC), '') AS BUYER, (LI.IMHIGH) AS ITEM_HEIGHT, SUBSTRING(IsNULL((SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='SIRF5' AND LZ.CCCODE=LI.IREF05), ''), 1, 20) AS APPLICATIONS, IsNULL((SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC
    LZ WHERE LZ.CCTABL='SIRF3' AND LZ.CCCODE=LI.IREF03), '') AS PORGRAM, (LI.IMWIDE) AS ITEM_WIDTH, LI.IMLONG AS ITEM_DEPTH, LI.IWGHT AS ITEM_WEIGHT_NET, LI.IMNNWU AS ITEM_WEIGHT_TARE FROM HCMEUP01.FRDA385A.LBPCSF.IIM LI, HCMEUP01.FRDA385A.LBPCSF.ISC LIS,HCMEUP01.FRDA385A.LBPCSF.ZPA
    LZPA WHERE LI.ICOND = LIS.ISSTSC AND LZPA.PKEY=('ITEMTYP'+LI.IITYP )
    Now I need to add a column called WORK_CENTER. I added a subquery to the existing one.  It looks like this:
    SELECT 2 as SOURCE_SYSTEM_ID, LI.IPROD AS SYSTEM_ID, LI.IPROD AS PART_NUMBER, LI.IDESC AS PART_DESCRIPTION, IsNULL((SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE (LZ.CCTABL = 'SIRF2') AND LI.IREF02 = LZ.CCCODE), '') AS PLANT_CODE, LIS.ISSTSD
    AS lifecycle_status, CASE LI.ILDTE WHEN 0 THEN convert(date, GETDATE()) ELSE (SUBSTRing(convert(varchar, LI.ILDTE), 1,4)+'-'+SUBSTRing(convert(varchar,LI.ILDTE), 5,2)+'-'+SUBSTRing(convert(varCHAR,LI.ILDTE), 7,2)) END AS LAST_ACTIVITY_DATE,
    LZPA.DATA AS PRODUCTION_TYPE, (CASE (LI.IITYP) WHEN '6' THEN 'SERVICE' ELSE 'ITEM' END) AS ITEM_TYPE, LI.IVEND AS PRIMARY_VENDOR, (SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='UNITMEAS' AND LZ.CCCODE=LI.IUMS AND LZ.CCLANG = '') AS
    UOM_INVENTORY, (SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='UNITMEAS' AND LZ.CCCODE=LI.IUMS AND LZ.CCLANG = '') AS UOM_BOM, (SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='UNITMEAS' AND LZ.CCCODE=LI. IUMR
    AND LZ.CCLANG = '') AS UOM_SELL, (SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='UNITMEAS' AND LZ.CCCODE=LI.IUMP AND LZ.CCLANG = '') AS UOM_PURCHASE, IsNULL((SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='BUYER'
    AND LZ.CCCODE=LI.IPURC), '') AS BUYER, (LI.IMHIGH) AS ITEM_HEIGHT, SUBSTRING(IsNULL((SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='SIRF5' AND LZ.CCCODE=LI.IREF05), ''), 1, 20) AS APPLICATIONS, IsNULL((SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC
    LZ WHERE LZ.CCTABL='SIRF3' AND LZ.CCCODE=LI.IREF03), '') AS PORGRAM, (LI.IMWIDE) AS ITEM_WIDTH, LI.IMLONG AS ITEM_DEPTH, LI.IWGHT AS ITEM_WEIGHT_NET, LI.IMNNWU AS ITEM_WEIGHT_TARE,
    (SELECT LC.LWRKC FROM HCMEUP01.FRDA385A.LBPCSF.LCR LC WHERE RTRIM(LTRIM(LC.LITEM)) = RTRIM(LTRIM(LI.IPROD)) ) AS WORK_CENTER FROM HCMEUP01.FRDA385A.LBPCSF.IIM LI, HCMEUP01.FRDA385A.LBPCSF.ISC LIS,HCMEUP01.FRDA385A.LBPCSF.ZPA LZPA WHERE
    LI.ICOND = LIS.ISSTSC AND LZPA.PKEY=('ITEMTYP'+LI.IITYP )
    Please see the bolded and italic part.   The problem is that the subquery is non distinct.  I am getting an error "
    Msg 512, Level 16, State 1, Line 2
    Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression."
    Can you let me know how I can resolve this issue? it is an urgent request.  Thank you
    Thank You Warmest Fanny Pied

    I was given the existing query and the subquery as they were.  The subquery is as it is returning multiple records on the columns selected.  The person who give me the sub query is sure those are the correct tables to use to develope/change the
    query. 
    select
      DISTINCT a.litem,
    b.IPROD,b.idesc,a.lwrkc
    from HCMEUP01.FRDA385A.LBPCSF.LCR
    a, HCMEUP01.FRDA385A.LBPCSF.IIM
    b
    where
    a.litem=b.iprod
    Thank you for your help.
    Thank You Warmest Fanny Pied

  • How Can i add "DateDiff(day, T0.DueDate" as a column in this query?

    How Can i add "DateDiff(day, T0.DueDate" as a column in this query?
    SELECT T1.CardCode, T1.CardName, T1.CreditLine, T0.RefDate, T0.Ref1 'Document Number',
          CASE  WHEN T0.TransType=13 THEN 'Invoice'
               WHEN T0.TransType=14 THEN 'Credit Note'
               WHEN T0.TransType=30 THEN 'Journal'
               WHEN T0.TransType=24 THEN 'Receipt'
               END AS 'Document Type',
          T0.DueDate, (T0.Debit- T0.Credit) 'Balance'
          ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')<=-1),0) 'Future'
          ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>=0 and DateDiff(day, T0.DueDate,'[%1]')<=30),0) 'Current'
          ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>30 and DateDiff(day, T0.DueDate,'[%1]')<=60),0) '31-60 Days'
          ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>60 and DateDiff(day, T0.DueDate,'[%1]')<=90),0) '61-90 Days'
          ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>90 and DateDiff(day, T0.DueDate,'[%1]')<=120),0) '91-120 Days'
          ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>=121),0) '121+ Days'
    FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode
    WHERE (T0.MthDate IS NULL OR T0.MthDate > [%1]) AND T0.RefDate <= [%1] AND T1.CardType = 'C'
    ORDER BY T1.CardCode, T0.DueDate, T0.Ref1

    Hi,
    As you mentioned not possible to assign the dynamic column in the query.
    will give you example for generate a dynamic column name in SQL query, using this example you can achieve your requirement.
    DECLARE @cols AS NVARCHAR(MAX),
        @query  AS NVARCHAR(MAX)
    select @cols = STUFF((SELECT distinct ',' + QUOTENAME(C.Name) 
                        from [History]
                FOR XML PATH(''), TYPE
                ).value('.', 'NVARCHAR(MAX)')
            ,1,1,'')
    set @query = 'SELECT [Date],' + @cols +'
                 from
                    select [Date], Name, Value
                    from [History]
                 ) x
                pivot
                    max(value)
                    for Name in (' + @cols + ')
                ) p '
    execute(@query)

  • Query Help - Add a column that doesn't exist in table

    Hello,
    i have an application that runs a query in code off of a main query, and that query in code requires a column that does not exist in the main query that I created. how do I go about adding a column to a query that does not actually exist in the table or database that I am querying?
    For Example:
    SELECT PROJ_ID, PROJECT_NAME
    FROM PROJECT
    I need a column called "DELETE_SESSION_ID" and this database/table does not contain that column anywhere. Is it best to create a view that creates the column somehow? I would prefer not having to create the column inside of the table. Any ideas are greatly appreciated.
    Thanks,
    Jeff

    user10249614 wrote:
    Hello,
    i have an application that runs a query in code off of a main query, and that query in code requires a column that does not exist in the main query that I created. how do I go about adding a column to a query that does not actually exist in the table or database that I am querying?
    For Example:
    SELECT PROJ_ID, PROJECT_NAME
    FROM PROJECT
    I need a column called "DELETE_SESSION_ID" and this database/table does not contain that column anywhere. Is it best to create a view that creates the column somehow? I would prefer not having to create the column inside of the table. Any ideas are greatly appreciated.
    Thanks,
    JeffYou need a way to obtain the value you need - a function to generate it, perhaps. A view using such a function or aquiring the value by other means should work well.
    Pipelined functions work well to generate values that aren't in the database at run time - if your version of Oracle supports them

  • Add a flag column in the Query based on Cancel date

    hi Guys,
    I have a Characterstic object 0canceldate and it gets the cancellation date of the sales order. Based on that date i need to add a column in the report like if 0canceldate has ahappened or populate then show Yes or No in the coumn like a flag.
    Can anybody help me how i can do that?

    SELECT d.NAME
          FROM
            (SELECT jta.NAME
              FROM apps.jtf_terr_values_all jtva,
              apps.jtf_terr_qual_all jtqa,
              apps.jtf_terr_all jta ,
              apps.hz_party_sites ps,
              apps.hz_locations hl
            WHERE jtva.terr_qual_id     = jtqa.terr_qual_id
            AND jtqa.terr_id            = jta.terr_id
            AND jtva.low_value_char     = hl.postal_code
            AND jtqa.org_id             = jtva.org_id
            AND jta.org_id              = jtqa.org_id
            AND ps.location_id          = hl.location_id
            AND hl.country             in( 'CA', 'US')) D;
            UNION
            SELECT jta.NAME
              FROM apps.jtf_terr_values_all jtva,
              apps.jtf_terr_qual_all jtqa,
              apps.jtf_terr_all jta,
              apps.hz_party_sites ps,
              apps.hz_locations hl
            WHERE jtva.terr_qual_id     = jtqa.terr_qual_id
            AND jtqa.terr_id            = jta.terr_id
            AND ps.location_id          = hl.location_id
            AND jtqa.org_id             = jtva.org_id
            AND jta.org_id              = jtqa.org_id
            AND hl.country              = 'US'
            AND hl.postal_code BETWEEN jtva.low_value_char AND jtva.high_value_char
            )d;

  • Is there a way to add a column after a filled DataTable from SQL with the same rows?

    My problem is that not to add rows like filled by SQLDataAdapter at the same row in DataGridView. How to make that? I showed below the details with my code also a screen shot, which shows the rows differences from the origin one.
    I don't want to add an expression as column behave in my sql script to get what I need with query result. I don't want to obtain that way.
    using (SqlConnection c = new SqlConnection(ConnStrMSSQL))
    c.Open();
    // 2
    // Create new DataAdapter
    using (SqlDataAdapter a = new SqlDataAdapter("SELECT SIPNO, SERINO, TARIH FROM SNOHAREKETLER WHERE Cast(TARIH as DATE) BETWEEN '2015/03/20' AND '2015/03/20' AND (TEZNO = 'T23' OR TEZNO = 'T31') AND CIKTI is null", c))
    // 3
    // Use DataAdapter to fill DataTable
    DataTable t = new DataTable();
    a.Fill(t);
    t.Columns.Add("MyColumn", typeof(string));
    DataRow workRow;
    int iGetCount = t.Rows.Count;
    for (int i = 0; i <= iGetCount - 1; i++)
    workRow = t.NewRow();
    workRow["MyColumn"] = i;
    t.Rows.Add(workRow);
    dataGridView1.DataSource = t;

    The extra column isn't applied to only certain rows.  The columns of a table identify what data each row will contain.  Hence adding a column to the table automatically adds them to the rows.  What you're seeing is that all the initial rows
    aren't being assigned a value so they retain their default value of null.  Later you enumerate the rows of the existing table and call AddRow which adds new rows.  This isn't adding columns, but rows.
    To generate values for the existing rows you should ideally simply pass the data back from the database.  DT computed columns can be difficult to set up as it is limited to what it can do.  If you want to use a computed column on the Datatable
    itself then define the column as a computed column and every row will calculate its own value.
    DataTable data = GetData();
    //Add elapsed time column
    var col = new DataColumn("ElapsedTime", typeof(TimeSpan), "expr");
    data.Columns.Add(col);
    dataGridView1.DataSource = data;
    The issue you will run into however is that calculating a diff on DateTime doesn't work in a computed column as the expression doesn't support the necessary functions.  You can google for how people solved this if you are interested in alternatives. 
    Most people just tend to add the column and then hook into the various change events to update the value as needed.

  • HOW TO: Add /manipulate columns for a GridControl

    HOW TO: Add /manipulate columns for a GridControl when the columns (attributes) are from different entity objects.
    This HOWTO describes the basic steps of using attributes from different entity objects for a GridControl.
    One way you can create a GridControl which contain attributes from different entity objects is to create a view object and base it on the entity objects which contain
    the desired attributes.
    Here are the basic steps:
    1.Create a new view object (or use an existing view object) by selecting File>New from the menu, clicking the Business Components tab and double-clicking
    on the View Object icon.
    2.In the View Object wizard change the name to something meaningful.
    3.Select the entity objects you will base your view object on.
    4.Nivigate to the attribute screen and select the attributes you would like to include in your view object from each entity object. At this point you can also create
    a new attribute by clicking the "New" button. The new attribute can be a concatenation of other attributes, derived from a calculation etc.
    5.In the query panel of the View Object wizard, click "Expert mode" and enter a query statement. You write complex queries such as decoding a set of attribute
    values.
    6.Add your newly to your newly created view object to the application module by double-clicking on the application module in the navigation pane and selecting
    your view object from the list.
    7.Create a new row set.
    8.Bind row set to a query by editing their queryinfo property and selecting your view object and its attributes from the queryInfo pane.
    9.Create a GridControl and bind it to the row set by editing the dataItemName property of the GridControl. Since the GridControl is bound at the row set level
    all of the related attributes are automatically added.
    null

    Michael,
    Are you intending this as a commercial solution or a work around?
    To take an existing equivalent, one would build a view in the database tailored for each grid in an Oracle Forms application. Or a separate query layered over tables for each form/grid in a Delphi or Access application? Even if it is ninety nine percent the same over half a dozen forms/grids?
    And now you've added a whole slew of "slightly different" rowSetInfos to maintain.
    So if you wanted to add a column that needs to appear everywhere... you've just increased the workload multi-fold?
    That would be a management nightmare, wouldn't it? Not to mention yet more performance cost and a slower system?
    Hmmmm..... I'm not sure I like where this is headed... someone needs to do some convincing...
    null

  • Invalid column name in query string - using Format function

    In my post just before this one the problem was solved for writing a query string using a date range. The rest of the query string includes the same date field (Call_Date) but formatted as 'MMM-YY'. I get an invalid column name error when I add this field to the query string. Here is the rest of the query string:
    strSql = "SELECT Format(CALL_DATE,'mmm-yy'), " _
    & "HOME_REGION FROM CCC2.CASE_EPRP " _
    & "WHERE (HOME_REGION = 'NCR') AND " _
    "(CALL_DATE >= to_date( '1/1/2002', 'MM/DD/YYYY' )" _
    & "AND CALL_DATE <= to_date( '2/28/2003', 'MM/DD/YYYY' ))"
    In the Access Query tool I can include this field
    Format(CALL_DATE,'mmm-yy')
    and the query runs fine (I just need to make it dynamic using ADO). But in my ADO query string above, I get the invalid column name error. Is there a way I can include
    Format(CALL_DATE,'mmm-yy')
    in my ADO query string? I appologize for not being more familiar with Oracle Sql. Any help greatly appreciated.
    Thanks again,
    Rich

    Thank you very much for your reply. I think I'm getting closer to the solution. Just I got an error message
    "date format not recognized"
    when I add "to_char( call_date, 'mmm-yy' )" to the query string. I tried using all uppercase, but that did not make a difference. Do I need to use to_date inside the to_char maybe?
    to_char(to_date(call_date, 'mmm/yy'), 'mmm-yy')
    Thanks again for your help.
    Rich

  • Comment column in a query

    Hello,
    In a BW query, I need to add a column of text comments (for example, the description of a calculation, the unit used, ...). These texts are static, the queries will only be used as static reports (download scheduler), in excel and web, so we can not use any VB script.
    Is it a way to add some text in a cell of a column, as in the following example (columns 2 and 3) ?
    KF1    |    Comment for KF1    |    Euros    |    12
    KF2    |    Comment for KF2    |    %          |    47
    Thanks in advance
    Michaë

    Hi guys,
    finally how you fix this problem?, I need to show a comment in a query column and i don't know if this is posible ¿?, I have a query inside of a wad and I want to show a comment in the columns  of the query with the formula details.
    Please let me know if you this is possible.
    Thanks!, Kinds Regards

  • How to add new columns in materialized view

    We are using Oracle 10g Release2.
    We need to add new columns to a prebuilt fast refresh materialized view. We want to add 4 new columns in this table and make them part of select statement in the materialized view. We can drop the view but we cannot do complete refresh after that because the paymentsInfo table has a creation_timestamp column which is populated by before row insert trigger with systimestamp. If we did the complete refresh, all values in this column shall be changed.
    CREATE MATERIALIZED VIEW  paymentsInfo
    ON PREBUILT TABLE
    REFRESH FAST
      ON DEMAND
      START WITH SYSDATE
      NEXT SYSDATE+5/1440
      WITH PRIMARY KEY
    DISABLE QUERY REWRITE AS
    SELECT PAYMENT_ID,BATCH_REFERENCE, TRANSACTION_REFERENCE, NO_OF_TRANSACTIONS, DEBIT_ACC_NUM,... from payment@dblink
    I want to know is there any other way to add new columns without losing any changes from the master table.
    Thanks.

    There is no way to add new Columns to Materialized view. To add new columns, it has to be dropped and re-built again.
    Extract from Oracle Documentaion:
    Use the ALTER MATERIALIZED VIEW statement to modify an existing materialized view in one or more of the following ways:
      To change its storage characteristics
      To change its refresh method, mode, or time
      To alter its structure so that it is a different type of materialized view
      To enable or disable query rewrite
    If you have a problem of Complete refresh, then It may be beneficial to get the backup of the MView; Drop and re-create it with modified definition; Restore the backup data leaving the new columns untouched (assuming they are to be kept as fetched from the Master site).

  • How to add join conditions in ABAP Query.

    Hi,
    I need a help on "ABAP Query".
    How to add join conditions in ABAP Query.
    Thanks in advance.
    Thanks & Regards,
    Ramana

    Hi,
    See below code,
    *& Report  ZRNP_ALV_SO
    REPORT  zrnp_alv_so MESSAGE-ID z7rnp .
    INCLUDE zrnp_include .
    *SELECTION SCREEN                                                      *
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-004 .
    SELECT-OPTIONS: s_vbeln FOR vbak-vbeln ,
                    s_auart FOR v_auart ,
                    s_vkorg FOR v_vkorg ,
                    s_spart FOR v_spart ,
                    s_kunnr FOR v_kunnr ,
                    s_matnr FOR v_matnr .
    SELECTION-SCREEN END OF BLOCK blk1 .
    *AT SELECTION SCREEN                                                   *
    AT SELECTION-SCREEN.
      SELECT SINGLE vbeln
                     FROM vbak INTO vbak-vbeln
                     WHERE vbeln IN s_vbeln.
      IF sy-subrc <> 0.
        MESSAGE e202.
      ENDIF.
    *START OF SELECTION                                                    *
    START-OF-SELECTION .
      PERFORM data_select.
      PERFORM t_sort USING i_sort .
      PERFORM event_cat USING i_event .
      PERFORM fld_cat USING i_fldcat[] .
      PERFORM t_layout USING i_layout .
      PERFORM fld_cat2 USING i_fldcat2[] .
      PERFORM call_alv.
    * DATA SELECT                                                          *
    *&      Form  DATA_SELECT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM data_select .
      REFRESH: it_vbfa, it_so1, it_del_ful ,it_del1 .
      BREAK-POINT.
      *SELECT*
            *a~vbeln*
            *a~auart*
            *a~vkorg*
            *a~spart*
            *a~kunnr*
            *b~posnr*
            *b~matnr*
            *c~maktx*
            *b~kwmeng*
            *b~vrkme*
            *INTO TABLE it_so1 FROM vbak AS a*
                  *INNER JOIN vbap AS b ON b~vbeln = a~vbeln*
                  *INNER JOIN makt AS c ON c~matnr = b~matnr*
                  *AND c~spras = sy-langu*
                  *WHERE a~vbeln IN s_vbeln .*
      IF sy-subrc = 0.
        SORT it_so1 BY vbeln.
        DELETE ADJACENT DUPLICATES FROM it_so1.
      ENDIF.
    * COLURING DISPLAY                                                     *
      DATA: ld_color(1) TYPE  c .
    *  LOOP AT it_so1 INTO wa_so.
    * Populate color variable with colour properties
    * Char 1 = C (This is a color property)
    * Char 2 = 3 (Color codes: 1 - 7)
    * Char 3 = Intensified on/off ( 1 or 0 )
    * Char 4 = Inverse display on/off ( 1 or 0 )
    *           i.e. wa_ekko-line_color = 'C410'
    *    ld_color = ld_color + 1.
    * Only 7 colours so need to reset color value
    *    IF ld_color = 8.
    *      ld_color = 1.
    *    ENDIF.
    *    CONCATENATE 'C' ld_color '10' INTO wa_so-line_color.
    **  wa_ekko-line_color = 'C410'.
    *    MODIFY it_so1 FROM wa_so.
    *  ENDLOOP .
    *  IF sy-subrc = 0.
      IF NOT it_so1[] IS INITIAL.
        SELECT vbelv
               posnv
               vbeln
               posnn
               vbtyp_n
               INTO TABLE it_vbfa
               FROM vbfa
               FOR ALL ENTRIES IN it_so1
               WHERE vbelv = it_so1-vbeln
               AND   posnn = it_so1-posnr
               AND vbtyp_n ='J' .
        IF sy-subrc = 0.
          SELECT vbeln
                 posnr
                 matnr
                 werks
                 lgort
                 charg
                 lfimg
                 vrkme
                 FROM lips INTO TABLE it_del_ful
                 FOR ALL ENTRIES IN it_vbfa
                 WHERE vbeln = it_vbfa-vbeln
                 AND   posnr = it_vbfa-posnn.
        ENDIF.
      ENDIF.
    ENDFORM.                    " DATA_SELECT
    **************** EVENT CATALOG ****************************************
    *&      Form  EVENT_CAT
    *       text
    *      -->P_I_EVENT  text
    FORM event_cat  USING    p_i_event TYPE slis_t_event .
      REFRESH p_i_event .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    * EXPORTING
    *   I_LIST_TYPE           = 0
       IMPORTING
          et_events             = p_i_event
    * EXCEPTIONS
    *   LIST_TYPE_WRONG       = 1
    *   OTHERS                = 2
    *  IF sy-subrc <> 0.
    ** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    **         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *  ENDIF.
      READ TABLE p_i_event WITH KEY name = slis_ev_top_of_page INTO t_event.
      IF sy-subrc = 0.
        MOVE 'TOP_OF_PAGE' TO t_event-form.
        MODIFY p_i_event FROM t_event INDEX sy-tabix TRANSPORTING form.
      ENDIF.
      CLEAR t_event .
    ENDFORM.                    " EVENT_CAT
    **********FORM FOR EVENT TOP_OF_PAGE**********************************
    FORM top_of_page .
      REFRESH i_listheader.
      DATA: t_header TYPE slis_listheader.
      DATA: v_text(50).
      WRITE sy-datum TO v_text.
      CLEAR t_header.
      t_header-typ = 'S'.
      t_header-key = "Date".
      t_header-info = v_text.
      APPEND t_header TO i_listheader.
      CLEAR t_header.
      CLEAR v_text.
      WRITE:  'SALES ORDER & DELIVERY DETAILS REPORT  ' TO v_text .
      t_header-typ = 'S'.
      t_header-key = 'TITLE'.
      t_header-info = v_text.
      APPEND t_header TO i_listheader.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = i_listheader.
    *      I_LOGO             = 'ALV_BACKGROUND'.
    *   I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP_OF_PAGE
    ********  FIRST ALV GRID DISPLAY ***************************************
    FORM call_alv .
    * FORM TO MAKE THE CELL CONTENTS INVISIBLE.
    * PERFORM INVISIBLE_CELL_CONTENTS. *
    *EXCLUDE-DECLARATION.
      CLEAR wa_exclude.
      wa_exclude-fcode = '&VEXCEL'.
      APPEND wa_exclude TO i_exclude.
    *&      Form  CALL_ALV
    *       text
    *  -->  p1        text
    *  <--  p2        text
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = sy-repid
    *    I_CALLBACK_PF_STATUS_SET          = 'SET_PF_STATUS'
         i_callback_user_command           = 'USER_COMMAND1'
         i_callback_top_of_page            = 'TOP_OF_PAGE'
         i_background_id                   = 'ALV_BACKGROUND'
         is_layout                         = i_layout
         it_fieldcat                       = i_fldcat[]
         it_excluding                      = i_exclude
         it_sort                           = i_sort
         it_events                         = i_event
        TABLES
         t_outtab                          = it_so1
    *  IF sy-subrc <> 0.
    ** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    **         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *  ENDIF.
    ENDFORM.                    " CALL_ALV
    ************** FIRST FIELDCATALOG *************************************
    *&      Form  FLD_CAT
    *       text
    *      -->P_I_FLDCAT[]  text
    FORM fld_cat  USING    p_i_fldcat TYPE slis_t_fieldcat_alv.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'VBELN'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'."TABLE NAME
      i_fldcat-seltext_m   = 'SALES ORDER NO.'.
      i_fldcat-col_pos     = 1.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-hotspot     = 'X'.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'AUART'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'."TABLE NAME
      i_fldcat-seltext_m   = 'SALES DOC. TYPE'.
      i_fldcat-col_pos     = 2.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 15.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'VKORG'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'.
      i_fldcat-seltext_m   = 'SALES ORG.'.
      i_fldcat-col_pos     = 3.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 12.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'SPART'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'.
      i_fldcat-seltext_m   = 'DIVISION'.
      i_fldcat-col_pos     = 4.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 10.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'KUNNR'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'.
      i_fldcat-seltext_m   = 'SOLD TO PARTY'.
      i_fldcat-col_pos     = 5.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 15.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'POSNR'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'.
      i_fldcat-seltext_m   = 'SALES DOC. ITEM'.
      i_fldcat-col_pos     = 6.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 17.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'MATNR'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'.
      i_fldcat-seltext_m   = 'MATERIAL NO.'.
      i_fldcat-col_pos     = 7.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'MAKTX'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'.
      i_fldcat-seltext_m   = 'DESCRIPTION'.
      i_fldcat-col_pos     = 8.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'KWMENG'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'.
      i_fldcat-seltext_m   = 'QUANTITY'.
      i_fldcat-col_pos     = 9.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 15.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-do_sum    = 'X'.        " For doing "SUM"
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'VRKME'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'.
      i_fldcat-seltext_m   = 'SALES UNIT'.
      i_fldcat-col_pos     = 10.       " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 10.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
    ENDFORM.                    " FLD_CAT
    ****************** ALV SORTING  ***************************************
    *&      Form  SORT
    *       text
    *      -->P_I_SORT  text
    FORM t_sort  USING    p_i_sort TYPE slis_t_sortinfo_alv .
      DATA: i_sort TYPE slis_sortinfo_alv .
      REFRESH p_i_sort .
      CLEAR i_sort.
      i_sort-spos = 1.
      i_sort-tabname = 'IT_SO1'.
      i_sort-fieldname = 'VBELN'.
      i_sort-up = 'X'.
      i_sort-subtot = 'X'.
      i_sort-group = '*'.
      APPEND i_sort TO p_i_sort.
    ENDFORM.                    " SORT
    *FORM SET_PF_STATUS USING rt_extab TYPE slis_t_extab.
    *  SET PF-STATUS 'ZSTANDARD'.
    *ENDFORM. "Set_pf_status
    ***********FORM FOR EVENT USER_COMMAND1********************************
    FORM user_command1 USING r_ucomm LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
    *CASE R_UCOMM .
    *    WHEN '&IC1' .
    *    IF rs_selfield-FIELDNAME = 'VBELN' .
    *    ENDIF .
    * WHEN OTHERS .
    * ENDCASE .
      CLEAR wa_so.
      REFRESH: it_del1 .
      IF r_ucomm = '&IC1' AND rs_selfield-fieldname = 'VBELN' AND
      rs_selfield-value IS NOT INITIAL.
        READ TABLE it_so1 INTO wa_so INDEX rs_selfield-tabindex.
        IF sy-subrc = 0.
          LOOP AT it_vbfa INTO wa_vbfa WHERE vbelv = wa_so-vbeln
                                       AND   posnv = wa_so-posnr.
            READ TABLE it_del_ful INTO wa_it_del_ful
                 WITH KEY vbeln = wa_vbfa-vbelv
                          posnr = wa_vbfa-posnn.
            IF sy-subrc = 0.
              CLEAR wa_del.
              MOVE wa_it_del_ful TO wa_del.
              APPEND wa_del TO it_del1.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ********* SECOND ALV GRID DISPLAY ***********************************
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
        i_callback_program                = sy-repid
    *   I_CALLBACK_PF_STATUS_SET          = 'SET_PF_STATUS'
        i_callback_user_command           = 'USER_COMMAND2'
        i_callback_top_of_page            = 'TOP_OF_PAGE'
        i_background_id                   = 'ALV_BACKGROUND'
        it_fieldcat                       = i_fldcat2[]
        it_sort                           = i_sort
        TABLES
        t_outtab                          = it_del_ful
    *  IF sy-subrc <> 0.
    ** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    **         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *  ENDIF.
    ENDFORM .                    "USER_COMMAND1
    ********** FORM FOR EVENT USER_COMMAND 2 ******************************
    FORM user_command2 USING r_ucomm LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
      CLEAR wa_so.
      REFRESH: it_del1 .
      IF r_ucomm = '&IC1' AND rs_selfield-fieldname = 'VBELN' AND
      rs_selfield-value IS NOT INITIAL.
        READ TABLE it_so1 INTO wa_so INDEX rs_selfield-tabindex.
    *    IF SY-SUBRC = 0.
    *       LOOP AT it_vbfa INTO wa_vbfa WHERE vbelv = WA_SO-vbeln
    *                                    AND   posnv = WA_SO-posnr.
        READ TABLE it_del_ful INTO wa_it_del_ful
             WITH KEY vbeln = rs_selfield-value
                     " vbeln = wa_vbfa-vbeln
                      posnr = wa_vbfa-posnn.
        IF rs_selfield-fieldname = 'VBELN'.
          SET PARAMETER ID 'VL' FIELD wa_vbfa-vbeln .
          CALL TRANSACTION 'VL03' AND SKIP FIRST SCREEN.
        ENDIF .
    *       ENDLOOP.
    *    ENDIF.
      ENDIF.
    ENDFORM .                    "USER_COMMAND2
    ********* SECOND FIELDCATALOG ******************************************
    *&      Form  FLD_CAT2
    *       text
    *      -->P_I_FLDCAT2[]  text
    FORM fld_cat2  USING    p_i_fldcat2 TYPE slis_t_fieldcat_alv .
      CLEAR i_fldcat2.
      i_fldcat2-fieldname   = 'VBELN'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat2-tabname     = 'IT_DEL_FUL'."TABLE NAME
      i_fldcat2-seltext_m   = 'DELIVERY NO.'.
      i_fldcat2-col_pos     = 1.        " POSITION OF THE COLUMN.
      i_fldcat2-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat2-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat2-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat2-hotspot     = 'X'.
      i_fldcat2-just(1)     = 'C'.
      APPEND i_fldcat2.
      CLEAR i_fldcat2.
      i_fldcat2-fieldname   = 'POSNR'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat2-seltext_m   = 'DELIVERY ITEM'.
      i_fldcat2-col_pos     = 2.        " POSITION OF THE COLUMN.
      i_fldcat2-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat2-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat2-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat2-just(1)     = 'C'.
      APPEND i_fldcat2.
      CLEAR i_fldcat2.
      i_fldcat2-fieldname   = 'MATNR'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat2-seltext_m   = 'MATERIAL NO.'.
      i_fldcat2-col_pos     = 3.        " POSITION OF THE COLUMN.
      i_fldcat2-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat2-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat2-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat2-just(1)     = 'C'.
      APPEND i_fldcat2.
      CLEAR i_fldcat2.
      i_fldcat2-fieldname   = 'WERKS'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat2-seltext_m   = 'PLANT.'.
      i_fldcat2-col_pos     = 4.        " POSITION OF THE COLUMN.
      i_fldcat2-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat2-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat2-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat2-just(1)     = 'C'.
      APPEND i_fldcat2.
      CLEAR i_fldcat2.
      i_fldcat2-fieldname   = 'LGORT'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat2-seltext_m   = 'ST. LOCATION'.
      i_fldcat2-col_pos     = 5.        " POSITION OF THE COLUMN.
      i_fldcat2-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat2-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat2-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat2-just(1)     = 'C'.
      APPEND i_fldcat2.
      CLEAR i_fldcat2.
      i_fldcat2-fieldname   = 'CHARG'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat2-seltext_m   = 'BATCH NO.'.
      i_fldcat2-col_pos     = 6.        " POSITION OF THE COLUMN.
      i_fldcat2-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat2-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat2-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat2-just(1)     = 'C'.
      APPEND i_fldcat2.
      CLEAR i_fldcat2.
      i_fldcat2-fieldname   = 'LFIMG'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat2-seltext_m   = 'ACT. DEL. QTY.'.
      i_fldcat2-col_pos     = 7.        " POSITION OF THE COLUMN.
      i_fldcat2-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat2-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat2-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat2-just(1)     = 'C'.
      APPEND i_fldcat2.
      CLEAR i_fldcat2.
      i_fldcat2-fieldname   = 'VRKME'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat2-seltext_m   = 'SALES UNIT.'.
      i_fldcat2-col_pos     = 8.        " POSITION OF THE COLUMN.
      i_fldcat2-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat2-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat2-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat2-just(1)     = 'C'.
      APPEND i_fldcat2.
    ENDFORM.                                                    " FLD_CAT2
    ***************** ALV LAYOUT *******************************************
    *&      Form  LAYOUT
    *       text
    *      -->P_I_LAYOUT  text
    FORM t_layout  USING    p_i_layout TYPE slis_layout_alv .
      p_i_layout-zebra  = 'X'.
      p_i_layout-totals_text = 'GRAND TOTAL ='.
    *  p_i_layout-CONFIRMATION_PROMPT = 'X'.
    *  p_i_layout-DEF_STATUS  = ' '.
      p_i_layout-info_fieldname = 'LINE_COLOR'.
    ENDFORM.                    " LAYOUT

Maybe you are looking for

  • Drag and Drop (re-order) Thumbnails in Organizer

    I am using Photoshop Elements version 5.0.2 I would like to re-order pictures in an order that will make sense for me in my business. I suppose I can go through each pix and change the time on them, so I can then sort by time stamp. Is there an easie

  • Error Message in portal application.log

    Hi all, There are error messages continually been written to application.log. Here is the path. $ORACLE_HOME/j2ee/OC4J_Portal/application-deployments/portal/OC4J_Portal_default_island_1/application.log We couldn't find out what's wrong. Portal Versio

  • Asset transfer in AR01 report

    When making a inter company transfer, i can see the asset in the transferring company deactivated and the asset in the transferred to company  created. IN our client this new asset is created with an asset value date of 01/01/2009. and this transfer

  • PO Line item IM Material

    Hi, In Purchase order line item some material number is populating in "IM Material" field. Please advice me what is the reason behind this. Thanks John K.T.

  • Impossible to see the Icon Size slider

    Hi I have installed SL on Leopard and I was expecting to see Icon Size sliders on each finder window and there are none. Is that a bug or is there a way to activate that feature ? Thanks in advance