cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with display value in the cell of a table

Former Member
0 Kudos

Hi experts!

I have this problem: I have a value of variable that is displayed in a cell of my table. This variable is type char, but the value is numeric for ex. 000000000176. I have to delete in this visualization this zeros. Is there a simple method for delete this zeros directly as property of the field of the table that I visualize in the web dynpro?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Use function module 'CONVERSION_EXIT_ALPHA_OUTPUT' before the binding the table with the context

arjun_thakur
Active Contributor
0 Kudos

Hi,

You can use CONVERSION_EXIT_ALPHA_OUTPUT Conversion Exits to trim the preceeding zeros.


DATA: TEMP TYPE C LENGTH 10 VALUE '000000123'.
DATA TEMP1 TYPE C LENGTH 10.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
  EXPORTING
    INPUT         = TEMP
 IMPORTING
   OUTPUT        = TEMP1
          .
" TEMP1 will have '123'.

I hope it helps.

Regards

Arjun

Former Member
0 Kudos

Tks a lot, I have solved associating the routine conversion CONVERSION_EXIT_ALPHA_OUTPUT at the data element and after, when I have binded the field, I formatted the variable selecting "compress input".

Former Member
0 Kudos

Go to the properties of context attribute to which this table column is binded. There is a option to remve leading zeros. or before binding the table to context node. remove the leading zeros by this statement:

shift <your variable containing values> left deleting leading 'O'. now bind the table to node.

Regards

Vishal Kapoor

Former Member
0 Kudos

unfortunately this property is not avalaible for variable type char... I have only the property "Formatting" and I have this options:

Compression: default value

compress input

do not compress input

I have selected "compress input" but I have always the zeros displayed...

Former Member
0 Kudos

Hi,

As Vishal suggested, you can use the SHIFT statement and try to replace Zeroes with spaces later..

Try this out........

Is there any restriction in using this C type...I mean why dont you use the 'I' or N types..

Regards,

Lekha.