Calling first query to get parameters for second query
Newbie trying to convert an Oracle Report to BI. The report has 1 parameter from the user, which is plugged into a query that returns grouped data (4 values, 1 row). This data is then used in multiple places (not just where clause) in a second query to get the data for the report. Can anyone please point me in the right direction to accomplish this?
I have looked at using a before trigger possibly to get the first query values but am not sure how to then pass those values back to be used by the second query.
Thank you for ANY suggestions!
Hello,
you use any fields in additional querys as parameters.
If you use XML-data-template, it would look like this:
<dataTemplate name="INVOICE_REPORT" description="Invoice Report" Version="1.0">
<parameters>
<parameter name="P_INVOICE_HEADER_ID" dataType="number"/>
</parameters>
<dataQuery>
<sqlStatement name="QUERY_INVOICE">
<![CDATA[
select ivh.invoice_header_id
, ivh.invoice_number
, ivh.customer_id // here you select the field which is a parameter for next query
-- ... additional fields ... --
from tbl_invoices ivh
where ivh.invoice_header_id = :P_INVOICE_HEADER_ID
-- and additonal conditions --
]]>
</sqlStatement>
<sqlStatement name="QUERY_CUSTOMER">
<![CDATA[
SELECT c.account_number
, c.customer_name
, c.customer_city
-- ... additional fields ... --
FROM tbl_customers c
where c.customer_id = :CUSTOMER_ID // here is the parameter
-- and additonal conditions --
]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="GRP_HEADER" source="QUERY_INVOICE">
<element name="INVOICE_HEADER_ID" value="INVOICE_HEADER_ID"/>
<element name="INVOICE_NUMBER" value="INVOICE_NUMBER"/>
<group name="GRP_LINE" source="QUERY_INVOICE">
<element name="ACCOUNT_NUMBER" value="ACCOUNT_NUMBER"/>
<element name="CUSTOMER_NAME" value="CUSTOMER_NAME"/>
<element name="CUSTOMER_CITY" value="CUSTOMER_CITY"/>
</group>
</group>
</dataStructure>
</dataTemplate> The behavoir is much similar to oracle report
Regards
Alexander
Edited by: alexander.steinbeisz on Dec 7, 2009 12:20 PM
Edited by: alexander.steinbeisz on Dec 7, 2009 12:21 PM
Similar Messages
-
Passing parameters for a query throught XML and capturing response in the same
Hi All,
I have defined a RequestParameters object and i am passing paramerts for a query through XML and trying to capture the result in the same and send back to the source. In this case i am send XML from excel.
Below is my XML format.
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Insert xmlns="http://tempuri.org/">
<dataContractValue>
<dsRequest>
<dsRequest>
<SOURCE></SOURCE>
<ACTION>Insert</ACTION>
<RequestParams>
<RequestParams>
<ACC_NO>52451</ACC_NO>
<EMP_CITY>HYD</EMP_CITY>
<EMP_NAME>RAKESH</EMP_NAME>
<EMP_CONTACT>99664</EMP_CONTACT>
<EMP_JOM>NOV</EMP_JOM>
<EMP_SALARY>12345</EMP_SALARY>
</RequestParams>
<RequestParams>
<ACC_NO>52452</ACC_NO>
<EMP_CITY>HYD</EMP_CITY>
<EMP_NAME>RAKESH</EMP_NAME>
<EMP_CONTACT>99664</EMP_CONTACT>
<EMP_JOM>NOV</EMP_JOM>
<EMP_SALARY>12345</EMP_SALARY>
</RequestParams>
</RequestParams>
</dsRequest>
<dsRequest>
<SOURCE></SOURCE>
<ACTION>Update</ACTION>
<RequestParams>
<RequestParams>
<ACC_NO>52449</ACC_NO>
<EMP_CITY>HYD1</EMP_CITY>
<EMP_NAME>RAKESH1</EMP_NAME>
<EMP_SALARY>1345</EMP_SALARY>
</RequestParams>
<RequestParams>
<ACC_NO>52450</ACC_NO>
<EMP_CITY>HYDer</EMP_CITY>
<EMP_NAME>RAKEH</EMP_NAME>
<EMP_SALARY>1235</EMP_SALARY>
</RequestParams>
</RequestParams>
</dsRequest>
</dsRequest>
</dataContractValue>
</Insert>
</s:Body>
</s:Envelope>
Where i have a List of dsRequest and RequestParams, where i can send any number of requests for Insert,Update. I have two a XML element defined in RequestParams "RowsEffected","error" where the result will be caputred and is updated
to the response XML.
I have 6 defined in RequestParams
EMP_SALARY(int),ACC_NO(int),EMP_CITY(string),EMP_NAME(string),EMP_CONTACT(string),EMP_JOM(string)
My Question is:
When i am trying to build response XML with the following code, the parameters which are not given in the Request XML are also appearing in the Response.
ResponseParams.Add(
newdsResponse()
ACTION = OriginalParams[a].ACTION,
SOURCE = OriginalParams[a].SOURCE,
Manager = OriginalParams[a].Manager,
RequestParams = OriginalParams[a].RequestParams
Where the OriginalParams is dsRequest
Ex: In my update query i will only send three parameters, but in my response building with ablove code, i am getting all the variables defined as INT in the RequestParameters.
Is there any way i can avoid this and build response with only the parameters given in the Request ??
Appreciate ur help..Thanks
Cronsey.Hi Kristin,
My project is, User will be giving the parameters in the excel, and using VBA, the values are captured and an XML is created in the above mentioned format and is send to web service for the Insert/Update.
I created a webservice which reads the values from <datacontract> and it consist of list of <dsRequests> where any number of Insert/Upate commands can be executed, with in which it contains a list of <RequestParams> for multiple insertion/Updation.
//function call
OriginalParams = generator.Function(query, OriginalParams);
where OriginalParams is List<dsRequest>
//inside function
command.Parameters.Add()// parameters adding
int
val = command.ExecuteNonQuery();
after the execution,an XML element is added for the response part.and it is looped for all the RequestParams.
OriginalParams[i].Result.Add(
newResult()
{ ERROR = "No Error",
ROWS_EFFECTEFD = 1 });
//once all the execution is done the response building part
for(inta
= 0; a < OriginalParams.Count; a++)
ResponseParams.Add(
newdsResponse()
Result = OriginalParams[a].Result
QUEST: When i am trying to build response XML with the following code, the parameters which are not given in the Request XML are also appearing in the Response.
Ex: In my update query i will only send three parameters, but in my response building with ablove code, i am getting all the variables defined as INT in the RequestParameters.
Is there any way i can avoid this and build response with only the parameters given in the Request ??
Appreciate ur help..Thanks
Cronsey. -
FM RSCRMBW_REPORT: What parameters for extracting query in itab?
Hello,
I'm trying to extract query data to a XML-file (in order to use it as a connection source for a XCelsius-dashboard).
Therefore I use the FM RSCRMBW_REPORT as shown in Eddy De Clercq's tutorial:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3ba5e590-0201-0010-59b1-cab51fd245b7
But I have a problem with the parameter i_extract while running the FM the second time:
What table do I need here? And what kind of structure does this table need?
Or is there any other solution for extracting query data to a XML-file? An ideal solution would be a XML-file with the same structue as the query.
I have tried the FM RRW3_GET_QUERY_VIEW_DATA but the problem is that I can't get the query's structure.
Thank you.Robert,
I have integrated XML data from this webservice into Excel using XML Maps ... it works perfectly fine with the RESTFul Web service..
Once you have the XML Map in the excel sheet - create your table by dragging and dropping necessary fields and then point the dataset to your Xcelsius container...
I have not tried to change the XML in the BSP till now .. but one thing you can do otherwise is
have a custom FM based on the function by the same name RRW3_QUERY_VIEW_DATA and then you have AXIS_DATA and CELL_DATA and you can create your own XML string by manipulating the content...
Or you can directly call the web service QUERY_VIEW_DATA using the webservice option in Xcelsius...
I have still not found out why the variable name tag is required but have given you other ways of integrating SAP BI with Xcelsius... -
T530 Display gets black for seconds
I use my T530 with two monitors with extended desktop. The external monitor is the main display.
Since I updated to Win8.1, at irregular intervals (seconds or minutes) both displays gets black for a second, all windows are moved to the laptop-display for a short time and then back to the main display.
It´s extremly annoying and it is not possible to use the monitors seperate.
Sometimes there is a message, that the GPU is ready to save energy.
All drivers are current and from the lenovo homepage.
Has anybody an idea?
Thanks in advance.
UlliDo you have an Apple Care extended warranty because it sounds like the begining of inverter failure. If it is a bad inverter, that is a hardware failure and can't be fixed with software.
-
SQL query to get DDL for Adding PK.
Guys,
I'm looking for SQL query that gets me the "ALTER TABLE <TABLE_NAME> ADD CONSTRAINT <constraint_name> PRIMARY KEY (X,Y,...);" statments of all tables in my schema containing Primary Keys.
Could someone help me with the query please?
Regards,
BhagatYou need this
SELECT 'ALTER TABLE '||table_name||' ADD CONSTRAINT '||constraint_name||' PRIMARY KEY ('||column_name||');'
FROM ( SELECT uc.table_name
,uc.constraint_name
,RTRIM (XMLAGG (XMLELEMENT (ucc, column_name || ',')).extract ('//text()'), ',') column_name
FROM user_constraints uc
,user_cons_columns ucc
WHERE uc.constraint_type = 'P'
AND uc.constraint_name = ucc.constraint_name
GROUP BY uc.table_name
,uc.constraint_name
ORDER BY table_name; Regards
Arun -
Query to get data for current week+13
Hi Friends,
I have two tables
BACKLOG_WEEK_AFTER_ATP (LE)
BACKLOG_ATP_GT_CW (RE)
** First I have to query whats the current week and year and it should come in this format ---- 2011-WK30
columns in table BACKLOG_WEEK_AFTER_ATP are:
ITEM_NUMBER QUANTITY
1N5418 20
1N5614 30
1N5806SM 10
1N5811 0
2PFF6 60columns in table BACKLOG_ATP_GT_CW are:
ITEM_NUMBER QUANTITY YEAR_WEEK
1N5418 30 2011-WK30
1N5418 5 2011-WK31
1N5614 30 2011-WK32
1N5806SM 30 2011-WK33
1N5811 20 2011-WK32
3EX473K1 20 2011-WK30My report should look like
ITEM_NUMBER 2011-WK30 2011-WK31 2011-WK32 2011-WK33 ...............till 13th week
1N5418 10 -5 -5 -5 ...............till 13t week
1N5614 30 30 0 0 ................till 13th week
1N5806SM 10 10 10 20 ................till 13th week
1N5811 0 0 20 20 ................till 13th week
2PFF6 60 60 60 60 ................till 13th week
3EX473K1 20 20 20 20 ................till 13th weekTo get this report i have these conditions to keep in mind.
1) If item_number not present in LE table and present in RE table then repeat what it is in RE table till 13th week
2) If item_number not present in RE table and present in LE table then repeat what it is in LE table till 13th week
3) If item_number present in LE and also present in RE table then do subtraction for RE - LE for that particular item_number till 13th week.
4) If item_number is there in LE table but not present in RE table for current_week+1(today week comes as 29th week) then repeat the same which is there in LE table. If item is found in RE table for (example 32th week) then subtract RE -LE for that particular item_number
Thanks in advance.
RegardsHello,
If you don't need the PIVOT display, then this may help you :
with le as
(select '1N5418' item_number, 20 quantity from dual union all
select '1N5614' item_number, 30 quantity from dual union all
select '1N5806SM' item_number, 10 quantity from dual union all
select '1N5811' item_number, 0 quantity from dual union all
select '2PFF6' item_number, 60 quantity from dual ),
re as
(select '1N5418' item_number, 30 quantity, '2011-WK30' year_week from dual union all
select '1N5418' item_number, 5 quantity, '2011-WK31' year_week from dual union all
select '1N5614' item_number, 30 quantity, '2011-WK32' year_week from dual union all
select '1N5806SM' item_number, 30 quantity, '2011-WK33' year_week from dual union all
select '1N5811' item_number, 20 quantity, '2011-WK32' year_week from dual union all
select '3EX473K1' item_number, 20 quantity, '2011-WK30' year_week from dual
row_gen as (
select item_number, calc_year_week,
row_number() over(partition by item_number order by calc_year_week) rn
from
(select le.item_number from le union select item_number from re) item,
(select to_char(level*7+sysdate,'YYYY-"WK"WW') calc_year_week from dual connect by level<=13) week)
select item_number, calc_year_week, calc_qty
from row_gen, le, re
where row_gen.item_number=le.item_number(+)
and row_gen.item_number=re.item_number(+)
and row_gen.calc_year_week=re.year_week(+)
model
partition by (row_gen.item_number)
dimension by (rn)
measures (calc_year_week, year_week, le.quantity le_qty,re.quantity re_qty,0 calc_qty )
rules (
calc_qty[1] =
case when re_qty[cv()] is null then le_qty[cv()]
when le_qty[cv()] is null then re_qty[cv()]
else re_qty[cv()]-le_qty[cv()]
end,
calc_qty[rn>1] order by rn =
case when re_qty[cv()] is null then calc_qty[cv()-1]
else re_qty[cv()] - calc_qty[cv()-1]
end )
order by 1,2;I am not sure this is the simplest way to do it, but the results seem to match your example.
Regards,
Sylvie
Edited by: Troll35 on Jul 19, 2011 3:08 PM -
How to pass parameters for second screen to SAP webgui URL
Hi
I want to call SAP webgui from an application and want to pass some data which need to be prefilled in the screen.
Have gone through many threads
/people/durairaj.athavanraja/blog/2004/09/23/pass-parameter-to-its-url-upadated-21st-june-2008
https://www.sdn.sap.com/irj/scn/wiki?path=/pages/viewpage.action&pageid=22375
webbgui - calling a transaction and specify variant or parameter in url
Things work fine if I pass values to fields which are on first screen, but I am unable to pass data to fields on next screens.
Taking an example :
tCode for vendor creation is XK01 and it has many screens, now when I call url
http://HOST_NAME:8000/sap/bc/gui/sap/its/webgui/!?sap-client=CLIENT_ID&sap-user=SAP_USER&sap-password=SAP_PASSWORD&language=EN&~transaction=*XK01 RF02K-LIFNR=Ven1001;
I am able to view Ven1001 in vendor code in first screen
But when I call
http://phxng4709:8000/sap/bc/gui/sap/its/webgui/!?sap-client=100&sap-user=testuser1&sap-password=SAP12345&language=EN&~transaction=*XK01 RF02K-LIFNR=Ven1111;RF02K-BUKRS=COCO;RF02K-EKORG=NG01;RF02K-KTOKK=0001;ADDR1_DATA-NAME1=VEN_NAME
All the fields on first screen get populated but I don't get VEN_NAME in Name1 field on GUI
Tried this
http://phxng4709:8000/sap/bc/gui/sap/its/webgui/!?sap-client=100&sap-user=testuser1&sap-password=SAP12345&language=EN&~transaction=*XK01 RF02K-LIFNR=Ven1111;RF02K-BUKRS=COCO;RF02K-EKORG=NG01;RF02K-KTOKK=0001;Ok_Code=ENTR;ADDR1_DATA-NAME1=VEN_NAME
as well, but no success
Can anybody help. Thanks in advance
Ruhiyou can only pass values to first screen fields
-
How to pass parameters for second screen to SAP webgui URL (ITS)
Hi
I want to call SAP webgui from an application and want to pass some data which need to be prefilled in the screen.
Have gone through many threads
/people/durairaj.athavanraja/blog/2004/09/23/pass-parameter-to-its-url-upadated-21st-june-2008
https://www.sdn.sap.com/irj/scn/wiki?path=/pages/viewpage.action&pageid=22375
webbgui - calling a transaction and specify variant or parameter in url
Things work fine if I pass values to fields which are on first screen, but I am unable to pass data to fields on next screens.
Taking an example :
tCode for vendor creation is XK01 and it has many screens, now when I call url
http://HOST_NAME:8000/sap/bc/gui/sap/its/webgui/!?sap-client=CLIENT_ID&sap-user=SAP_USER&sap-password=SAP_PASSWORD&language=EN&~transaction=*XK01 RF02K-LIFNR=Ven1001;
I am able to view Ven1001 in vendor code in first screen
But when I call
http://phxng4709:8000/sap/bc/gui/sap/its/webgui/!?sap-client=100&sap-user=testuser1&sap-password=SAP12345&language=EN&~transaction=*XK01 RF02K-LIFNR=Ven1111;RF02K-BUKRS=COCO;RF02K-EKORG=NG01;RF02K-KTOKK=0001;ADDR1_DATA-NAME1=VEN_NAME
All the fields on first screen get populated but I don't get VEN_NAME in Name1 field on GUI
Tried this
http://phxng4709:8000/sap/bc/gui/sap/its/webgui/!?sap-client=100&sap-user=testuser1&sap-password=SAP12345&language=EN&~transaction=*XK01 RF02K-LIFNR=Ven1111;RF02K-BUKRS=COCO;RF02K-EKORG=NG01;RF02K-KTOKK=0001;Ok_Code=ENTR;ADDR1_DATA-NAME1=VEN_NAME
as well, but no success
Can anybody help. Thanks in advance
Ruhiyou can only pass values to first screen fields
-
URL Parameterizing for BI Query Detail Drill Down via Xcelsius
Hi Guys,
I am In the process of building an Xcelsius dashboard using BI/BW as my source system, working on a "Details" URL button to allow the user to drill directly into the source BI queries with their current combo box selections.
I am trying to build a URL to pass a value to both a variable and to filter a characteristic. I want to pass a value to a 0fiscper variable and exclude an employee number.
I have been able to get each URL to work independently, but not working together. If I leave out either the variable part or the filter part it works, but it doesn't work with both the filter portion and characteristic filter section.
I followed other threads and used Web application designer (WAD) instructions to view the XHTML I will have to parametrize for my URL.
This is how I have flattened/parametrized it
Variable part:
BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE&
BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING&
BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=010/2010&
BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=BCURFPER&
data provider part
BI_COMMAND_1-BI_COMMAND_TYPE=SET_SELECTION_STATE&
BI_COMMAND_1-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=DP_1&
characteristic filter part
BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-CHARACTERISTIC=0EMPLOYEE&
BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1-SELECTION_INPUT_STRING=!201
So my complete URL is:
http://serverinfo?
QUERY=ABCQUERY&
BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE&
BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING&
BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=010/2010&
BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=BCURFPER&
BI_COMMAND_1-BI_COMMAND_TYPE=SET_SELECTION_STATE&
BI_COMMAND_1-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=DP_1&
BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-CHARACTERISTIC=0EMPLOYEE&
BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1-SELECTION_INPUT_STRING=!201
Then it gives me the following error when I attempt to run this...
" The metadata of "CMD" "SET_VARIABLES_STATE" are incorrect for parameter "CHARACTERISTICS_SELECTIONS"
If I set the debug=x flag to see what is generated in the error this is the info I get:
The parameter "CHARACTERISTICS_SELECTIONS" in the metadata of "CMD" "SET_VARIABLES_STATE is not correctly defined:
<parameterList>
<param name="BI_COMMAND_TYPE" value="SET_VARIABLES_STATE"/>
<param name="CHARACTERISTICS_SELECTIONS">
<param name="CHARACTERISTIC_SELECTIONS" index="1">
<param name="CHARACTERISTIC" value="0EMPLOYEE"/>
<param name="SELECTIONS">
<param name="SELECTION" modification_type="delete_if_value_not_equal" index="1">
<param name="SELECTION_INPUT_STRING" value="!201"/>
</param>
</param>
</param>
</param>
<param name="TARGET_DATA_PROVIDER_REF_LIST">
<param name="TARGET_DATA_PROVIDER_REF" value="DP_1" index="1"/>
</param>
<param name="TARGET_VARIABLE_CONTAINER_REF" value="DEFAULT"/>
<param name="VARIABLE_VALUES">
<param name="VARIABLE_VALUE" index="1">
<param name="VARIABLE" value="BCURFPER"/>
<param name="VARIABLE_TYPE" value="VARIABLE_INPUT_STRING" modification_type="delete_if_value_not_equal">
<param name="VARIABLE_INPUT_STRING" value="010/2010"/>
</param>
</param>
</param>
</parameterList>
Thanks for looking!
-GaryHi Gary,
We came across the following issue.Colud you please provide the solution which you used to resolve it.
" The metadata of "CMD" "SET_ITEM_PARAMETERS" are incorrect for parameter "BUTTON_LIST".
Thanks,
Anji -
Query to get total for missing Dates
Hi All
Please help in writing this query.
I have a table with the below values
Tx_code -- TX_date --- Amount -- Accumlated_amt
101 -- 01-Jul-2011 -- 100 -- 100
102 -- 01-Jul-2011 -- 300 -- 300
103 -- 01-Jul-2011 -- 500 -- 500
101 -- 02-Jul-2011 -- 150 -- 250
103 -- 02-Jul-2011 -- 100 -- 600
101 -- 03-Jul-2011 -- 250 -- 500
103 -- 03-Jul-2011 -- 50 -- 650
I want the output as below
101 -- 01-Jul-2011 -- 100 -- 100
102 -- 01-Jul-2011 -- 300 -- 300
103 -- 01-Jul-2011 -- 500 -- 500
101 -- 02-Jul-2011 -- 150 -- 250
102 -- 02-Jul-2011 -- 0 -- 300
103 -- 02-Jul-2011 -- 100 -- 600
101 -- 03-Jul-2011 -- 250 -- 500
102 -- 03-Jul-2011 -- 0 -- 300
103 -- 03-Jul-2011 -- 50 -- 650
For Tx_code 102 is available in 01-Jul-2011 but not in 02-Jul-2011 and 03-Jul-2011
But i want this row in my output for all other dates.
Below are my database version info
Oracle Database 10g Release 10.2.0.1.0 - Production
PL/SQL Release 10.2.0.1.0 - Production
"CORE 10.2.0.1.0 Production"
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Thanks
RakThere you are:SQL>WITH t AS
2 (SELECT 101 AS tx_code, TO_DATE('01-Jul-2011', 'DD-MON-YYYY') AS tx_date, 100 AS amount,
3 100 AS accumlated_amt
4 FROM DUAL
5 UNION ALL
6 SELECT 102, TO_DATE('01-Jul-2011', 'DD-MON-YYYY'), 300, 300
7 FROM DUAL
8 UNION ALL
9 SELECT 103, TO_DATE('01-Jul-2011', 'DD-MON-YYYY'), 500, 500
10 FROM DUAL
11 UNION ALL
12 SELECT 101, TO_DATE('02-Jul-2011', 'DD-MON-YYYY'), 150, 250
13 FROM DUAL
14 UNION ALL
15 SELECT 103, TO_DATE('02-Jul-2011', 'DD-MON-YYYY'), 100, 600
16 FROM DUAL
17 UNION ALL
18 SELECT 101, TO_DATE('03-Jul-2011', 'DD-MON-YYYY'), 250, 500
19 FROM DUAL
20 UNION ALL
21 SELECT 103, TO_DATE('03-Jul-2011', 'DD-MON-YYYY'), 50, 650
22 FROM DUAL)
23 SELECT c.tx_code AS tx_code, c.tx_date AS tx_date, NVL(t.amount, 0) AS amount,
24 (SELECT MAX(t.accumlated_amt)KEEP (DENSE_RANK FIRST ORDER BY tx_date DESC)
25 FROM t
26 WHERE t.tx_code = c.tx_code AND t.tx_date <= c.tx_date) AS accumlated_amt
27 FROM (SELECT b.tx_code, tx_date
28 FROM (SELECT a.min_date + LEVEL - 1 AS tx_date
29 FROM (SELECT MIN(tx_date) AS min_date, MAX(tx_date) AS max_date
30 FROM t) a
31 CONNECT BY LEVEL <= max_date - min_date + 1) a,
32 (SELECT DISTINCT tx_code
33 FROM t) b) c,
34 t
35 WHERE t.tx_code(+) = c.tx_code AND t.tx_date(+) = c.tx_date
36 ORDER BY c.tx_date, c.tx_code
37 /
TX_CODE TX_DATE AMOUNT ACCUMLATED_AMT
101 01-JUL-11 100 100
102 01-JUL-11 300 300
103 01-JUL-11 500 500
101 02-JUL-11 150 250
102 02-JUL-11 0 300
103 02-JUL-11 100 600
101 03-JUL-11 250 500
102 03-JUL-11 0 300
103 03-JUL-11 50 650Urs -
Get parameters for rfc sender communication channel
Hello everybody,
does anybody know how to establish the values for the cc-parameters?
For example:
Where do I receive information about:
- the Application Server (Gateway) = Gateway host name of the sender system
- the Application Server Service (Gateway)
- the Program ID
etc.
Regards Mariohi,
did you have a look at my weblog?
/people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step
>>>- the Application Server (Gateway) = Gateway host name of the sender system
fomr SAPlogon
>>>>- the Application Server Service (Gateway)
SAPGW + system number from SAPlogon
>>>>- the Program ID
any name
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
Query Builder - Getting Universelist for one specific Group
Hi All,
I am in need of a query string (in query builder) that will return me All the universes for a specific group.Is it possible to do and if possible what will be the way to do this?
Thanks in advance for your help,
AnirbanHi Anirban,
What is the BusinessObjects version you are using ( i.e. BO XIR2 or BOXI 3.0)?
Regards,
Deepti Bajpai -
Selection Parameters for SAP Query
I have difficulty in displaying the SAP Query selection parameter in my result screen.
Even the ALV Selection option at the Print dialog is not working in this SAP Query (working for ABAP developed ALV report).
Any help will be much appreciated.> Yes SAP Query.
> The printing is printing out the SAP Query result, even mentioned in my 1st statement.
> Is my language that bad or you have difficult understanding English?
I have no difficulty in understanding English but in understanding your problem. If someone says only "it's not working" I must ask, what "it" is.
Is your problem the fact, that the selection criteria is not printed if you use ALV but printed if you use an ABAP list? Or is printing not working alltogether?
Markus -
Query to get summary for two types of row data
Hi Friends,
I have tried using aggregate functions and thought of using analytic functions and still trying... But I am sure some analytic function expert can quickly help me out in this.
With this data.
BID_ELMT_SEQ_ID PRF_NO BID_REQ_DT BID_ATRB_TYP_CD BID_ATRB_VAL
3575758 1 1/24/2011 2:27:32 PM MINDAYS 1
3575758 1 1/24/2011 2:27:32 PM WRAPDAYS 1-0
3575759 2 1/24/2011 2:27:32 PM MINDAYS 1
3575759 2 1/24/2011 2:27:32 PM WRAPDAYS 1-0
3575760 3 1/24/2011 2:27:32 PM MINDAYS 1
3575760 3 1/24/2011 2:27:32 PM WRAPDAYS 1-0
3575761 4 1/24/2011 2:27:32 PM MINDAYS 1
3575761 4 1/24/2011 2:27:32 PM WRAPDAYS 1-0 Is it possible to retrieve an output similar to this ? In short , the row values of BID_ATRB_TYP_CD to be grouped into two columns and values fetched for this
BID_ELMT_SEQ_ID PRF_NO BID_REQ_DT MIN_DAYS_VAL WRAP_DAYS_VAL
3575758 1 1/24/2011 14:27 1 1-0
3575759 2 1/24/2011 14:27 1 1-0
3575760 3 1/24/2011 14:27 1 1-0
3575761 4 1/24/2011 14:27 1 1-0 Regards,
SSNLooks pretty simple to me - I haven't tried it yet.
Can you share what you have tried so far and what has been the outcome of that effort? -
Query to get script for dbms_scheduler jobs
Hi,
I created 3 dbms_scheduler jobs on customer DB earlier. Now with the latest version of Toad they have, when I try to describe these jobs it gives me an error saying ADMIN MODULE REQUIRED to describe such objects.
I contacted Toad for the same and they asked the customer to purchase ADMIN MODULE which th customer is not willing.
My problem is that I need the scipts of each of these DBMS_SCHEDULER jobs and programs, However I am not able to locate a DATA DICTIONARY that would store the source for each of them like we have for PROCEDURES etc USER_SOURCE data dictionary.
Is anyone aware of any such Data Dictionary or has a quey though which I can retrive Scheduler Jobs and Programs scripts.
Please Help.Ok got it :)
To show details on job run:
select log_date
, job_name
, status
, req_start_date
, actual_start_date
, run_duration
from dba_scheduler_job_run_details;
To show running jobs:
select job_name
, session_id
, running_instance
, elapsed_time
, cpu_used
from dba_scheduler_running_jobs;
To show job history:
select log_date
, job_name
, status
from dba_scheduler_job_log;
show all schedules:
select schedule_name, schedule_type, start_date, repeat_interval
from dba_scheduler_schedules;
show all jobs and their attributes:
select *
from dba_scheduler_jobs;
show all program-objects and their attributes
select *
from dba_scheduler_programs;
show all program-arguments:
select *
from dba_scheduler_program_args;
Thanks
Maybe you are looking for
-
Sender File adapter with nested structure
friends, Source structure is looks like below <mt_details> <header> <key> </key> <id > </id> <name> </name> <contact> <key> </key> <pno> </pno> </contact> </header> </mt_details> If both the nodes i.e <header>&<contact>
-
Downloading file in specific folder not possible
When I use the standard Settings in FF901 (Win7 64bit home premium) under "General" downloading files to the standard folder c:\user\username\downloads - there is no problem. When I choose "ask every time where to download" the downlaod box closes, I
-
Adobe Reader 11.0.5 Search Function does not function: HELP
I am looking at a word in the document such as "the" (without quotes) When I search for "the" (without quotes) - comes back with 0 documents 0 instances I've tried both Find and Advanced Search. Please advise! This is time sensitive. Thank you, Da
-
How do I get a Dialog to appear in the center of the screen?
How do I get a Dialog to appear in the center of the screen?
-
OATS:Error When Adding Data Sources to the Oracle Load Technology suite
Hi, I am trying to add the data source to the OLT to work on the demo files generated during installation. When i tried to add the In the Add monitor : step 1 window i selected the Perfmon (Windows Performance Monitor) and click Next. In Add monitor