ABAP Character Data Type Multiplication Issue difference in ITG vs Dev Environments.

Hello Folks,
My problem is very simple but hey I have tried everything and dont know why I have an issue and what is the possible solution. Let me create the scenario:-
SAP Dev Box:
data: prctg type char15.
prctg = '0.065'.
prctg = prctg * 100000.
i see prctg value to be: 6500. Which is good.
SAP ITG Box:
data: prctg type char15.
prctg = '0.065'.
prctg = prctg * 100000.
i see prctg value to be: 65000. Which is absurd and wrong!!!!
Question: How can 2 environments behave differently? What is the solution to have the same result as the DEV Box using a reliable method please.
Thanks alot!!!! Yet I have had no one resolve this issue for me in my workplace so I came here desparately!!
Salman

Hi,
It's to do with deactivated 'Fixed point arithmetic' in V61A, where FV64A301 is ultimately included, I believe:
My guess is that in the system, where it is working, someone has activated 'Fixed point arithmetic' in V61A via repair or otherwise.
You can verify if the issue is inactive Fixed point arithmetic, by reproducing (inactivating it in Program attributes) in your test program.
Are you coding your business logic directly in enhancement implementations? If yes, why don't you modularize your business logic in, say, a class method? Or at least a custom Function module? :| Define some kind of interface (I don't mean ABAP OO Interface, but interface in general - what SAP data you need to pass, what data you need to return or change), and encapsulate your logic in a separate procedure, which you then can call from Enhancement implementation...
Just because you see too many to count lazy SAP programmers programming ridiculous "naked" (not modularized) enhancement implementations in the middle of existing Function modules and other modularization units, doesn't mean it's a good thing to do... It makes original code more unreadable than it already was and what if you or someone else needs to reuse that business logic...? And as added benefit, you'll encounter less galling issues like this...
cheers
Jānis

