Output number with comma separator
I have the value 1250 as an amount in a smartform. And I want to output this as 1,250. How do I do this?
Hi...
Use this function module.....
it will satify your requirements...
pass that changing parameter to the smartform..
DATA: v_cur like TCURX-CURRKEY,
c_cur(10) type c VALUE '1250'..
CALL FUNCTION 'SD_CONVERT_CURRENCY_FORMAT'
EXPORTING
i_currency = v_cur
* IMPORTING
* E_CURRENCY_INT_FORMAT =
changing
c_currency_ext_format = c_cur
EXCEPTIONS
WRONG_FORMAT = 1
OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
WRITE: C_CUR.
I believe this will greatly help you.
Thanks and regards
Bhuvana
Similar Messages
-
Covert number to comma separated number
I have to covert number to comma separated number
Please let me know how to do this.
Example :
Input: 10000 Output: 100,00
Input: 1000 Output: 10,00
Input: 1000044 Output: 100,00,44Like this
with t as
( select 1234 a from dual union all
select 1234456 from dual union all
select 123 from dual union all
select 12 from dual union all
select 124579652 from dual union all
select 12235 from dual
select to_char(a,'999,99,99,99,99,99') formatted
from t Regards
Arun -
How can i get all these values in single row with comma separated?
I have a table "abxx" with column "absg" Number(3)
which is having following rows
absg
1
3
56
232
43
436
23
677
545
367
xxxxxx No of rows
How can i get all these values in single row with comma separated?
Like
output_absg
1,3,56,232,43,436,23,677,545,367,..,..,...............
Can you send the query Plz!These all will do the same
create or replace type string_agg_type as object
2 (
3 total varchar2(4000),
4
5 static function
6 ODCIAggregateInitialize(sctx IN OUT string_agg_type )
7 return number,
8
9 member function
10 ODCIAggregateIterate(self IN OUT string_agg_type ,
11 value IN varchar2 )
12 return number,
13
14 member function
15 ODCIAggregateTerminate(self IN string_agg_type,
16 returnValue OUT varchar2,
17 flags IN number)
18 return number,
19
20 member function
21 ODCIAggregateMerge(self IN OUT string_agg_type,
22 ctx2 IN string_agg_type)
23 return number
24 );
25 /
create or replace type body string_agg_type
2 is
3
4 static function ODCIAggregateInitialize(sctx IN OUT string_agg_type)
5 return number
6 is
7 begin
8 sctx := string_agg_type( null );
9 return ODCIConst.Success;
10 end;
11
12 member function ODCIAggregateIterate(self IN OUT string_agg_type,
13 value IN varchar2 )
14 return number
15 is
16 begin
17 self.total := self.total || ',' || value;
18 return ODCIConst.Success;
19 end;
20
21 member function ODCIAggregateTerminate(self IN string_agg_type,
22 returnValue OUT varchar2,
23 flags IN number)
24 return number
25 is
26 begin
27 returnValue := ltrim(self.total,',');
28 return ODCIConst.Success;
29 end;
30
31 member function ODCIAggregateMerge(self IN OUT string_agg_type,
32 ctx2 IN string_agg_type)
33 return number
34 is
35 begin
36 self.total := self.total || ctx2.total;
37 return ODCIConst.Success;
38 end;
39
40
41 end;
42 /
Type body created.
[email protected]>
[email protected]> CREATE or replace
2 FUNCTION stragg(input varchar2 )
3 RETURN varchar2
4 PARALLEL_ENABLE AGGREGATE USING string_agg_type;
5 /
CREATE OR REPLACE FUNCTION get_employees (p_deptno in emp.deptno%TYPE)
RETURN VARCHAR2
IS
l_text VARCHAR2(32767) := NULL;
BEGIN
FOR cur_rec IN (SELECT ename FROM emp WHERE deptno = p_deptno) LOOP
l_text := l_text || ',' || cur_rec.ename;
END LOOP;
RETURN LTRIM(l_text, ',');
END;
SHOW ERRORS
The function can then be incorporated into a query as follows.
COLUMN employees FORMAT A50
SELECT deptno,
get_employees(deptno) AS employees
FROM emp
GROUP by deptno;
###########################################3
SELECT SUBSTR(STR,2) FROM
(SELECT SYS_CONNECT_BY_PATH(n,',')
STR ,LENGTH(SYS_CONNECT_BY_PATH(n,',')) LN
FROM
SELECT N,rownum rn from t )
CONNECT BY rn = PRIOR RN+1
ORDER BY LN desc )
WHERE ROWNUM=1
declare
str varchar2(32767);
begin
for i in (select sal from emp) loop
str:= str || i.sal ||',' ;
end loop;
dbms_output.put_line(str);
end;
COLUMN employees FORMAT A50
SELECT e.deptno,
get_employees(e.deptno) AS employees
FROM (SELECT DISTINCT deptno
FROM emp) e;
DEPTNO EMPLOYEES
10 CLARK,KING,MILLER
20 SMITH,JONES,SCOTT,ADAMS,FORD
30 ALLEN,WARD,MARTIN,BLAKE,TURNER,JAMES
CREATE OR REPLACE FUNCTION concatenate_list (p_cursor IN SYS_REFCURSOR)
RETURN VARCHAR2
IS
l_return VARCHAR2(32767);
l_temp VARCHAR2(32767);
BEGIN
LOOP
FETCH p_cursor
INTO l_temp;
EXIT WHEN p_cursor%NOTFOUND;
l_return := l_return || ',' || l_temp;
END LOOP;
RETURN LTRIM(l_return, ',');
END;
COLUMN employees FORMAT A50
SELECT e1.deptno,
concatenate_list(CURSOR(SELECT e2.ename FROM emp e2 WHERE e2.deptno = e1.deptno)) employees
FROM emp e1
GROUP BY e1.deptno;
DEPTNO EMPLOYEES
10 CLARK,KING,MILLER
20 SMITH,JONES,SCOTT,ADAMS,FORD
30 ALLEN,WARD,MARTIN,BLAKE,TURNER,JAMES
CREATE OR REPLACE TYPE t_string_agg AS OBJECT
g_string VARCHAR2(32767),
STATIC FUNCTION ODCIAggregateInitialize(sctx IN OUT t_string_agg)
RETURN NUMBER,
MEMBER FUNCTION ODCIAggregateIterate(self IN OUT t_string_agg,
value IN VARCHAR2 )
RETURN NUMBER,
MEMBER FUNCTION ODCIAggregateTerminate(self IN t_string_agg,
returnValue OUT VARCHAR2,
flags IN NUMBER)
RETURN NUMBER,
MEMBER FUNCTION ODCIAggregateMerge(self IN OUT t_string_agg,
ctx2 IN t_string_agg)
RETURN NUMBER
SHOW ERRORS
CREATE OR REPLACE TYPE BODY t_string_agg IS
STATIC FUNCTION ODCIAggregateInitialize(sctx IN OUT t_string_agg)
RETURN NUMBER IS
BEGIN
sctx := t_string_agg(NULL);
RETURN ODCIConst.Success;
END;
MEMBER FUNCTION ODCIAggregateIterate(self IN OUT t_string_agg,
value IN VARCHAR2 )
RETURN NUMBER IS
BEGIN
SELF.g_string := self.g_string || ',' || value;
RETURN ODCIConst.Success;
END;
MEMBER FUNCTION ODCIAggregateTerminate(self IN t_string_agg,
returnValue OUT VARCHAR2,
flags IN NUMBER)
RETURN NUMBER IS
BEGIN
returnValue := RTRIM(LTRIM(SELF.g_string, ','), ',');
RETURN ODCIConst.Success;
END;
MEMBER FUNCTION ODCIAggregateMerge(self IN OUT t_string_agg,
ctx2 IN t_string_agg)
RETURN NUMBER IS
BEGIN
SELF.g_string := SELF.g_string || ',' || ctx2.g_string;
RETURN ODCIConst.Success;
END;
END;
SHOW ERRORS
CREATE OR REPLACE FUNCTION string_agg (p_input VARCHAR2)
RETURN VARCHAR2
PARALLEL_ENABLE AGGREGATE USING t_string_agg;
/ -
Displaying a number with commas in gid
Hi EveryOne,
This is Ram Prasad.I want to display a number with commas in the grid (eg:1,000).In the grid it is shown as 1000.I wan to add commas for this number to be shown in the grid display template.Can any one help on this.That's an odd format, so I assume you mean 1 million to be displayed as: 1,000,000 ?
http://help.sap.com/saphelp_xmii115/helpdata/en/Applet_Reference_Details/ParameterReference.htm#Number Formatting
#,##0 should provide you with a comma as the thousands separator for all numbers in this column of your iGrid. -
Hi all ,
I have a currency filed TFULLVACWTG. I am summing all values like this
TFULLVACWTG = VFWTG001 + VFWTG002 + VFWTG003 + VFWTG004 + VFWTG005 . iam getting output like this 14092.00 i should get output like this 14,092.00
I should write output with comma separator .is there any key word or f.m for this one?Hi Priya,
You have two options.
1) Changes in user master record ie change thousand separator as , and decimal separator as .(dot).
You can do this with transaction SU3.
2) If you dont want to change master record then try with this code.
DATA VC_TFULLVACWTG(18).
VC_TFULLVACWTG = TFULLVACWTG.
TRANSLATE VC_TFULLVACWTG USING ',#'.
TRANSLATE VC_TFULLVACWTG USING '.,'.
TRANSLATE VC_TFULLVACWTG USING '#.'.
WRITE VC_TFULLVACWTG.
Thanks,
Vinay -
Adding a parameter with comma separated having different values
i want to add a parameter with comma separated having different values of a column. e.g i have column having values from 10000 to 99999. i want to create report for the selected values of 11111,12111,131111 etc. This selection can be one or more values as desired. Second problem is restricting the records as per parameter.
Reports doesn't allow multi-selection of a parameter in its parameter form. You need to use Oracle*Forms or an HTML Form to front end more advanced parameter form options.
However, you could have multiple parameters and combine their selections into a single parameter in the after parameter form trigger. This would at least allow you to give the user the option for selecting up to 'n' parameters. The single parameter would have to be of type "character" and you probably want to add appropriate quotes around the values in the after parameter form trigger.
Second problem is restricting the records as per parameter. Once you've got the comma seperated values into a single parameter (say p_myValues with a default value of '') then you can just use a lexical parameter to restrict the values as in:
select * from emp
where to_char(empno) in (&p_myValues) -
One column having multiple values with comma separator.
Hey Guys,
In my db, one culmn having multiple values with comma separator. like column_name = 'value1,value2,value3'. Now I want to compare this column to another column and fetch in Cursor.
and each value having corresponding email_id, By fetching cursor, I need to populate email_ids.
Thanks in advance!!
-LakshmanPlease compare and fetch cursor and populate result with out extract data into temp table. Give me the query!You have not provided DDL for table so I don't know table or column name to write any SQL.
You have not provided DML for test data to run SQL against. -
Here's a way to display a number with commas. See attached
code.
I had searched here for help on how to do it, and couldn't
find anything. So, then I wrote this. I'm a hack, self-taught
coder, so there may be a more eloquent way, but this does
work.Nice, I'm always happy to be humbled.
One more point. If you're going ot use a return statement I
like to keep it
at the very end of the function. So, in a conditional
statement, setting a
local variable to the value to be returned allows you to
return that local
variable and always keep the return statement as the last
line. It just
saves a little searching around for returns in longer
functions. Just a
style choice not necessarily better.
Craig Wollman
Word of Mouth Productions
phone 212 928 9581
fax 212 928 9582
159-00 Riverside Drive West #5H-70
NY, NY 10032
www.wordofmouthpros.com
"duckets" <[email protected]> wrote in
message
news:[email protected]...
>
quote:
Originally posted by:
FasterPastor
> I had searched here for help on how to do it, and
couldn't find
> anything.
>
> You should have asked! here's one I have had sitting
around for a while.
> (code
> attached below). It handles lots of cases which the
other handlers posted
> so
> far do not. Specifically:
>
> Negative numbers - input: -123456
> - craig's: -,123,456
> - dougs's: -,123,456
> - mikes's: -,123,456
> - duck's: -123,456
>
> Floating point numbers - input: pi
> - craig's: 3
> - dougs's: 3
> - mikes's: 3.1,416
> - duck's: 3.1416
>
> Numbers larger than the maxinteger - input: 149668992000
> - craig's: -,654,863,360
> - dougs's: -,654,863,360
> - mikes's: 14,966,899,200,0.0,000
> - duck's: 149,668,992,000
>
> Negative floats - input: -123456.7890
> - craig's: -,123,457
> - dougs's: -,123,457
> - mikes's: -12,345,6.7,890
> - duck's: -123,456.789
>
> Floats larger than the maxinteger - input:
2233445566.7788
> - craig's: -2,061,521,729
> - dougs's: -2,061,521,729
> - mikes's: 223,344,556,6.7,788
> - duck's: 2,233,445,566.7788
>
> Yes.. the code is longer, but if you want to print
something like the
> distance
> in meters to the sun, you need to handle floats
properly!
>
> enjoy ;-)
>
> - Ben
>
>
>
> on stringNumber n
>
> outputString = ""
> inputString = string(n)
>
> if inputString.char[1] = "-" then
> negative = true
> delete inputString.char[1]
> else
> negative = false
> end if
>
> fraction = ""
>
> if inputString contains "e" then
>
> mantissa = inputString.char[1..(offset("e",
inputString)-1)]
> exponent = value(inputString.char[(offset("e",
> inputString)+1)..inputString.length])
>
> decimalChar = mantissa.char[2]
> mantissa = mantissa.char[1] &
mantissa.char[3..mantissa.length]
>
> if mantissa.length < exponent+1 then
> plainNumber = mantissa
> repeat while plainNumber.length < exponent+1
> put "0" after plainNumber
> end repeat
> else
> plainNumber = mantissa.char[1..(exponent+1)]
> fraction = mantissa.char[(exponent+2)..mantissa.length]
> end if
>
> else
>
> if offset(".", inputString)>0 then
> decimalChar = "."
> end if
> if offset(",", inputString)>0 then
> decimalChar = ","
> end if
>
> if offset(decimalChar, inputString)>0 then
> plainNumber = inputString.char[1..(offset(decimalChar,
> inputString)-1)]
> fraction = inputString.char[(offset(decimalChar,
> inputString)+1)..inputString.length]
> else
> plainNumber = inputString
> fraction = ""
> decimalChar = string(1.2).char[2]
> end if
>
> end if
>
> if decimalChar = "." then
> separatorChar = ","
> else
> separatorChar = "."
> end if
>
>
> repeat while plainNumber.char[1] = "0"
> delete plainNumber.char[1]
> end repeat
>
>
> repeat while plainNumber.length > 0
> if plainNumber.length > 3 then
> nextDigits =
>
separatorChar&plainNumber.char[plainNumber.length-2..plainNumber.length]
> delete
plainNumber.char[plainNumber.length-2..plainNumber.length]
> else
> nextDigits = plainNumber
> plainNumber = ""
> end if
> put nextDigits before outputString
> end repeat
>
> repeat while fraction.char[fraction.length] = "0"
> delete fraction.char[fraction.length]
> end repeat
>
> if fraction.length > 0 then
> put decimalChar&fraction after outputString
> end if
>
>
> if negative then
> put "-" before outputString
> end if
>
> return outputString
>
> end
> -
Query on column with comma separated values
I have a proposed table with unnormalized data like the following:
ID COLA COLB REFLIST
21 xxx zzz 24,25,78,412
22 xxx xxx 21
24 yyy xxx 912,22
25 zzz fff 433,555,22
.. ... ... ...There are 200 million rows. There is maximum of about 10 IDs in the REFLIST, though typically two or three. How could I efficiently query this data on the REFLIST column? e.g. something like:
SELECT id FROM mytable WHERE :myval in reflistLogically there is a many to many relationship between rows in this table. The REFLIST column contains pointers to ID values elsewhere in the table. The data could be normalized so that the relationship keys are in a separate table (in fact this is the current solution that we want to change).
ID REF
21 24
21 25
21 78
21 412
22 21
24 912
... ...The comma separated list seems instinctively like a bad idea, however there are various reasons for proposing it. The main reason is because the source for this data has it structured like the REFLIST example. It is an OLTP-like system rather than a data warehouse. The source code (and edit performance) would benefit greatly from not having to maintain the relationship table as the data changes.
Going back to querying the REFLIST column, the problem seems to be building an approriate index for the data. The ideas proposed so far are:
<li>Make a materialized view that presents the relationships as normalized (e.g. as in the example with ID, REF columns above), then index the plain column - the various methods of writing the view SQL have been widely posted.
<li>Use a Oracle Text Index (not something I have ever had call to use before).
Any other ideas? Its Oracle 10.2, though 11g could be possible.
Thanks
JimSomething like this ?
This is test demo on my 11.2.0.1 Windows XP
SQL> create table test (id number,reflist varchar2(30));
Table created.
SQL> insert into test values (21,'24,25,78,412');
1 row created.
SQL> insert into test values (22,'21');
1 row created.
SQL> insert into test values (24,'912,22');
1 row created.
SQL> insert into test values (25,'433,555,22');
1 row created.
SQL> select * from test
2 where
3 ',' || reflist || ',' like '%,22,%';
ID REFLIST
24 912,22
25 433,555,22
SQL>Source:http://stackoverflow.com/questions/7212282/is-it-possible-to-query-a-comma-separated-column-for-a-specific-value
Regards
Girish Sharma
Edited by: Girish Sharma on Jul 12, 2012 2:31 PM -
SQL - Multiple Fetch into Single Column with Comma Separator
Hello Experts,
Good Day to all...
I need your help on following scenarios. The below query returns set of titleID strings. Instead of printing them one below the other as query output, I want the output to be in batch of 25 values.i.e each row should have 25 values separated by comma. i.e If there are 100 titles satisfying the output, then there should be only four rows with and each row having 25 titles in comma separated manner.
SELECT DISTINCT title_id
FROM pack_relation
WHERE package_id IN ( SELECT DISTINCT fa.package_id
FROM annotation fa
GROUP BY fa.package_id
HAVING COUNT
(fa.package_id) <100);I tried with the PL/SQL block; whereas it is printing all the values continously :(
I need to stop with 25 values and display.
If its possible with SQL block alone; then it would be of great help
DECLARE
v_str VARCHAR2 (32767) := NULL;
CURSOR c1
IS
SELECT DISTINCT title_id
FROM pack_relation
WHERE package_id IN ( SELECT DISTINCT fa.package_id
FROM annotation fa
GROUP BY fa.package_id
HAVING COUNT
(fa.package_id) <100);
BEGIN
FOR i IN c1
LOOP
v_str := v_str || ',' || i.title_id;
END LOOP;
v_str := SUBSTR (v_str, 2);
DBMS_OUTPUT.put_line (v_str);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Error-->' || SQLERRM);
END;Thanks...You can use CEIL
Sample code
SELECT
nt,
LTRIM(MAX(SYS_CONNECT_BY_PATH(val,',')) KEEP (DENSE_RANK LAST ORDER BY curr),',') AS concat_val
FROM
SELECT
val,
nt,
ROW_NUMBER() OVER (PARTITION BY nt ORDER BY val) AS curr,
ROW_NUMBER() OVER (PARTITION BY nt ORDER BY val) -1 AS prev
FROM
SELECT
level AS val,
ceil(rownum/3) as nt /* Grouped in batches of 3 */
FROM
dual
CONNECT BY level <= 10
GROUP BY
nt
CONNECT BY prev = PRIOR curr
AND nt = PRIOR nt
START WITH curr = 1;
NT CONCAT_VAL
1 1,2,3
2 4,5,6
3 7,8,9
4 10Your code
SELECT
nt,
LTRIM(MAX(SYS_CONNECT_BY_PATH(title_id,',')) KEEP (DENSE_RANK LAST ORDER BY curr),',') AS concat_val
FROM
SELECT
title_id,
nt,
ROW_NUMBER () OVER (PARTITion BY nt ORDER BY title_id) AS curr,
ROW_NUMBER() OVER (PARTITION BY nt ORDER BY title_id) -1 AS prev
FROM
SELECT
title_id,
ceil(rownum/25) AS nt /* Grouped in batches of 25 */
FROM
pack_relation tdpr
JOIN annotation fa
ON
tdpr.package_id = fa.package_id
GROUP BY
title_id,
fa.package_id
HAVING
COUNT (fa.package_id) < 500
GROUP BY
nt
CONNECT BY prev = PRIOR curr
AND nt = PRIOR nt
START WITH curr = 1; -
How to generate oracle report output in a comma separated format in reports
Pls any one can help in generation of oracle report in comma separated format in reports 10g.....
thanks,
prasad.
1,Chennai,Nokiasiemen,Convent junction,5535Use desformat=delimited.
http://download.oracle.com/docs/cd/E15523_01/bi.1111/b32122/orbr_howto007.htm#i1040102 -
SQL Select with comma separated column value
Hi All
ASP VBScript
I have a DB column named allowed_contracts that stores a
comma separated
list of of values e.g. 3, 5, 19, 44, 52
I need to select records based on a variable called
varContractList that
contains another comma separated list i.e. 5, 44, 52
I only want to select records where the allowed_contracts
column contains
each of the varContractList,
For example only return records that have 5 or 44 or 52 in
thier
allowed_contracts column.
My brain is now in a persistant vegetive state trying to work
this out so
any ideas would be much appreciated.
Regards
BrenHi Jules
Cheers for this.
I was trying to be a bit cute (lazy even) by storing the
project ID's as a
comma delimted string but as we see it doesn't always pay to
be lazy. Serves
me right for destroying brain cells by drinking the Welshpool
beer the other
week whilst visiting mates down that neck of the woods. :-))
Time for another table me thinks.
Rgds
Bren
"Julian Roberts" <[email protected]> wrote in message
news:e7i13f$mup$[email protected]..
> Fatal flaw here Bren. In a relational database, one
shouldn't really store
> foreign keys as a comma delimted string. One should have
a 3 table
> structure. eg
>
> Products:
> ProductID
> Product
>
> Categories:
> CategoryID
> Category
>
> ProductCategories:
> ProductID
> CategoryID
>
> So, from the table ProductCategories, a product can
belong to many
> categories. When doing a front end search to find
products in multiple
> categories, products can be shown thus:
>
> select * from Products where ProductID in (select
ProductID from
> ProductCategories where CategoryID in (5,44))
>
> --
> Jules
>
http://www.charon.co.uk/charoncart
> Charon Cart 3
> Shopping Cart Extension for Dreamweaver MX/MX 2004
>
>
>
>
> -
Invalid number error - with comma separated values
FUNCTION fn_check_value(
p_ids_in IN VARCHAR2
RETURN NUMBER
IS
v_nCheckValue NUMBER;
CURSOR vCur
IS
SELECT COUNT(*)
FROM t1
WHERE col_id IN (p_ids_in); -- col_id is number field
BEGIN
OPEN vCur;
FETCH vCur INTO v_nCheckValue;
CLOSE vCur;
Return v_nCheckValue;
END fn_check_value;
I get following error when the input is 3,4. Works fine with single value
Execution failed: ORA-01722: invalid numberIf you have more than one number in the list being passed in through p_ids_in then you could try the following
CURSOR vCur
IS
SELECT COUNT(*)
FROM t1
where
INSTR(chr(44) || p_ids_in || chr(44), chr(44) || col_id || chr(44) ) > 0;
This will do pattern matching and will return a true if the pattern matches.
For example, if p_ids_in = '3,4'
then INSTR (',3,4' , ',3,') > 0 will return a true.
This approach is useful if you have more than one value inside a string.
Shakti
(http://www.impact-sol.com)
(Developers of Guggi Oracle - Tool for DBAs and Developers) -
Download internal table as text file with comma separation
hi all
I wanted text file separated by comma. I used the CSV function module, but the result is separeted by semicolon,instead i need comma.
Kindly suggest some solution.
Thanks
Subhause this fm to convert to csv file
CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'
EXPORTING
I_FIELD_SEPERATOR = ','
TABLES
I_TAB_SAP_DATA = ITAB_FINAL
CHANGING
I_TAB_CONVERTED_DATA = ITAB_OUTPUT
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
itab_output is of type ITAB_OUTPUT TYPE TRUXS_T_TEXT_DATA,
and then download using gui_download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = W_FILENAME
FILETYPE = 'ASC'
TABLES
DATA_TAB = ITAB_OUTPUT
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22. -
Displaying data from a list into a single field with comma separated values
Hi,
I have a requirement to change a report with an XML structure (simplified version) as below
<Protocol>
<ProtocolNumber>100</ProtocolNumber>
<SiteName>Baxter Building</SiteName>
<ListOfActivity>
<Activity>
<Description>Communication Memo Description.</Description>
<Name>James</Name>
</Activity>
<Activity>
<Description>Visit 4</Description>
<Name>James</Name>
</Activity>
<ListOfActivity/>
</Protocol>
On the report I need to display all the 'Names' for each of the Child (Activities) in a single field at the Parent (Protocol) level, with each Name separated by a comma.
How do I go about getting this to work?
ThanksTake a look at this: http://blogs.oracle.com/xmlpublisher/entry/inline_grouping
You could do this (ofcourse, you will need to add extra logic to ensure that there is no comma added after the last name..)
<?for-each@inlines:Name?><?.?><?', '?><?end for-each?>
Thanks,
Bipuser
Maybe you are looking for
-
Concatenated Prompts in OBIEE answers
Hello All, Can we have Concatenated OBIEE Prompts in Answers(Not in Dashboard) ex: Vendor_Number || Vendor_Name.. it has to be displayed in this way when the user runs the request. either can go into the DB to process the request. This is something l
-
Blackbarry and Iphone versions supported by MSA
Hi Folks, Any idea about the latest versions of Blackbarry and Iphone versions supported by Oracl MSA. Your eralier response would be appreciated. Thanks, Mayank
-
Frame Set Flickering issue in Safari Browser( All Mac Devices)
Hello, My self Dominic Johns. I am running my various websites and having online insurance quotation facility. But I am using 3rd party Quote Link on the page in Frame set. When i am using my mac devices (apple, ipad, mac air, imac, macbook) and open
-
Need to create a Store Business document type for material master and store a sharepoint link
Hello, I need to create a Store business document type for material master and store a URL link . How do I do that?( or is there any functionality to upload a document for a store business document that it will automatically saves to sharepoint?) Th
-
I am new to the iPhone, I purchased an iPhone 5. I have iPad and iPods so im a little familure with products. I clean off running apps, but my internet seems to run slower now while on WiFi with good signal. I have had trouble with sending pictures,