Output with comma as delimiter

I do have the same problem.
Any help ??

Sorry
I was refering to the earlier posting be Suneel.
I want to generate excel format of my report. I did it using Delimited option but it was not same as it appears in my browser if I choose html format.all the labels repeat with each instance of the row . Can you please give me the proper Solution.How should I proceed?
Thanks & Regds.
Suneel
null

Similar Messages

  • 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.r

    quote:
    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

  • Setting DESFORMAT parameter with Comma as delimiter

    Hi Gurus,
    I have a report in which i set the DESFORMAT to Delimited and whenever i generate the output, it is a tab separated file. The reason is that the default delimiter is Tab. How can i set Comma as the delimiter for that report. I don't want to change it for all the reports, means i don't want to change any of the environment variablr. I want this change only for this report.
    Thanks in advance
    Manish

    I haven't had personal experience with it,
    but the reference docs say that DELIMITER
    is a possible option to RWBLD60 as well.
    (Only for DESFORMAT=delimited.)
    Also, the built-in-help says that if you
    select file->generate-to-file->delimited,
    you'll get a dialog box for options, one of
    which is the delimiter. Tried it, seems to
    work. Doesn't like Unicode, which is one of
    the reasons I don't use DELIMITED...
    -- Allan Plumb

  • Currency with comma separator

    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

  • Help with formatting multiline output into comma delimited ordered output

    I have 2 tables:
    SQL> desc table_1;
    Name Null? Type
    ===================================
    ID NOT NULL NUMBER
    DATA1 NOT NULL VARCHAR2(440)
    DATA2 NOT NULL VARCHAR2(1024)
    SQL> desc table_2;
    Name Null? Type
    ===================================
    ID NOT NULL NUMBER
    ATTNAME NOT NULL VARCHAR2(255)
    ATTVAL                          VARCHAR2 (4000)
    DATA1 NOT NULL CHAR(1)
    DATA2                          VARCHAR2 (2000)
    DATA3                          VARCHAR2 (255)
    I need to get ATTVAL from where e.g. ATTNAME=att_name1 to ATTNAME=att_name6 from every entry (with its unique ID), and format the output into comma delimited format in e.g. this order:
    att_val1,att_val3,att_val6,att_val4,att_val5,att_val6
    So e.g. for entry with ID "9812" from the query below, the output I need would be:
    187,179,156,134,1436,1809
    What I've got so far is as follows:
    SQL> SELECT id,attname,attval FROM table_2 WHERE id in (SELECT id from table_1 WHERE data2='xxx')
    AND attname in ('att_name1','att_name3','att_name6','att_name4','att_name5','att_name6');
    ID               ATTNAME               ATTVAL
    ===============================
    1970 att_name1 123
    1970 att_name2 abc
    1970 att_name3 1234
    1970 att_name4 def
    1970 att_name5 1134
    1970 att_name6 ghj
    9812 att_name4 134
    9812 att_name5 1436
    9812 att_name3 156
    9812 att_name1 187
    9812 att_name2 179
    9812 att_name6 1809
    77 att_name1 1980
    77 att_name5 1867
    77 att_name3 174
    77 att_name4 1345
    77 att_name2 1345
    77 att_name6 1345
    but I don't know how to format the output comma limited in certain order. (or if this is the best way of getting the data out)
    Would someone have idea how this could be done?

    846954 wrote:
    Thanks Frank!
    I got much further now :).
    I've got Oracle 10g So I used the "SYS_CONNECT_BY_PATH" for my query.
    Now I get the output in the format I want, however, it comes out in the order that the attributes are (which is pretty random).The values you posted are in order: 'attval1' < 'attval2' < ...
    So I'm using this now(had to use "|" as separator because SYS_CONNECT_BY_PATH would not work with comma due to some of the attval having comma in them ):The values you posted don't contain and commas.
    You're hiding what the problem is. It would really help if you posted actual data. It always helps if you post CREATE TABLE and INSERT statements for a little sample data, and the results you want from that data.
    Assuming you really have something that has to be in a certain order, and that order is not based on anything in the values themselves, then DECODE might be a good way to do it. Storing the sort value in a table might be even better.
    It looks like you were using an Oracle 9 exanple. In Oracle 10, using SYS_CONNECT_BY_PATH is simpler:
    SELECT     id
    ,     LTRIM ( SYS_CONNECT_BY_PATH (attval, '|')
               , '|'
               )          AS attvals
    FROM     (
              SELECT     id
              ,     attval
              ,     ROW_NUMBER () OVER ( PARTITION BY  id
                                  ORDER BY          DECODE (...)
                                )     AS curr
              WHERE     id     IN (
                             SELECT  id
                             FROM     table_1
                             WHERE     data2     = 'xxx'
              AND     attname     IN ('attname1','attname2','attname3','attname4','attname5','attname6')
    WHERE     CONNECT_BY_ISLEAF     = 1
    START WITH     curr     = 1
    CONNECT BY     curr     = PRIOR curr + 1
         AND     id     = PRIOR id
    ;You don't need two almost-identical ROW_NUMBERs; one will do just fine.

  • How to store a file in application server with comma as a delimiter !!

    <i>Hi,
       I'm Creating a file in app. server using "open dataset" statment and populating the file using Transfer stmt.
    I like to store the data fields with comma delimiter, since it normally fixed length.
    Please let me know Any method available.
    Thank You,
    Senthil</i>

    No problem,  just concatenate all your fields into one field separated by a comma.  Then transfer that field only.
    data: your_dataset type localfile default '/usr/sap/TST/SYS/Data1.txt'.
    data: output type string.
    open dataset your_dataset for output in text mode.
    loop at itab.
      concatenate itab-fld1
                  itab-fld2
                  itab-fld3
                       into output separated by ','.
      transfer output to your_dataset.
    endloop.
    close dataset your_dataset.
    REgards,
    Rich Heilman

  • Combining rows with comma delimited

    Hi All,
    I have two tables
    Table A
    ID Location ID
    1 6
    2 7
    1 9
    2 10
    3 7
    1 8
    2 9
    Table B
    ID
    1
    2
    3
    49
    8
    6
    I have to come up with something like this for each ID in table B, I have to write a query to get
    ID Location ID
    1 6, 9, 8
    2 7, 10, 9
    so for each Id I need to grab there Location Id and concatenate them with comma.
    How can I acheive this. Is it possible to avoid loops in this case?
    Anye help will be apprecaited.

    with a as (
               select 1 id,6 location_id from dual union all
               select 2,7 from dual union all
               select 1,9 from dual union all
               select 2,10 from dual union all
               select 3,7 from dual union all
               select 1,8 from dual union all
               select 2,9 from dual
         b as (
               select 1 id from dual union all
               select 2 from dual union all
               select 3 from dual union all
               select 49 from dual union all
               select 8 from dual union all
               select 6 from dual
    -- end of on-the-fly data sample
    select  id,
            rtrim(xmlagg(xmlelement(e,location_id,',').extract('//text()') order by rn),',') location_id_list
      from  (
             select  a.id,
                     a.location_id,
                     row_number() over(partition by a.id order by a.location_id) rn
               from  a,
                     b
               where b.id = a.id
      group by id
            ID LOCATION_ID_LIST
             1 6,8,9
             2 7,9,10
             3 7
    3 rows selected.
    SQL> SY.

  • Excel output (with graphics)

    Hello,
    I am using Oracle reports 10g 1.2.0 version.
    We need to generate oracle reports in Excel format ("real" Excel, not delimited text) with tabular data and
    also graphics.
    I used desformat=spreasheet. But is is giving only one worksheet.
    I've found the "Output to Excel with Oracle9i Reports"
    demo but the Excel template in the demo is very simple and doesn't have graphics.
    Then I've found the following:
    http://otn.oracle.com/products/reports/htdocs/getstart/examples/excel_output/result/excel.jpg
    a) The above site has excel output with multiple worksheets.
    which is similar to what we need but I wasn't able to find related source (excel_emp.jsp).
    b) Using jsp if we can ahieve multiple worksheets with grapahics, please provide us examples.
    c) http://www.oracle.com/technology/products/reports/htdocs/getstart/demonstrations/excel/index.html --This site is not working to find the demo.
    Could you please help me in this?
    Thank you for any help.

    carla,
    the example you mentioned uses the JSP web source that is only available in oracle9i reports.
    in theory you can create any excel output. it is just a matter of creating the template and then adding the reports tags to populate it with data.
    you could then use reports' URL engine to produce files from this output.
    there are certainly ways to do it, but they are only available in oracle9i reports (9.0.2 and higher)
    regards,
    philipp

  • How to create a String with comma ?

    Hi All,
    I have a table with 10 records(employee name) and i have to make a string
    with comma delimiter and at the end with "."
    Can anybody tell me how to write a Java program for this ?
    Thanks in advance.

    // I believe the following example gives you the answer.
    class stringEG {
         public static void main(String args[]) {
         String emprs[] ={"1","2","3","4","5","6","7","8","9","10"};
         String vempname = "";
         for(int i=0; i<emprs.length; i++) {
         if(i == (emprs.length-1))
              vempname = vempname + emprs[i] + ".";
         else
              vempname = vempname + emprs[i] + ", ";
         System.out.println("vempname : "+vempname);
    Here dont assume that I asked you to get all the results and putting
    it into the string arrays. But its a simple example to suit your requirement.
    The half-way coding below answers your question, I hope.
    vempname = "";
    while (emprs.next()) {
    if(emprs.isLast())
    vempname = vempname + emprs.getString("empname") + ".";
    else
    vempname = vempname + emprs.getString("empname") + ", ";
    // nats.

  • Separating number in inputext with comma

    hi all
    I need to separate numbers with comma without using Enter .
    I have an input text and used an clientListner on it : code is bellow
      <f:view>
        <af:document id="d1">  
         <af:resource type="javascript" source="/js/accounting.js"/>
         <af:resource type="javascript" source="/js/functions.js"/>
         <!--<af:resource type="javascript" source="/js/accounting.min.js"/>-->
          <af:form id="f1">
    <af:panelGroupLayout id="pgl1">
    <af:inputText label="Label 1" id="it1">
    <af:clientListener method="formatNum" type="keyUp"/>
    </af:inputText>
            </af:panelGroupLayout>
          </af:form>
        </af:document>
      </f:view>
    I run this JavaScript on HTML page that is OK and my input text show separated number during entering ,
    but I run my above jspx page ,it does not show until press the Enter key ...
    please guide me .... I have an emergency condition please answer me soon
    and then use this function for handling...
    function.js :
    function formatNum(evt) {
        var inputfield = evt.getSource();
        var num = accounting.unformat(inputfield.getValue());
        var formatNum = accounting.formatNumber(num);
        inputfield.setValue(formatNum);
        return true;
    accounting.js
    * accounting.js v0.3.2
    * Copyright 2011, Joss Crowcroft
    * Freely distributable under the MIT license.
    * Portions of accounting.js are inspired or borrowed from underscore.js
    * Full details and documentation:
    * http://josscrowcroft.github.com/accounting.js/
    (function(root, undefined) {
    /* --- Setup --- */
    // Create the local library object, to be exported or referenced globally later
    var lib = {};
    // Current version
    lib.version = '0.3.2';
    /* --- Exposed settings --- */
    // The library's settings configuration object. Contains default parameters for
    // currency and number formatting
    lib.settings = {
    currency: {
    symbol : "$", // default currency symbol is '$'
    format : "%s%v", // controls output: %s = symbol, %v = value (can be object, see docs)
    decimal : ".", // decimal point separator
    thousand : ",", // thousands separator
    precision : 2, // decimal places
    grouping : 3 // digit grouping (not implemented yet)
    number: {
    precision : 0, // default precision on numbers is 0
    grouping : 3, // digit grouping (not implemented yet)
    thousand : ",",
    decimal : "."
    /* --- Internal Helper Methods --- */
    // Store reference to possibly-available ECMAScript 5 methods for later
    var nativeMap = Array.prototype.map,
    nativeIsArray = Array.isArray,
    toString = Object.prototype.toString;
    * Tests whether supplied parameter is a string
    * from underscore.js
    function isString(obj) {
    return !!(obj === '' || (obj && obj.charCodeAt && obj.substr));
    * Tests whether supplied parameter is a string
    * from underscore.js, delegates to ECMA5's native Array.isArray
    function isArray(obj) {
    return nativeIsArray ? nativeIsArray(obj) : toString.call(obj) === '[object Array]';
    * Tests whether supplied parameter is a true object
    function isObject(obj) {
    return obj && toString.call(obj) === '[object Object]';
    * Extends an object with a defaults object, similar to underscore's _.defaults
    * Used for abstracting parameter handling from API methods
    function defaults(object, defs) {
    var key;
    object = object || {};
    defs = defs || {};
    // Iterate over object non-prototype properties:
    for (key in defs) {
    if (defs.hasOwnProperty(key)) {
    // Replace values with defaults only if undefined (allow empty/zero values):
    if (object[key] == null) object[key] = defs[key];
    return object;
    * Implementation of `Array.map()` for iteration loops
    * Returns a new Array as a result of calling `iterator` on each array value.
    * Defers to native Array.map if available
    function map(obj, iterator, context) {
    var results = [], i, j;
    if (!obj) return results;
    // Use native .map method if it exists:
    if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
    // Fallback for native .map:
    for (i = 0, j = obj.length; i < j; i++ ) {
    results[i] = iterator.call(context, obj[i], i, obj);
    return results;
    * Check and normalise the value of precision (must be positive integer)
    function checkPrecision(val, base) {
    val = Math.round(Math.abs(val));
    return isNaN(val)? base : val;
    * Parses a format string or object and returns format obj for use in rendering
    * `format` is either a string with the default (positive) format, or object
    * containing `pos` (required), `neg` and `zero` values (or a function returning
    * either a string or object)
    * Either string or format.pos must contain "%v" (value) to be valid
    function checkCurrencyFormat(format) {
    var defaults = lib.settings.currency.format;
    // Allow function as format parameter (should return string or object):
    if ( typeof format === "function" ) format = format();
    // Format can be a string, in which case `value` ("%v") must be present:
    if ( isString( format ) && format.match("%v") ) {
    // Create and return positive, negative and zero formats:
    return {
    pos : format,
    neg : format.replace("-", "").replace("%v", "-%v"),
    zero : format
    // If no format, or object is missing valid positive value, use defaults:
    } else if ( !format || !format.pos || !format.pos.match("%v") ) {
    // If defaults is a string, casts it to an object for faster checking next time:
    return ( !isString( defaults ) ) ? defaults : lib.settings.currency.format = {
    pos : defaults,
    neg : defaults.replace("%v", "-%v"),
    zero : defaults
    // Otherwise, assume format was fine:
    return format;
    /* --- API Methods --- */
    * Takes a string/array of strings, removes all formatting/cruft and returns the raw float value
    * alias: accounting.`parse(string)`
    * Decimal must be included in the regular expression to match floats (defaults to
    * accounting.settings.number.decimal), so if the number uses a non-standard decimal
    * separator, provide it as the second argument.
    * Also matches bracketed negatives (eg. "$ (1.99)" => -1.99)
    * Doesn't throw any errors (`NaN`s become 0) but this may change in future
    var unformat = lib.unformat = lib.parse = function(value, decimal) {
    // Recursively unformat arrays:
    if (isArray(value)) {
    return map(value, function(val) {
    return unformat(val, decimal);
    // Fails silently (need decent errors):
    value = value || 0;
    // Return the value as-is if it's already a number:
    if (typeof value === "number") return value;
    // Default decimal point comes from settings, but could be set to eg. "," in opts:
    decimal = decimal || lib.settings.number.decimal;
    // Build regex to strip out everything except digits, decimal point and minus sign:
    var regex = new RegExp("[^0-9-" + decimal + "]", ["g"]),
    unformatted = parseFloat(
    ("" + value)
    .replace(/\((.*)\)/, "-$1") // replace bracketed values with negatives
    .replace(regex, '')         // strip out any cruft
    .replace(decimal, '.')      // make sure decimal point is standard
    // This will fail silently which may cause trouble, let's wait and see:
    return !isNaN(unformatted) ? unformatted : 0;
    * Implementation of toFixed() that treats floats more like decimals
    * Fixes binary rounding issues (eg. (0.615).toFixed(2) === "0.61") that present
    * problems for accounting- and finance-related software.
    var toFixed = lib.toFixed = function(value, precision) {
    precision = checkPrecision(precision, lib.settings.number.precision);
    var power = Math.pow(10, precision);
    // Multiply up by precision, round accurately, then divide and use native toFixed():
    return (Math.round(lib.unformat(value) * power) / power).toFixed(precision);
    * Format a number, with comma-separated thousands and custom precision/decimal places
    * Localise by overriding the precision and thousand / decimal separators
    * 2nd parameter `precision` can be an object matching `settings.number`
    var formatNumber = lib.formatNumber = function(number, precision, thousand, decimal) {
      // Resursively format arrays:
    if (isArray(number)) {
    return map(number, function(val) {
    return formatNumber(val, precision, thousand, decimal);
    // Clean up number:
    number = unformat(number);
    // Build options object from second param (if object) or all params, extending defaults:
    var opts = defaults(
    (isObject(precision) ? precision : {
    precision : precision,
    thousand : thousand,
    decimal : decimal
    lib.settings.number
    // Clean up precision
    usePrecision = checkPrecision(opts.precision),
    // Do some calc:
    negative = number < 0 ? "-" : "",
    base = parseInt(toFixed(Math.abs(number || 0), usePrecision), 10) + "",
    mod = base.length > 3 ? base.length % 3 : 0;
    // Format the number:
    return negative + (mod ? base.substr(0, mod) + opts.thousand : "") + base.substr(mod).replace(/(\d{3})(?=\d)/g, "$1" + opts.thousand) + (usePrecision ? opts.decimal + toFixed(Math.abs(number), usePrecision).split('.')[1] : "");
    * Format a number into currency
    * Usage: accounting.formatMoney(number, symbol, precision, thousandsSep, decimalSep, format)
    * defaults: (0, "$", 2, ",", ".", "%s%v")
    * Localise by overriding the symbol, precision, thousand / decimal separators and format
    * Second param can be an object matching `settings.currency` which is the easiest way.
    * To do: tidy up the parameters
    var formatMoney = lib.formatMoney = function(number, symbol, precision, thousand, decimal, format) {
    // Resursively format arrays:
    if (isArray(number)) {
    return map(number, function(val){
    return formatMoney(val, symbol, precision, thousand, decimal, format);
    // Clean up number:
    number = unformat(number);
    // Build options object from second param (if object) or all params, extending defaults:
    var opts = defaults(
    (isObject(symbol) ? symbol : {
    symbol : symbol,
    precision : precision,
    thousand : thousand,
    decimal : decimal,
    format : format
    lib.settings.currency
    // Check format (returns object with pos, neg and zero):
    formats = checkCurrencyFormat(opts.format),
    // Choose which format to use for this value:
    useFormat = number > 0 ? formats.pos : number < 0 ? formats.neg : formats.zero;
    // Return with currency symbol added:
    return useFormat.replace('%s', opts.symbol).replace('%v', formatNumber(Math.abs(number), checkPrecision(opts.precision), opts.thousand, opts.decimal));
    * Format a list of numbers into an accounting column, padding with whitespace
    * to line up currency symbols, thousand separators and decimals places
    * List should be an array of numbers
    * Second parameter can be an object containing keys that match the params
    * Returns array of accouting-formatted number strings of same length
    * NB: `white-space:pre` CSS rule is required on the list container to prevent
    * browsers from collapsing the whitespace in the output strings.
    lib.formatColumn = function(list, symbol, precision, thousand, decimal, format) {
    if (!list) return [];
    // Build options object from second param (if object) or all params, extending defaults:
    var opts = defaults(
    (isObject(symbol) ? symbol : {
    symbol : symbol,
    precision : precision,
    thousand : thousand,
    decimal : decimal,
    format : format
    lib.settings.currency
    // Check format (returns object with pos, neg and zero), only need pos for now:
    formats = checkCurrencyFormat(opts.format),
    // Whether to pad at start of string or after currency symbol:
    padAfterSymbol = formats.pos.indexOf("%s") < formats.pos.indexOf("%v") ? true : false,
    // Store value for the length of the longest string in the column:
    maxLength = 0,
    // Format the list according to options, store the length of the longest string:
    formatted = map(list, function(val, i) {
    if (isArray(val)) {
    // Recursively format columns if list is a multi-dimensional array:
    return lib.formatColumn(val, opts);
    } else {
    // Clean up the value
    val = unformat(val);
    // Choose which format to use for this value (pos, neg or zero):
    var useFormat = val > 0 ? formats.pos : val < 0 ? formats.neg : formats.zero,
    // Format this value, push into formatted list and save the length:
    fVal = useFormat.replace('%s', opts.symbol).replace('%v', formatNumber(Math.abs(val), checkPrecision(opts.precision), opts.thousand, opts.decimal));
    if (fVal.length > maxLength) maxLength = fVal.length;
    return fVal;
    // Pad each number in the list and send back the column of numbers:
    return map(formatted, function(val, i) {
    // Only if this is a string (not a nested array, which would have already been padded):
    if (isString(val) && val.length < maxLength) {
    // Depending on symbol position, pad after symbol or at index 0:
    return padAfterSymbol ? val.replace(opts.symbol, opts.symbol+(new Array(maxLength - val.length + 1).join(" "))) : (new Array(maxLength - val.length + 1).join(" ")) + val;
    return val;
    /* --- Module Definition --- */
    // Export accounting for CommonJS. If being loaded as an AMD module, define it as such.
    // Otherwise, just add `accounting` to the global object
    if (typeof exports !== 'undefined') {
    if (typeof module !== 'undefined' && module.exports) {
    exports = module.exports = lib;
    exports.accounting = lib;
    } else if (typeof define === 'function' && define.amd) {
    // Return the library as an AMD module:
    define([], function() {
    return lib;
    } else {
    // Use accounting.noConflict to restore `accounting` back to its original value.
    // Returns a reference to the library's `accounting` object;
    // e.g. `var numbers = accounting.noConflict();`
    lib.noConflict = (function(oldAccounting) {
    return function() {
    // Reset the value of the root's `accounting` variable:
    root.accounting = oldAccounting;
    // Delete the noConflict method:
    lib.noConflict = undefined;
    // Return reference to the library to re-assign it:
    return lib;
    })(root.accounting);
    // Declare `fx` on the root (global/window) object:
    root['accounting'] = lib;
    // Root will be `window` in browser or `global` on the server:
    }(this));

    hi all
    I have an input text that I want to separate it's value with comma
    this is my input text :
    <af:inputText value="#{bindings.LacreditAmt.inputValue}"
    label="#{bindings.LacreditAmt.hints.label}"
    required="#{bindings.LacreditAmt.hints.mandatory}"
    columns="#{bindings.LacreditAmt.hints.displayWidth}"
    shortDesc="#{bindings.LacreditAmt.hints.tooltip}"
    id="it8"
    maximumLength="#{bindings.LacreditAmt.hints.precision}"
    converter="converter.BIGDECIMALMONEYCONVERTER"
    clientComponent="true">
    <f:validator binding="#{bindings.LacreditAmt.validator}"/>
    <!--<af:convertNumber groupingUsed="false"
    pattern="#{bindings.LacreditAmt.format}"/>-->
    <af:clientListener method="handleNumberFormatConversion" type="keyUp"/>
    </af:inputText>
    and use this  java Script for comma separated value :
    problem is : when I used firebug for testing this java Script ,everything is OK and 'result' variable shown
    the correct value (comma separated value) but in fact the correct value did not show
    in input text  !!!!!
    please guide me soon.
    I appreciated in advance
    function handleNumberFormatConversion(evt){
            var inputField = evt.getCurrentTarget();
            var keyPressed = evt.getKeyCode();
            var oldValue = inputField.getSubmittedValue();
            var validKeys = new Array(48,49,50,51,52,53,54,55, 56,57,96,97,98,99,100, 101,102,103,104,105,AdfKeyStroke.ARROWRIGHT_KEY, AdfKeyStroke.ARROWLEFT_KEY, AdfKeyStroke.BACKSPACE_KEY, AdfKeyStroke.DELETE_KEY, AdfKeyStroke.END_KEY, AdfKeyStroke.ESC_KEY, AdfKeyStroke.TAB_KEY);
            var numberKeys = new Array(48,49,50,51,52,53,54,55, 56,57,96,97,98,99,100, 101,102,103,104,105, AdfKeyStroke.BACKSPACE_KEY, AdfKeyStroke.DELETE_KEY);
            var isValidKey = false;
            for (var i=0; i < validKeys.length; ++i){
                if (validKeys[i] == keyPressed) {
                    isValidKey = true;
                    break;
            if(isValidKey){
                    var isNumberKey = false;
                for (var n=0; n < numberKeys.length; ++n){
                    if(numberKeys[n] == keyPressed){
                        isNumberKey = true;
                        break;
                if(isNumberKey){
                    var formatLength = 25;
                    if(formatLength == oldValue.length){
                        inputField.setValue(oldValue);
                        evt.cancel();
                    else {
                        var firstNeg = false;
                        var lastNeg = false;
                        if (oldValue.charAt(0) == '(')
                            firstNeg = true;
                        if(oldValue.contains(')')){
                          lastNeg = true;                              
                        oldValue = oldValue.replace('(', "");
                        oldValue = oldValue.replace(')', "");
                        var result = "";
                        while (oldValue.contains(",")) {
                            oldValue = oldValue.replace(",", "");
                        for (i = oldValue.length - 3;i > 0;i -= 3) {
                            result = ",".concat(oldValue.substring(i, i + 3), result);
                        result = oldValue.substring(0, (oldValue.length % 3 == 0) ? 3 : oldValue.length % 3).concat(result);
                        if (firstNeg)
                            result = '(' + result;
                        if (lastNeg) {
                            result = result + ')';
                        inputField.setValue(result);
                        evt.cancel();
                        return true;                   
            else {
                inputField.setValue(oldValue);
                evt.cancel();

  • Currency field to be displayed with commas and asterisks(formatting)

    I have a field REGUH-RWBTR in my sap script code. I need to have the currency displayed with commas. And also if the digits are less, then left pad it with asterisks for remaining spaces.
    For eg, If the Digit is 12345678912.23 (max value), it should print as 12345,678,912.23.
    And If the digit is 12345.89, it should print as ******12,345.89
    Please help me to solve this problem.Its urgent.
    Thanks,
    Sandeep.

    Hello,
    You can use the WRITE using EDIT MASK.
    USING { {NO EDIT MASK}|{EDIT MASK mask} }
    Effect
    This addition overrides a conversion routine defined through reference to the ABAP Dictionary. The addition NO EDIT MASK only switches off the execution of an assigned conversion routine. The addition EDIT MASK calls either another conversion routine or defines an edit mask. For mask, a data object of the same name is expected.
    In order to call an arbitrary conversion routine CONV, mask must contain two equals signs, followed directly by the name of the conversion routine: "==CONV". During output, the content of dobj is passed to the function module CONVERSION_EXIT_CONV_OUTPUT, converted there, and then the result is displayed. If the function module is not found, an exception that can be handled is triggered (as of Release 6.10). The statement DESCRIBE FIELD contains an addition in order to fill mask accordingly.
    If the output length is specified explicitly with len, the conversion routine is executed for the specified length; otherwise for the implicit output length. If * or ** is specified for the output length, the appropriate rules are used for the converted result.
    If the first two characters in mask are not equals signs, the content is interpreted as an edit mask in which some characters have a particular meaning. The WRITE statement does not then output the content of dobj directly, but the character string in mask as follows:
    If the first two characters in mask are "LL" or "RR ", these are not output, They control whether the edit mask is left-justified or right-justified. If the first two characters are other characters, the edit mask is left-justified.
    All "_" characters are replaced from the left (in the case of "LL") or from the right (in the case of "RR") with characters for character-type types or numbers for the types p or i from dobj. In the case of fields of type c, closing blanks are ignored. Data objects of type f or x are converted into type c before editing. Superfluous characters "_" in mask are replaced by blanks. Characters from dobj for which there are no characters "_" in mask are not displayed.
    If dobj is of type i or p, the first character from the left "V" in mask is replaced with "-" in the case of a negative number and by blank in the case of a positive number.
    All the other characters of the edit mask are displayed unchanged.
    If no output length is specified, the implicit output length of dobj is used. If len is specified for the output length, the value of len is used. If * is specified for the output length, exactly that length that is required for the list display is set. If, in Unicode systems, characters of the edit mask are replaced by characters that take up more than one column on the list, the output length is increased accordingly and the output is filled with blanks in the list buffer. If ** is specified for the output length, double the length of the edit mask mask is used.
    If other formatting options are specified concurrently for an edit mask, these are used first and then the special characters in the edit mask are replaced by the interim result. The date masks date_mask are an exception to this. If these are specified, the edit mask is ignored.
    Notes
    In Unicode systems, you must remember that a character "_"in the edit mask does not necessarily correspond to a column in the list display since the space required in the display depends on the character to be replaced.
    The minus sign for a negative number is not displayed if no edit character "V" is specified. The decimal separator of a packed number with decimal places must be specified at the required position in the edit mask.
    Example
    Edited output of time duration. In the first output, the function module CONVERSION_EXIT_DURA_OUTPUT is executed. This converts the duration specified in seconds into minutes. In the second output, the edit mask is output according to the above rules. However, the underscore characters "_" are replaced by the characters from time.
    DATA: dura TYPE i,
          time TYPE t VALUE '080000'.
    dura = sy-uzeit - time.
    time = dura.
    WRITE /(30) dura USING EDIT MASK '==SDURA'.
    WRITE /(30) time USING EDIT MASK
                           'RRThe duration is __:__:__'.
    Regards,

  • Unable to Load CSV file with comma inside the column(Sql Server 2008)

    Hi,
    I am not able load an CSV file with Comma inside a column. 
    Here is sample File:(First row contain the column names)
    _id,qp,c
    "1","[ ""0"", ""0"", ""0"" ]","helloworld"
    "1","[ ""0"", ""0"", ""0"" ]","helloworld"
    When i specify the Text Qualifier as "(Double quotes) it work in SQL Server 2012, where as fail in the SQL Server 2008, complaining with error:
    TITLE: Microsoft Visual Studio
    The preview sample contains embedded text qualifiers ("). The flat file parser does not support embedding text qualifiers in data. Parsing columns that contain data with text qualifiers will fail at run time.
    BUTTONS:
    OK
    I need to do this in sql server 2008 R2 with Service pack 2, my build version is 10.50.1600.1.
    Can someone let me know it is possible in do the same way it is handle in SQL Server 2012?
    Or
    It got resolved in any successive Cumulative update after 10.50.1600.1?
    Regards Harsh

    Hello,
    If you have CSV with double quotes inside double quotes and with SSIS 2008, I suggest:
    in your data flow you use a script transformation component as Source, then define the ouput columns id signed int, Gp unicode string and C unicode string. e.g. Ouput 0 output colmuns
    Id - four-byte signed
    gp - unicode string
    cc - unicode string
    Do not use a flat file connection, but use a user variable in which you store the name of the flat file (this could be inside a for each file loop).
    The user variable is supplied as a a readonly variable argument to the script component in your dataflow.
    In the script component inMain.CreateNewOutputRows use a System.IO.Streamreader with the user variable name to read the file and use the outputbuffer addrow method to add each line to the output of the script component.
    Between the ReadLine instraction and the addrow instruction you have to add your code to extract the 3 column values.
    public override void CreateNewOutputRows()
    Add rows by calling the AddRow method on the member variable named "<Output Name>Buffer".
    For example, call MyOutputBuffer.AddRow() if your output was named "MyOutput".
    string line;
    System.IO.StreamReader file = new System.IO.StreamReader( Variables.CsvFilename);
    while ((line = file.ReadLine()) != null)
    System.Windows.Forms.MessageBox.Show(line);
    if (line.StartsWith("_id,qp,c") != true) //skip header line
    Output0Buffer.AddRow();
    string[] mydata = Yourlineconversionher(line);
    Output0Buffer.Id = Convert.ToInt32(mydata[0]);
    Output0Buffer.gp = mydata[1];
    Output0Buffer.cc = mydata[2];
    file.Close();
    Jan D'Hondt - SQL server BI development

  • How to upload .csv file with tab as delimiter.

    HI,
    I want to upload a .csv file with tab as delimiter to unix path in background.                                                                                                             
    I know there is function module 'GUI_UPLOAD', but in my case data is available in an internal table .
    upload the *.CSV :
    OPEN DATASET lv_filename
             FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
        IF sy-subrc = 0.
      *     Write  file records into file on application server
          LOOP AT gt_datatab INTO gs_datatab.
            TRANSFER gs_datatab TO lv_filename.
          ENDLOOP.
    CLOSE DATASET lv_filename.

    Bhanu,
    Define a local variable of type CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
    LV_TAB TYPE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
    LOOP AT  GT_DATATAB INTO GS_DATATAB.
    CONCATENATE GS_DATATAB-FIELD1
                             GS_DATATAB-FIELD2
                             GS_DATATAB-FIELDN
                             INTO LV_STRING SEPARATED BY LV_TAB.
    TRANSFER LV_STRING TO lv_filename.
    ENDLOOP.
    Thanks,
    Vikram.M

  • Issue using Comma as Delimiter for SelectManyChoice

    Hi,
    Jdeveloper version 11.1.1.6 .
    I have implemented this simple usecase which is not working. Create a VO in Model and expose it through AM . Now drag and drop ViewObject as SelectManyChoice.
    Run the page...
    It runs perfectly fine. When you select more than one value in selectManyChoice , they are shown in the inputField with a delimiter ";" [ semicolon ]. I have a requirement to change it to comma "," .
    So there is a property delimiter in ListBinding in pageDef. I tried modifying that property to #{','} and page stopped loading.
    How to specify your custom delimiter in SelectManyChoice component    ?
    Thanks,
    Rajdeep

    Hi Frank,
    So I assume this requirement then is for cosmetic reasons?
    You are correct that requirement is for cosmetic change.
    As far as I know changing the delimiter is not possible ( I checked the skinning docs and no resource String is provided).
    So what is the delimiter property for ? .. is it there for future enhancement or does something.
    Note that he actual value is returned as an array of index or object (dependent on how you implemented this)
    My implementation is simple . I just drag and drop a VO as select many choice. And tried to place comma in delimiter property of the ListBinding created in pageDef.
    Thanks,
    Rajdeep

  • Data Merge, description field data with comma in text

    I work with Data Merge, but my description field data have comma in text, occurring a problem when load to Indesign, when i exclud de field description with comma the action occur perfectly. Have solunction to this?

    Hi Peter, i dont have problems with =concatenate on excel, and i think who you formula is wrong. i use exactly =CONCATENAR(A2&","&B2&","&C2) and works perfectly.
    My problem is with commas in texts, see comma B2
    indesign recognizes it as the delimiter and wraps the text to another field, ok?
    i use quotes  eg: B2( "Dias melhores, para sempre")  to delimiter text like the example
    when I load the data source InDesign does not recognize the quotes and breaks lines
    the text  "Dias melhores, para sempre" have to show on <<slogan>> but

Maybe you are looking for

  • How to install Windows 8.1 on Haswell Mac?

    Just bought the 15" Haswell Macbook Pro Retina and I'm trying to install Windows 8.1. I'm relatively new to Mac so the instructions that I found didn't really make sense to me and seemed like they were skipping steps. My school gave me the downloadab

  • Alternative Access Mapping not working "You're not connected to a network"

    Hi *, i want to set up alternate access mapping in my sharepoint 2013 development environment. My SharePoint is reachable through http://sp2013. I created a second web application with listens on port 8080. When i open http://sp2013:8080 everything w

  • Using ios 7.0.4 but i want ios 6's music player back!

    hello there. i just bought an ipod touch 5th generation a week ago. i love music and i collect all the albums of artists i like. i bought my ipod primarily to use as an mp3 player. i'm so obsessed with mp3 tags, covers and lyrics. I behave them like

  • Same results appear regardless of search query - Office 365

    Hi, I am currently experiencing an issue with search. Whenever I search, the same results appear regardless of the search term I used. they even appear in the same order. I could type, "policy", "test" or "sadfasdfasdfvdfb" and the same results would

  • Web Dynpro ABAP to trigger workflow

    Hi, I have made a WD Application, where users are typing in free text. I want the application to trigger a workflow (probably using FM SAP_WAPI_START_WORKFLOW) and then passing the text along to workflow inbox. How can this be done? Br, Sonni