Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Amount field display as 0.00

Former Member
0 Likes
1,789

Hi friends,

we have requirement to display amount value as 0.00 if amount is 0 in the custom screen field(data type CURR).

user is requesting us to display amount in screen field with 0.00 if the amount is 0.

i want to do this through screen attributes ..

Please help

3 REPLIES 3
Read only

Former Member
0 Likes
1,134

Hi,

Enter NUMCV in the ConvExit screen field attribute. You should also have CURR in the Format attribute and T001-WAERS (or some such field) in the Reference field attribute of the screen field in question. This will cause an initial CURR type input field to display as 0.00. Without the ConvExit NUMCV, your custom input currency field will simply be a blank field ready for input. If the field is not an input field, then you should see 0.00 even without the NUMCV. Please explain further if this is not what you are asking for.

Best Regards,

Jamie

Read only

0 Likes
1,134

HI Thanks for your reply.

we need to display for input amount screen field once user enter value 0 it shoud display as 0.00..

as you said i enter and it works fine if i enter 0.00 or 20.00.etc.

if i enter 0 or 20..etc. its going to dump and given msg as shown below.

i etntered amount screen field attributes as follows:

Attrubutes:

under Dict TAB:

FORMAT CURR

Conv.Exit: NUMCV

Ref.field : T001-WAERS

under program TAB

inout field & ouput field check boxes checked

dump:

runtime Error UC_OBJECTS_NOT_CHARLIKE

Occurred on 10.05.2008 at 05:24:31

he current statement is defined for character-type data objects only.

Error analysis:

Only character-type data objects are supported at the argument

position "OUTPUT" for the statement

"TRANSLATE".

In this case, the operand "OUTPUT" has the non-character-type "P". The

current program is flagged as a Unicode program. In the Unicode context,

type X fields are seen as non-character-type, as are structures that

contain non-character-type components.

Please help me.

thanks

Read only

0 Likes
1,134

Hi,

When I try to recreate your problem in my own system, entering 0 or 20 results in output of 0.00 or 20.00 with no dump. It sounds like you might have an unnecessary or invalid TRANSLATE statement in your PAI. Is the dump happening in the standard code, or is it happening in your own custom code? If the error is happening in your own code and you are trying to somehow TRANSLATE to get the decimals, simply remove the TRANSLATE logic because the screen field attributes should now handle the decimal places automatically for you.

If you are not able to determine what is causing the dump, please reply with a snapshot of the code in which the dump is happening.

Regards,

Jamie