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

Concatenate numeric values

Former Member
0 Likes
1,266

Hi all,

I have an issue in concatenating '000'. When i give any other number instead of '0'  then its gets printed but zeros alone are not getting printed.

If i add dot infront of zeros for eg  '.000' then the zeros gets printed. can anyone help in this regard.

Regards

Sam.

5 REPLIES 5
Read only

deepan_v_s
Active Participant
0 Likes
1,181

Hello Sam,

Declare the variable of type STRING and concatenate the result into that variable.

Tyr printing that variable.

Hope it helps !!!

Regards,

Deepan Swaminathan

Read only

Former Member
0 Likes
1,181

Hi Samuel,

When You concatenate datatype should have only character.

Final result only shall be a numeric data.

Eg:-

DATA: a type C LENGTH 3 VALUE '0',     

b type c length 3 VALUE '000',     

c type c LENGTH 10,     

d type p DECIMALS 3.

CONCATENATE a b into c SEPARATED BY '.'.

d = c.

write: c, d.

Read only

Former Member
0 Likes
1,181

I already tried those options also but dint work out..

Read only

rajkumarnarasimman
Active Contributor
0 Likes
1,181

Hi Samuel,

At where you are printing,

  1. Report(ALV)
  2. Forms(Smartform/Adobeform)

If it is report program, kindly check whether in field catalog NO_ZERO= 'X' is enabled, if the attribute is set, system won't show the zero in ALV report for the appropriate field.

If form, kindly check whether any condition is mentioned in Condition tab for the text element

Regards

Rajkumar Narasimman

Read only

Former Member
0 Likes
1,181

hi,

it depends on the type of your variable. e.g. numc values always are filled with leading 0.

regards

Stefan Seeburger