Conversion of a numeric or decimal field
Hello,
i have an adobe print form for my invoices.
in one cell of a table, either a percentage value will be printed or a fix amount.
in the table, the value for -30% is "300.00-", for the fix amount, it is 4.88
on the printform, it should be displayed in the right way.
the amount is displayed right. "4.88", but the percentage is displayed in the same way as in the table, "-300.00"
can anyone help me?
is it necessary, to convert all entries in the table before calling the print form?
McDelta0six
Hi,
You may try out the disp[lay patterns in the object palette of the fields.
Refer to Designer help, regarding theDisplay, edit patterns...
hope this helps,
- anto
Similar Messages
-
What I've found so far is that the only way to get the % symbol into a numeric/decimal field at all is to set the "display pattern" to display the % symbol after numbers have been entered into the field.
The reason I want the field to be numeric and not text is because I have to run a FormCalc caculation that populates a third field.
(NumericField1 * Numeric Field2*) + NumericField1Thanks for the reply Niall.
I ended up chanigng the numeric field to a decimal field instead, and added the following display pattern: num{zzzz9.99'%'}
So although the user can't enter a % symbol into the field, a % symbol automaticaly populates when the user enters a number.
My criteria involved ensuring that a user could not enter a number with more than two numbers after the decimal, so I also set a trailing digits max of 2 (in the Obect > Field settings)
This is the FormCalc formula I used in the "calculate" event to calculate the salary increase amount request: (DecimalField1 * NumericField2) *.01 + NumericField2
This formula is meant to calculate the salary amount a manager is requesting their employee's salary be increased to. -
Aodbe form Numeric or Decimal Field
Hi experts,
I am new to adobe form. I want to display, if i enter 1234 ,it will be displayed 12.34 .Can you please suggest me?
Thnaks.
HansHi Hans Bauer,
Do the following:
1. Take the field as Numeric Field or Decimal field from Library.
2. Select the field from Hierarchy.
3. Go to menu> windows> Script Editor.
4. Choose Exit event in the script editor.
5. now write the following code in the exit event of the numeric field/decimal field.
$.rawValue = $.rawValue/100
Thats all what you have to do.
Hope it will solve your problem.
Regards,
Vaibhav Tiwari. -
Format of a numeric/decimal field
Can we set the format of a decimal field to display zzz.999 without rounding off the value. For example,I have a decimal field with display & Edit pattern set as "zzz.999" and trailing digits limited to 3. If I enter a value 123.456, its ok. But if I put 123.4567 the value is rounded off and displayed as 123.457. Can we limit it somehow to truncate anything extra than 3 trailing digits.
Thanks
ShwetaMaybe not automatically, but you should be able to do this with a little JavaScript in the form.
Mike -
Data flow fails on packed decimal field moving iSeries DB2 data from one iSeries DB to another
I' trying to use SSIS to move table content from one iSeries DB2 database to another. I'm using the .Net providers for OleDb\IBM DB2 for i5/OS IBMDA400 OLE DB Provider in the connection managers for the source and destination and the test connection
works fine. When I try to run the data flow task however it fails on the first packed decimal field it encounters with the exceptions ...
[select from hydro520 hydroweb2 blpmstr [16]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "component "select from hydro520 hydroweb2 blpmstr" (16)" failed because error code 0x80004002 occurred, and the error
row disposition on "output column "MSPRIB" (55)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
[select from hydro520 hydroweb2 blpmstr [16]] Error: The component "select from hydro520 hydroweb2 blpmstr" (16) was unable to process the data. Pipeline component has returned HRESULT error code 0xC0209029 from a method call.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "select from hydro520 hydroweb2 blpmstr" (16) returned error code 0xC02090F5. The component returned a failure code when the pipeline
engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
...in the progress tab. Can someone kindly tell me what I need to do to get the connection manager to work with DB2 packed decimal fields? Or is it a different issue all together? Thanks tonnes for any help, RoscoeHi rpfinn,
From the Data Types mapping rules between SSIS and DB2, we can see that both the NUMERIC and DECIMAL data types in DB2 are mapped to DT_NUMBERIC data type in SSIS. Now that the source data in your DB2 database is NUMERIC data type, changing the DT_NUMBRIC
data type to DT_DECIMAL is invalid. Besides, if we check the data types of the target External column and Output column from the Advanced Editor for ADO NET Source adapter, the data type should be defined as DT_NUMERIC with Precision as 9 and Scale as 2. I
am not clear where you see the DT_NUMBERIC(9,0) e.g. DT_NUMERIC with Precision as 9 and Scale as 0, but it may be the cause of the issue. You need to make sure the DT_NUMERIC data type also has Scale 2 instead of 0.
If you don’t know how to modify the data type, please elaborate the Data Flow Task of the package so that we can make further analysis. Besides, the error messages you posted are incomplete, it will be helpful if you post the complete error message.
Regards,
Mike Yin
If you have any feedback on our support, please click
here
Mike Yin
TechNet Community Support -
Can I know the precision and scale of a decimal field using ACEDAO?
Using ACEDAO in VC++, I am trying to retrieve the field details of an Access database (.accdb file) table of which one field is of decimal type. I am able to get the details using the functions of
DAO::_FieldPtr field;
as follows:
fieldName = field->GetName().GetBSTR();
nType = field->GetType() // returns DAO::dbDecimal
lSize = field->GetSize(); // returns 16
lAttr = field->GetAttributes(); // returns 0x000002H
nOrdinal = field->GetOrdinalPosition(); // returns 11
bAutoIncrement = ((lAttr & DAO::dbAutoIncrField) > 0);
DAO::PropertiesPtr props;
DAO::PropertyPtr prop;
int k, nProp;
std::wstring propName, propNames;
props = field->GetProperties();
if(props)
nProp = props->GetCount(); // returns 33
for(k = 0; k < nProp; k++)
prop = field->GetProperties()->GetItem((short) k);
if(prop)
propName = prop->GetName().GetBSTR();
propNames += propName;
propNames += L"\n";
// After exiting the loop, propNames contain 33 properties as:
// Value
// Attributes
// CollatingOrder
// Type
// Name
// OrdinalPosition
// Size
// SourceField
// SourceTable
// ValidateOnSet
// DataUpdatable
// ForeignName
// DefaultValue
// ValidationRule
// ValidationText
// Required
// AllowZeroLength
// AppendOnly
// Expression
// FieldSize
// OriginalValue
// VisibleValue
// GUID
// ColumnWidth
// ColumnOrder
// ColumnHidden
// Description
// DecimalPlaces
// DisplayControl
// TextAlign
// AggregateType
// ResultType
// CurrencyLCID
//But does not have any property named "Scale" or "Precision"
I could not find any function for retrieving the value for precision and scale for the decimal field.
Though I am able to retrieve the field value as a decimal number and get the required information from the structure, I think it is not the right way. Because, what will happen if the data for field is not available in the table?
Is there any other method to retrieve the precision and scale of a decimal type field using ACEDAO?
Thanks.I cannot find a method or property in ACEDAO to retrieve the precision and scale of a field. Maybe you could try get the number of a decimal type and use some mathematical methods to get the precision.
I find there are some way to get the precision by ADO or OLEDB.
For ADO way, you could check this thread:
https://social.msdn.microsoft.com/Forums/office/en-US/883087ba-2c25-4571-bd3c-706061466a11/how-can-i-programmatically-access-scale-property-of-a-decimal-data-type-field?forum=accessdev
For OLE DB , you could use IColumnsInfo::GetColumnInfo to get DBCOLUMNINFO::bPrecision.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms722704(v=vs.85).aspx
Also people in C++ may not familiar with access development, the
Access for Developers forum is good place for access develop issue. You could try there.
Hope this helps some.
Shu
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to process decimal field in extract
Hi All
I need to use a extract in TableMaintenace event.
I understood using loop and indexing, we can access teh fileds.
But when i checked in the Debugging mode, Decimal values in hte table are displayed as ####. How to get these decimal fields.
Could someone please clarify this?Increase the field length for you decimal field.
If that doesn't work define the field as an alpha field. -
Gui_upload for csv file with numeric n date fields
Hi ,
i searched on net on how to use GUI_UPLOAD for csv files using split function but the spilt function requires that the data type of all fields of the internal table should be character whereas in my case there is a numeric n data field too.So kindly help me how to do it.
One way ppl might suggest that give all the fields as char in the internal n after recieving the data in the internal convert the required fields back to data n numeric n then finally insert to the database but if i have 80 fields u would really dont want to do that as it requires precision to convert it to the same type n length as in the original database for all the fields.yeah i guess that would be a bit longer if i m having more no of fields (80) compared to ORACLE where this can be done in a shorter way.
SO i shall use 2 internal tables here rite?? i mean first one(with all fields as char) for storing the split function values and the other one (with actual data types) .CAN u plz tell me how to convert or cast from one data type to another n while moving values from 1st internal table to another which way shall i do.
Thanks for ur help n can u suggest if there is any other method for uploading csv also other than this split method n whether this method is better n faster than others.
THANX -
How to change the Display Pattern for Decimal Fields dynamically
hi all,
Can any one help me how to change the display pattern for decimal fields dynamically???
Currently I am using z,zzz,zzz,zz9.999 Display pattern for Quantity Field. If the value is blank it is displaying as 0.000 on the Screen. But I don't want this to be printed.
Please help me how to solve this ASAP.
Thanks,
PrabhuHi,
Alternatively you can handle it in the context.
In the context area, click on the quantity. In the bottom, click on the conditions tab, and put a condition
<quan field> NE initial.
So the field will not be printed if there is no value.
Regards,
Vidya Chowdhary A. -
Hi,
I have developed a Module pool program. I have a screen field type DEC. I have two modes, EDIT and DISPLAY. In EDIT mode, when i enter 0.00 into this screen field and press save, the value displayed is BLANK and not '0.00' as required. In DISPLAY mode the value is displayed correctly as '0.00'.
I tried changing the screen field to type CHAR. But the same field variable is declared as TYPE 'p' for underlying calculations. Thus it gives me an 'SCREEN FORMAT ERROR'.
Any ideas how to diplay '0.00' in the decimal field in EDIT mode?
Awaiting your responses.
Regards,
SandeepWhat you are seeing is the stanard way the gui handles these fields in the particular mode(change,display). You can not get around this using the decimal field. Your only solution is to make are character field on the screen as well as character field in the underlying program.
Regards,
Rich Heilman -
Invalid Number Error for Decimal Field While Loading Data
I am loading a delimited text file using the SQL* loader however I am reciving an error in my decimal fields. When a decimal field only has leading zeros before the decimal point I receive invalid number error. Below will clarify:
i.e.) 00000000.30 [*Invalid number*]
i.e.) 00046567.45 [*Valid number*]
i.e.) 00000001.00 [*Valid number*]
I've tried setting the precision/scale in the table, tried declaring it a decimal field instead of number, none of these methods fixed the issue. Any help I would really appreciate.
POLICY_NUMBER NUMBER,
EFFECTIVE_DATE DATE "YYYYMMDD" NULLIF EFFECTIVE_DATE = '',
TRANSACTION_DATE DATE "YYYYMMDD",
TRANSACTION_AMOUNT DECIMAL EXTERNAL, -- Tried TRANSACTION_AMOUNT DECIMAL EXTERNAL (10) & TRANSACTION_AMOUNT NUMBER
MF_TRX_CODE NUMBER,
USER_ID CHAR,
GROUP_NUMBER NUMBER,
EXPIRATION_DATE DATE "YYYYMMDD" NULLIF EXPIRATION_DATE = '',
BILL_NUMBER NUMBER,Any help is greatly appreciated. Thanks before hand.Hi,
Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
Connected as hr
SQL> SELECT * FROM TEST;
TRANSACTION_AMOUNT
SQL> SELECT * FROM TEST;
TRANSACTION_AMOUNT
11000,00
293,37
2000,00
1134,32
0,30
SQL>Between the selects I loaded the table with sql*loader using...
Load Data
INFILE *
APPEND
INTO TABLE TEST
FIELDS TERMINATED BY '|'
TRAILING NULLCOLS
TRANSACTION_AMOUNT DECIMAL EXTERNAL
BEGINDATA
00011000.00
00000293.37
00002000.00
00001134.32
00000000.30The log is
SQL*Loader: Release 10.2.0.1.0 - Production on Tue Dec 23 17:23:47 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Control File: test.ctl
Data File: test.ctl
Bad File: test.bad
Discard File: none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table TEST, loaded from every logical record.
Insert option in effect for this table: APPEND
TRAILING NULLCOLS option in effect
Column Name Position Len Term Encl Datatype
TRANSACTION_AMOUNT FIRST * | CHARACTER
Table TEST:
5 Rows successfully loaded.
0 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 16512 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 5
Total logical records rejected: 0
Total logical records discarded: 0
Run began on Tue Dec 23 17:23:47 2008
Run ended on Tue Dec 23 17:23:50 2008
Elapsed time was: 00:00:02.86
CPU time was: 00:00:00.06Regards, -
hi ,
I have created an extractor using a Ztable. The extractor is available in RSA6 transaction. When i doubl click on the extractor from RSA6, it takes me to the extractor and when i click on BACK icon from the extrcator, it takes me back to RSA6 screen with a info window " warnings have occured . See Log "...
the log says,
"The even-numbered length of the DEC field ZHOURLY_RT can lead to problems".
how to get rid of this......
regards,
BalajiHi Balaji,
The reason for the error will be clear for you when you check the following link
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21f2f2446011d189700000e8322d00/content.htm
And check your table if you put the even number for the decimal field.
With regards
Chandru -
Dezimalfeld und Berechnung/ decimal-field and calculation
Hallo zusammen,
in einerm Formular versuche ich mehrere Dezimalfelder anzulegen, die am Ende zu einer Summe berechnet werden sollen.
Wenn die Stellen hinter dem Komma "00" lauten, werden sie nicht dargestellt.
Welche Einstellung muss ich wählen?
Wie muss die Einstellung für das Summenfeld lauten?
Freue mich über jeden Hinweis oder Tipp.
Hi,
in a form I'm trying to create several decimal fields that are to be calculated at the end to a sum.
If the digits after the decimal point are "00", they are not shown.
What setting should I choose?
What must be the setting for the total field?
I am pleased with every hint or tip.In a form I'm trying to create several decimal fields that are to be calculated at the end to a sum.
If the digits after the decimal point are "00", they are not shown.
What setting should I choose?
What must be the setting for the total field?
In the field's validation pattern, In pattern field box copy this pattern num{(zzzz9.99)}
This should work for your problem
Thanks,
Jaison -
Web dynpro + adobe form decimal field round off
hello all,
I am now developing an application which is based on the SAP WebDynpro and Adobe form, but the application has an error, if one can help me to resolve the error, I will be very thankful.
The error is as follows, for a decimal filed on the Adobe form which is binded to a deicmal attribute of Webdynpro, if I get the value of the decimal field using the programming code as "context.nodexx.getAttribute("xx")", the decimal value is rounded off (e.g., 2.4 is changed to 2.0, 2.7 is changed to 3.0).
for example:In Web Dynpro, A node name is "TestNode" which has a type of decimalattribute named "TestAttr" , in adobe form a decimal field bind to the TestAttr . when i input 2.3 in adobe form, i click the button with code:
this.wdComponentAPI.getMessageManager.reportSuccess(this.wdContext.nodeTestNode.getTestAttr()+"");
the rusult is : 2.0
if i input the value 2.5 the result will be 3.0
Thanks All !Hi,
there is a special display pattern to check for null values:
null{pattern}
Example:
null{'please enter a value'}
But I don't know if WDJ is really sending a null value. You can combine this with alternatives using '|' to separate alternatives.
Regards,
Juergen -
Decimal field in Adobe interactive form
I am making one report in which i am displaying decimal field , if that variable contains value then there is no problem but when the value is null then it is showing 0.00 so please suggest me any method by which i can remove these 0.00 and the space left blank.
Thanks. AnkeshDo one thing...
write the following code on "intialize" event of LSF field:
xfa.host.messageBox( $.rawValue );
if ( $.rawValue == 0.0 ) {
$.rawValue = "";
What is the message coming in messageBox in case of value is 0, write that value in if condition.
Edited by: Amit on Jun 6, 2008 7:07 AM
Maybe you are looking for
-
How to do total of quantities in same internal table?
Hello friends, I have an internal table like... VBELN MATNR WMENG BMENG 5001 ZRX1 5 10 5001 ZRX1 2 5 5001 PPD5 3 8 5002 XMX4 1 7 5002 GFC7 4 3 Now i need to update my same
-
A report which displaies Bank Incoming payments for each Customer
Hi All, could anyone show me a report which displaies the Bank Incoming payments for each Customer? Thanks Gandalf
-
Problem Running Process Flow When Database Objects Deployed Outside of OWB
Hi I am having a few problems running process flows that I'm deploying through OMB. My set up is as follows: All database updates are done outside of OWB (for version control purposes). Each object within OWB is exported to an MDL file, which is then
-
Reinstalled windows and lost all playlists
Hi, I reinstalled Windows after a virus and all my files were recovered from my backup system just fine. However, when I went to the Apple Store it didn't recognize my computer. I had to log in several times. I purchased some new music, synced my ipo
-
Selected Pages for purchase from the App Store and it downloaded, installed, and seems to be working fine. However the Purchased page under My Account on the App Store has a red error message against the Pages item: 'An error has occurred', whilst th