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
Similar Messages
-
Dynamic structure creating based on the input parameter
Hi all,
How to create a dynamic structure based on the input parameter given in the selection screen. I have a file path given and it contains three fields in common, but after that depending upon the input given the fields get changed. For example, i have 0002 infotype given in the selection screen, my file path structure should contain pernr begda endda and PS0002 structure, if the infotype is changed the PS structure has to be changed dynamcially.
Thank you,
Usha.Ans
-
How to change a region title based upon the input parameter?
Hi All,
I need to change the region's title dynamically based on the value of a select list in another region.
Can anyone help me in this?
Regards,
Sakthi.Hi,
You can use &P1_ITEM_NAME. (including the & and the .) in a region title - this string will be replaced by the value from the page item called P1_ITEM_NAME, so change the name to suit your page item
Andy -
How to put Dynamic Query description based on the Input selections?
Hi All,
I have a requirement wherien there will be 4 input selections for a report namely A, B, C & D alongwith Fiscal year period. wherin Fiscal Year period will be mandatory field
Now, the output of the report should show the description of the report as follows:
For E.g: if Fiscal year Period = 011/2011
When User Enters input value for 'A', then report nameshould be displayed as A 011/2011
When User Enters input value for 'B', then report nameshould be displayed as B 011/2011
When User Enters input value for 'C', then report nameshould be displayed as C 011/2011
When User Enters input value for 'D', then report nameshould be displayed as D 011/2011
Please advice if this requirement is possible and if yes, please guide me how?
Thanks& Regards
Sneha Santhanakrishnanchange the code as below and see
WHEN 'ZREP_DESC'.
data: wa_data TYPE rrrangesid.
CLEAR : wa_var_range.
READ TABLE i_t_var_range INTO wa_var_range WITH KEY vnam = 'ZVALUE'. "ZVALUE is variable for A,B,C,D field
l_no = wa_var_range-low.
CLEAR wa_var_range.
READ TABLE i_t_var_range INTO wa_var_range WITH KEY vnam = 'ZFISCPER' iobjnm = '0FISCPER'.
IF wa_var_range-low IS NOT INITIAL.
gv_var = wa_var_range-low.
concatenate l_no gv_var into wa_data-low
ENDIF.
wa_data-sign = 'I'.
wa_data-opt = 'BT'.
APPEND wa_data TO e_t_range.
ENDCASE. -
How can I filter a column based on data in another list.
I have two lists:
List A:
Business Unit | BU Services
BU1 | Service 1
BU1 | Service 2
BU1 | Service 3
BU2 | Service 4
BU2 | Service 5
BU3 | Service 6
BU3 | Service 7
List B:
Sales Rep | Business Unit | Service
Jonny Cash | BU3 | Service 7
Kitty Wells | BU3 | Service 6
Willie Nelson | BU2 | Service 5
etc
List A is a reference list. I.e. it associates services with a business unit.
List B is a record of activities. It records what each sales rep sold. Sales reps can sell services from any business unit.
Using a drop down list to select the business unit, the service column should only display services that are related to a business unit. I.e. If BU3 is selected, then only Service 6 and Service 7 should be available.
How can this be achieved in SharePoint? It looks like something that it could easily do, however I can't get a lookup to work across lists, and I'm not sure a calculated column will do the job either.
Any ideas?Hi Cameron,
The first list (or table) is used for associations. I'm associating services with a business unit. This would work the same way with an example I found, regarding countries and states:
i.e.
Country | State
USA | Nebraska
USA | New York
Canada | Alberta
Canada | Manitoba
Russia | Crimea
Russia | Chechnya
Australia | New South Wales
etc
Then in the second list or table I could specific team members and their location:
Team Member | Country | State
Russell Crow | Australia | New South Wales
Clive Owen | USA | New York
In the 2nd table, I would select the country from a drop down (or by type ahead), and then the state column would restrict choices to states for the particular country as define in the first list, i.e. USA would show states like: Nebraska and New York, but
not Alberta or New South Wales because they belong to other countries.
I have a feeling that SharePoint can't do this, despite having the basic foundation for it. I'm not a MS developer, I'm a business user trying to put a basic app together for my boss. -
How can I import db column comments into the OBIEE presentation layer?
We have a very well designed data mart - it is a star schema and all the fact and dimension table columns have comments in them with their definition and use. There is virtually no change required in the physical or business layer. The only modifications done in the presentation layer was to hide the Pk/Fk columns.
Is there a way to import these column comments into the presentation layer so that the business user can see this comment in the tool tip while hovering over the presentation column in Answers?
Thanks for your help!Hi,
I assume the comments you mean are stored in user_tab_comments and user_col_comments.
When this is the case you should do the following:
Go to your subject area in your presentation layer. For now I assume the name of this subject area is "Subject Area".
Then right click on this subject area and check "Externalize Descriptions".
Then create an initialization block (session) using this query:
(select 'CD_Subject_Area_' || table_name, comments from user_tab_comments)
union all
(select 'CD_Subject_Area_' || table_name || '_' || column_name, comments from user_col_comments)
Use "Row-wise initialization" for this initialization block.
Two comments:
1) Like I said, I assume Subject Area is the name of your subject area in your presentation layer, so I guess you need to replace this with the name of your Subject Area.
But be sure that you replace each space ' ' with an underscore '_'.
2) Maybe you need to refine above querys by filtering on table_name for those table_names you are using.
Good luck.
Regards,
Stijn -
How can I use an application based upon the Siebel High Interactive Framework?
I ma trying to use an application that is based upon the Siebel High Interactive Framework and can't open the software on my MacBook Pro. IS there any solution to this problem?
My vote is pick up VirtualBox and download Windows 8 Preview, both are free, and see how that goes. Even though a deveoper preview and has IE10 this is my primary OS and browser. Only issue is getting it into a VM but that should be okay, and at least you can decide from there.
Windows 7 64-bit SP1 Home Premium System Builder ($95) otherwise and then Parallels 7 or run natively.
http://news.softpedia.com/news/Download-and-Install-Windows-8-on-a-Mac-with-Para llels-7-0-15050-231759.shtml
http://msdn.microsoft.com/en-us/windows/apps/br229516
VirtualBox 4.1.4 is includes a Windows 8 Template for guests.
http://www.virtualbox.org/wiki/Downloads
http://skear.hubpages.com/hub/Installing-Windows-8-Developers-Preview-Edition-on -VirtualBox -
How can I add a column to show the website (web site) of an rss feed?
I've got a lot of rss feeds coming into thunderbird. I organized some into folders, but also have a folder for several rss feeds as they adress the same topics and I prefer not to browse through 25 separate folders. However, the sender doesn't always make it clear which blog it's from, so I'd like to add a column which shows the website of the rss feed. (sender is often: [email protected], and there are different writers for a single blog who themselve have their own blog as well, so can't sort on sender name either).
When opening an rss feed, it displays in the header: web site (with the space) and then the web adress. This is what I'd like to be able to see in my columns.
I didn't see an option yet to customize columns, nor did I find an addon that does this.
Does anyone know a solution?Thanks, that seems to work. I'm struggling to place the lightbox at the top of the page however - when I click the trigger I want the menu image to display anchored to the top of the page, but there's always a gap as it centers the image. Help is appreciated!
-
How can I find MAC address based on the serial number of a missing IpodTouch 4th Gen?
My Ipod touch 4th Generation is lost. If I can find the MAC address, the Univeristy can help locate the device. I have the serial number, is there any way I can find the MAC address based on the serial number? I did not install a third party app on the IPod to help find it and it is not registered on iCloud, but I used it on iCloud. Any ideas are greatly appreciated.
Did you turn on FindMyiPd is Settings>iCloud and is the iPod connected to wifi? That is all that is needed for for Apple FindMyiPhone
Maybe Apple can find the MAC address
Apple - Support - iPod touch - Contact Us
Your question has been asked in the past but no one has responded if Apple could actually help -
How to execute PL/SQL query based on given input parameter
Hi all,
I have a pl/sql code which is in Region source. It extracts data from database. I want to execute the code based on input I give. I have to give date as a input parameter.
e.g.
If I give date1 as a parameter, then following code should executed
select col1, col2,..... from Table where date1 between '01-jan-2010' and '31-jan-2010'
If I give date2 as a parameter, then following code should executed
select col1, col2,..... from Table where date2 between '01-jan-2010' and '31-jan-2010'
Your help is very much appreciated.
LeoCheck the datatemplate,lexicals and beforeTrigger for this in documentation.
check this
Lexical reference issue in EBS -
We have all of our data in a Microsoft SQL server database and would like to load fabric options, and then color choices, based on this data. As fabrics are added, and/or color choices are updated, we would like Edge Animate to update automatically, without having to open the project and add/change options. Ultimately we would like to build an interactive designer that would then send all of the user's selections to us in an order. Is this possible?
There is no like, but contains
contains(LAST_NAME,'A') -
Based on the input parameter can OBIEE select table at run time
For e.g if we select monthly from the drop down then the same report must fetch data from monthly report
and at the same time if a persons selects daily then the same reprot must fetch data from daily table.Let's assign a presentation variable to the drop down values i.e. var_Status
Now in functionality of the column that you want to change it's functionality dynamically depends on your selection... write this formula
case when '@{var_Status}' = 'Daily' then Table1.Col1 else Table2.col2 end
Because of this.. we can't have dynamic column heading for this column.
One more approach is: Same Presentation variable but with Sectional Guided navigation properties.
see here: http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-selecting-reports-from-dashboard-prompts-and-guided-navigation-sections/
You have to develop 2 reports for this..
Regards
Kishore Guggilla -
How can I create sub-arrays based on the positions of indicies in a separate index array?
Please forgive me if this question is basic or obvious. I am fairly new to LabVIEW and I'm trying to learn as I go along.
I have a 1D array of index values (the number of possible index values is not fixed, but can vary between uses of the application; it could be just {0, 1} on one day and {1, 5, 11, 678} on another) and a 1D array of measurement values (doubles). I'd like to parse the measurement values into sub-arrays for each index, so that if my index array was:
[0 1 1 1 1 5 5 0 5 5 1 0 1 1 5]
and my measurement array was:
[0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.10 0.11 0.12 0.13 0.14 0.15]
I would get back 3 sub-arrays:
[0.1 0.8 0.12]
[0.2 0.3 0.4 0.5 0.11 0.13 0.14]
[0.6 0.7 0.9 0.10 0.15]
I know there must be a simple way to do this, I guess I'm just stuck too much in matlab-array thinking to figure it out... please help!
-- jph
Solved!
Go to Solution.jamespherman wrote:
Thus, I figured it might be possible to generalize this idea and send multiple sets of XY values to an XY graph.
OK, all we need is a trivial modification of what we already have. XY graph data is easiest handled using complex data. Here's a quick rewrite. See if this works for you.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
SplitInGroupsGraph.vi 14 KB -
How can I search for a string, as an input parameter to a procedure?
Hi all,
I need to solve one scenario. In this the search string and search against columns, both are passed as input parameters to a procedure. till now i didn't face this situation.. can you please help me in this by giving some sample code...
Thanks in advance.
Regards,
Ramu.Maybe something like this then?
SQL> CREATE OR REPLACE PROCEDURE EMP_SEARCH
2 (
3 pColumnName IN VARCHAR2
4 , pSearchParam IN VARCHAR2
5 , pResult OUT SYS_REFCURSOR
6 )
7 AS
8 BEGIN
9 IF UPPER(pColumnName) = 'ENAME' THEN
10 OPEN pResult FOR
11 SELECT ENAME
12 FROM SCOTT.EMP
13 WHERE ENAME LIKE '%' || pSearchParam || '%';
14 ELSIF UPPER(pColumnName) = 'JOB' THEN
15 OPEN pResult FOR
16 SELECT ENAME
17 FROM SCOTT.EMP
18 WHERE JOB LIKE '%' || pSearchParam || '%';
19 ELSIF UPPER(pColumnName) = 'DEPTNO' THEN
20 OPEN pResult FOR
21 SELECT ENAME
22 FROM SCOTT.EMP
23 WHERE DEPTNO LIKE '%' || pSearchParam || '%'
24 END IF;
25 END;
26 /
SP2-0804: Procedure created with compilation warnings
SQL> VAR C REFCURSOR
SQL> EXEC EMP_SEARCH('ENAME','SMITH',:c);
PL/SQL procedure successfully completed.
SQL> PRINT c;
ENAME
SMITH
SQL> EXEC EMP_SEARCH('JOB','MANAGER',:c);
PL/SQL procedure successfully completed.
SQL> print c;
ENAME
JONES
BLAKE
CLARK
SQL> EXEC EMP_SEARCH('DEPTNO','30',:c);
PL/SQL procedure successfully completed.
SQL> print c
ENAME
ALLEN
WARD
MARTIN
BLAKE
TURNER
JAMES
6 rows selected.Be careful though. If you have a large amount of data this search could take a long time because Oracle will not choose an indexed path. If that's an issue you should investigate using Oracle Text.
HTH!
Edited by: Centinul on Apr 26, 2010 7:36 AM -
How to Insert & Return a Row using a Function based on the Input parameter
Hi Guys, Plz help me the following code i am converting from Sql Server to Oracle.
I want equivalent code in Oracle.
ALTER FUNCTION [dbo].[GetDateRange]
@Period VARCHAR(50)
RETURNS @DateRange TABLE(StartDate DATETIME,EndDate DATETIME,[Name] NVARCHAR(500), [Description] Nvarchar(2000) )
AS
IF(LTRIM(RTRIM(@Period)) = 'LQ')
BEGIN
''''CALCULATION
INSERT INTO @DateRange
StartDate,
EndDate,
[Name],
[description]
SELECT @StartDate,@EndDate,'Last Quarter',
'Last Quarter - '+ Cast(@StartDate as Nvarchar(11))+ ' to '+Cast(@EndDate as Nvarchar(11))
END
RETURN
END
above Function i am using in another Procedure
select ----
FROM dbo.SalesFact SF ,
dbo.DateDimension DD,
dbo.GetDateRange('LY') GDR
WHERE DD.DateKeyID = SF.BillDateKeyID AND
DD.Date >= GDR.StartDate AND
DD.Date < GDR.EndDate
Edited by: 801668 on Oct 11, 2010 10:26 PMhi i'm sending again the following code
ALTER FUNCTION [dbo].[GetDateRange]
@Period VARCHAR(50)
RETURNS @DateRange TABLE
(StartDate DATETIME, EndDate DATETIME,[Name] NVARCHAR(500), [Description] Nvarchar(2000) )
AS
BEGIN
DECLARE @ToDay DATETIME,
@StartDate DATETIME,
@EndDate DATETIME
DECLARE
@V_Getdate DATETIME
,@V_Getdate_2 DATETIME
,@V_dateA datetime
,@V_dateB datetime
,@V_dateC datetime
,@V_dateD Datetime
,@StartFirstdayofquarter datetime
,@EndLastdayofthequarter datetime
,@quater int
,@FirstdayofPreviousyr Datetime
,@LastdayofPreviousyr Datetime
,@FirstdayofPreviousyr6MTD Datetime
,@TodayDayOfWeek INT
,@EndOfPrevWeek DateTime
,@StartOfPrevWeek DateTime
,@V_Date_1 datetime
,@V_P6MV1 datetime
,@V_P6MV2 Datetime
,@StartFirstdayofquarter_1 datetime
,@EndLastdayofthequarter_1 datetime
,@i int
,@CurrentRowNum int
,@CurrentQuarter int
,@V_Startdate datetime
,@V_Startdate2 datetime
,@V_enddate datetime
,@V_Quarter int
,@V_rownum int
SET @Period=LTRIM(RTRIM(@Period))
SET @V_Getdate = (SELECT CONVERT(DATETIME,(SELECT CONVERT(VARCHAR(10),(Select LastETLDate from Parameterconfig),101))))
--Where parameterconfig is a table
SET @V_Getdate_2=@V_Getdate
IF(LTRIM(RTRIM(@Period)) = 'LQ')
BEGIN
SET @ToDay = (SELECT CONVERT(DATETIME,CONVERT(VARCHAR(10),@V_Getdate,101) + ' 00:00:00.000'))--#Ch003
--If Today is in between 1st January to 31st March then return
--1st Oct of previous year as StartDate and 1st Jan of present year as EndDate
IF((DATEPART(MM,@ToDay) = 1) OR (DATEPART(MM,@ToDay) = 2) OR (DATEPART(MM,@ToDay) = 3 ))
BEGIN
SET @StartDate = (SELECTCONVERT(DATETIME,CONVERT(VARCHAR(4),DATEPART(YYYY,DATEADD(YYYY,-1,@ToDay))) +'-10-01 00:00:00.000'))
SET @EndDate = (SELECTCONVERT(DATETIME,CONVERT(VARCHAR(4),DATEPART(YYYY,@ToDay)) +
'-01-01 00:00:00.000'))
INSERT INTO @DateRange(StartDate,EndDate,[Name],[description] )
SELECT @StartDate,@EndDate,'Last Quarter',
'Last Quarter - '+ Cast(@StartDate as Nvarchar(11))+ ' to '+Cast(@EndDate as Nvarchar(11))
END
--If Today is in between 1st April to 30th June then return
--1st Jan of present year as StartDate and 1st April of present year as EndDate
IF((DATEPART(MM,@ToDay) = 4) OR (DATEPART(MM,@ToDay) = 5) OR (DATEPART(MM,@ToDay) = 6 ))
BEGIN
SET @StartDate = (SELECT CONVERT(DATETIME,CONVERT(VARCHAR(4),DATEPART(YYYY,@ToDay)) +
'-01-01 00:00:00.000'))
SET @EndDate = (SELECT CONVERT(DATETIME,CONVERT(VARCHAR(4),DATEPART(YYYY,@ToDay)) +
'-04-01 00:00:00.000'))
INSERT INTO @DateRange(StartDate,EndDate,[Name],[description] )
SELECT @StartDate,@EndDate,'Last Quarter ',
'Last Quarter - '+ Cast(@StartDate as Nvarchar(11))+' to '+Cast(@EndDate as Nvarchar(11))
END
--If Today is in between 1st July to 30th September then return
--1st April of present year as StartDate and 1st July of present year as EndDate
IF((DATEPART(MM,@ToDay) = 7) OR (DATEPART(MM,@ToDay) = 8) OR (DATEPART(MM,@ToDay) = 9 ))
BEGIN
SET @StartDate = (SELECT CONVERT(DATETIME,CONVERT(VARCHAR(4),DATEPART(YYYY,@ToDay)) +
'-04-01 00:00:00.000'))
SET @EndDate = (SELECT CONVERT(DATETIME,CONVERT(VARCHAR(4),DATEPART(YYYY,@ToDay)) +
'-07-01 00:00:00.000'))
INSERT INTO @DateRange(StartDate,EndDate,[Name],[description])
SELECT @StartDate,@EndDate,'Last Quarter',
'Last Quarter - '+ Cast(@StartDate as Nvarchar(11))+' to '+Cast(@EndDate as Nvarchar(11))
END
--If Today is in between 1st Oct to 31St Dec then return
--1st July of present year as StartDate and 1st Oct of present year as EndDate
IF((DATEPART(MM,@ToDay) = 10 ) OR (DATEPART(MM,@ToDay) = 11) OR (DATEPART(MM,@ToDay) = 12 ))
BEGIN
SET @StartDate = (SELECT CONVERT(DATETIME,CONVERT(VARCHAR(4),DATEPART(YYYY,@ToDay)) +
'-07-01 00:00:00.000'))
SET @EndDate = (SELECT CONVERT(DATETIME,CONVERT(VARCHAR(4),DATEPART(YYYY,@ToDay)) +
'-10-01 00:00:00.000'))
INSERT INTO @DateRange(StartDate,EndDate,[Name],[description])
SELECT @StartDate,@EndDate,'Last Quarter',
'Last Quarter - '+ Cast(@StartDate as Nvarchar(11))+' to '+Cast(@EndDate as Nvarchar(11))
END
END
RETURN
END
above function i'm using in another procedure. which acts as a virtual table. for joining purpose.
Maybe you are looking for
-
Very strange text on screen - Server 10.2.8
One place I work has a Mac network based around a G4 1.25 Ghz server running 10.2.8 Server and some Mk II iMacs running normal 10.2.8. Yesterday when I came in the server was showing a black screen with the following text scrolling down the screen in
-
My iPod touch isn't recognized by iTunes, but it is recognized by Windows.
I'm using Windows 8 and it worked okay for a while. I have uninstalled and re-installed iTunes without success. It works fine on my other computer (desktop Windows 7). Thanks for any suggestions Jim McColl
-
Site doesn't work in IE, need help...
Heya, So if you visit http://www.spencerhill.us in Safari or FireFox on a mac you click any of the three images on the right and up pops a handi lightbox script using java. Normally this works without a hitch in IE but I have made a lot of modificati
-
Hi All, we are currently upgrading the addon that created using VB6 from B1 2004A to 2007A. When compiling or make project dll file, there is an error message : "Compile Error : variable not defined" then the system shows or highlight Private Sub For
-
Can someone please examine these lines of code and help me to resolve error? Thank You, Markus Warning 1 The field 'RectangleApplication.TableTop.cost' is never used Warning 2 'RectangleApplication.TableTop.Display()' hides inherited member 'Rectang