Formatting an inbound Decimal Field
Hello,
I have a decimal field.....>
xxxxxxxxxx.yyyyy
now lenght of xxx and yyy can vary..
now depending on the scenario i may hhave to round off the field to 3/4/5 places afeter the decimal....how can i acheivce this using std.pI functions....
i know of aformat number function ..but don't exactly know how to use it...........pls advice....
Jovani,
Depending upon your condition take a formatnum and double click on it and put the format like 000000.000 this will produce 3 decimal points. So depending upon ur requirement put that many.
Also check some more help on this function here:
Is this possible with formatNum
Example of FormatNum usage
Regards,
---Satish
Similar Messages
-
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 -
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 -
The decimal field should accept 0.00 as the input and generate the XML
Hi Experts,
I have one requirement. I need to display the field which take 0.00 as the input and that field should come in the output XML. This field of type decimal. I m using sender proxy. Im populating the value 0.00 to this decimal field, But the proxy is not producing this field in the output XML. Plz suggest me.
Regards,
RamaHI Ravi,
It is accepting the input as 0.00. But i want it as decimal.
Can u explian what is the difference between these two types decimal and string.
It should take the input values in the decimal format. ll it take?
Regards,
Rama -
I create soap to rfc interface. The client system is .net program. I import the rfc from ecc to pi. and create service interface depond on rfc message . the client system import the web service and add data . the decimal field lost in xml message. I don't know why this happen and how to repair it ?
>
Prateek Raj Srivastava wrote:
> and create service interface depond on rfc message .
> You don't have to create any Service Interface for RFC messages. Use the RFC message directly in Interface mapping.
I might be wrong, but I think he mentioned that he used the message definition from RFC in the inbound service interface that the .NET app consumes. If that's the case, he doesn't have mapping at all.
Best regards,
Henrique. -
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. -
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. -
FF_5 - Import Bank Statement, Err: Formatting error in the field COBL-KOSTL
Hi
When importing the bank statement I'm getting the error
Error: (00 298) Formatting error in the field COBL-KOSTL ; see next message
Why is it doing this? In OKB9 I have the GL Account and the cost center assigned. It is the ne GL that is giving this problem, in the classic GL I do not have this problem.
Thanks in advanceHi
No, it is not that. For some reason in the new GL it does not seem to determine the cost centers and profit centers as usual.
For exampl to allocate the Profit Center for Balance Sheet Account I used to use 3KEH in the classic gl but in the New gl we must use FAGL3KEH.
Now with cost center i'm having the same problem, does not determine the cost center when importing the bank statement.
Can someone help me.
Thanks in advance
Edited by: Louis De Gouveia on Mar 3, 2009 7:07 AM -
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. -
How to display HTML formatted text in the field with Item Style: Raw Text
How can I display HTML formatted text in the field with Item Style: Raw Text.
Currently the Item Style is Raw Text, but the text is being displayed along with HTML tags without formatting.
RegardsHi,
Use Item Style formattedText.
Regards,
Gyan -
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. -
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. -
Formatting error in the field COBL-GSBER - FF_5 Upload
Hi Experts,
When I upload the bank statement in FF_5, I am getting the following error.
"Error: (00 298) Formatting error in the field COBL-GSBER ; see next message"
If I make the field "Businees Area" Optional in Field Status Group of the "Bank Main Accout", then I am not getting the above error and the posting also happens to the "Bank Main Account".
But if I make "Business Area" Required Entry Field then I get the above error.
Is there any other method to rectify this problem, i.e can this be resolved even after keeping Business Area as a required field.
Pl advice.
Rgds,
Prasad.Hi,
I hope making Business area optional field is not a wise decision...user may go without inputting the business area in the field which later on will create problem for clearing...
If required go for activating user exit FEB00001... which will give you the business area...
try the same with your ABAPer....
Cheers
PK -
Ff_5 Formatting error in the field COBL-KOSTL
When automatically posting bankstatements we have several searchstrings in place.
Most of them post against a bookingrule, but in this case I have a posting on a costcenter as well.
I created two equal searchstrings, one for the bookingrule and one for the costcenter.
When executing FF_5 SAP only books in area 1 and not in area 2. The error message states:
00: 298 Formatting error in the field COBL-KOSTL.
The costcenter is an active one, it is also in OKB9 linked to the cost account number.
Profitcenter is default.
What does this message mean, and how can I find out what I did wrong? I am absolutely sure I have made no typo when entering the costcenter in the mapping area of the searchstring.Hi Siermann,
How are you mapping these two in search string , could you tell me ..?..
Seems to be that cost center is mandatory field but the field is suppressed in GL.
Thanks,
Maybe you are looking for
-
Javascript in .jsff page
Hi Gurus, Iam facing few problems in adding javascript to my .jsff page. i had tried with <trh:script></trh:script> but its showing not declared and dont know which lib that i need to add. Please let me know how to add javascript in .jsff page so whe
-
Returning Clause out parameter not working
I have Oracle 11g (I think?) and VS2010. I am using an insert statement with the returning clause to return an identity value that is created by a Sequence/Trigger. The problem I am having is that it is not updating the out parameter in C#. Here's so
-
Intellisync Unknown error reported
I have a new Verizon Storm 2, Windows XP and Office 2007. I am unable to synchronize to outlook. I have seen a number of reports with this exact log but no solution, tried everything from deleting the intellisync folder to complete reinstall of Deskt
-
Is there any way to open an InDesign document in Pages other than as a PDF (and be able to work on it)!?
-
Hi, after taking two images of a landscape, one exposed for the foreground and another exposed for the sky. How do I open them each in a seperate layer so I can blend the two together. Giving me a correctly exposed image of foreground and sky. I dont