Decimal Conversion! Urgent
Hello,
I need to read a file *.txt that have a field with the value '1230'.
In my program i need to convert these field to a similar one like '12.30'
Is there a easy way to do that or do i need to use concatenate?
Thanks in advance.
Best regards.
data : cdat(10) type c value '1230',
final type p decimals 2.
final = cdat / 100.
write:/ final.
check this.
do the operation in ur itab with the same ,
hope this helps ..
regards,
vijay
Message was edited by:
Vijay
Similar Messages
-
Decimal Conversion Error During Export
Hi All
We are migrating our production system from HP-UX to SOLARIS and Informix to Oracle.
During the export phase for the process SAPAPPL1 terminates with error :
DbSl Trace: Error in decimal conversion. Length: 5, Decimals: 0
(EXP) ERROR: DbSlExeRead: rc = 2, table "S011"
(SQL error 0)
error message returned by DbSl:
I am not able to get hold of it.
Kindly help, if someone has experience on the same.
Regards
RahulHi Rahul,
What is your kernel release? Please confirm that you are in latest kernel and using the latest version of R3load.
Regards,
Satyabrat -
Last field not shown in MONI if its empty during content conversion-urgent
Hi All,
I have my input structure like
<RECORDSET>
<EMPLOYEE>
<FIRSTNAME>
<LASTNAME>
<PHONENUMBER>
</EMPLOYEE>
</RECORDSET>
I have given my sender Conversion parameters like
Employee.fieldSeparator=*
Employee.endSeparator='nl'
Employee.fieldNames=FIRSTNAME,LASTNAME,PHONENUMBER
It is working fine.But if the value is empty for any of the field it is showing up with empty tag in MONI but for the Last field i.e.,PHONENUMBER if the value is empty the tag is not being shown in MONI. Please help me in this issue.It is very urgent.Hi Dinakar,
I haven't tried but u can check these parameters and give it a try
<b>NameA.missingLastfields</b>
If the inbound structure has less fields than specified in the configuration then the XML outbound structure is created as follows:
○ ignore
Outbound structure only contains the fields in the inbound structure
○ add
Outbound structure contains all fields from the configuration; the fields missing in the inbound structure are empty.
○ error
Conversion is terminated due to the incomplete inbound structure. An error message is displayed.
● <b> NameA.additionalLastFields</b>
If the inbound structure has more fields than specified in the configuration then the XML outbound structure is created as follows:
○ ignore
Outbound structure only contains the fields in the inbound structure
○ error
Conversion is terminated due to the incomplete inbound structure. An error message is displayed.
The default value is ignore. If you have defined the NameA.fieldFixedLengths parameter, the default value is error.
<b>NameA.lastFieldsOptional</b> (obsolete)
You use this parameter to specify whether the last fields can be omitted (YES) or not (NO) in a comma-separated structure.
If you do not make an entry, the default value is NO.
Check for details:
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm
Sachin -
Currency Decimal Places - Urgent
Hi all of you..
When earlier stage in my project , client has not told us to change the decimal places in Foreign Currency - USD.
Now client is asking to change the decimal places for 4 digits..
( Earlier 2 decimals )
Now in Global settings t.code OY06 , we are trying to change for 4 decimals , but system is changing the entire existed transaction values regd USD as for 4 decimals , data inconsistency is coming.
Is there any procedure to change the decimal places from now onwards...
Or else is there any procedure to get 4 decimals in PO..
Plss help me it is very urgent to me ..we are trying to shoot from 10 days..
Thanks & Regards
RamkiPlease read OSS note 434349 - Change of decimal places of currencies
it has instructions for your case -
hi,
i have been trying to do this.
'Let the user populate field with a value with 2 decimals but make always the conversion for the record
If a currency is managed with 3 decimals, apply rule of around with the top or with the lower. For example, 11.555 become 11.56 and 11.554 become 11.55.
If a currency is managed without decimal, apply the same rule. For example 11.49 become 11 and 11.50 become 12.
This conversion rules are use for the display and the record function of ZVA02N and ZVA02
Other currencies must work as today. For user, the modification have to be invisible when he use standard currencies with 2 decimals.
the problem is i am unable to do so.
can someone help me on this.<b>case 1.</b>
DATA: FLD(8) TYPE P DECIMALS 3 value '11.555',
final(8) type c,
DEC TYPE I.
DESCRIBE FIELD FLD DECIMALS DEC.
write:/ dec.
if dec = 3.
write fld decimals 2 to final. "check here
endif.
write:/ final.
<b>case2.</b>
DATA: FLD1(8) TYPE P DECIMALS 2 value '11.50',
final1(8) type c,
DEC1 TYPE I.
DESCRIBE FIELD FLD1 DECIMALS DEC1.
if dec1 = 2.
write fld1 decimals 0 to final1. "check here
endif.
write:/ final1.
regards,
vijay -
Hexadecimal to decimal conversion help needed
hi all
i need to know if there exists a method to convert a hexadecimal number to a decimal number
If so please let me know which class to refer
As a sample to make it more clear
i will be reading a hexadecimal number from a file and want to convert it into decimal number before entering it into Data Base
Thanking in anticipation ofrepliesi = Integer.parseInt("3ff", 16); this will parse to the decimal
the resulting i will be 1023
i think u get me
regards
shanu
[email protected] -
Decimal conversion of Sales Tax in 'SPARE PARTS SALE INVOICE' ( smart form)
Hello,
I am displaying a the value of the Sales Taxc in 'SPARE PARTS SALE INVOICE'. (in Smart Form)
The field(which holds the Sales Tax value is 'KWERT' -LBBIL_INVOICE-IT_KOND ), with datatype 'CURR', reference table 'KOMK' and reference field 'WAERK'.
In my smart form,i have declared a variable 'SALES_VALUE' of datatype 'KWERT' and reference field 'IT_PRICE-WAERK' (LBBIL_INVOICE-IT_PRICE), where 'WAERK' is the SD document currency.
Now when i display the field 'SALES_VALUE' i get 735.00 , whereas the original value in the field is 73.5
how to correct this and where am i wrong ?
Thankyou for yur time and really appreciate the help.
ShehryarYou are using currency fields that reference a currency code. Most currencies in SAP have two decimal places. Dividing by 100 will work in most cases. Ideally you should get the CURRDEC value in table TCURX for the currency you are working with... then divide by 10 that number of times.
example-
USD, 2 decimals, divide by 10 twice.
There is a function module that will do this for you. Can't think of the name...??? -
CHARACTER TO DECIMAL Conversion
hi all ,
i get data from a flat file for one column i am getting
65900
650
754399
for eg : 65900
i should insert into table as 659.00
for : 754399
i should insert into table as 7543.99
The last two digits should be separated i cant change the datatype ..it is now character .i want to load decimal data
if i get 65 only i hav to load 65.00
THANKS IN ADVANCE..You aren't going to load information as 659.00 into the database - that's a format issue. You just load it as 659.
Here's a quick example of how you can do it using CASE:
with t as (
select 65900 num1 from dual UNION ALL
select 650 num1 from dual UNION ALL
select 754399 num1 from dual
select case
when num1 < 1000 then to_number(num1)
when num1 < 10000 then to_number(num1/10)
else to_number(num1/100)
end actual_num
from t;
ACTUAL_NUM
659
650
7543.99
3 rows selectedYou will have to modify the case statement to reflect the exact logic you want - I was just taking a guess there. -
Currency Decimal Points - Urgent
Hi,
I am facing a serious problem with currency decimal points. Unfortunately "Currency code" has been deleted from where we can maintain currency decimal points in OY04 Tcode and the currency code was maintained by zero decimal places. Before deleting the Currency from decimal points the document currency was showing $1000.00 which is correct. But after deleting Currency Code from OY04 Tcode the same amount is showing $100000 by combining decimals.
I have again given same Currency Code in same transaction code. But still it is showing ($100000) the amount by combing the decimals.
Please help me
Thanks
RavindraYou said someone "unfortunately" deleted an entry from table TCURX. Has that someone seen all the following WARNINGS given by SAP!!!
In a productive system, you must not delete the currencies in use or change the decimal places. This could make amounts in documents already posted incorrect or invalid.
Before you continue, please read the following text carefully. If you do not heed this note, you can cause irreparable damage to the system with this transacton. In the R/3 System tables currency fields are stored as decimal figures with a variable number of decimal places. The decimal point is not stored in the field in the database. Instead, each currency field refers to a currency key field. In this transaction you assign the number of decimal places to this currency key uniquely. Example: If you have set currency USD to have two decimal places and you post an amount of 100 USD, an amount of 10000 USD is stored in the currency field in the database. Not until this amount is processed further or is output does the system use the currency key from the reference field to determine the number of decimal places via this table. In this way the table content can be interpreted correctly for further processing or formatted for output with the correct punctuation. If after posting you changed the number of decimal places for USD, for example, to 3, the existing field content of 10000 would be interpreted for futher processing or output as 10 USD (10.000). This would mean that the contents of tables across the system would, for all currency fields containing an amount in USD, be interpreted incorrectly by 10 per cent. To
change the number of decimal places for a currency already in use, you must convert all the tables in the R/3 System that contain
currency fields, so that the data integrity remains. This cannot, however, for both organizational reasons and under the runtime aspect be carried out in a productive system. The following changes to the TCURX table can thus lead to the loss of data integrity if you
make the changes in a productive system or transport them into a productive system:
o Change to the number of decimal places of an existing currency
o Deletion of an entry from the TCURX table (corresponds to changing the decimal places to the standard value of two decimal places)
o Insertion of an entry in the TCURX (corresponds to changing the standard value of 2 decimal places to a different value), if this is a currency code that already exists Uncritical changes are any made to this table during the Customizing of a new installation or the insertion of TCURX even during operations, if the currency codes have just been entered in the TCURC table using transaction OY03, signifying that no postings to these currency codes can have been carried out yet.
Do you want to change the decimal places despite all recommendations? -
Hi friends,
can any one send the commom errors in unicode conversion project?Hi ,
Hope it will help you,
The Link will be helpful to you.
Re: Upgrade 4.6 to ECC - What are the responsibilites
regarding Unicode influence in Standard programs
Very good document:
http://www.doag.org/pub/docs/sig/sap/2004-03/Buhlinger_Maxi_Version.pdf
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d37d1ad9-0b01-0010-ed9f-bc3222312dd8
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/589d18d9-0b01-0010-ac8a-8a22852061a2
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f8e316d9-0b01-0010-8e95-829a58c1511a
You need to use the transaction UCCHECK.
The report documentation is here
ABAP Unicode Scan Tool UCCHECK
You can use transaction UCCHECK to examine a Unicode program set for syntax errors without having to set the program attribute "Unicode checks active" for every individual program. From the list of Unicode syntax errors, you can go directly to the affected programs and remove the errors. It is also possible to automatically create transport requests and set the Unicode program attribute for a program set.
Some application-specific checks, which draw your attention to program points that are not Unicode-compatible, are also integrated.
Selection of Objects:
The program objects can be selected according to object name, object type, author (TADIR), package, and original system. For the Unicode syntax check, only object types for which an independent syntax check can be carried out are appropriate. The following object types are possibilities:
PROG Report
CLAS Class
FUGR Function groups
FUGX Function group (with customer include, customer area)
FUGS Function group (with customer include, SAP area)
LDBA Logical Database
CNTX Context
TYPE Type pool
INTF Interface
Only Examine Programs with Non-Activated Unicode Flag
By default, the system only displays program objects that have not yet set the Unicode attribute. If you want to use UCCHECK to process program objects that have already set the attribute, you can deactivate this option.
Only Objects with TADIR Entry
By default, the system only displays program objects with a TADIR entry. If you want to examine programs that don't have a TADIR entry, for example locally generated programs without a package, you can deactivate this option.
Exclude Packages $*
By default, the system does not display program objects that are in a local, non-transportable package. If you want to examine programs that are in such a package, you can deactivate this option.
Display Modified SAP Programs Also
By default, SAP programs are not checked in customer systems. If you also want to check SAP programs that were modified in a customer system (see transaction SE95), you can activate this option.
Maximum Number of Programs:
To avoid timeouts or unexpectedly long waiting times, the maximum number of program objects is preset to 50. If you want to examine more objects, you must increase the maximum number or run a SAMT scan (general program set processing). The latter also has the advantage that the data is stored persistently. Proceed as follows:
Call transaction SAMT
Create task with program RSUNISCAN_FINAL, subroutine SAMT_SEARCH
For further information refer to documentation for transaction SAMT.
Displaying Points that Cannot Be Analyzed Statically
If you choose this option, you get an overview of the program points, where a static check for Unicode syntax errors is not possible. This can be the case if, for example, parameters or field symbols are not typed or you are accessing a field or structure with variable length/offset. At these points the system only tests at runtime whether the code is sufficient for the stricter Unicode tests. If possible, you should assign types to the variables used, otherwise you must check runtime behavior after the Unicode attribute has been set.
To be able to differentiate between your own and foreign code (for example when using standard includes or generated includes), there is a selection option for the includes to be displayed. By default, the system excludes the standard includes of the view maintenance LSVIM* from the display, because they cause a large number of messages that are not relevant for the Unicode conversion. It is recommended that you also exclude the generated function group-specific includes of the view maintenance (usually L<function group name>F00 and L<function group name>I00) from the display.
Similarly to the process in the extended syntax check, you can hide the warning using the pseudo comment ("#EC *).
Applikation-Specific Checks
These checks indicate program points that represent a public interface but are not Unicode-compatible. Under Unicode, the corresponding interfaces change according to the referenced documentation and must be adapted appropriately.
View Maintenance
Parts of the view maintenance generated in older releases are not Unicode-compatible. The relevant parts can be regenerated with a service report.
UPLOAD/DOWNLOAD
The function modules UPLOAD, DOWNLOAD or WS_UPLOAD and WS_DOWNLOAD are obsolete and cannot run under Unicode. Refer to the documentation for these modules to find out which routines serve as replacements.
Thanks
Jagadeesh.G -
Hi All,
I have a program in which i dont want decimal values.So i am moving the value from Floating point to int4.Now i have a problem that one of the values is '3.0114e+09' and more and its giving a dump due to overflow .Doe any know how to sole this .
the type for
eg
Data v_var type F value '3.0114e+09'.
data v_int type int4.
move v_var to v_int.
write: / v_var, v_int.
the code in my program is
MOVE TIME_SERIES_ITEM-TIME_SERIES_VALUE TO WA_DOWNLOAD-M.
TIME_SERIES_ITEM-TIME_SERIES_VALUE is of type /SAPAPO/FLTP ie is of type FLTP length 16 and decimals 16
WA_DOWNLOAD-M is of type int4.
Regards
AhasanHi,
Make sure you have the "Fixed Point Arithmetic" checked in the attributes of the program and declare your variable as P DECIMALS 0.
Regards,
Ravi -
Decimal conversion error (Data Integrator 11.7.000)
Did someone encoutered this error? Any solution?
1004 3488 RUN-050802 06/01/2009 10:43:23 Cannot convert data <-.91> into type <DECIMAL>. Context: Column <Project Column AIColumn7>.
It happens when I try to perform a multiplication of a number with -0.91
Thanksthis seems to be happening for a specific optimization plan
tried with 11.7.3.0 and oracle 9i, since the query is not getting pushed down so most likely not a issue with database
I am trying to reproduce this using 2 source table and multiplying 2 columns in mapping by selecting a int column from one table and decimal (6,2) column from other table and output is also decimal (6,2)
is there anything else in the mapping expression for the other column, which might be creating multiple nodes for optimizer
can you give some more information about the DF, like outer join, where condition
since you mentioned both the source are oracle, why is the expression not getting pushed down ? -
Exponential to decimal conversion
Hi,
I have a problem in displaying data into EXCEL sheet from internal table
In excel sheet data coming is in Exponential form I want it into decimal.
How to convert it?.
ThanksI have tried P,C D even Ihave changed the field value for output so that whole numer can display, I am fetching exponential from standerd tables
PRMAPE LIKE /SAPAPO/FCSTACCU-PRMAPE,
PRMSE LIKE /SAPAPO/FCSTACCU-PRMSE,
PRRMSE LIKE /SAPAPO/FCSTACCU-PRRMSE,
PRMPE LIKE /SAPAPO/FCSTACCU-PRMPE,
PRMAD LIKE /SAPAPO/FCSTACCU-PRMAD,
FSUMM LIKE /SAPAPO/FCSTACCU-FSUMM,
USERE LIKE /SAPAPO/FCSTACCU-USERE,
DURBIN_WATSON LIKE /SAPAPO/FCSTACCU-DURBIN_WATSON,
R_SQUARE LIKE /SAPAPO/FCSTACCU-R_SQUARE,
ADJ_R_SQUARE LIKE /SAPAPO/FCSTACCU-ADJ_R_SQUARE,
TS LIKE /SAPAPO/FCSTACCU-FSUMM,
and then appending this itab values into anther itab having fields
PRMAPE(16) TYPE C,
PRMSE(16) TYPE C,
PRRMSE(16) TYPE C,
PRMPE(16) TYPE C,
PRMAD(16) TYPE C,
FSUMM(16) TYPE C,
USERE(16) TYPE C,
R_SQUARE(16) TYPE C,
ADJ_R_SQUARE(16) TYPE C,
DURBIN_WATSON(16) TYPE C,
TS(16) TYPE C,
so how can I do this.
Is there any Function Module. -
Impact of ALPHA Conversion Urgent!!
Hi,
We have a problem with some of the infoobjects during the upgrade to 3.5.
Some of the custom developed Z infoobjects do not have conversion routine in them when they were developed in 3.0B.
e.g. ZCUSTNO has two customer numbers 01 & 000001.
This is being used in infocube ZSALES & the data in the cube is
ZCUSTNO 01 ZSAL 100
ZCUSTNO 000001 ZSAL 200
We need to add ALPHA Conversion routine in ZCUSTNO.
CASE 1 : Making Customer 01 as A01 & 000001 as A000001.
In order to achieve this do we need to rotate the existing transactional data by adding 'A' in update rule & then loading master data for A01 & A000001 or how do we go about to achieve this. Please give the steps.
Also, if ZCUSTNO is "char 6" so adding 'A' to 000001 makes the length "7" so what can be done for same?
CASE 2 : If we add ALPHA routine WITHOUT adding 'A' to the customer no.
What will be the impact of this on transactional data? will it look as follows ---
ZCUSTNO 000001 ZSAL 300Hi Vikash,
PPT was really helpful. I'll definitely reward u the points for that but it would be helpful if you could elaborate on some points mentioned in PPT.
<i>"Conversion tables containing the old and new values are built from the SID tables"</i>
Could you pl elaborate what exactly system does? what are conversion tables?
<i>"Characteristics with collisions in the SID table
Marked in RED"</i>
Could you pl give an example when a characteristic will be marked RED. -
Data conversion (urgent)
Hi all,
i'd to know why i've got all my é to i when i've inserted data with unix script ?
enven though i've converted them from Dos to Unix before ftp and ftp in binary ?
Thanks in advance,Hey, keep cool here...<br>
This forum is based on volunteers, which are not paid for answer.<br>
So, if you have not the time to read the doc for which someone give you the link, nobody will make it for you, and if your pb is urgent (as your thread title mentionned), pay yourself a consulant, or raise a SR through metalink.<br>
<br>
Very best regards,<br>
<br>
Nicolas.<br>
<br>
Try your chance into Globalization Support<br>
Message was edited by: <br>
N. Gasparotto<br>
<br>
Maybe you are looking for
-
Single Line and Stacked Bar Graph Representation
Data to be plotted on graph is as follows Year and Month Study Planned Subject Study-Site ID # # Enrolled 2001 / 03 AMXN 9374 50 US-001 1
-
Dear Experts, THis is regarding form for LD00. I am from EH&S module. For getting DG data on form, there is one std form in sap which is RVDELNOTE. The respective print program is RVADDN01 I have replaced this LE_SHP_DELNOTE with RVDELNOTE then I am
-
Is it possible to paste two images into one layer?
I'm having some issues pasting two images into one layer. Every time I paste the second image, it automatically creates a new layer...is there anyway to prevent that from happening? I'm making an animation on photoshop and I want there to be more tha
-
Can I connect an older Mac Mini (approx 2007) to a new iMac 27" display - I am about to purchase one but in doing so will be removing the PC/LCD monitor... So what options do I have or is this a non-starter?
-
Where do i add a new email alias?
I can no longer find where i set up a new alias email address for my iCloud account. I have found "alternate" email addresses but this doesn't accept anything i try to add as an alias so I'm guessing its not that.. This USED to be easy.. Any ideas? T