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

Regarding supressing left zero

Former Member
0 Likes
540

Hello Guru,

I am new to ABAP. I have one small problem. please help me.

My problem is :

DATA : INDEX LIKE BKPF-BELNR.

DATA : SUM LIKE BKPF-BELNR.

SUM = INDEX.

SUM = SUM + 1.

INDEX and SUM are 10 character. if i give INDEX = 0100000023.

SUM ALSO SHOUD COME 0100000024. But SUM is coming 1000000024 by missing one zero in left.

so please let me know how i can avoide that.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
524

no both method is not working.

i want result SUM = 01000000024.

5 REPLIES 5
Read only

Former Member
0 Likes
524

Hi,

After SUM = SUM + 1.

Call Function Conversion_Exit_Alpha_Input

Exporting

Input = sum

Importing

Output = sum.

Regards,

Bharat.

Read only

Former Member
0 Likes
524

Hello,

This is what u want

PARAMETERS : INDEX LIKE BKPF-BELNR.

DATA : SUM LIKE BKPF-BELNR.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

INPUT = INDEX

IMPORTING

OUTPUT = INDEX.

SUM = INDEX.

ADD 1 TO SUM.

WRITE: SUM.

Regards,

Vasanth

Read only

Former Member
0 Likes
525

no both method is not working.

i want result SUM = 01000000024.

Read only

0 Likes
524

Hello,

Try this.

PARAMETERS : INDEX LIKE BKPF-BELNR.

DATA : SUM(10) TYPE N.

SUM = INDEX.

ADD 1 TO SUM.

WRITE: SUM.

Vasanth

Read only

Former Member
0 Likes
524

thanks venaktesh

problem sovled.