Writeback with 'NA'  and decimal values

Hi All!!!
We are making some tests on the writeback with the BIBeans; we migrated a db from express to 10gR2 and converted it in
standard form and we try the writeback on this aw.
We found some problems when in the worksheet there are one or more 'NA' values to writeback.
In particular when we call the submitChanges method on the crosstab object (like in the BI sample) if there are one or more
'NA' values the submitChanges fails and return false.
We solve this problem implementing the cellSubmitting method and catching the cellSubmittingEvent; in this method we
substitute the values 'null' for the QDR with an "NA" string.
We also found that the decimal values (like 180.4) make the writeback to fail; we think it is due to the fact that the
writeback engine add a '.0' to all the values that we try to writeback so for decimal values we have two character '.'; we
solve this problem with a support's variable for converting the value to a string and pass it to the set data to the QDR to
writeback.
Is this the rigth way?
Is this a bug?
Following We report the code we implementing for this method
public void cellsSubmitting(CellsSubmittingEvent e)
String app;
ArrayList qdrCollection = (ArrayList)e.getQDROverrides();
if (qdrCollection != null)
int iSize = qdrCollection.size();
for (int i =0; i < iSize; i++)
QDRoverride qdrOverride = (QDRoverride)qdrCollection.get(i);
if(qdrOverride.getData()==null)
qdrOverride.setData("NA"); //for the problem with 'NA' values
else
app=qdrOverride.getData().toString(); //for the problem with decimal values
qdrOverride.setData(app);
Hi!
Daniele De Faveri

Thanks for your post, it is great solution and it's work for me. I'm supprised that those oversights are still in bibeans and nobody from Oracle havent answered your question.
Message was edited by:
Moks

