FM to get number separator
Hi,
If I give any number, the FM should give the output with separator.
For example, if I give 1000, the output should be 1,000.
Can anybody let me know is there any standard FM avaiable for this requirement?
Thanks in advance.
Regards,
Mani
You dont need to have a special FM for this. Just assign it to a variable of TYPE P. It will give you the desired output
Similar Messages
-
How to get field separator in flat file using GUI_DOWNLOAD function
hi,
how to get field separator in flat file using GUI_DOWNLOAD function.
thanking you.Hi,
Use WRITE_FIELD_SEPARATOR = 'X'.
Check this sample code
REPORT z_file_download.
DATA: w_name(90) TYPE c.
DATA:
BEGIN OF fs_flight,
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
price LIKE sflight-price,
currency LIKE sflight-currency,
END OF fs_flight.
DATA:
BEGIN OF fs_head,
carrid(10) TYPE c,
connid(10) TYPE c,
fldate(10) TYPE c,
price(10) TYPE c,
curr(10) TYPE c,
END OF fs_head.
DATA:
t_head LIKE
TABLE OF
fs_head.
DATA:
t_flight LIKE
TABLE OF
fs_flight.
fs_head-carrid = 'CARRID'.
fs_head-connid = 'CONNID'.
fs_head-fldate = 'FLDATE'.
fs_head-price = 'PRICE'.
fs_head-curr = 'CURRENCY'.
APPEND fs_head TO t_head.
SELECT-OPTIONS:
s_carrid FOR fs_flight-carrid.
START-OF-SELECTION.
SELECT carrid
connid
fldate
price
currency
FROM sflight
INTO TABLE t_flight
WHERE carrid IN s_carrid.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = 'D:\flight.xls'
FILETYPE = 'ASC'
* APPEND = ' '
WRITE_FIELD_SEPARATOR = 'X'
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* IMPORTING
* FILELENGTH =
tables
data_tab = t_head
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
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'D:\flight.xls'
filetype = 'ASC'
append = 'X'
write_field_separator = 'X'
TABLES
data_tab = t_flight
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.
IF sy-subrc EQ 0.
MESSAGE 'Download successful' TYPE 'I'.
ENDIF.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
Get Comma separated result from SQL Query
Hey Everyone
I have a requirement where i need to get comma separated result of names because there is one to many relationship i.e for every protocol there are mutiple people associated to it , and i created PL/SQL function for that and everything was fine and when it is in production multiple number of cursors were opened because of the logic and leading to RAC fail over and for that we were manually clearing the cursors every weekend and i am looking to create a Materialized view for this logic but i was unable to code the logic using Connect by clause
Result is like and i want comma separated names for every protocol
P06065 TESTER13 TESTER13
P02095 PATRICIA CARMELITANO
P02095 ANNE MUIR
P02095 ROBERT HARLOW
P02095 JANICE ALBERT
P02095 Jacqueline van Dalen
P02095 GUENTER HENNIG DR.
P05209 Olga Xenaki
P05553 Birgit Limbach-Angele
P05553 Anja Schulz Dr.
P05553 CHRISTA HAGENBUCHER
here is the function which i wrote, i need to get the same logic through SQL Statement .. thanks for your help
cursor c_GSCR is
select T565804.FST_NAME||' '||T565804.LAST_NAME
from
S_PT_POS_HST_LS T544105 /* S_PT_POS_HST_LS_Protocol_Team */ ,
S_CONTACT T565804 /* S_CONTACT_Protocol_Team */,
S_CL_PTCL_LS T541903 /* S_CL_PTCL_LS_Protocol */
where ( T541903.ROW_ID = T544105.CL_PTCL_ID and
T544105.POSTN_ID = T565804.PR_HELD_POSTN_ID and
T544105.ROLE_CD = 'Lead Project Manager' AND
T541903.ROW_ID = v_PTCL_ID and
T541903.PAR_PTCL_ID is null and T544105.END_DT is null );
BEGIN
l_row_num := 0;
l_role := '';
l_role_list := '';
v_PTCL_ID := PTCL_ID;
OPEN C_GSCR;
if C_GSCR%isopen THEN
LOOP
FETCH C_GSCR INTO l_role;
exit when C_GSCR%notfound;
IF l_role_list IS NULL THEN
l_role_list:=l_role;
ELSE
l_role_list:=l_role_list||', '||l_role;
END IF;
END LOOP;
CLOSE C_GSCR;
end if;
~SrixHi,
Srix wrote:
Thanks for the Info .. My database in 10g R 2 i started using COLLECT Function
select T541903.PTCL_NUM ,
CAST(COLLECT(T565804.FST_NAME||' '||T565804.LAST_NAME) AS varchar2_ntt) , 7) AS LPM_NAME
from
S_PT_POS_HST_LS T544105 /* S_PT_POS_HST_LS_Protocol_Team */ ,
S_CONTACT T565804 /* S_CONTACT_Protocol_Team */,
S_CL_PTCL_LS T541903 /* S_CL_PTCL_LS_Protocol */
where T541903.ROW_ID = T544105.CL_PTCL_ID and
T544105.POSTN_ID = T565804.PR_HELD_POSTN_ID and
T544105.ROLE_CD = 'Lead Project Manager' AND
T541903.PAR_PTCL_ID is null and T544105.END_DT is null
GROUP BY T541903.PTCL_NUM
The result i like ...Do you mean "The result *is* like ..."?
Or do you mean "The result I [would] like [is] ..."?
The code above has unblanaced parentheses. If you are getting anything other than an error message, then I don't believe you are really running what you posted.
Whenever you have a problem, post a complete test script that people can use to recreate the problem and test their ideas.
Please do that. Post CREATE TABLE and INSERT statements to crate the sample data, the code you used to create the carachr2_ntt type and the function, and your best attempt at a query (formatted). Simplify as much as possible. For example, do you really need 3 tables to illustrate the problem? For purposes of asking a question on this forum, can't you pretend you have just one table, with 2 columns?
I suspect the problem has to do with the user-defined type and function, which you didn't post. I can't even see how you called the function in your query. Without the information I mentioned above, there's not much I can do to help you. -
ALV_GRID How to get number of lines after filted applyed?
Hi, all!
The task is to display title in alv_grid like
"N records selected (X records on the screen)".
It means, N records in dataset and X records displayed after filter applyed by user.
But i can't get number of lines after filter applyed from the alv_grid.
Can anybody help me?
Thanks & regards,
KonstantinHi,
If it goes through PBO/PAI cycle after user sets the filter then in your PBO call method get_filtered_entries of CL_GUI_ALV_GRID and then do a describe statement on the table.
Number of entries in your grid table - number of entries in this filtered entries table will give you the displayed entries after the filter is set.
If it does not go through PBO/PAI cycle then register for after_user_command and I think the fcode for filter is '&FILTER' and code for the above logic in your handler method..
Hope this helps..
Sri -
How to get number of rows and columns in a two dimensional array ?
Hello,
What would be the simplest way to get number of rows and columns in a two dimensional array represented as integers ?
I'm looking for another solution as For...Each loop in case of large arrays.
Regards,
PetriHi Petri,
See a attached txt file for obtaining two arrays with upper and lower index values
Regards
Ray
Regards
Ray Farmer
Attachments:
Get2DArrayIndex.txt 2 KB -
How to get number of rows return in SELECT query
i'm very new in java, i have a question:
- How to get number of rows return in SELECT query?
(i use SQL Server 2000 Driver for JDBC and everything are done, i only want to know problems above)
Thanks.make the result set scroll insensitve, do rs.last(), get the row num, and call rs.beforeFirst(), then you can process the result set like you currently do.
String sql = "select * from testing";
PreparedStatement ps =
con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
ResultSet rs = ps.executeQuery();
rs.last();
System.out.println("Row count = " + rs.getRow());
rs.beforeFirst();~Tim
NOTE: Ugly, but does the trick. -
How to get number of pages in word document
I am developing an OCR application where I need to get number of pages of word documents. I am currently assuming that each page consists of 46 lines but some how, I am not getting convinced with this logic. Is there any simplest way to get this information?
Let me tell you that in the OCR system I am converting tiff iamges to .txt file and again reading txt file and counting number of pages based on number of lines.
regards,
RanjanThe number of pages depends on the font size, length of each line and any page break in between.
You could just say, one page per 46 lines, it depends on how accurate you must be.
Why not count the number of pages you scanned? -
How to get Number of Column in Excel file
Hi All,
My requirment is to get Number of Column in Excel file which i want to upload,
so please suggest if there is any possible way to get this functionality.
Thanks
AnirudhUse FM "ALSM_EXCEL_TO_INTERNAL_TABLE".
Adjust the values of i_begin_col & i_end_col parameters in this FM.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME =
I_BEGIN_COL =
I_BEGIN_ROW =
I_END_COL =
I_END_ROW =
TABLES
INTERN =
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 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.
Regards,
BBR. -
How to get number of digits in given amount
Hi Experts,
How to get number of digits in given amount.
Regards
MohitCheck this :
data: v_data1 type p decimals 3 value '12.860',
v_char1 type char20,
v_char2 type char20,
v_char3 type char20,
len type i.
write v_data1 to v_char1.
split v_char1 at '.' into v_char2 v_char3.
len = strlen( v_char3 ).
write:/ v_char2,
/ v_char3, " this holds the digit value
/ len. " number digits -
Function Module for getting Number ranges between two number
Hi guys,
Is there any Function module which provide us the number range between two numbers?
For Ex:If i give 1 and 10 to FM it must give me 1
2
3
4.....upto 10.
is there any FM for doing this,but i'm not able to find exact Fm for same.
I can write small piece of code for getting number ranges, but if i get FM it could save little work.Hi
But why do u need a fm, can't you do it by yourself?
DATA: FROM_NUMBER TYPE I VALUE 1,
TO_NUMBER TYPE I VALUE 15.
DATA: NUMBER TYPE I.
DATA: BEGIN OF T_NUMBER OCCURS 0,
NR TYPE I,
END OF T_NUMBER.
NUMBER = FROM_NUMBER.
DO.
IF NUMBER <= TO_NUMBER.
T_NUMBER-NR = NUMBER.
APPEND T_NUMBER.
ELSE.
EXIT.
ENDIF.
NUMBER = NUMBER + 1.
ENDDO.
LOOP AT T_NUMBER.
WRITE: / T_NUMBER-NR.
ENDLOOP.
Max -
System build-in or system variable to get number of records from a query
Hi,
Is there a system build-in or system variable to get number of records from a Oracle Forms query?
Thank youNamely, when GO_BLOCK(BLOCK_NAME) EXECUTE QUERY finishes, is there a way directly get the number of the records?
SYSTEM.COURSOR_RECORD = 1 tells this is the first record
SYSTEM.LAST_RECORD = 'TRUE' tells this is the last record
Thanks -
Getting Number of hops to a destination
Hi,
I'd be grateful if anyone can please tell me
whether it is possible to get number of hops
to a destination using Java (similar to traceroute).
or Do I need to write my own code for that?
Thanks very much.
BhavinThere's a traceroute app included at http://jswrench.sourceforge.net. It should be straightforward to amend the code for your purposes.
-
Get number of copies from print dialog
Hi All,
I am using javax.print API to display the print dialog, I am also able to successfuly print a document.
My questions is how can get number of copies from the print dialog.
I did log of googling, but no sucess...I have been trying from 1 day.
Please help me.
Thanks in advance.Here is the code: // TODO Auto-generated constructor stub
PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);
PrintService defaultPrinter = PrintServiceLookup.lookupDefaultPrintService();
PrintRequestAttributeSet attrs = new HashPrintRequestAttributeSet();
selection = ServiceUI.printDialog(
null, 100, 100, services, defaultPrinter, null, attrs);
if(selection!=null){
selectedPrinter = selection.getName();
}Now once the printDialog is displayed i want to get the number of copies selected by the user. I tried all different options from Attribute, but not successful.
Please help...
Thanks. -
How i get number of record in repet frame?
Hi,
How i get number of record in repet frame?
Regards
JomarJomar,
you can use Summary Columns in the Data Modell. Create them on group higher that your wished group (so on the pane for an first group of a query), use as Source the primary column and as reset at the group, where the summary column is located.
If you hide some instances via format triggers, that you could use a counter inside the format triggers to count the rows.
Regards
Rainer -
Filter selection for 0TCTQUCOUNT to get number of navigations
In BI statistics, we have a key figure 0TCTQUCOUNT to get the count. can any body tell what are filter selections to get number of navigations in a query.
thanks
kumarHi,
You can use FM rh_struc_get with evaluation path MANASS to see of which organizational unit the manager is manager of.
ANd then either with evaluation path B008 to see who is placeholder of that unit, or with O-O_DOWN to get all the subsequent units.
Regards, Rob Dielemans
Maybe you are looking for
-
Besides buying more storage what can I do to free up space to backup my device.
keep getting messages -out of iCloud storage can't back up phone. Don't to want to buy more storage-what else can I do?
-
StringTokenizer to read multiple lines
I've been struggling to make my program to read multiple lines from the input text input5.txt: -.1 -2.3 -45.678 -90 .1 .23 .45678 .90 1 2.3 4.56 0 and the program will stop reading when it sees 0 in the line. What i got was a nullPointerException, it
-
Forum for SQL Developer and Data Modeler?
I searched now for a while all the available forums but did not found a special forum for the Oracle SQL Developer tool. Where do I post questions about it? Is there another, separate forum for SQL Developer Data Modeler? Peter
-
Errors, time machine wont go more than 15Go
Hi I start time machine the backup begin. Than stop 15,2 Go onthe 133,6 Go it should back up! Il try several thing. 1 reformat the External HD be "Mac OS Extended (Journaled)" and Select GUID 2 redonne the partitionning "Volume Scheme" choose "1 part
-
A thought about awarding points
Hi! If I'm understanding the new system correctly, if I ask a question, and someone gives me some useful assistance, I can essentially award them points... Under the old system, I was able to browse all the discussions, and from time to time, I would