Similar Messages

  • JCO reading abap RAW data type (truncating?)

    Does anyone have experience reading an Abap RAW data type using JCO?  I am trying to read a GUID (via RFC_READ_TABLE) that is defined as RAW length 16.  When I view this field in SAP GUI, I see 32 characters.  However, when I read this field using JCO, I only see the first 16 characters. 
    The mapping documents state Abap RAW maps to a Java byte array.  I have tried that - no luck.  I have used the constructor of a string that takes a byte array - no luck.  I have made sure my character set is UTF-8 in case Unicode was a possibility.  I have turned on tracing to level 8 and only see 16 characters in the output.  I need the other 16 characters as all 32 characters are used as the primary key into other tables.
    I also posted this on the ABAP Java Development space.  I know the rule about not cross-posting, but I wasn't sure which was a better place to post something like this.  This my first post on here, so my apologies in advance.
    Larry

    Thanks for responding.  Unfortunately, the export parameter list is null. There are no export parameters.  However, there are tables.  I have tried:
    byte[] byteArray = funct.getTableParameterList().getTable("DATA").getByteArray(0);
    My SE16 query only returns one field: GUID.
    I only get 16 bytes back even though GUID is defined as raw length 32.
    Is there something I else I should try?  Do you see an error in my code?
    Thanks again,
    Larry

  • As to the data type of the data type of the difference between two date type of datas

    Hi,
    I have a question about the data type of the difference between two date type of datas.
    There are two date type of datas as:
    SSHIPMENTS.RECEIVEDATETIME
    SSHIPMENTS.PROMISEDATETIME
    I try to use the following SQL Script in Oracle SQL*Plus as:
    SELECT CASE
    WHEN (SSHIPMENTS.RECEIVEDATETIME - SSHIPMENTS.PROMISEDATETIME) < '000 01:00:00.000' THEN 'OnTime'
    WHEN (SSHIPMENTS.RECEIVEDATETIME - SSHIPMENTS.PROMISEDATETIME) < '000 01:30:00.000' THEN '60-89 Minutes'
    ELSE '3+ Hours'
    END
    FROM SSHIPMENTS;
    The error message of "Invalid Number" for the '000 01:30:00.000' happens.
    I don't know if the data type of the interval is wrong.
    Many Thanks,
    Cathy

    SELECT CASE
    WHEN (to_char(SSHIPMENTS.RECEIVEDATETIME,'hhmiss') - to_char(SSHIPMENTS.PROMISEDATETIME,'hh24miss')) < '010000' THEN 'OnTime'
    WHEN (to_char(SSHIPMENTS.RECEIVEDATETIME,'hhmiss') - to_char(SSHIPMENTS.PROMISEDATETIME,'hh24miss'))< '000 01:30:00.000' THEN '60-89 Minutes'
    ELSE '3+ Hours'
    END
    FROM SSHIPMENTS;
    just try it out..

  • Space removed from character data type when move to internal table issue...

    Hi Friends,
                        I converted material code and other details into internal table which have corresponding data types.But in internal table,I can see material code as left justified ,but after that space was removed.For example if material code is 'ABC' then rest of the space(material char(18)) are removed.But I need remaining spaces.I tried to concatenate material  code with spaces (caoncatenate matnr `        ` int etc .. )at right side and moved to another internal table.Its working.But the problem is material codes have different values like one material 'ABC' and another like '123893-h' etc.So I need to calculate the space(out of char 18) dynamiclly and need to put space based on material code value.
    << Moderator message - Everyone's problem is important >>
    .Thank you all..
    Regards,
    Kumaran..
    Edited by: Rob Burbank on Oct 26, 2010 11:18 AM

    Hi Ramkumaran,
    You have not told the purpose of having these spaces.
    is it for transfering to a file?
    If that is the case, use a table with fixed lenght lines instead of many fields.
    i.e. try something like this
    DATA : i_tab type standard table of BUSDATA,
    wa_tab type BUSDATA.
    wa_tab+0(10) = material number.
    wa_tab+10(10) = material code.
    wa_tab+20(4) = company code...
    append wa_tab to i_tab.
    Thanks
    Vimal

  • Abap 4 data type

    Hye Friends,
    Can u tell me when to use C data type and when to use N datatype??
    apart from character and numeric character what are the more differences between these two??
    Thnks in advance.
    Sunny

    Data consists of strings of bytes in the memory area of the program. A string of related bytes is called a field. Each field has an identity (a name) and a data type. All programming languages have a concept that describes how the contents of a field are interpreted according to the data type.
    In the ABAP type concept, fields are called data objects. Each data object is an instance of an abstract data type. Data types in ABAP are not just attributes of fields, but can be defined in their own right. There are separate name spaces for data objects and data types. This means that a name can at the same time be the name of a data object as well as the name of a data type.
    Data Types:
    As well as occurring as attributes of a data object, data types can also be defined independently. The definition of a user-defined data type is based on a set of predefined elementary data types. You can define data types either locally in the declaration part of a program (using the TYPES statement) or globally in the ABAP Dictionary. You can use your own data types to declare data objects or to check the types of parameters in generic operations.
    Data types can be divided into elementary, reference, and complex types
    Kishi.

  • Convert from String data type to Character data type

    Hi...,
    I'm a beginner. I try to make a program. But I don't know how to convert from string to data type. I try to make a calculator with GUI window. And when somebody put "+" to one of the window, I just want to convert it to Character instead of String.
    Sorry of my bad english..
    Please help me....
    Thanks

    String s = "a+b";
    char theplus = s.charAt(1);

  • Data type conversion issues between Oracle and SQL Server

    Hi there, I am using Heterogeneous Services to insert into a SQL Server database. I am running into an issue between data types regarding Oracle's VARCHAR2 and trying to insert that into a SQL Server MONEY data type. I tried using the TO_NUMBER() function to convert my VARCHAR2 to a number, but that didn't seem to help.
    Does anyone have any advice on how to work around this??
    Thanks for any help,
    ivalum21

    ORA-02047: cannot join the distributed transaction in progress
    ORA-06512: at "MY_PACKAGE_NAME", line 263
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC]DRV_Execute: DB_ODBC_ENGINE (1645): ;
    [Microsoft][ODBC SQL Server Driver][SQL Server]Disallowed implicit conversion
    from data type varchar to data type money, table 'tableA',
    column 'total_amount'. Use the CONVERT function to run this query. (SQL
    State: 37000; SQL Code: 260)
    ORA-02063: preceding 2 lines from SQLSERVER_LINK
    ORA-06512: at "RCDTPUMP.CAMPUSCALL_DATAPUMP_UNI", line 875
    ORA-06512: at "RCDTPUMP.CAMPUSCALL_DATAPUMP_UNI", line 791
    ORA-06512: at "RCDTPUMP.CAMPUSCALL_DATAPUMP_UNI", line 1156
    ORA-06512: at line 1
    That is what I get when I take out the TO_NUMBER()
    Message was edited by:
    ivalum21

  • Report - Want to know the maximum length of a character Data Type.

    Hello,
           I have to print some details which is having more than 500 characters. Is it possible to create a variable or workarea with more than 256 characters? Please help me. Its very urgent.
    My actual requirement is to pass this workarea to smartform and print. So the data should be in one work area.
    Regards,
    LIJO

    Hi,
    U can declare the variable of required length for eg.1000 characters like this
    DATA: w_data(1000) TYPE c.
    If u r not sure of how much length u will be getting then better declare the variable with data type string .
    DATA: w_data TYPE string.
    Hope this clarified ur doubt.
    thanks,
    Vinod.

  • Comparing two GUID of ABAP raw data type in Web Dynpro

    Hello,
    I am working with a CRM application. I want to fill a table with each column from different tables.
    For that I am trying to compare the GUID of each table. But I am not successful as the GUID is of RAW data type. How can I compare them in Web Dynpro Java?.
    Thanks,
    Sunita.

    Hi,
    I have been able to get rid of the problem posed in my earlier mail about assigning values from a field symbol to an internal table. Now its back to the same old problem.
    As mentioned earlier I have a view1 in which I am populating a range (select option), which I want to display on the next view, view2.
    On view1, on click of the button, I have populated internal table I_RANGE2.
    DATA: IT_RANGE2 TYPE TABLE OF ZTTRANGE.
    ZTTRANGE is a table type in SE11 with linetype as ZRANGE (structure in SE11).
    I want to pass I_RANGE2 to the method in the component controller:
    WD_COMP_CONTROLLER->HOLD_DATA( CHANGING IT_RANGE = IT_RANGE2 ).
    In the component controller the parameter IT_RANGE has been declared as
    PARAMETER             TYPE                REFTo             Associated Type
    IT_RANGE                 Changing              u221A (Tick)                ZTTRANGE
    But I am getting an error:
    IT_RANGE2 is not type-compatible with formal parameter IT_RANGE.
    Please help resolve this error.
    Mick

  • Demantra - Create New Series - Mdp_matrix - Data Type String Issue

    I created a new series (MDP_matrix) that has the data type as String. The display format is BLANK.
    I was able to load the data into mdp_matrix table for the series i created.
    However, when i look at the series in a worksheet, it does not display the string value. It display zero. for some reason, it considers the series as numeric and not string. Any idea why that would be happening?
    This is on version 7.2 using SQL server/tomcat

    Hi
    1. Have you tried giving display format i.e ###?
    2. Is your server expression something like max (mdp_matrix. column_name)?
    Tks
    MJ

  • Character data type not accepting name

    Hi all! i have declared a characteristic object as "CHAR". But when i have given input as "ram" it is throwing the error "special characters not allowed". I have not given any special character. Can somebody help me out in this issue?

    In BI system use t-code RSKC then you get screen with Permitted extra characters then enter ALL_CAPITAL then click on execute button. You can allowed characters in the table RSALLOWEDCHAR.
    It seems your problem is you are loading small case letters into your infoobject. By default characteristic does not allow lower case letters, to allow lowercase letters--- open the characteristic --- In general tab -
    check the ckeckbox for Lowercase letters.

  • Date and multiple issues

    hey everyone,
    I have a strange issue in iphoto 5. occasionally, when i import photos, it places some of them way back in 2001! they still come up at the right date if i search using the calendar, and the date is right in the info pane, and they are filed in the right folder in the finder. but, when i view my whole library by date, some of my recent photos are up a the beginning of the library in 2001. any suggestions?
    perhaps unrelated, but also odd, a number of my recent photos also have 2 thumbnails in the library. if i try to delete one of them, they both go away! its not a big deal, but nevertheless annoying.
    any suggestions?
    thanks
    jason

    hey everyone,
    I have a strange issue in iphoto 5. occasionally, when i import photos, it places some of them way back in 2001! they still come up at the right date if i search using the calendar, and the date is right in the info pane, and they are filed in the right folder in the finder. but, when i view my whole library by date, some of my recent photos are up a the beginning of the library in 2001. any suggestions?
    perhaps unrelated, but also odd, a number of my recent photos also have 2 thumbnails in the library. if i try to delete one of them, they both go away! its not a big deal, but nevertheless annoying.
    any suggestions?
    thanks
    jason

  • Data type conversion issue

    Trying make the parent-child hierarchy to work, where all the keys in the dimension table and parent-child closure table are RAW ( VARBINARY(16) in admin tool)
    In BI Answer, when parent-child logical dimension is used with the fact table, got the following error message:
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 46035] Datatype(VARBINARY) nullable(0) unicode(1) external char(0) conversion to datatype(VARCHAR) nullable(0) unicode(1) external char(0) is not supported. (HY000)
    SQL Issued: SELECT 0 s_0, "Chargeback"."Target Instance"."Target Name" s_1, CASE WHEN ISLEAF("Chargeback"."Target Instance"."H51 Target Instance") THEN 1 ELSE 0 END s_2, IDOF("Chargeback"."Target Instance"."H51 Target Instance") s_3, PARENT("Chargeback"."Target Instance"."H51 Target Instance") s_4, "Chargeback"."Base Facts"."Charge" s_5 FROM "Chargeback" WHERE ISROOT("Chargeback"."Target Instance"."H51 Target Instance")
    Two questions:
    1. The column with the conversion problem is not listed in the error message. How to find out the column with the problem?
    2. The SQL listed is not the final text send over to database. How to find out the actual query send over to the database? (Tried EM console, and searched for trace message for bi server, but could not find it there)

    Srix, thanks for the reply.
    The query is generated by the tool, so it takes some understanding of the internals to make it work. By 'casting the column' do you mean changing the datatypes in the RPD file? If yes, change on the logical table metadata or the physical table metadata? ?

  • Difference between Data Type Char & VarChar

    Hi Experts,
    I a design document that I have, some of the Data Types are mentioned as CHAR(e.g.CHAR(4)), and a few others as VARCHAR(e.g.VARCHAR(20)), can you let me know what is the difference between the two.And how is such an object to be developed in BW seeing that we don't have a DataType called Varchar in BW?
    Thanks
    Aravind

    Hi
    The char is a fixed-length character data type, the varchar is a variable-length character data type.
    Because char is a fixed-length data type, the storage size of the char value is equal to the maximum size for this column. Because varchar is a variable-length data type, the storage size of the varchar value is the actual length of the data entered, not the maximum size for this column.
    You can use char when the data entries in a column are expected to be the same size.
    You can use varchar when the data entries in a column are expected to vary considerably in size.
    but that is no need in SAP BW, any how you are going to assign the length of the variable while creating...
    Thanks
    M Kalpana

  • Invalid data type conversions

    what are the invalid data type conversions in ABAP ???
    Moderator message: please search for available information/documentation.
    Edited by: Thomas Zloch on Mar 10, 2012 6:01 PM

    No Amanda,
    The values that I see in message monitor are also those that comes to XSLT programs as input.
    I investigated our problem a little further myself:
    1) XI always converts messages into XML format - this everybody knows.
    2) In XI documentation it is declared that XI uses ISO 8601 for DATE type formatting. That's why you see dates in format YYYY-MM-DD in XML data in message monitoring.
    3) The appearance of those decimal values are not that obvious for me. If XI uses ABAP transformation for message content then applies the rules for converting ABAP data types into XML. For this there is a SAP document 'ABAP - XML mapping' from TechEd2004. This document seems to describe how ABAP data types are handled by XML transformation.
    Anyway, we currently need to play with decimal values in XSLT mapping programs inside XI:
    a) add leading 0 integer if source value < 1
    RFC returns 0.123 -> XI converts to XML '.123' -> XSLT mapper should return '0.123' ->SOAP response returns '0.123'
    b) add decimal point and trailing zeros
    RFC returns 0.000 -> XI converts to XML '0' -> XSLT mapper should return '0.000' ->SOAP response return '0.000'
    With dates, the problem is actually on documenting mapping rules when writing interface specifications. If you would write an EAI-solution-independent conversion rule (RFC/date->SOAP/char) for date field it could sound like: YYYYMMDD -> dd.mm.yyyy. This works semantically between these systems but would not work for XI-developer, because he get YYYY-MM-DD from the RFC.
    Additionally the decimal type conversion requirements in XSLT mapping programs probably only applies XI and are therefore not reusable in other EAI environments.
    I would be glad if somebody would still have further comments for this data type conversion issue.
    br: Kimmo

