Need output of TH_SERVER_LIST
Hello!
In case you are running two SAP instances of the same SAP system on the same physical machine, i need your output if FM TH_SERVER_LIST!!
Background: I am interested in how far the field HOST of the outcoming table LIST differs...
Thanx in advance
--MIKE
Hi Mike,
1. I tried this FM in our Prd server.
2. It returned 3 entries.
3. Host were
r3ci
r3app2
r3app1
4. may be ci stands for Central Instance.
app1, app2 for application 1, application 2.
Regards,
Amit M.
Similar Messages
-
I need output type NEU automaticaly for create purchase order document type
Dear Experts,
I need output type NEU automaticaly for create purchase order document type NB
when transaction code MN04, I am doing the following:
(1) I selected the third option Purchasing Output determination: Document type
(2) I selected the output type NEU.
(3) In condition records in document type , i have chosen NB.
(4) In name its automatically coming as Purchase requisition
Please suggest how Purchase Order NB will comeHi,
Check & press F4, NB Purchase Order (for catagory F) will be there after entering PO output type NEU & then maintaion the condition record in MN04.
Output type NEU automaticaly defaulted during purchase order creation with document type ,then just fine tune the output (message) type in following path:
SPRO--->MM->Purchasing>Message>Output control->Message types> Define message type for Purchase Order----->Fine-Tuned Control: Purchase Order
Now here select the check box corresponding to your output(message) type NEU to have print output automatically displayed & save.
Now try to creating Purchase Order & you will have default message type NEU.
Regards,
Biju K -
Need output like below mentioned format
Hi,
By using below query , iam getting output in the below formate as metioned
select
m.year "Year",
--decode(m.year,like '200%','a') "DG",
--decode(instr(m.year,'200'),0,Null,'Shallow Water <1000 Feet') "DG",
--decode(substr('Shallow Water <1000 Feet',1,1),'S','Shallow Water <1000 Feet') "DG1",
'Shallow Water <1000 Feet' as "Depth Group",
'Deep Water 1000-5000 Feet' as "Depth Group",
'Ultra Deep Water > 5000 Feet' as "Depth Group",
sum(decode(M.FLUID,'O',nvl(M.YEAR_TO_DATE,0))) "Ytd Oil" ,
from pden_monthly_prod m,pi_pden_well w,pden p
--- Make sure all necessary Table joins are done
where P.ENTITY=M.ENTITY
and p.entity = w.entity
---- define limitations by column values
and m.year between 2000 and 2012
and ((p.entity_type in ('LEASE','WELL') and p.province_state not in ('17','42') and p.pi_situation_cd <> 'F')
or (p.entity_type = 'ALLOCATED' and p.province_state in ('17','42') and p.pi_situation_cd <> 'F')
or (p.entity_type = 'WELL' and p.province_state = '42' and p.pi_situation_cd <> 'F')
or(p.pi_situation_cd = 'F'))
and m.fluid in ('O','CN','G','CG','OW','GW','LW','FW')
and nvl(w.water_depth,'0') <1000
--or w.water_depth between 1000 and 5000
--or w.water_depth >5000
--for Federal state only (FOS)
and P.PI_SITUATION_CD IN ('F','S')
and p.province_state in ('17','42','60','01')
group by m.year
,'Shallow Water <1000 Feet'
,'Deep Water 1000-5000 Feet'
,'Ultra Deep Water > 5000 Feet'
order by m.year
i am getting output is
Year Depth Group Depth Group Depth Group Ytd Oil
2000 a b c 200
2001 a b c 150
2002 a b c 110
2003 a b c 100
but i need output like the below format
Year Depth Group Ytd Oil
2000 a 200
2000 b 200
2000 c 200
2000Total 600
2001 a 150
2001 b 150
2001 c 150
2001Total 450
2002 a 110
2002 b 110
2002 c 110
2002Total 330
2003 a 100
2003 b 100
2003 c 100
2003Total 300
could you please help on this ?UNPIVOT is equal to:
with t1 as (select 'a' f1, 1 f2, 2 f3, 3 f4 from dual union all
select 'b', 4, 5, 6 from dual union all
select 'c', 7, 8, 9 from dual union all
select 'd', 10, 11, 12 from dual)
select a.f1, b.f,
case b.f
when 'F2' then a.f2
when 'F3' then a.f3
when 'F4' then a.f4
end res
from t1 a, (select 'F2' f from dual union all
select 'F3' f from dual union all
select 'F4' f from dual) b
order by 1, 2 -
Run BW query from R/3, need output file saved on application server
Hello all,
We are currently working on BI 7.0. Is there a way where we can run a BW query from R/3 by some program or tcode? We need to run the BW query and use the output of that query as an input to some other custom program in R/3.
If we can save the output file on application server than the R/3 program will pick up that file from there.
Is there any standard delivered functionality that will allow us to do that or how can we achieve this.
Can some help help with some suggestions or links?
Thanks in advance.Hi,
Refer the following threads:
[Calling BW Query from R/3;
[Saving Bex Report / query in BW App server;
Regards. -
Need Output in Urdu Style in Oracle Customize Application
Dear Guys
I have developed Oracle customize Payroll application in 6i with standard Language Style is English.In this application one of the employee form,which is contain employee information name,address ,location email & fax etc.But my client need that employee information output should be display in urdu style in particular report,is there any possibility to show output in urdu style or any other solution.
Thanks in advance
-regard
FurqanLet support, we input data format like this
1 7369 SMITH CLERK 7902 12/17/1980 800.00 20
2 7499 ALLEN SALESMAN 7698 2/20/1981 1600.00 300.00 30
3 7521 WARD SALESMAN 7698 2/22/1981 1250.00 500.00 30
4 7566 JONES MANAGER 7839 4/2/1981 2975.00 20
Now need is that i want to develop a report which should show output in Urdu style only those column,
which are contain A TO Z data.
Thanks -
WITH rcv_transactions
AS (SELECT 1001 TRANSACTIONS_ID,
-1 PARENT_TRANSACTION_ID,
'RECEIVE' TRANSACTION_TYPE,
NULL LPN_ID,
'LPN01' TRANSFER_LPN_ID
FROM dual
UNION ALL
SELECT 1002,
1001,
'DELIVER',
'LPN01',
'LPN01'
FROM dual
UNION ALL
SELECT 1003,
-1,
'RECEIVE',
NULL,
'LPN01'
FROM dual)
SELECT *
FROM rcv_transactions;
My output for the above query is
transactions_id parent_transaction_id transaction_type lpn_id transfer_lpn_id
1001 -1 receive lpn01
1002 1001 deliver lpn01 lpn01
1003 -1 receive lpn01
I want the output as below:
TRANSACTIONS_ID, PARENT_TRANSACTION_ID, TRANSACTION_TYPE, LPN_ID, TRANSFER_LPN_ID,
1003 -1 RECEIVE LPN01
i.e., I want the transactions id which are only 'receive' and not 'deliver' for the particular transfer_lpn_id
in the above scenario 1001 is received and delivered in 1002.
But 1003 is only received. so I need the output of 1003WITH rcv_transactions AS (SELECT 1001 TRANSACTIONS_ID,
-1 PARENT_TRANSACTION_ID,
'RECEIVE' TRANSACTION_TYPE,
NULL LPN_ID,
'LPN01' TRANSFER_LPN_ID
FROM DUAL
UNION ALL
SELECT 1002,
1001,
'DELIVER',
'LPN01',
'LPN01'
FROM DUAL
UNION ALL
SELECT 1003,
-1,
'RECEIVE',
NULL,
'LPN01'
FROM DUAL)
SELECT *
FROM rcv_transactions rcv_out
WHERE rcv_out.transaction_type = 'RECEIVE'
AND NOT EXISTS
(SELECT 1
FROM rcv_transactions
WHERE parent_transaction_id = rcv_out.TRANSACTIONS_ID) -
Problem with concatenation, need output in a desired format
Hi all,
I have a weird problem with concatenation.
I should get an output in such a way that the result would be
Put C:\TEMP\test20090210.xml /FOLDER1/test20090210.xml
For this first to get C:\TEMP\test20090210.xml format I said
CONCATENATE 'C:\TEMP\test' sy-datum '.XML' INTO filepath.
For this secondly to get /FOLDER1/test20090210.xml format I said
CONCATENATE '/FOLDER1/test' sy-datum '.XML' INTO filepath1.
Now I need to get the format
Put C:\TEMP\test20090210.xml /FOLDER1/test20090210.xml
And to get this I said
CONCATENATE 'put' filepath INTO filepath SEPARATED BY space.
And the output for filepath was Put C:\TEMP\test20090210.xml.
But I want u2026u2026u2026.Put C:\TEMP\test20090210.xml /FOLDER1/test20090210.xml.
How can I achieve this?
If I say
CONCATENATE filepath INTO filepath1 SEPARATED BY space. It throws a syntax error saying
u201CUnable to interpret filepathu201D
Please help me..i am dying to figure out how to concatenate and get the required output.
My filepath contains u2026 Put C:\TEMP\test20090210.xml
My filepath1 contains u2026/FOLDER1/test20090210.xml
I need final output asu2026u2026u2026u2026.
Put C:\TEMP\test20090210.xml /FOLDER1/test20090210.xml
How to attain this..please helpu2026where I am going wrong..i declared filepath and filepath1 as STRINGHi all,
Thanks for immediate reply...now it works..
but i also need to put a counter like thing to distinguish my files.
for my filepath....
i want it as C:\TEMP\test20090210110146 so i said....
CONCATENATE ' C:\TEMP\test' sy-datum s y-uzeit '.XML'.
Actually i am generating XML files and naming them as testsystemdatesystemtime.
But i am concerend that my filed might be overwrriten if a file gets generated in a fraction of a millisecond..so to avoid that now i want to put a counter.
i.e my filepath should now be as follows each time loop executes...
C:\TEMP\test20090210110146_1
C:\TEMP\test20090210110147 _2
C:\TEMP\test20090210110148 _3.........and son on how can i do it
i.e testsystemdatesystemtime+ a counter(which tells how many times loop executed)
Once again thanks to all for immediate help... -
Need output format for trigger program
Hello everyone ;
https://forums.oracle.com/message/11078921#11078921
Above link is reference . It's also my own thread related to this discussion.
SQL> desc user_login
Name Null? Type
USERNAME VARCHAR2(30)
ISDBA VARCHAR2(20)
LOGIN_DATE DATE
LOGIN_TIME VARCHAR2(15)
LOGOUT_TIME VARCHAR2(15)
EXTERNAL_NAME VARCHAR2(30)
AUTHENTICATION_TYPE VARCHAR2(30)
HOST VARCHAR2(20)
Program for tracing user logon/logoff details
SQL> create or replace trigger tri_logon
AFTER LOGON ON DATABASE
BEGIN
INSERT INTO user_login (username, isdba, external_name,
authentication_type, HOST, login_date , login_time)
SELECT SYS_CONTEXT ('USERENV', 'SESSION_USER'),
SYS_CONTEXT ('USERENV', 'ISDBA'),
SYS_CONTEXT ('USERENV', 'EXTERNAL_NAME'),
SYS_CONTEXT ('USERENV', 'AUTHENTICATION_TYPE'),
SYS_CONTEXT ('USERENV', 'host'),
SYSDATE, TO_CHAR (SYSDATE, 'HH24:MI:SS') FROM DUAL;
END;
Trigger created.
SQL> create or replace trigger tri_audit1
2 BEFORE LOGOFf on database
3 BEGIN
4 insert into user_login (username, logout_time)
5 (select user, TO_CHAR(SYSDATE, 'HH24:MM:SS') from dual);
6 end;
6 /
Trigger created.
I got following output . Here i cannot insert logout_time on logout_time column.
logout_time is dispalyed seperately please see last two output values (CST01 , 02:06:16) and user_name also displayed twice. (don't need )
USERNAME ISDBA LOGIN_DAT LOGIN_TIME LOGOUT_TIME EXTERNAL_NAME AUTHENTICATION_TYPE HOST
CST01 FALSE 21-JUN-13 02:06:11 oracle DATABASE linuxserver CST01 02:06:16
I want output following below format
Expecting output logout time on LOGOUT_TIME column and user_name should be displayed once.
USERNAME ISDBA LOGIN_DAT LOGIN_TIME LOGOUT_TIME EXTERNAL_NAME AUTHENTICATION_TYPE HOST
CST01 FALSE 20-JUN-13 13:06:34 oracle DATABASE LINUXSERVER
thanks in advance ..8f953842-815b-4d8c-833d-f2a3dd51e602 wrote:
Hello everyone ;
https://forums.oracle.com/message/11078921#11078921
Above link is reference . It's also my own thread related to this discussion.
SQL> desc user_login
Name Null? Type
USERNAME VARCHAR2(30)
ISDBA VARCHAR2(20)
LOGIN_DATE DATE
LOGIN_TIME VARCHAR2(15)
LOGOUT_TIME VARCHAR2(15)
EXTERNAL_NAME VARCHAR2(30)
AUTHENTICATION_TYPE VARCHAR2(30)
HOST VARCHAR2(20)
In addition to the myriad of other issues pointed out in this and your other -- essentially duplicate -- thread, why do you have separate columns for login_date and login_time? A DATE datatype (which you have correctly defined for LOGIN_DATE carries both date and time elements. You only need one column -- LOGIN_TIME -- populated with SYSDATE when the user logs in. And LOGOUT_TIME should also be a DATE, populated with SYSDATE. This alone points to several design flaws.
1) DATE and TIME are not seperate elements. In this application, the concept of 'time' has no meaning apart from the date, and a DATE data type, by definition, stores both date and time.
2) keeping either date OR time in a varchar is asking for trouble. Comparisons and math simply do not work as you expect.
3) You don't have a date for LOGOUT, but suppose the user logs on at 2330 on Tuesday, and logs out at 0030 on Wednesday..
Properly, you should only have two columns for this .. LOGON_TIME, defined as a DATE, and LOGOUT_TIME, defined as a date.
Or possibly separate rows, one for LOGON and one for LOGOUT, both with a sessid to join them.
Or better, and as I mentioned earlier, don't reinvent what AUDIT already does. How much time have you spent on this (how much of your employers MONEY has been spent) when you could have solved the whole thing in 5 minutes with AUDIT?
Program for tracing user logon/logoff details
SQL> create or replace trigger tri_logon
AFTER LOGON ON DATABASE
BEGIN
INSERT INTO user_login (username, isdba, external_name,
authentication_type, HOST, login_date , login_time)
SELECT SYS_CONTEXT ('USERENV', 'SESSION_USER'),
SYS_CONTEXT ('USERENV', 'ISDBA'),
SYS_CONTEXT ('USERENV', 'EXTERNAL_NAME'),
SYS_CONTEXT ('USERENV', 'AUTHENTICATION_TYPE'),
SYS_CONTEXT ('USERENV', 'host'),
SYSDATE, TO_CHAR (SYSDATE, 'HH24:MI:SS') FROM DUAL;
END;
Trigger created.
SQL> create or replace trigger tri_audit1
2 BEFORE LOGOFf on database
3 BEGIN
4 insert into user_login (username, logout_time)
5 (select user, TO_CHAR(SYSDATE, 'HH24:MM:SS') from dual);
6 end;
6 /
Trigger created.
I got following output . Here i cannot insert logout_time on logout_time column.
logout_time is dispalyed seperately please see last two output values (CST01 , 02:06:16) and user_name also displayed twice. (don't need )
USERNAME ISDBA LOGIN_DAT LOGIN_TIME LOGOUT_TIME EXTERNAL_NAME AUTHENTICATION_TYPE HOST
CST01 FALSE 21-JUN-13 02:06:11 oracle DATABASE linuxserver CST01 02:06:16
I want output following below format
Expecting output logout time on LOGOUT_TIME column and user_name should be displayed once.
USERNAME ISDBA LOGIN_DAT LOGIN_TIME LOGOUT_TIME EXTERNAL_NAME AUTHENTICATION_TYPE HOST
CST01 FALSE 20-JUN-13 13:06:34 oracle DATABASE LINUXSERVER
thanks in advance .. -
Need output for only two org_ids
hi
i have this query with me
select DESCRIPTION, list_price_per_unit,segment1,segment2,segment3,PRIMARY_UOM_CODE,PRIMARY_UNIT_OF_MEASURE ,org_id
from mtl_system_items
where INVENTORY_ITEM_STATUS_CODE ='Active'
and segment1 like '205%' or segment1 like '7%'
the output is as follows
DESCRIPTION LIST_PRICE_PER_UNIT SEGMENT1 SEGMENT2 SEGMENT3 PRIMARY_UOM_CODE PRIMARY_UNIT_OF_MEASURE org_id
CABLE 3 X 2.5MM 2 (WHITE) 18.5 2050101108 MTR METER 103
CABLE 3 X 2.5MM 2 (WHITE) 1 2050101108 MTR METER 105
TYRE 700 R16 LT 1 7020499027 EA EACH 121
HAND TAP SET MM 13.5 2059901143 SET Set 103
HAND TAP SET MM 1 2059901143 SET Set 105
TYRE 1 7020499035 EA EACH 121
i need only the output corresponding to org_id 105 and 121 only
ie as follows
DESCRIPTION LIST_PRICE_PER_UNIT SEGMENT1 SEGMENT2 SEGMENT3 PRIMARY_UOM_CODE PRIMARY_UNIT_OF_MEASURE org_id
CABLE 3 X 2.5MM 2 (WHITE) 1 2050101108 MTR METER 105
TYRE 700 R16 LT 1 7020499027 EA EACH 121
HAND TAP SET MM 1 2059901143 SET Set 105
TYRE 1 7020499035 EA EACH 121
i tried
and organization_id LIKE'105' OR organization_id LIKE '121'
but doesnt seem to workkindly help
thanking in advance
Edited by: makdutakdu on Sep 22, 2010 8:00 AM
Edited by: makdutakdu on Sep 22, 2010 8:00 AM
Edited by: makdutakdu on Sep 22, 2010 8:02 AM
Edited by: makdutakdu on Sep 22, 2010 8:03 AM
Edited by: makdutakdu on Sep 22, 2010 8:04 AM
Edited by: makdutakdu on Sep 22, 2010 8:05 AM
Edited by: makdutakdu on Sep 22, 2010 8:06 AM
Edited by: makdutakdu on Sep 22, 2010 8:07 AMAdd this condition
and (segment1 like '205%' or segment1 like '7%')
and
org_id IN (105,121) -
Need output of a query in given xml format.
I have a table as
create table t_cases (case_id number, pros_seq number, case_lname varchar2(100),
day_phone number, night_phone number, intl_phone number);
where case_id and pros_seq is the compound primary key.
The insert script to insert the data in the table is
insert into t_cases values(1, 1, 'test', 12, 23, 34);
insert into t_cases values(1, 2, 'test', 56, 67, 78);
commit;
Now from this table I need to query and fetch the data in the following xml format.
<case REPEATINGTYPE="PageList">
<rowdata REPEATINGINDEX="1">
<caseid>1</caseid>
<prosseq>1</prosseq>
<PhoneNumbers REPEATINGTYPE="PageList">
<rowdata REPEATINGINDEX="1">
<CountryCode>12</CountryCode>
<Type>Day</Type>
</rowdata>
<rowdata REPEATINGINDEX="2">
<CountryCode>23</CountryCode>
<Type>Night</Type>
</rowdata>
<rowdata REPEATINGINDEX="3">
<CountryCode>34</CountryCode>
<Type>International</Type>
</rowdata>
</PhoneNumbers>
</rowdata>
<rowdata REPEATINGINDEX="2">
<caseid>1</caseid>
<prosseq>2</prosseq>
<PhoneNumbers REPEATINGTYPE="PageList">
<rowdata REPEATINGINDEX="1">
<CountryCode>56</CountryCode>
<Type>Day</Type>
</rowdata>
<rowdata REPEATINGINDEX="2">
<CountryCode>67</CountryCode>
<Type>Night</Type>
</rowdata>
<rowdata REPEATINGINDEX="3">
<CountryCode>78</CountryCode>
<Type>International</Type>
</rowdata>
</PhoneNumbers>
</rowdata>
</case>
Please let me know how to do this.Like this...
select XMLELEMENT( "case", XMLATTRIBUTES ('PageList' as "RepeatingType")
,xmlagg(
xmlelement("rowdata", xmlattributes(pros_seq as "RepeatingIndex")
,xmlelement("caseid", case_id)
,xmlelement("prosseq", pros_seq)
,xmlelement("PhoneNumbers", xmlattributes('PageList' as "RepeatingType")
,xmlelement("rowdata", xmlattributes(1 as "RepeatingIndex")
,xmlelement("CountryCode", day_phone)
,xmlelement("Type", 'Day')
,xmlelement("rowdata", xmlattributes(2 as "RepeatingIndex")
,xmlelement("CountryCode", night_phone)
,xmlelement("Type", 'Night')
,xmlelement("rowdata", xmlattributes(3 as "RepeatingIndex")
,xmlelement("CountryCode", intl_phone)
,xmlelement("Type", 'International')
as x
from t_cases -
Hello, any help would be greatly appreciated.
I have this client who is a great client but for various reasons their print vendors for packaging are incredibly special. I've begged them to change vendors, but it's not going to happen. Their paper printing vendors are fine (great actually), and the packaging vendors I use with other clients are fine, I think it's just because they are using the absolute cheapest vendors.
The situation is that I use InDesign to create packaging (boxes, plastic tubes, labels, the whole bit). It's much more efficient for me because for their specific stuff, I use master pages, character/paragraph styles, update linked graphics, etc. This sort of thing is possible in Illustrator via other tools, but I strongly feel InDesign is a much better solution. When I'm done, I export a CMYK PDF (sometimes spot, but either either way, it's a clean, tidy PDF). I'm pretty comfortable with my settings for this as I don't have trouble with any other vendor.
The problem is that my client is getting emails like this: Is it possible for you to send me the true vector files in either .ai or .eps format?
I could take the PDF into Illustrator and outline the fonts, and give them one huge, extremely messy package of AI files (and I'm sure they're on Illustrator 8 or something), but the client will need changes after the proof, and there are a lot of files here, so I have to do this, and redo it, etc. Not to mention this client is WAY over budget.
So, what I'm begging for help with: I've been trying to google for something that explains why a PDF is a better file than an AI file for this purpose and why they should be able to use PDF, but I'm coming up with very little. So far I have general Adobe and Wikipedia articles (which covers raster vs vector), but I haven't found any info from a third party that explains why printers should be using (or at least able to use) a PDF to generate plates (poly or otherwise).
Any help would be greatly appreciated. Thanks much.I actually hadn't thought of that (actually, hardly ever think about .eps anymore). It's a good point though.
In CS4 (don't remember previous versions), I can export these just as easily as a PDF, but then I still have to outline the fonts, zip up several files instead of just sending a PDF, etc. It's 10 minutes, if that; but this is happening consistently with their packaging vendors. I'd rather educate their vendors than do work-arounds for them. I'm not trying to be a jerk about it, but if they don't know a PDF can be just as "true" a vector as an AI/EPS, the problem isn't just outdated equipment, it's a lack of seriously basic pre-press knowledge.
I was sure adobe (or someone) had a nice article on why a PDF was a better solution, but I'm having a hard time finding it. More than a work-around, I'm really looking for general information for them as to what a PDF is (versus AI/EPS). Then I can at least tell my client that their printer requires me to do extra work, and I'll just bill out for my time. It's a nominal fee, because these work-arounds aren't that elaborate, but sooner or later my client will do the math and realize that it's in their best interest to find a better printer. I know a lot of great printers right now that are hurting (although sadly, none of them do packaging), I'd much rather see work go to printers who make an effort to stay educated about their industry. -
Hi,
One Classical report is there, After executing this report i am getting output as per user requirement the output is to save in excel file. Can any body Tell me RH_START_WITH_EXCEL_DATA is sufficent, if s tell me the procedure.
Thanks & Regards,
RajHi,
Please refer to the following program.
Driver program.
report zrich_0001.
data: list type table of abaplist with header line.
data: ascilines(1024) type c occurs 0 with header line.
data: htmllines type table of w3html with header line.
data: istr type table of string with header line.
parameters: d1 type localfile default '/usr/sap/NSP/SYS/Data1.csv'.
start-of-selection.
submit zrich_0002 exporting list to memory and return.
call function 'LIST_FROM_MEMORY'
tables
listobject = list
exceptions
not_found = 1
others = 2.
call function 'LIST_TO_ASCI'
tables
listobject = list
listasci = ascilines
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
loop at ascilines.
check sy-tabix > 2.. "Don't include headings
concatenate ascilines+0(10)
ascilines+19(10)
ascilines+39(10)
into istr separated by ','.
append istr.
endloop.
open dataset d1 for output in text mode encoding default.
loop at istr.
transfer istr to d1.
endloop.
The report program.
report zrich_0002.
write:/ 'Field1', at 20 'Field2', at 40 'Field3'.
write:/ 'Field1', at 20 'Field2', at 40 'Field3'.
write:/ 'Field1', at 20 'Field2', at 40 'Field3'.
write:/ 'Field1', at 20 'Field2', at 40 'Field3'.
Of course, parsing your report program is going to be more difficult, but it can be done.
Also, this will only work if the the report program can output its list as a standard list display, if it is forcing an ALV grid, then I think that it can not be retrieved from memory using the funtion module LIST_FROM_MEMORY.
Hope it helps.
Thanks
Rajesh Kumar -
WITH T1
AS (SELECT 7532 pkey,2 events,TO_DATE ('12/11/2012', 'mm/dd/yyyy') dt,'Dept' code FROM DUAL
UNION ALL
SELECT 8101,3,TO_DATE ('12/9/2013', 'mm/dd/yyyy'),'Emp' FROM DUAL
UNION ALL
SELECT 8102,4,TO_DATE ('12/16/2013', 'mm/dd/yyyy'),'Dept' FROM DUAL)
SELECT pkey, events, dt, code
FROM t1;
Output:
pkey events dt code
7532 2 12/11/2012 Dept
8101 3 12/9/2013 Emp
8102 4 12/16/2013 Dept
value column should be derived as below:_
Starting_letter_of_code+year_of_dt+week_of_year_in_dt+loop_sequence_of_event
for pkey 7532 value is derived as below
Starting letter of code is D
year of dt is 12
week of dt in year is 50
no of events are 2
so I should get two records for pkey 7532
i.e., D125001 and D125002
Expected output:
pkey events dt code value
7532 2 12/11/2012 Dept D125001
7532 2 12/11/2012 Dept D125002
8101 3 12/9/2013 Emp E134901
8101 3 12/9/2013 Emp E134902
8101 3 12/9/2013 Emp E134903
8102 4 12/16/2013 Dept D135001
8102 4 12/16/2013 Dept D135002
8102 4 12/16/2013 Dept D135003
8102 4 12/16/2013 Dept D135004
am currently getting output as
present output:
pkey events dt code value
7532 2 12/11/2012 Dept D1250
8101 3 12/9/2013 Emp E1349
8102 4 12/16/2013 Dept D1350
Query Used:
WITH T1
AS (SELECT 7532 pkey,2 events,TO_DATE ('12/11/2012', 'mm/dd/yyyy') dt,'Dept' code FROM DUAL
UNION ALL
SELECT 8101,3,TO_DATE ('12/9/2013', 'mm/dd/yyyy'),'Emp' FROM DUAL
UNION ALL
SELECT 8102,4,TO_DATE ('12/16/2013', 'mm/dd/yyyy'),'Dept' FROM DUAL)
SELECT pkey, events, dt, code,
NVL (REGEXP_SUBSTR (code,'(D)(ept)',1,1,'i',1),
REGEXP_SUBSTR (code,'(E)(mp)',1,1,'i',1)
|| TO_CHAR (dt, 'YY')
|| TO_CHAR (dt, 'WW')
val
FROM t1;Edited by: NSK2KSN on Dec 21, 2012 12:05 PMUsed Analytic Function 'ROW_NUMBER()' to get the consecutive row numbers inside a group.
please check this...
WITH T1
AS (SELECT 7532 pkey,2 events,TO_DATE ('12/11/2012', 'mm/dd/yyyy') dt,'Dept' code FROM DUAL
UNION ALL
SELECT 8101,3,TO_DATE ('12/9/2013', 'mm/dd/yyyy'),'Emp' FROM DUAL
UNION ALL
SELECT 8102,4,TO_DATE ('12/16/2013', 'mm/dd/yyyy'),'Dept' FROM DUAL
UNION ALL
SELECT 8101,3,TO_DATE ('12/9/2013', 'mm/dd/yyyy'),'Emp' FROM DUAL
UNION ALL
SELECT 8101,3,TO_DATE ('12/9/2013', 'mm/dd/yyyy'),'Emp' FROM DUAL
UNION ALL
SELECT 8102,4,TO_DATE ('12/16/2013', 'mm/dd/yyyy'),'Dept' FROM DUAL
UNION ALL
SELECT 8102,4,TO_DATE ('12/16/2013', 'mm/dd/yyyy'),'Dept' FROM DUAL
UNION ALL
SELECT 8102,4,TO_DATE ('12/16/2013', 'mm/dd/yyyy'),'Dept' FROM DUAL
UNION ALL
SELECT 8102,4,TO_DATE ('12/16/2013', 'mm/dd/yyyy'),'Dept' FROM DUAL)
SELECT pkey, events, dt, code,
substr(code,1,1)||
to_char(dt,'yy')||
to_char(dt,'ww')||
lpad(row_number() over (partition by pkey order by pkey),2,'0')
FROM t1;gives7532 2 12-11-2012 Dept D125001
8101 3 12-9-2013 Emp E134901
8101 3 12-9-2013 Emp E134902
8101 3 12-9-2013 Emp E134903
8102 4 12-16-2013 Dept D135001
8102 4 12-16-2013 Dept D135002
8102 4 12-16-2013 Dept D135003
8102 4 12-16-2013 Dept D135004
8102 4 12-16-2013 Dept D135005 -
Hi All,
I have a requiremnet in which i am supposed th print the incoming string in following format
input string :aaaa,bbbb,cccc,dddd,eeee,ffff,gggg,hhhh,iiiiii,jjjj
output format
aaaa bbbb cccc dddd
eeee ffff gggg hhhh
iiii jjjj
input string will be comma seprated
the output should be printed in tabular format..with evry fifth word printing in new line.
Please let me know if any on has solution for this.
Thanks,
SeshuHi,
Here's one way:
VARIABLE input_string VARCHAR2 (4000)
EXEC :input_string := 'aaaa,bbbb,cccc,dddd,eeee,ffff,gggg,hhhh,iiiiii,jjjj';
WITH got_sub_string AS
SELECT CEIL (LEVEL / 4) AS r_num
, MOD (LEVEL, 4) + 1 AS c_num
, REGEXP_SUBSTR ( :input_string
, '[^,]+'
, 1
, LEVEL
) AS sub_string
FROM dual
CONNECT BY LEVEL <= 1 + LENGTH ( :input_string)
- LENGTH ( REPLACE ( :input_string
SELECT MIN (CASE WHEN c_num = 1 THEN sub_string END) AS col_1
, MIN (CASE WHEN c_num = 2 THEN sub_string END) AS col_2
, MIN (CASE WHEN c_num = 3 THEN sub_string END) AS col_3
, MIN (CASE WHEN c_num = 4 THEN sub_string END) AS col_4
FROM got_sub_string
GROUP BY r_num
ORDER BY r_num
;I assumed seeral things, such as your version of Oracle. This works in Oracle 10 (and up), but could be simplified some in Oracle 11. -
Need output with commas and decimals.
Hi All,
I want to print this below no using write statement with commas and decimals .
123,45,67,890.12
Note :
It must be declared in parameters and it is currency value
and my output must also be like this
123,45,67,890.12
Can any one suggest me what to or send me some sample program for this,
(points will be rewarded)
Thanking you
vinoth.rquote:
Originally posted by:
The ScareCrow
You should redesign your db to have another table
This table should have the asset id and the category id (I
call this a bridging table)
The category column would then be removed from the asset
table.
You then do a join on the tables to gain the category
description.
But to fix your problem with the existing structure
Your query
<cfquery name="qIndex" datasource="#appDSN#">
SELECT Asset.Reference, Asset.AssetName, Asset.Category
FROM Asset
WHERE Category LIKE '%#URL.Category#%'
</cfquery>
<cfoutput query="qIndex">
<cfset catids = ValueList(qIndex.category])>
<cfquery name="qCat" datasource="#appDSN#">
Select Category_Name
From categories
Where Category_ID IN (#catids#)
</cfquery>
#qIndex.Reference#<br />
#qIndex.AssetName#<br />
<cfloop query="qCat">
#qCat.Category#<br>
</cfloop>
</cfoutput>
Ken
Ken, Thanks. It's really close, but all of the repeating
records are taking the Category output from the first record in the
set and repeating it...e.g. if the first record is "Mouse,
Keyboards, Trackballs", all of the subsequent records show the
same.
Also should "ValueList(qIndex.category])", have been
"ValueList(qIndex.category)"?
If there's not a way to do this using the current db, i'll
try using a bridging table.
thanks.
paul
Maybe you are looking for
-
"Invoke a Browser Script" Action in OBIEE 11g
Follow website : http://www.rittmanmead.com/2012/07/navigating-to-bi-content-in-obiee11g-and-passing-multiple-parameters/ In file "D:\oracle\user_projects\domains\bifoundation_domain\servers\AdminServer\tmp\_WL_user\analytics_11.1.1\silp1v\war\res\b_
-
Hi All, I have a requirement of grouping of columns in report. For example a report which has columns A,B,C,D,E,F. Once user see this report he wants to save A,B,c as group and save. He can make any no of groups as such and save see later... Thanks!
-
Real time data aquisation(RDA)
hi if i want use datasource for RDA , its support in r/3 side? so its wont support for flat file? where can i check the data source will support for RDA or not? once datasource replicated while creating infopackage need to check check box and dtp ne
-
When executed xslsample - returns error
I am running XDK 9.0.1.2.0 release version on Oracle 9i database. Installation of XDK was clean. When I try to run xslsample which is demo procedure, I get the following error. SQL> exec xslsample ('D:\Projects\XML\PLSQL\xdk\demo\plsql\parser','famil
-
How to restrict simultaneous execution of two programs?
Hi Experts, Need inputs for the situation described below: We have two programs prog A and prog B. These are independent executable programs and have no dependency on each other. I want to restrict execution of prog B if prog A is running in any sess