Forming a report query dynamically with the value of an item
Hi Gurus,
We wanted to create a report based on the value of an item in the page.
For example
There is a text box named p1_table depending on the value of this item the query of the report should change
1) when p1_table = emp then report query should be select * from emp
2) when p1_table = dept then report query should be select * from dept
I tried doing this using
select * from :p1_table and select * from v('p1_table') , it is not working.
Kindly help me in achieving the requirement.
Thanks & Regards,
Vikas Krishna
Hi Vikas,
You have to do this as a report based on a function that returns the query as a string. You build up the string dynamically in the function.
Regards
Andre
Similar Messages
-
Report layout changes with the values in it
I he a standard report, but i want certain report rows to show up in red when a value of the row is null.
I know you have to use different templates, but how or where do i need to put the condition to change report row templates?
ThanksUse multiple row/column templates (there are up to 4 available in a report template), controlling which is used via the Row/Column Template 1 Condition and Row/Column Template 1 Expression etc, depending on whether it is a named column (row) template or a generic column template.
http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/themes.htm#BABFFGGJ -
Report query not returning the field value from external table
hi
I have an issue regarding reports. I have a query having 4 fields from external table and remaining from db tables. the report query returns all the fields from the db tables and only 2 fields from external table. but the same query if I tried in plsql developer it returns all the fields values.
Can anyone please help me in this issue.
Thanks and Regards
kkDuplicate post?
value not displaying in report whereas it returns in plsql developer
value not displaying in report whereas it returns in plsql developer
Please log a SR if you do not get any reply to your thread instead of creating new one.
Thanks,
Hussein -
Task Total Slack Calculated values mismatching with the values in reporting database
Hi,
We require 'Task Total Slack' as one of the items in a report for Project Server 2010. We're developing the reports using SSRS wherein the SQL Queries are fired on the reporting database of Project Server 2010.
We've come across a situation wherein the total slack values from reporting database for tasks are mismatching with the values that are seen in either PWA or Project Professional for total slack field. We also could not find a consistent factor by which
the slack is multiplied for reflecting in the database in case the Slack in days was being converted into Hours in reporting databse.
Is there a definite way that these values are being represented in reporting database which is quite different from the way these values are seen in Project Professional? Please help resolving this issue.Hi Abhijit PS,
Can you give an example of the mismatch? Also you could tell us if this is happening for all tasks and all projects. Your concern may be seen from 2 different points of view:
Either this is indeed a bug with a slack of 2 days for example in Project Pro and 4 days in your report from the reporting DB. In this case, you should check if the projects have been published correctly and if the Reporting DB is correctly sync'ed with
the draft DB.
Or it could be the normal behavior and it is just a matter of finding why. For example, the durations are stored in the DB in minutes, meaning that a 1day duration might be stored as 480 if you have 8 working hours in a day (8*60).
Hope this helps,
Guillaume Rouyre, MBA, MVP, P-Seller | -
How to dynamically populate a listbox with the values in the database
Hi,
How do dynamically populate the list box with the values in the oracle database. I want to load the list box at run time.Plz anybody help me out to find a solution for this problem.
Thanks in advance...
Regards,
Shiva.u can wite code like this..on jsp page
<%
ResultSet rs = stmt.executeQuery("select vender_name from vendors");
%>
<select name = "vendorlist">
<%
while(rs.next()){
String vname = rs.getString(1);
%>
<option value="<%=vname%>"><%=vname%></option%>
<%
rs.close();
%> -
Creation of a Query to show the values for the current month and the last 12 months data.
Dear All,
Good day!
I have to create a Query with the below requirement.
I have to create a Query to show the values for the current month and the last 12 months data.
Can you please guide me how to achieve this ??
thank you,
Regards,
HemaHema
explain the exact problem..? as you mentioned you want to create query to show values for current month and last 12 months.. so I think you want to show values for 12 months from current data.. you can achive this by multiple way..
you can have selection screen and field with date .. and restrict based on system current date and 12 months before or you can handle this at your target.. .. I mean there are multiple ways to restrict data by date range..
for some more hints..
http://www.forumtopics.com/busobj/viewtopic.php?t=34393&sid=7fba465d0463bf7ff5ec46c128754ed6
http://businessintelligence.ittoolbox.com/groups/technical-functional/cognos8-l/how-to-display-last-12-months-in-report-based-on-todays-date-3231850
http://scn.sap.com/thread/3217381
search on SDN you will get many other ways..
Thanks,
Bhupesh -
Call transaction in new session with the value at hotspot
Hi all,
As a hotspot functionality I would like to open a new transaction in a new session with the value at hotspot. For that reason, I am using the FM ABAP4_CALL_TRANSACTION with the option STARTING NEW TASK.
This FM is not working because Parameter ID is not Maintained for the field (Hotspoted). So no value is passing to new transaction.
Please suggest any other way to implement this.
ThanksHi Anil..
This is the Solution for ur Requirement. try this program and change as per ur need.
REPORT ZSEL_CALL_TCODE.
data : IT_KNA1 TYPE TABLE OF KNA1 WITH HEADER LINE.
DATA : IT_SPA TYPE TABLE OF RFC_SPAGPA WITH HEADER LINE.
SELECT * FROM KNA1 INTO TABLE IT_KNA1 .
LOOP AT IT_KNA1 .
WRITE:/ IT_KNA1-KUNNR HOTSPOT ON.
HIDE IT_KNA1-KUNNR .
ENDLOOP.
CLEAR IT_KNA1-KUNNR.
AT LINE-SELECTION.
CASE SY-LSIND.
WHEN 1.
IF IT_KNA1-KUNNR IS NOT INITIAL.
REFRESH IT_SPA.
IT_SPA-PARID = 'KUN'.
IT_SPA-PARVAL = IT_KNA1-KUNNR.
APPEND IT_SPA.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'S1'
EXPORTING
TCODE = 'XD02'
SKIP_SCREEN = ' '
MODE_VAL = 'A'
UPDATE_VAL = 'A'
IMPORTING
SUBRC =
TABLES
USING_TAB =
SPAGPA_TAB = IT_SPA
MESS_TAB =
EXCEPTIONS
CALL_TRANSACTION_DENIED = 1
TCODE_INVALID = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDCASE.
<b>Reward if Helpful.</b> -
How to fill an empty cell with the value above
Hello,
Please help me on the following issue related to BEx query and it's output in BEx analyzer as well as on Web.
I am trying to modify a query output where the empty cells are to be filled with the value in the above cell.
e.g. there is a column for transaction number, and this transaction number is the same for three rows, so it turns out to be two empty cells and only appears as if the transaction number applies to the first row only.
not sure how to paste screenshot or attach document but would love to provide more information if the above isn't suffice.
Please advise on what and where to modify in BEx designer.
Thank you for your help!Thanks a lot...yes, now it works in BEx Analyzer but for some reason doesn't work in the Web view.
Any ideas why is that?
Thanks again for your prompt help.
Edited by: One Idea on Jan 15, 2009 12:17 AM -
Pre-populating a date/time column with the value entered in the last added item
I have a list with a column called "expected finish date". Whenever the user adds the very first item in a list, he/she should have to enter a value for this column.
I want to make all new item entries to pre-poplate this field with the value entered in the previously added item. This way, he/she wont have to re-enter the date every time (which rarely changes). How can this be done?could create a second list ("state") with column ("default finish date")...
create a workflow on main list... if column is blank/empty, pull from second list... otherwise, update second list with the value that was entered.
Or, customize the form (InfoPath or JavaScript)
Scott Brickey
MCTS, MCPD, MCITP
www.sbrickey.com
Strategic Data Systems - for all your SharePoint needs -
SD reports we generated with the the help of ABAPers
What are the SD reports we generated with the the help of ABAPers? How can we modify existing reports?
Hi Gopala.,
Customer uses standard SAP reports if he wants additional reports apart from the functionality provided we functional people give the specifiction to the technical peole ABAPERS reagrding the report we needed and the tables and fields of the particular repot,With the help of that ABAPERS develop Query reports or they create reports
Some reports we also can generate using LIS
REWARD if helpfull
Thanks & Regards
Narayana
Message was edited by:
manam narayana -
Can you calculate multiple text boxes to achieve a total value? If so how is that done? I am trying to create a order form where multiple items can be purchased but i would like the values of each item to calculate so I can achieve a total value.
Hi sashby51,
I've moved your discussion to the PDF Forms forum--the folks who visit this forum regularly should be able to point you in the right direction.
Best,
Sara -
Hi ,
We have enabled context sensitive DFF in Bank Branch Page for HZ_PARTIES DFF , We have created Flex Map so that only bank branch context fields are only displayed in the bank branch page and as we know party information DFF is shared by supplier and Customer Page so we dint want to see any Bank Branch fields or context information in those pages.
We have achieved the requirement but when open existing branches bank branch update is throwing below error message :
"The value in flexfield context reference web bean does not match with the value in the context of the Descriptive flexfield web bean BranchDescFlex. If this in not intended, please go back to correct the data or contact your Systems Administrator for assistance."
this error is thrown only when we open existing branches, if we save existing branch and open then it is not throwing any error message.
Please let us know reason behind this error message.
Thanks,
MrudualaYou are kidding? It took me about 3 minutes to scroll down on my tab to get to the triplex button!
Habe you read the error message?
Quote:
java.sql.SQLSyntaxErrorException: ORA-04098: trigger 'PMS.PROJECT_SEQ' is invalid and failed re-validation
Check the trigger and it should work again.
Timo -
How can I get the variable with the value from Thread Run method?
We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
How can I get the variable with the value?
This is sample code:
public class SampleSynchronisation
public static void main(String df[])
sampleThread sathr= new sampleThread();
sathr.start();
System.out.println("This is the value from the run method "+sathr.x);
// I should get Inside the run method::: But I get only Inside
class sampleThread extends Thread
public String x="Inside";
public void run()
x+="the run method";
NB: if i write the variable in to a file I am able to read it from external method. This I dont want to doWe want to access a variable from the run method of a
Thread externally in a class or in a method. I presume you mean a member variable of the thread class and not a local variable inside the run() method.
Even
though I make the variable as public /public static, I
could get the value till the end of the run method
only. After that scope of the variable gets lost
resulting to null value in the called method/class..
I find it easier to implement the Runnable interface rather than extending a thread. This allows your class to extend another class (ie if you extend thread you can't extend something else, but if you implement Runnable you have the ability to inherit from something). Here's how I would write it:
public class SampleSynchronisation
public static void main(String[] args)
SampleSynchronisation app = new SampleSynchronisation();
public SampleSynchronisation()
MyRunnable runner = new MyRunnable();
new Thread(runner).start();
// yield this thread so other thread gets a chance to start
Thread.yield();
System.out.println("runner's X = " + runner.getX());
class MyRunnable implements Runnable
String X = null;
// this method called from the controlling thread
public synchronized String getX()
return X;
public void run()
System.out.println("Inside MyRunnable");
X = "MyRunnable's data";
} // end class MyRunnable
} // end class SampleSynchronisation>
public class SampleSynchronisation
public static void main(String df[])
sampleThread sathr= new sampleThread();
sathr.start();
System.out.println("This is the value from the run
method "+sathr.x);
// I should get Inside the run method::: But I get
only Inside
class sampleThread extends Thread
public String x="Inside";
public void run()
x+="the run method";
NB: if i write the variable in to a file I am able to
read it from external method. This I dont want to do -
How can I get the variable with the value from Thread's run method
We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
How can I get the variable with the value?
This is sample code:
public class SampleSynchronisation
public static void main(String df[])
sampleThread sathr= new sampleThread();
sathr.start();
System.out.println("This is the value from the run method "+sathr.x);
/* I should get:
Inside the run method
But I get only:
Inside*/
class sampleThread extends Thread
public String x="Inside";
public void run()
x+="the run method";
NB: if i write the variable in to a file I am able to read it from external method. This I dont want to doYour main thread continues to run after the sathr thread is completed, consequently the output is done before the sathr thread has modified the string. You need to make the main thread pause, this will allow sathr time to run to the point where it will modify the string and then you can print it out. Another way would be to lock the object using a synchronized block to stop the main thread accessing the string until the sathr has finished with it.
-
Why in the world is it that everytime I attempt to report a problem with The TV Show "The Walking Dead Season 2 episode 1" Itunes redirects me to their main page..**
I have recently started having this problem in PSE8. The Adobe workaround
did work, but I don't fancy having to re register each time I use it.
What I have discovered is that it's nothing to do with the image metadata as it occurs before any image is opened.
It SEEMS to only occur if you use file/open with to open an image in the editor - IE start PSE with that command.
If you close elements down, and start it using programs/PSE/Elements (or your desktop shortcut) - the panorama feature magically works.
Each time I've opened the editor 'automatically' using image/open with, it seems to create the problem.
Hope this helps
Maybe you are looking for
-
I have two computers. One that is running windows XP and the new one that is Windows 8. I have tried several times to import my music Library from the old computer. I have installed and uninstalled Itunes. The Apple's help desk had me to re-install.
-
I need a tool which i can create 3d subs
i need a tool which i can create 3d subs. Does anyone know anything about this
-
WRT54G keeps restarting with Windows 7
Hi guys,, i realy need some help here,, i'm using laptop with Win 7 Home Premium + WRT54G ver 7. Every time i connect my laptop via LAN or wireless network, the WRT54G ver 7 keeps restarting by it self. I try to used another laptop with win xp and it
-
I recently downloaded the most current version of itunes automatically, got an error during the install process and was unable to open my existing itunes after that occurrance. I unistalled and reinstalled 3 times. Says installed finished but when I
-
Hi all i wan to whether the right approach for the design is corerct. this is wat my input xml going to be <xpTransactions> <transList> <xpTrans name="ADD_AG"> <childTrans>ADD_ED</childTrans> <childTrans>ADD_CD</childTrans> </xp