Writing decimal value to application file
hi All,
I am having an internal table with fields itab-A, itab-b and itab-C.
i want to write the record to itab in such a way that
itab-ASPACEitab-bitab-c.
Now i tried to concatenate the record in one string and write it out but the problem is itab-b is decimal value so it cant be concatenated. and also i m not getting value if i write
concatenate itab-A SPACE into val.
Can you suggest me something?
thanks and regards,
Reena
Hi Reena,
Convert decimal value to character and write to application server.
The sample code here.
data:
lv_ format TYPE hslxx9,
lv_char_hsl TYPE char23,
CALL FUNCTION 'CEVA_CONVERT_FLOAT_TO_CHAR'
EXPORTING
float_imp = wa_finbal-hsl
format_imp = lv_format
IMPORTING
char_exp = lv_char_hsl.
Regards
Bhupal reddy
Similar Messages
-
Zero Decimal values in AL11 file download
Hi Experts,
We have a program to download data into XLS file in AL11 application server. We have a currency column to be passed on to the file. The issue here is I have a decimal value like 201.30 and 200.00 but these values are downloading in AL11 as 201.3 and 200, But I want the values as how it is passing in the string. I am using Open data set statement and inside that concatenating all fields and transferring it into file. I tried searching in the forum and find couple of links none of them helped. Could anyone advice how to overcome this?
Thanks
SivaWe have a program to download data into XLS file in AL11 application server.
You are having problem when you are trying to upload the quantity from excel ( presentation server ) to AL11 ( application server ) or vice versa ? -
How to load decimal values into a file using bcp in SQL Server 2000?
Hi everyone,
I'm trying to load data from a database table to a text file using bcp on SQL Server 2000. When I'm loading the decimal values, the values before the decimal are not being loaded into the file. How could I load the values before decimals?
Here are the DDLs and DMLs of what I'm trying to run:
CREATE TABLE [dbo].[Product_Sales](
[Year_of_Sale] [smallint] NOT NULL,
[Product_Type] [varchar](25) NOT NULL,
[Product_Group] [varchar](25) NOT NULL,
[Category_Type] [varchar](25) NOT NULL,
[Category_Group] [varchar](10) NOT NULL,
[Product_Count] [bigint] NOT NULL,
[Product_Amount] [decimal](19, 2) NOT NULL,
[Category_Count] [bigint] NOT NULL,
[Category_Amount] [decimal](19, 2) NOT NULL,
CONSTRAINT [PK_Product_Sales] PRIMARY KEY CLUSTERED
[Year_of_Sale] ASC,
[Product_Type] ASC,
[Product_Group] ASC,
[Category_Type] ASC,
[Category_Group] ASC
) ON [PRIMARY]
) ON [PRIMARY]
INSERT INTO [Yearly_Sales].[dbo].[Product_Sales]
VALUES(2010, 'Online', 'Web', 'Cameras', 'Electronics', 547, 0.00, 0, 0.00)
EXEC [master].[dbo].[xp_cmdshell] 'bcp "SELECT * FROM [Yearly_Sales].[dbo].[Product_Sales]" queryout D:\Yearly_Sales\Product_Sales.dat -c -T -S'
And the output I see in the file is:
2010 Online Web Cameras Electronics 547 .00 0 .00
The values before decimals are being truncated.
Thanks,
Bangaaram
Known is a DROP, Unknown is an OCEAN.You can modify the decimal column(s) in the table to varchar type before export. But it does not look good.
alter table [dbo].[Product_Sales]
Alter column [Product_Amount] varchar(20)
alter table [dbo].[Product_Sales]
Alter column [Category_Amount] varchar(20)
Does that make any sense?
Known is a DROP, Unknown is an OCEAN.
Basically you modify the decimal column to a varchar type before you run the bcp command for export. You can modify your source table or you can modify them on the fly. It is just a workaround.
Modifying the source wouldn't be a good idea. Never do that if you can't get your desired output.
Known is a DROP, Unknown is an OCEAN. -
Hello everyone,
it is my first post here.
I'm trying to import a CSV file into Numbers, but the result is not quite what I was looking for. First of all, to get Numbers to open the file I had to drag and drop it into Numbers, I didn't find any other way to do it. I was looking for an "import" button that would let me give some kind of instructions on how to open the file, but did not find this button.
In the CSV file, every numbers is separated by a comma, wich is normal, but the decimal portion of a value is also indicated by a comma and when imported it ends up in it's own column. So 4,5 might be 2 columns, the first one with the value 4 and the second one with the value 5, but 4,5 could also be the value 4,5. How do we tell Numbers how it should interpret the different values in a CSV file. Is it possible to say that column 4 is in fact the decimal part of value in column 3?
Hopefully this is clear enough for you to understand.
Thank you for your help.Hello
The support of CSV files was described here many times.
If the decimal separator in use on the system is the period, Numbers requires the original CSV format : Comma Separated Values.
If the decimal separator in use on the system is the comma, Numbers requires the alternate CSV format : Semi-colon Separated Values.
Given what you wrote, you are trying to import datas from a file using the original CSV format and the decimal comma.
I know that some experts wrote Python filters to treat such case but I have no reference available at this time.
If you send a sample file to my mailbox, I will try to write an AppleScript deciphering it.
But as I often wrote, CSV is really the worst format ever invented. Why aren't you asking the document's author to use Tab Separated Values format ?
Click my blue name to get my address.
Yvan KOENIG (VALLAURIS, France) vendredi 22 avril 2011 11:04:21 -
I am using the below code to write the contents of a blob column in a table to a txt file. My procedure is getting executed successfully.But I am not able to find the text file in the given directory.
SQL> CREATE OR REPLACE PROCEDURE Write_Binary_file
2 (
3 pcdir IN VARCHAR2
4 ,pcflnm IN VARCHAR2
5 ,P_raise IN BOOLEAN DEFAULT FALSE
6 )
7 -- -------------------------------------------
8 -- Procedure to dump a BLOB column onto a file
9 -- -------------------------------------------
10 -- parameters:
11 -- pcdir : name of an existing Oracle Directory
12 -- pcflnm : name of the expected output file
13 -- P_raise : boolean to indicate if the process
14 -- would be stopped after an error
15 --
16 IS
17 src_lob BLOB;
18 buffer RAW(16384);
19 amt BINARY_INTEGER := 16384;
20 pos INTEGER := 1;
21 out_file UTL_FILE.FILE_TYPE ;
22 Err_msg VARCHAR2(2000) ;
23 BEGIN
24
25 -- get the BLOB column --
26 BEGIN
27 select CONTENT_DATA INTO src_lob from pstars.REPORT_INSTANCES where id=29;
28 EXCEPTION
29 WHEN NO_DATA_FOUND THEN
30 Err_msg := 'Write_Binary_File(): NO_DATA_FOUND' ;
31 IF P_raise THEN
32 RAISE_APPLICATION_ERROR( -20100, Err_msg ) ;
33 END IF ;
34 Dbms_Output.Put_Line(Err_msg) ;
35 RETURN ;
36 END ;
37
38 -- open the output file --
39 out_file := UTL_FILE.FOPEN( pcdir, pcflnm, 'W', 32764 ) ;
40
41 -- write the file --
42 while pos<dbms_lob.getlength(src_lob)
43 LOOP
44 -- read the chunks --
45 Dbms_Lob.READ (src_lob, amt, pos, buffer);
46 -- write the chunks --
47 Utl_File.Put_Raw(out_file, buffer);
48 pos := pos + amt;
49 END LOOP;
50 -- close the file --
51 Utl_File.Fclose(out_file);
52
53 EXCEPTION
54 WHEN NO_DATA_FOUND THEN
55 utl_file.fclose(out_file);
56 WHEN OTHERS THEN
57 Err_msg := 'Write_Binary_File() Error : ' || TO_CHAR( SQLCODE ) || ' while managing file ('
58 || pcdir || ') ' || pcflnm ;
59 IF P_raise THEN
60 RAISE_APPLICATION_ERROR( -20100, Err_msg ) ;
61 END IF ;
62 Dbms_Output.Put_Line(Err_msg);
63 END Write_Binary_file;
64 /
Procedure created
SQL> exec Write_Binary_file('dir_temp','rpt_inst.txt');
PL/SQL procedure successfully completed
SQL> select * from dba_directories;
OWNER DIRECTORY_NAME DIRECTORY_PATH
SYS VWC D:\Oracle9iserver\vwcode
SYS MYDIR C:\load_SLD\
SYS DIR_TEMP D:\temp
SQL> exec Write_Binary_file('VWC','rpt_inst.txt');
PL/SQL procedure successfully completed
SQL>Your exception code is wrong because if P_RAISE is set to FALSE you won't see any exception.
Run you code with P_RAISE set to TRUE and with:
set serveroutput on -
Help needed in writing installers for swing application
Hi ,
I want to write an installer for one of our home grown profiler tool. I need to write the installer for different platforms such as windows,linux,solaris,HP-UX.
Does anybody have any idea of how to go ahead in writing installations. Share if there is any good links such as tutorials as well is thr any opensource tool (similar to installsheild) to write installers . As well following is the tentative algorithm for my install sheild
1. Create a home dir for the tool and put all the application files in tht.
2. Installing a 3rd party jar and make a home for it.
3. Option for user to select the features(i hv 2 features. user can either select both or select individual feature) to be installed.
4. Select the appserver home if any. On selection i hv to update the classpath in the startup batch file for the application(This is the toughest step i beleive bcoz each appserver have different folder structures and different startup batch files).Tried obtaining the output using SQL and the result is as follows:
SQL> WITH T AS
2 (
3 SELECT 1 COL1 FROM DUAL
4 UNION
5 SELECT 2 COL1 FROM DUAL
6 UNION
7 SELECT 3 COL1 FROM DUAL
8 UNION
9 SELECT 4 COL1 FROM DUAL
10 UNION
11 SELECT 5 COL1 FROM DUAL
12 UNION
13 SELECT 8 COL1 FROM DUAL
14 UNION
15 SELECT 9 COL1 FROM DUAL
16 UNION
17 SELECT 10 COL1 FROM DUAL
18 UNION
19 SELECT 13 COL1 FROM DUAL
20 UNION
21 SELECT 14 COL1 FROM DUAL
22 UNION
23 SELECT 15 COL1 FROM DUAL
24 UNION
25 SELECT 16 COL1 FROM DUAL
26 UNION
27 SELECT 23 COL1 FROM DUAL
28 UNION
29 SELECT 24 COL1 FROM DUAL
30 )
31 SELECT OUTPUT FROM
32 (
33 SELECT DECODE(COL3,NULL,COL1, COL2) || '-' || LEAD(DECODE(COL3,NULL,COL3, COL1)) OVER (ORDER BY DECODE(COL3,NULL,COL1, COL2)) OUTPUT FROM
34 (
35 SELECT COL1, LEAD(COL1) OVER (ORDER BY COL1) COL2, LAG(COL1) OVER (ORDER BY COL1) COL3 FROM T
36 )
37 WHERE
38 (COL2 - COL1 > 1 OR COL2 IS NULL OR COL3 IS NULL)
39 )
40 WHERE OUTPUT != '-';
OUTPUT
1-5
8-10
13-16
23-24 -
Error saving purchase order data decimal values in SAP R/3
sir,
PO was created with currency japanese YEN using Tcode ME21N . The net price was showing 142502300 (in JPY).
when checked in EKPO table , it saved with a value 1425023.00 instead of 142502300 .
what can be done to correct this.
In PO Print out , it showing values as 1425023.00 which is wrong.
SPRO>> NET WEAVER >> GENERAL SETTINGS >> CURRENCY>> SET DECIMAL values FOR CURRENCY CODES is showing 0 decimals against JPY (Japanese YEN)
I want to know where else the Decimal values could have been set to 2 decimal places.
FOr other currencies like US Dollars there is no error.
Regards,
Srinivasa MurthyHello Srinivasa
Please check the forum Rules of Engagement - https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement.
Cross posting is not permitted. This issue is already raised in the application area forum which is probably correct. This does not look like a PI technical issue.
Regards
Mark Smyth
XI/PI Moderator -
How to set default value for html:file in struts
hi
i am working on an application using struts situation is i am using the
<html:file property="" /> to allow the user to upload file. but i need that a default file should be set so that even if the user donot click browse ie the user wish to upload that default file the default file get uploaded on page submition. Is it possible to set any default value for html:file ...if yes plz provide any suggestion or links how to achieve this. thanks in advancewww.google.com?q=STRUTS+DOCUMENTATION
-
Purchase order with decimal values in held status.
Hello, i have a SC. The quantity is decimal for the line item.When it was approved, the PO got a 'held' status.How do i release the PO and what can i do in order to accept decimal values in my SC ?
Hello,
Are you sure this is not a workflow issue? If it is held, someone either placed it in hold status or something like that. Since, there was nothing to suspect an application error, I don't think the decimals is your issue. If you feel that it is, have you checked OSS.
More information would be helpful....
Regards, Dean. -
Excel import rounding up decimal values
In my excel file I have a column that contains dollars and cents (e.g. 49.95). When I run the import the values in this column are rounded up to the next integer (e.g. 49.95 is rounded up to 50). Is this a bug or am I doing something wrong?
Thanks,
PeterHi All,
I have already migrated lakhs of records and I am facing the same problem for decimal value migration. Shall I know whether anyone has fixed this problem? Is there any other free tool for SQL Server to ORACLE migration? Please do guide me as soon as possible.
Thanks,
Srinivasan.T -
Faillure writing metadata to some DNG files
I'm having a problem writing metadata to some dng files using Lightroom 2.6.1. When I try to apply a metadata template to a batch of files most of them get changes but a few don't. This only effects DNG files so far JPEG and TIFF seem to be OK. I have tried running the problem files through DNG converter and the new files have the same problem. Lightroom won't write to them.
I can change the metadata of these files from Bridge. The changes then appear properly in Lightroom. Afterwards I can change the metadata again from Lightroom.
I'm working on a MacBook Pro (Late 2008) and running OS 10.6.2.I created a preset to export to same folder as original, same format as original, and stack with (above) original. I used this on the seven files, and it has solved the problem without losing any metadata.
The jpegs had at some point been processed by Photoshop Elements as they were imported/edited using that application in 2010 but the metadata problem didn't show up until recently when I was making some adjustments in Lightroom. I somehow think this may be related to the GPS tag though I don't have sufficient evidence.
The DNG file was strange in that it was straight the camera with no Lightroom adjustments, although I did add GPS info in the Map module. Anway it is now fixed as well as the jpegs.
With this preset it would be possible quickly to fix a large number of image files. Just create a Smart Collection to display the problem files and run the preset on them all in one go. The only things that I am aware of that you would need to look out for are (1) if they are in a collection other than a smart collection, or have been published to a service like Flickr or to the Hard Disk the link will be broken, and (2) If you like to sort photos by date/time added, they will be out of the sequence (capture time is fine).
When you are satisfied that this has worked OK then you can delete the images from the "Metadata Not Up To Date" smart collection. Select all, go to all photos, they should remain selected and press Delete. You could do a thousand in one go if you have the nerve for it
Hope this helps.
Peter -
Inline style - decimal value for dimension break designer
Hi all.
I'm using JDeveloper 11.1.2.1 & ADF.
Just to let you know that decimal value in dimension css selectors (like width...) added using inline style break UI designer.
af:tree table -> nodeStamp facet -> column -> inlineStyle -> width:305.0px break UI designer.
Replacing 305.0px with 305px makes everything work Ok.
.0 part in inline style was added by JDeveloper 11.1.1.5, while JDeveloper 11.1.2.1 doesn't add decimal part.
Regards.Frank, this is i minor issue but it took me 1hour to find what breaks UI designer.
What I did is just migrated adf application from JDeveloper 11.1.1.5 to 11.1.2.1.
In JDeveloper 11.1.1.5, when you enter width using property inspector -> style -> layout -> dimension -> width property, let say 305 and select pixel in side drop down list, what you get as result is inlineStyle property like this:
inlineStyle="width:305.0px"
Frank Nimphius wrote:How would 305.2 pixel look like ?You should ask Oracle to answer this question.
Thank you for your reply. -
Seeing decimal values in TOAD, but not in SQL Developer
I'm writing on behalf of a co-worker. He's using SQL Developer to look at some records in a database, but in one column he sees zeroes instead of the correct decimal values (the values are between 0 and 1).
However, the developer he's working with is using TOAD and sees the correct decimal values in the column.
Any idea as to how to get the decimal values to appear correctly within SQL Developer?The database version is 10g, the version supported by TOAD is 9.
Hi ,
1/I have not seen this reported please give a create
table statement and some test data to insert to
reproduce the problem.. Please give versions of
SQLDeveloper and the Oracle database - out current
production release of SQLDeveloper is 1.5.1(.54.40)
2.If you can convert the number to a string at the
database side say with TO_CHAR you should see the
string representation of the number in SQLDeveloper.
This would work if you are using a select via the
worksheet or a view on the table with the number if
you want to see it in a views data tab.
-Turloch -
Display decimal values in report
Hi all,
I have one question concerning the display of decimal values smaller than '1' in a report.
In an SQL query some calculations are done and the result is displayed in a report.
The problem is, that if the value of the result is smaller than '1' it shows for example ,8 instead of 0,8
Does anybody know how to display decimal values normally?
kind Regards and thanks!!
PatrickHi SWED!
1.) Click at the name of your report region (in application builder) to edit it
2.) Select the "report attributes" tab
3.) Click at the column you want to format
4.) Look for the "Column Formatting" region
5.) Select the proper format from the "Number / Date Format" list or enter your own format like "0.0"
I hope that will help you along.
yours sincerely
Florian W. -
Hy, I have a question, is it possible to split a main application file into several others ?
So I have an application where I keep a few objects on my stage. Each object can do a lot of things and is linked with the others. Writing the script for each object will make my main application file hard to read. Can I somehow run the application from like 5 or 6 Flex Components or Flex Application files ? If so can you give me a little sample of code ?
I've tryed to add my objects on the stage from a component, but it doesn't work... I don't really understand them, they look like classes but they don't really act like ones...Components or Modules, Components are much easier than modules, modules keep the main app smaller, but you do have to load them later.
What don't you get about components?
1. Create the component,
2. Register the component.
xmlns:MyCustomComponent="theDirectoryItsIn.*"
3. Use the component.
<MyCustomComponent:ComponentName/>
That's the MXML way.
If you do it in actionscript theres a bit more coding but not a whole more.
1. import your component
import theDirectoryItsIn.TheComponent;
2. Create an instance of it.
var idName:ComponentName = new ComponentName();
idName.x=10;
idName.y=10;
3. If you use FB4
this.contentGroup.addElement(idName);
if you use FB3
this.addChild(idName);
Maybe you are looking for
-
Using iPhone 3G and iPad on one iTunes account?
I have an iPhone 3G that I have been using on an older iMAC that can only support up to OS 10.4.11. I can't update the iPhone to OS4.2 because the iMAC can't support 10.1 iTunes, because it can't support OS 10.5 or higher. I also have a Gateway lapto
-
Error while starting the SOA suite
Hi, Im facing error while starting SOA suite, which I was doing earlier without error. Below is the error log. An unknown OPMN error has occured oracle.appserver.startupconsole.model.ConsoleException: An unknown OPMN error has occured at oracle.
-
What is the best way to upgrade iTunes?
I'm currently running iTunes 8.0.2.20 to work with my iPod Touch 2G and Nano 4G. All is working quite well so I'm rather hesitant about upgrading. But more and more content is requiring an upgrade to the latest iTunes version. If I decide to take the
-
Hi there! I have eternal problem with N73-even when I set a volume level to 100% sound is pretty quiet, and I can't hear it on a busy street....Thought a friend of mine has 6233 and the nokia has very loud plaer'r sound...more than enough. As far as
-
Dear All, For Goods return to vendor after GR has done and no IV,we are following the below scenario, Goods Return for that qty in MIGO & capturing the Part 1 entries and Capture the excise in J1IS wrt Mat doc, so that system will generate an interna