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

Function MOdule

Former Member
0 Likes
769

HI ,

I there any function module to delete unnessary zero numbers .. example at the moment the number is '040' want to display in the alv as '40'..any example regarding this is helpfull..

Thxs,

vind.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
676

fcat-no_zero = 'X'.

check this.

regards

Prabhu

6 REPLIES 6
Read only

Former Member
0 Likes
676

<b>CONVERSION_EXIT_ALPHA_OUTPUT<b></b></b>

Read only

Former Member
0 Likes
677

fcat-no_zero = 'X'.

check this.

regards

Prabhu

Read only

Former Member
0 Likes
676

Please use this FM

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

input = variable

IMPORTING

OUTPUT = variable

This should be done before passing the values to the grid.

IF you dont want to change the values in the internal table then change the fieldcat of the field to fcat-no_zero = 'X'.

Message was edited by: Dominic Pappaly

Read only

Former Member
0 Likes
676

hi vind,

check the FM <b>CONVERSION_EXIT_ALPHA_OUTPUT</b>

call function 'CONVERSION_EXIT_ALPHA_OUTPUT'

exporting

input = itab-matnr

importing

output = itab-matnr.

endif.

hope this helps,

do reward if it helps,

priya.

Message was edited by: Priya

Read only

Former Member
0 Likes
676

hi vind,

FM <b>'CONVERSION_EXIT_ALPHA_OUTPUT'</b> removes only the leading<b> zeros</b>.

ie. 00099 to 99.

data: number(15) value '23516000',

zer(5) value '0'.

shift number right deleting trailing zer.

write number.

Reward points if it s helpful

Regards

Alfred

Read only

Former Member
0 Likes
676

Hi,

Before appending that number into the internal table

use PACK.

e.g. PACK(field) into field.

Hope this will help.

-Umesh