Maybe you are looking for

  • Is it possible to open up an excel file inside a Web Browser not IE?

    I'm trying to find out if it is possible to open up a pivot excel file inside the a web browser, but i don't want to use Internet Explorer for that i'd prefer firefox for that. I have a web application that uses an excel file for one of its reports b

  • Is it possible to buy iPhone 4 without a simlock

    Hi I am from Turkey and will be visiting USA. Im thinking of buying an iPhone 4 without a contract as its much cheaper there(about 1/3 of the price of here). But as far as i read on the internet even if you buy without a contract the phones come with

  • Command link display wrong

    I have a table with a commandLink nested into a column. command link display itemID. When I click the commandLink , it will take me to the item edit page(ADF Dialog). ** The problem is, Sometime I click first item in the table, command link switch to

  • How do I print from PSE9 to Acrobat Standard X?

    I have a new computer with Windows 7 and PSE 9 and Acrobat Standard X. I have no problems editing and printing pictures out on my HP 7410.  However when I attempt to print a pdf it says its doing it (but I do not see the normal Adobe logo going round

  • Permission error when WebLogic Server starts up

    Dear WebLogic gurus When I try to startup WebLogic server with 80 listening port in Solaris 2.6, it did not startup due to permission problem. The error log said that Sat Dec 11 06:11:02 GMT 1999:<E> <ListenThread> **** Unable to create server socket