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: 

removing leading zeros

Former Member
0 Kudos

Hi All,

Can any one help me how to remove leading Zeros in smartform.

Ex.: My o/p was coming as 00000000000008070. so i need to remove the leading zeros and my o/p should be 8070.

Thanks in Advance.

Ramana

8 REPLIES 8

Former Member
0 Kudos

use FM

converison_exit_alpha_output.

************

just check in sf's if &value(Z)& works to remove the leading zeros.

we can do this in scripts.

Former Member
0 Kudos

HI

use CONVERSION_EXIT_ALPHA_OUTPUT fm..

pass 000008070 to it, it will give 8070..

if helpful, reward

Sathish. R

0 Kudos
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = IBSIS-ZUONR
IMPORTING
OUTPUT = IBSIS-ZUONR
EXCEPTIONS
OTHERS = 1.

Former Member
0 Kudos

use fm CONVERSION_EXIT_ALPHA_OUTPUT

or use for that field

shift f1 left deleting leading '0'.

regards

shiba dutta

former_member181962
Active Contributor
0 Kudos

Hi ramana,

use the syntax.

shift lv_string left deleting leading '0'.

Regards,

Ravi

Former Member
0 Kudos

Hi

U can use the fm CONVERSION_EXIT_ALPHA_OUTPUT

Max

Former Member
0 Kudos

try SHIFT LEFT.... DELETING LEADING 0.....

reward points if helpful

Former Member
0 Kudos

Hi Ramana,

Use the keyword Removing Leading Zeros.

Use this FM CONVERSION_EXIT_ALPHA_OUTPUT.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

input = matnr

IMPORTING

OUTPUT = matnr

Check these links.

https://forums.sdn.sap.com/click.jspa?searchID=579915&messageID=2208475

https://forums.sdn.sap.com/click.jspa?searchID=579915&messageID=644164

https://forums.sdn.sap.com/click.jspa?searchID=579915&messageID=2812047

Regards,

Priyanka.