Application Development 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: 

Concatenate numeric values

Former Member
0 Kudos

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

deepan_v_s
Active Participant
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

rajkumarnarasimman
Active Contributor
0 Kudos

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

former_member220028
Active Contributor
0 Kudos

hi,

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

regards

Stefan Seeburger