Similar Messages

  • How to display integer values and decimal values in same column in a table

    hi 
    in my report amount column is there in that column integer values (2234) and decimal values (3562.34) 
    i want to print this values as 1000 separate as like 2,234 as integer and 3,562.34 as decimal
    but this values print like 2,234.00 as integer and 3,562.34 as decimal

    Hi akilreddy,
    Per my understanding you have an field which data type may be "float" in the DB, so it have value which format like "2234" and "3562.34" in the same column, now you want to format them differently in the report, right?
    I have tested on my local environement and you can use the expression in the custom format in the Textbox properties to do this:
    Right click the field which you want to add the format and select the "Text Box Properties"
    Select the "Number" on the left pane and using expression below in the Custom format:
    =IIF(Split(Fields!yourfieldname.Value,".").Length=2,"#,###.##",Nothing)
    Or you can just use "#,###.##" in the format.
    Preview you will go the result like below:
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Wat should be data type for  negative and decimal values (eg: -1.2222)

    What should be data type for  negative and decimal values (eg: -1.2222)

    Hi
    U can use the data type DEC while creating the DOMAIN and in the domain u  have sign check box at the left corner of the screen, click that check box , u can assign negative values for the field which refers this domain.
    REWARD IF HELPFULL
    Anees.

  • Integer values and decimal values in weblient UI - Display mode

    Hello,
    i have developed an custom assignmentblock with some custom fields.
    Some of this fields are integer values and text values.
    Some other fields are decimal values.
    I face the issue that this decimal values are in display mode  right-aligned all other fields are left-aligned.
    In edit mode all values are right-alligned.
    How can i change this behaviour? All values left-alligned in display mode!
    Otherwise this looks strange.
    Thank you
    Kind regards
    Manfred

    Hi,
    Decimal values will be displayed right-aligned. To change that you need to modify the GET_M method.
    In get_m method, you have to change the attr datatype to string.
    Data: attr type string.
    Data: dref type ref to data.
    Get reference of attr into dref.
    Regards,
    Arun
    Edited by: Arun Kumar on May 14, 2010 3:03 PM

  • Create a Custom BAPI with inputs as Decimal values

    Hello Experts,
    I am new to BAPI creation, my requirment has two decimal inputs(as import parameters) and out output can be a simple add of these two numbers.
    Decimal Input has 9 characters with 7 decimals Ex: 10.0000000. How to create a structure or data type and use the same back in my BAPI.
    What is the ABAP code that, I should write to add these two inputs and export them.
    Please help ASAP, I am in a critcal position.
    Thanks,
    Suma

    Hello Suma,
    This error is caused because you are trying to use a data type rather a data element, it better if you follow the below process
    Start with creating a Structure with ZBAPI name, from SE11
    give a component name with Z and component type with Z and then double click on new component type and this will ask what to generate click on dataelement and enter discription then enter a Z new name in the Domain and double click on it, click on data type and enter DEC, no char 9 and decimal 7 then save activate, clikc on back save activate and again click on back and save activate now your sturcture will be saved. Follow the proces if have new data type or else the same for your next entres.
    For your Req....
    take component ZINPUT1 compenent type ZINPUT with domain as ZZINPUT...
    use the sam for ZINPUT2 and ZOUTPUT and then save activate. Now the structure is created.
    SE37 create new BAPI, In import parameters take parameters as T_INPUT1 and T_INPUT2 with ZBAPI_SUM-ZINPUT1 and ZBAPI_SUM-ZINPUT2.Then in export  if you wnat inputs also in there just give some export names and give the assoated type as what you have used in import, also add OUTPUT and RETURN with ZBAPI_SUM-ZOUTPUT and BAPIRETURN.Now write the source code as follows
    FUNCTION ZBAPI_TESTDEC1.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(T_INPUT1) TYPE  ZBAPI_SUM-ZINPUT OPTIONAL
    *"     VALUE(T_INPUT2) TYPE  ZBAPI_SUM-ZINPUT1 OPTIONAL
    *"  EXPORTING
    *"     VALUE(INPUT1) TYPE  ZBAPI_SUM-ZINPUT
    *"     VALUE(INPUT2) TYPE  ZBAPI_SUM-ZINPUT1
    *"     VALUE(OUTPUT) TYPE  ZBAPI_SUM-ZOUTPUT
    *"     VALUE(RETURN) TYPE  BAPIRETURN
    INPUT1 = T_INPUT1.
    INPUT2 = T_INPUT2.
    OUTPUT = T_INPUT1 + T_INPUT2.
    ENDFUNCTION.
    Now save it and then activate and then clikc on tables tab then functional module on main menu and then relase.
    Go to T-code SWO1 create new Obj with ZBAPI name and then clikc create enter Obj name,Name,Des,Program,and Application has to be * then enter.
    Click on methods,Utilites, API Methods, Add method, Select BAPI Name then contine for 3 times then click BAPI Added in the methods then on edit change relase status- object type To modeled, To impimented and To relased at 3 diff times then follow the same for Object Type component.
    Now click on red and white round button which is similar to BMW symbol. This will generate the BAPI and now you see it in BAPI T-Code.
    Hope this helps you ...
    Reward if helpfull....
    Thanks,
    Srikanth

  • Problems with convertNumber and Double values

    I've serious troubles using convertNumber with Double data in input fields.
    While output formatting works fine, the outputted string fails to be converted back - I get conversion errors.
    So the value that is written to the input field generates a conversion error being submitted! This is not good practice!
    I've found out the following: (I use german locale, so following examples containing ',' means decimal point)
    <f:convertNumber pattern="##0.00" />generates the right output, eg. for Double(20.50) - "20,50", but this value ("20,50") will not be parsed using the above pattern! Only values with non zero last minimum fractional digit (eg "20,51", "20,59", ... ) will be parsed!
    In addition, the above pattern doesn't parse numberstrings that don't contain all significant digits.
    For example an input of "20" will not be parsed to "20.00"!
    Maybe this is not the right forum for that problem, since i think this is a general java formatting problem (?).
    But as the problem arised by using the convertNumber tag and acting like this on numeric input fields is not very comfortable, I liked to post this here. Maybe someone can give me some advice?

    I also have found this problem, except that in my experience it is the decimal part that must be non-zero, not just the last digit of the decimal part. So with a pattern of "0.00" the string "1.50" (one and a half) will be accepted whereas the string "1.00" will not.
    My guess (just a guess) is that it is related to the documented behaviour of the DecimalFormat object when it parses a number. According to the documentation:
    The most economical subclass that can represent the number given by the string is chosen. Most integer values are returned as Long objects, no matter how they are written: "17" and "17.000" both parse to Long(17). Values that cannot fit into a Long are returned as Doubles. This includes values with a fractional part, infinite values, NaN, and the value -0.0. DecimalFormat does not decide whether to return a Double or a Long based on the presence of a decimal separator in the source string. Doing so would prevent integers that overflow the mantissa of a double, such as "10,000,000,000,000,000.00", from being parsed accurately. Currently, the only classes that parse returns are Long and Double, but callers should not rely on this. Callers may use the Number methods doubleValue, longValue, etc., to obtain the type they want.
    Which means that "1.50" will be returned as a Double while "1.00" will be returned as a Long. Perhaps there is then a class-cast exception whie trying to use this value?
    If this is indeed the problem, the solution is to use the getDouble() method of the parsed Number to create the Double to be returned, but this is for the implementer to do - not the user!

  • Union two tables with diffrent count of fields with null and float value

    Hello,
    i want to union two tables, first one with 3 fields and second one with 4 fields (diffrent count of fields).
    I can add null value at end of first select but it does not work with float values in second table. Value form second table is convert to integer.
    For example:
    select null v1 from sessions
    union
    select 0.05 v1 from sessions
    result is set of null and 0 value.
    As workaround i can type:
    select null+0.0 v1 from sessions
    union
    select 0.05 v1 from sessions
    or simple change select's order.
    Is any better/proper way to do this? Can I somehow set float field type in first select?
    Best regards,
    Lukasz.
    WIN XP, MAXDB 7.6.03

    Hi Lukasz,
    in a UNION statement the first statement defines the structure (number, names and types of fields) of the resultset.
    Therefore you have to define a FLOAT field in the first SELECT statement in order to avoid conversion to VARCHAR.
    Be aware that NULL and 0.0 are not the same thus NULL+0.0 does not equal NULL.
    In fact NULL cannot equal to any number or character value at all.
    BTW: you may want to use UNION ALL to avoid the search and removal of duplicates - looks like your datasets won't contain duplicates anyhow...
    Regards,
    Lars

  • Problem with QofQ and Null Values

    Just converted from CF5 to CF7. Finally figured out what was
    causing the error message :
    "The value "" cannot be converted to a number" when running a
    QofQ. It happens whenever there is a NULL (and I think a ZERO)
    value in the QofQ. I'm using the QofQ in a seperate chart program.
    The main query merges data from a store and a region table.
    I'm doing a LEFT OUTER JOIN to combine the REGION with the STORE,
    AND so that stores with NO SALES for a given day will show up as
    ZERO. On the main report, when I don't use a QofQWhen grouping by
    DAY or MONTH, I can test the value in the CFOUTPUT for NULL or ZERO
    and display "0" or "N/A" on the report.
    But when I try to chart it, using a QofQ to read in the
    values from the main query, and format the numbers, I get this
    error message. I've tried using the CAST function, using FLOAT,
    DOUBLE, BIGINT, etc., but still get same error message.
    The only way I could fix this is to add a WHERE statement to
    the QofQ, that only includes sales values greater than ZERO. But
    then, I have gaps in my chart because stores with NO SALES for a
    given day or MONTH don't appear. Because they are removed from the
    query. The whole point of LEFT JOINS is to include items with no
    values (or NULL) values.
    Does anyone know if it's possible to keep these values in a
    QofQ? So that items (e.g., store locations in my case) with NULL or
    ZERO values for some or all days or months can be charted? Even
    with a ZERO value? I've read everything I can get my hands on
    regarding QofQ, the CAST function, etc., but nothing seems to work.
    Thanks for any help. (FYI, didn't have this problem with CF5. It's
    QofQ could handle NULL or ZERO values without providing an error).
    Gary

    Well, I tried the IsNull function on the 3 SUM() values I was
    calculating in my SELECT statement (on a LEFT OUTER JOIN QUERY),
    and I STILL got another "cannot convert "" to a number" but this
    time the error message was more direct, and pointed me to a DATE
    field in my query, where I was SORTING AND GROUPING either by DAY
    or MONTH (depending on what user selected on form).
    In my QofQ, I'm not just reformating the integer SUM()
    values, but also the date values. So, I applied the IsNull()
    function to the DATE values in my main query. I still kept getting
    errors. But after experimenting ((SQL Server BOL docs doesn't give
    ISNULL() examples for DATE FIELDS, only NUMBER fields), I tried
    putting the dates in SINGLE QUOTES in my IsNull() function, the
    QUERY RAN. Then I wasn't sure WHAT date to enter, e.g., 1/1/1889 or
    1/1/2001, etc.
    Then, I discovered, after experimenting, that you cannot just
    blindly enter ANY date when using IsNull in a date field,
    especially if you are using CFGRAPH to chart the results by day.
    You have to select a date within the date range the user selected,
    so this means using the FORM.DATE (or URL.DATE) value from the
    form. Here's the working example from my SELECT main query:
    SELECT SUM(ISNULL(d.ttldb,0)) AS SumOfDB,
    SUM(ISNULL(d.ttldbv,0)) AS SumOfDBV,
    SUM(ISNULL(d.ttldbi,0)) AS SumOfDBI,
    <CFIF '#url.reptype#' IS "DAILY">
    ISNULL(d.depday, '#url.date1#') AS depday
    <CFELSE>
    month(ISNULL(d.depday, '#url.date2#')) AS TranMonth,
    year(ISNULL(d.depday, '#url.date2#')) AS TranYear
    </CFIF>
    Then I discovered that whatever date was used in the URL.DATE
    field (in my case it would be one of the two date field from the
    form, and depended on whether you coded DATE1 or DATE2, the chart
    would always show ZERO values for that date. So I tried putting the
    IsNull() date values in the GROUP BY and ORDER BY statements, e.g.,
    <CFIF '#url.reptype#' IS "DAILY">
    GROUP BY ISNULL(d.depday, '#url.date1#')
    ORDER BY ISNULL(d.depday, '#url.date1#') DESC
    <CFELSE>
    GROUP BY year(ISNULL(d.depday, '#url.date2#')),
    month(ISNULL(d.depday, '#url.date2#'))
    ORDER BY year(ISNULL(d.depday, '#url.date2#')),
    month(ISNULL(d.depday, '#url.date2#'))
    </CFIF>
    And this worked. The report ran just fine, and the chart
    charted every value correctly.
    I guess you have to learn all the little "quirks" about CF7
    and how it's QofQ and chart programs work. But so far, so good.
    Thank you all for your help. Now I've got to update other old
    CF5 programs that are returning errors when there are null values
    from my LEFT OUTER JOIN queries. Will take some time, but at least
    I know how to do it. Thanks to your help.
    I really appreciate your time and efforts to help with this
    issue.
    Gary

  • I am a rookie and need help with max and min values

    Hello all, i am into this intro to java class. my assignment is to write a program that prompts the user for two integers and then prints the sum, difference, average, product , distance (absolute value of the difference) Maximum(largest of the two) and Minimum(smallest fo the two) here is my code so far
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.lang.Math;
    public class Sample4
       public static void main(String[] args) throws IOException
          try // attempt the following
    {           // create the stream to read from
    InputStreamReader istream = new InputStreamReader(System.in);   // create a buffer to hold the stream
    BufferedReader console = new BufferedReader(istream);           // prompt the user
          System.out.println("Enter a number please");              // get input as a string
          String input = console.readLine();                        // convert to an integer
          int num1 = Integer.parseInt(input);
          System.out.println("Enter a number please");              // get input as a string
          String input2 = console.readLine();                       // convert to an integer
          int num2 = Integer.parseInt(input2);
          int sum = num1 + num2;                                    // get the sum of the two inputs
          int difference = num1 - num2;                             // get the difference of the two inputs
          int product = num1 * num2;                                // get the product of the two inputs
          int average = sum / 2;                                    // get the average of the two inputs
          int abs = Math.abs(difference);                           // get the absolute value of the two inputs
              // new section
                 // display the number
          System.out.println("The total sum = " + sum);
          System.out.println("The total difference = " + difference);
           System.out.println("The total product = " + product);
           System.out.println("The total average = " + average);
           System.out.println("The total absolute value = " + abs);
    } // if something breaks, catch the exception
    catch (IOException e)
       System.out.println(e); // displays the exception
       System.exit(1);  // quits the program
    }what will be the right syntax or code to find the MAX and MIN values of two numbers a User Inputs, hope someone can help with this. thank you for your help.

    Thanks alot man, sheesh i do not know why my book
    doesnt give me all the static methods. but i do really
    appreciate your help. peaceA complete list of the java.lang.Math methods can be found at http://java.sun.com/j2se/1.4/docs/api/java/lang/Math.html
    btw,
    max(a, b) == (a > b) ? a : b
    min(a, b) == (a < b) ? a : b

  • Post material master idoc  with class and characteristic values

    Hi,
    I need to post the class and characterstic values of material while posting the material using idoc of basic type matmas05 . Can anyone suggest me the fields and segment details to fill the class, class type and characteristic values in matmas05.
    Note : the class and characteristic values are already created in the system, my purpose is to assign them to material while creating. so please give me the field and segment details in idoc basic type matmas05.
    thanks
    Kiran

    I  try to do the samething. I see the fields E1CUVAL : CU: Characteristic valuation in the structure of MATMAS05 but when I run the IDOC, these fields never appear even they exist for the material.
    Did you find an answer to your question that can help me?

  • Excise Amount with three Digit decimal value

    Dear All,
    I enabled three digit decimal values for sales.
    When I am raising a Excise Invoice through J1I3, two digit only appearing?
    For Ex: Excise amount in sale order is 6897.525 where as in J1I3 transaction, it's showing as 68975.25.
    How to correct this issue?
    Rgds,
    Senni.B

    Dear GSL,
    For Import purchase purpose, client is asking for three digit decimal values. But when we go for excise related transactions, it's taking only two digits of the actual value.
    Is there any settings in CIN to activate three digit decimal?
    Rgds,
    Senni.B

  • O.T. Hair Colour & Skin Tone Charts With Hexadecimal And Decimal Colour Codes

    Two jpg images I keep on my photo folder - perhaps not brilliant but useful. Just save the charts on your local hard drive, open them in your software, sample the color you need, switch to your working picture, and there it is, loaded for painting, filling, or whatever. RGB and Hex values are also included for manual entry.
    Photoshop swatch files are also available for download . Unzip the .aco files into your \Presets\Color Swatches folder. Then click on the arrow in the upper right corner of your swatches palette to access the Load option.
    http://www.retouchpro.com/pages/colors.html
    http://www.retouchpro.com/pages/skintones.jpg
    http://www.retouchpro.com/pages/haircolor.jpg

    What is the best way to sample the color? When I save the charts it simply saves the entire chart and I don't guess I am "sampling" the proper way.

  • Problem with thousands and decimal  separator (Excel 2000)

    Hi, i have a problem with the download option to excel 2000.
    When downloading numbers over 1000 the thousands separators change in decimal separators.
    My config is:
    Locale (location): Español - España
    User Interface Language: Español
    For example, if I have a value as 1800:
    1) in OBIEE show "1.800" (ok)
    2) in Excel 2000 show "1,8" (bad)
    If i choose Locale (location): English - United Stated and
    User interface language Español.
    1) in OBIEE show "1,800" (bad)
    2) in Excel 2000 show "1.800" (ok)
    Can someone help me solve my problem?
    I need to show the same result in OBIEE and Excel, that is, "1.800" with "." not with ",".
    Thanks

    Hi,
    The thousands separator change in the backend dind't work. (+ it only works for text input fields, not for text fields)
    Anyhow, this is how we created a workaround :
    Suppose we did this : <b>NSTR(@CREDITLIMIT,"C.2")</b>
    This resulted in the field being displayed as <i>67,234.56</i>
    The 'dirty' way to convert this to an european format is :
    <b>REPLACE(REPLACE(REPLACE(NSTR(@CREDITLIMIT,"C.2"),",",";"),".",","),";",".")</b>
    Output is <i>67.234,56</i>
    (we just replaced the '.' by ',' and vice versa)
    I still feel quite uncomfortable with this solution, but this is the only way we got it to work.
    I really hope a next patch/servivepack provided a more elegant solution for this problem... (hint hint)

  • Problem with inheritance and outputting values in toString.

    Hey guys, i'm having a major problem with inheritances.
    What i'm trying to do with my program is to create objects in my demo class. Values are passed to several other objects that each do their own calculations of grades and results and then outputs the result in my toString. I followed step by step the instructions in my book on how to setup the inheritance and such. I can only output everything that was created in my superclass, any other thing that was created in an object that belongs to a subclass does not display in the output at all.
    Even if I change or create new instance variables, I can't figure out for the life of myself how to output the other values.
    Because there's so much code to be splitting on the forums, I zipped my whole project in a RAR. I'll link it here
    http://www.4shared.com/file/ZleBitzP/Assign7.html
    The file to run the program is CourseGradesDemo class, everything else is either a subclass or superclass to some part of the program. After you run CourseGradesDemo, you will see the output, and understand what displays and what stays at 0.0 value. If anyone can help me out with this it would be greatly appreciated
    Thanks in advance.

    Basshunter36 wrote:
    Hey guys, i'm having a major problem with inheritances.
    What i'm trying to do with my program is to create objects in my demo class. Values are passed to several other objects that each do their own calculations of grades and results and then outputs the result in my toString. I followed step by step the instructions in my book on how to setup the inheritance and such. I can only output everything that was created in my superclass, any other thing that was created in an object that belongs to a subclass does not display in the output at all.
    Even if I change or create new instance variables, I can't figure out for the life of myself how to output the other values.No idea what you're talking about. Provide an [url http://sscce.org]SSCCE.
    Because there's so much code to be splitting on the forums, I zipped my whole project in a RAR. I'll link it here
    http://www.4shared.com/file/ZleBitzP/Assign7.html
    Not gonna happen. Provide an [url http://sscce.org]SSCCE. And don't say you can't. You definitely can. You may have to spend an hour building a new program from scratch and getting it to reproduce the problem, but if you can't or won't do that, you'll find few people here willing to bother with it.

  • Problem with dg4msql and table-valued functions

    Have configured dg4msql to connect from my oracle db to ms sql server.
    Am able to do simple SELECTs from ms sql tables like:
    select * from "sys"."procedures"@dg4msql;
    or
    select * from "dbo"."SomeTable"@dg4msql;
    But am unable to do a SELECT from a table-valued function:
    select * from "dbo"."GetData"@dg4msql('param1value');
    or
    select * from "dbo"."GetData"('param1value')@dg4msql;
    In both cases I get:
    ORA-00933: SQL command not properly ended
    It does not like the parameters portion of the query ("('param1value')")
    initdg4msql.ora:
    HS_FDS_CONNECT_INFO=[svr1]//mydb
    HS_FDS_TRACE_LEVEL=OFF
    HS_FDS_PROC_IS_FUNCT=TRUE
    HS_FDS_RESULTSET_SUPPORT=TRUE
    Have tried the other set of params:
    HS_FDS_PROC_IS_FUNCT=FALSE
    HS_FDS_RESULTSET_SUPPORT=TRUE
    Same story. After changing the init*** file have bounced both Listeners (DB and Gateway), reconnected, and re-run the query.
    Have I missed something?
    Any help is greatly appreciated!

    Sorry, but for me it looks you did not get the problem.
    Oracle® Database Gateway for SQL Server User's Guide,:
    11g Release 2 (11.2)
    Part Number E12069-02
    *2 SQL Server Gateway Features and Restriction*
    Result Sets and Stored Procedures
    The Oracle Database Gateway for SQL Server provides support for stored procedures which return result sets.
    By default, all stored procedures and functions do not return a result set to the user. To enable result sets, set the HS_FDS_RESULTSET_SUPPORT parameter value to TRUE.
    PL/SQL Program Fetching from Result Sets in Sequential Mode
    -- Execute procedure
    out_arg := null;
    refcurproc@MSQL('Hello World', out_arg, rc1);
    Somewhere in this forum I've seen a message that the syntax "SELECT ... FROM sp@db(param1, param2)" works.
    Anyway, even with the PL/SQL block the error message is the same - ORA-00933 "SQL command not properly ended"
    and the cursor (* in SQL*PLUS) is put just at the first bracket.
    Edited by: user636213 on Aug 10, 2012 5:17 AM

Maybe you are looking for