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

are there any data elements to represent %.

Former Member
0 Likes
1,066

dear all,

I need to caliculate a Percentage amount and represent it as a XXX%. can I use any standard data element to acomplish this.

regards,

Vj

dear all,

I need to caliculate a Percentage amount and represent it as a XXX%. can I use any standard data element to acomplish this.

regards,

Vj

4 REPLIES 4
Read only

Former Member
0 Likes
953

There are no data elements for that.

Yu should probably concatenate the Percentage value with a % and diaply using a char type variable.

data: v_int type i,

v_char(10).

v_char = v_int.

concatenate v_char '%' into v_char.

write:/ v_char.

Regards,

Ravi

Read only

Former Member
0 Likes
953

I guess there is nothing like that , you have to calculate the percentage and display as XXX%

Read only

former_member194669
Active Contributor
0 Likes
953

Hi,

You can do this way.



data per type i value '153'.
write (4) per using edit mask '___%'.

aRs

Read only

Former Member
0 Likes
953

There are some existing data elements you could use to declare your data variable, and then use an edit mask as aRs suggested to add the '%' in the output.

For example P15_PERNE. This is type DEC with 6 characters, 3 for decimals, and output length of 7.

You could also look at AM_PPERC, AGKPZ.