Dynamically selecting column names in report builder ???

Dear members,
I have a requirement in which the user dynamically selects the tables column names. Like suppose take DEPT table. My query would be
select &P Report from dept;
so if the user selects DNAME then i would get the dname values and so on... This is fine but if one gives the value for the lexical parameter as DEPTNO,DNAME then i should get two columns in my report output. The select statement then becomes
select DEPTNO,DNAME Report from dept;
But i am not able to do this in report builder(6i). If i use just one value for the parameter then i get the o/p but if i use more than one (eg: DEPTNO,DNAME) then its giving an error.when i run this query through toad or sql plus then i am getting the desired o/p but wher as in report builder i am not able to get the o/p.
My report triggers are :
Before Parameter form :
:P := NULL;
After parameter Form :
function AfterPForm return boolean is
begin
IF :P = 'DNAME,DEPTNO' THEN
:P := ' DNAME,DEPTNO ' ;
ELSE
     :P := NULL;
     END IF;
return (TRUE);
end;
Your comments and suggestions are welcomed.
thanks
regards
sandeep

Number of columns can not be changed at run time. If your data model has three columns, lexical parameter should pass 3 values. If you have query like this in data model:
select &p_1 from table
Whatevere you have as initial value in user parameter p_1, data model captures that info.

Similar Messages

  • Dynamically assign column names in reports

    I have a report that has to display the data for the years within the given date range.
    For example, for customer A I need to display order value placed in each year between the date range 01-dec-2010 till 31-dec-2014.
    From Date : 01-dec-2010 To Date :31-dec-2014
    Output should be a follows :
    Customer 2010 2011 2012 2013 2014
    A 50 40 60 100 20
    This means that if the date range is 2010 to 2015 then output will be as follows
    Customer 2010 2011 2012 2013 2014 2015
    A 50 40 60 100 20 50
    So the report column name must change accoding to the Fm/To Period range
    Please tell me the coding for dynamically changing report column names as per the parameters 'From Dt' and 'To Dt'.

    Hi,
    First and best option I will recommend is to create a MATRIX report.
    Second option if the number of columns are fixed,
    create fixed no of date ranges as parameters or placeholder columns (can be achieved even with 2 parameters start date and end date), you just need to use DATE is formula calculations cleverly.
    Now create formula columns and pass the date ranges as parameters to the respective column formulas.
    Best Regards
    Arif Khadas

  • Function short dump - A dynamically specified column name is unknown.

    Hello,
    I've created BRF fuction according to the  Note 1466868 - Dunning by collection strategy with BRFplus. I get short dump during simulation of function with following exception:
    "A dynamically specified column name is unknown. "
    Runtime Errors         SAPSQL_INVALID_FIELDNAME
    Exception              CX_SY_DYNAMIC_OSQL_SEMANTICS
    No.   Ty.          Program                             Include                             Line
          Name
       19 METHOD       CL_FDT_ELEMENT================CP    CL_FDT_ELEMENT================CM012   129
          CL_FDT_ELEMENT=>GET_VALUES_DDIC
       18 METHOD       CL_FDT_ELEMENT================CP    CL_FDT_ELEMENT================CM011   124
          CL_FDT_ELEMENT=>GET_VALUES
       17 METHOD       CL_FDT_WD_RENDER_VALUE_INPUT==CP    CL_FDT_WD_RENDER_VALUE_INPUT==CM00G   139
          CL_FDT_WD_RENDER_VALUE_INPUT=>VALIDATE_VALUES
    In my opinion there is uncorrect query.
    Current version:
    .  SELECT FIKRS AS VALUE NAME AS TEXT FROM FMBS_BS_T
        INTO CORRESPONDING FIELDS OF TABLE lt_value
        WHERE LANGU EQ 'E'.
    instead of:
    .  SELECT FM_AREA AS VALUE NAME AS TEXT FROM FMBS_BS_T
        INTO CORRESPONDING FIELDS OF TABLE lt_value
        WHERE LANGU EQ 'E'.
    My sap version:
    EHP4 FOR SAP ERP 6.0 / NW7.01
      SAP_BASIS     701     0003     SAPKB70103
    Do you know any note or solution  to resolve this problem.
    Best regards,
    Jacek Witczak

    Hi, I came back to working on "Dunning by collection strategy with BRFplus". According to your sugestions, I raised the level of components:
    SAP_BASIS Level 09
    SAP_ABA level 09
    PI_BASIS level 09
    SAP_BW level 09
    But still I have the same short dump.
    Shoudl we raise any other components? Maybe you know note, which resolve this problem?

  • HR - dynamic selections field name and field value in the program

    HI all,
       I am using dynamic selections for a HR report.
    I have created a view with 20 fields and added it to HR report category ___00003(All fields suppressed).
    I need to check these fields in the program. But i am not able to get the field name and value in the program for dynamic selections fields.
    Please let me know how to get the field names and values in the program for dynamic selections .
    Thanks,
    Kranthi.

    You have to read the itab <i>pnpdynse</i> in your Program to obtain the Dynamic Selection values. This itab has a deep structure.. you can set a break point in one of the events before <b>get pernr</b> & in the debug mode, you will able to display the itab <i>pnpdynse</i>.. you can then identify how to get the values into your code..
    ~Suresh

  • How to dynamically set column name in Answers

    Hi.
    How to dynamically set column name in Answers, for example I want to put presentation variable in column header. Is this possible?
    Regards,
    Goran Ocko
    http://108obiee.blogspot.com/

    May be a rude way .. but it works.
    Add narrative view and use Java script to change the column headings based on the variables.
    <script language="javascript" type="text/javascript">
    var a = document.getElementById('idResultsTableParent');
    var rows= a.getElementsByTagName('tr');
    rows[1].cells[1].innerText ="@{Presentation Variable}";
    </script>
    Editing the same post to remove irrelevant information.
    - Girish

  • Dynamic selections for the FBL5N report

    Hi Experts,
    Can any body help how to add the account assignment group field in dynamic selections for the FBL5N report.
    rgds / Srini

    Hi Alex,
    Thanks for your quick response, here for the report FBL5N the logical database is DDF and the field which should be add in dynamic selection is (KTGRD) account assignment group is available in KNVV table but this table is not available in DDF logival database.
    Please suggest us how we can pickup this field into the report FBL5N for dynamic selections.
    regards / Srini

  • Report Profile Use & fields in dynamic selection in RE-FX reports..

    I have two requirements:
    1. Some of the SAP delivered fields in RE master data of BE,PR,BU and RO are not required by our client. Thus we have hidden them using field status transaction. However they are still available in RE info system in Dynamic selection as well as in output screen. How can we remove these fields from information system as well.
    2. Some fields were added to the master data using BDT, they are visisble in the report however, they are not available in Dynamic Selections. How can we add them in dynamic selection as well during report execution.
    The transaction codes for reports are e.g. REISBE, REISBU, REISPR, REISRO, RECN, etc.
    Can ReportProfile be of some use?? If yes, how can we configure the same.
    Regards
    Rohit

    I am aware of this, however, creating a variant still keeps the fields in hidden list in change variant section and any user maygo and bring the same to viewable list.
    I am willing if we can simply remove those fields from the display screen to avoid any confusion in future.
    Regards
    Rohit

  • What is the name of Report Builder Resource File

    Can Anybody knows what is the name of Report Builder Resource file and can it open in Oracle Terminal or not.
    Regard's
    Fahed

    How to create a new one.http://download-uk.oracle.com/docs/cd/B14099_19/bi.1012/b14048/pbr_arch.htm#i1005582
    http://download-uk.oracle.com/docs/cd/B14099_19/bi.1012/b14048/pbr_strt.htm#i1007097

  • How to add a dynamic table name in Report Builder Query ?

    I have some problem while creating a report in report builder 6i.
    My data is managed as in tables like this abc_012006, abc_022006 etc , so I want to query data according to the month user have selected from the parameter form. Let suppose if user entered 012006 as month year then data must be fetched from abc_012006.
    Can any one tell me the appropriate tip for this problem.
    Message was edited by:
    [email protected]

    Hello,
    Once you get the Data Set create save it as XML and then create a new report off the XML file. Then you can set the data set to the report and the XML is not required any more.
    First, to be able add fields to a report you need to use RAS. Report.Engine doesn't have the ability.
    If you search in this forum you will find lots of examples on how to...
    If you want to create the report then see these RAS samples:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples#NETRASSDKSamples-Exporting%2FPrinting
    Don

  • Dynamic comparison column in Bex report

    Hi Gurus
    I have the following request, could any of you kindly help me out?
    Content example in Cube:
    GL Act| Fiscyear| Fiscper3| Amount
    10001 |2004     |12       |100
    Report: Cross-year comparison determined by period
    Specifying fiscyear and period range is enabled as user-input, e.g. choose year 2003 to 2005 and period 01 to 03
    The following layout is our target:
    header: period 01-03
    GL Act| Y2003| Var2003-2004| Y2004|  Var2004-2005| Y2005
    10001 | 100 | 200         | 300 |  -100        | 200
    10002 | 300 | 500         | 800 |  200         |1000
    I think the point is to achieve the "variance" column which is dynamically determined by fiscyear where user inputs, since restricted key figure cannot achieve the "dynamic" solution.
    Thanks in advance!

    Hi Eric,
    My approach is somewhat not flexibible but it may suit your needs.
    Will try to describe it in more details.
    Let’s assume that this periods contain full information: a year and a period within a year and that there are 12 periods in the year. A user enters a a range of periods P1 – P2 (let’s say of 2005) and wants to compare some KF for the given time period with that for 2004, 2003 and calculate difference between periods.
    Solution:
    Create two – for P1 and P2. All vars are user entry ones. If P1 is always the first period in the year then P1 might be determined in the user exit.
    Create a structure in rows.
    New selection. Name it as Y2003. Put here your KF and Fiscal year/period. Restrict it with P1 – 24, P2 – 24.
    New selection. Name it as Y2004. Put here your KF and Fiscal year/period. Restrict it with P1 – 12, P2 – 12.
    New selection. Name it as Y2005. Put here your KF and Fiscal year/period. Restrict it with P1, P2.
    New formula for Var2003-2004. Place into formula Y2004 - Y2003.
    New formula for Var2004-2005. Place into formula Y2005 - Y2005.
    Regardless of selection’s names this query will show values for given periods of 3 years: entered, year before entered and entered -2. 
    Best regards,
    Eugene

  • Passing values to a dynamic selection screen via a report

    Hi,
    I have the following problem and need to seek your expertise urgently.
    In my program, I need to call another report by passing in parameters to the selection screen of other report. However, I could not pass values into a dynamic selection screen. I tried to use submit (report) with free selection but do not know how it works.
    Currently, I tried calling the function RS_REFRESH_FROM_DYNAMICAL_SEL and FREE_SELECTIONS_RANGE_2_EX. Using the object the first function has returned to me, I tried to append values such as fieldname etc to it. However, I realised the field names of a dynamic selection screen keeps changing. So I would not know how to pass a particular value to a selection field.
    Appreciate any help given.
    Thanks,
    CK

    Hello CK,
    Are you using logical database in your selection screen program attributes? If it is, look at include file DBxxxSEL for parameter named xxxDYNSE where xxx = logical database. Debug the program that has that dynamic selection, and look at field xxxDYNSE. This should give you a hint on how to populate the parameter when you submit the program.

  • Problem in dynamic selection in vendor balance report  tcode S_ALR_87012082

    Hello Friends,
    After upgrading from 4.7 to ecc 6.0 we are facing the below mentioned problem.
    In a Vendor Balances report, the document selection is not available in the dynamic selections and hence i am not able to select the business area to suit the requirement. We have only, vendor master and company code in the dynamic selections.
    Is there any customization tht needs to be set???
    Thanks,
    Sunny

    Hi Vas,
    I am not sure..... but you can view the details in "S_ALR_87012079", you need to chnage the layout....
    If the hint is useful… Say thanks by reward….
    Regards,
    Prabhu Rajesh

  • How can i dynamically select columns based on the input parameter?

    I have an input parameter which takes single numeric value.
    Based on this value i have to dynamically select table-columns .
    For eg: if i have following fields in my table :
    SEM_1
    SEM_2
    SEM_3 and SEM_4.
    And if i give numeric input as 2 , then i have to select "SEM_2" column only.
    if the input is 3 then i have to select "SEM_3" only and leave the rest of the columns.
    how do i achieve this dynamic feature in the "Select .....  From...... table...." statement in the ABAP??

    Hi,
    you should try something like this.
    TYPES: cond(72) TYPE c.
    data: condtab TYPE TABLE OF cond,
             condw type cond.
    data: lv_field(30) type c value 'SEM_'.
    write p_num to lv_field+4(1).
    condw = lv_field.
    append condw to condtab.
    SELECT (CONDTAB) FROM table INTO.....
    Kostas
    Message was edited by:
            Kostas Tsioubris

  • Crystal Report - NULL values mapped to Column names in reports

    Hai,
    I am using rows of data retrived from the SQL Server 2005 Express and sometimes the column names are NULL , I want to set a default value to this NULL value and set it as Data axes label / Group axes values, can some one please help me with this issue.
    Thank you in advance.
    Vijay

    I resolved this issue myself, this can be set as other Data Labels, Group Label or Series Riser's properties too, left-click twice until the blank item is selected and then right click and select "Edit Axis Label" item and here it can edited with the new value(text).

  • Problem  in dynamic selection in vendor balances report

    Hello Friends,
    We are facing the below mentioned problem after upgradation ie 4.7 to ecc 6.0
    In a Vendor Balances report, the document selection is not available in the dynamic selections and hence i am not able to select the business area to suit the requirement. We have only, vendor master and company code in the dynamic selections.
    Is there any customization tht needs to be set???
    Thanks,
    Sunny

    NS

Maybe you are looking for

  • File Type Icons Not Working

    Hey everyone, the issue I'm haveing is not just with Photoshop, but sense I couldnt find a general CS5 forum, and Photoshop was the last CS5 application I noticed this for I'm hoping to find some answers here. So on to the issue.... I have noticed th

  • Restoring my imac to factory setting

    i was restoring my imac to factory setting using a snowlepord CD. the process gave a error massage and the installation got canceled. now the system is not booting up, when i boot up it shows a white screen with the apple logo and loading wheel below

  • How to make components appear and disappear dynamically.

    So I admit I am from the HTML world and have been able to dynamically control divs to make them visible and invisible, as needed. How do you do that in Flex/Flash? I have tried the "visible" attribute, but the component takes up the same space when i

  • Unrecognized selector ???

    I new to objective c and I am working through Aaron Hillegass Cocoa Programming for Mac OS X 3rd Edition. I am working in chapter 3 and I started to mess around with writing my own classes for testing purposes. I am writing a console app using the Fo

  • Missing HTML tag

    I've noticed that Dreamweaver CS4 is missing <strike> tag that is listed in HTML 4.01 specification on W3 website. Can anyone explain why this tag isn't included in Dreamweaver ?