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

data bits.

Former Member
0 Likes
590

hi frends i am using a variable to store the material no as:

data var_mat_no(18) type c.

this variable stores the material no read from a data base table.now as the size specfied of the material no. is 18 i took the variable's length also 18.but when i dispalyed the var_mat_no it shows the material no with length 18.and the actual material no is of 8 digits like if the material no is 13000000 then it displays it as:

000000000013000000

i want to display it as only 13000000.and want to neglect the 10 zero's before it.wat shud i do?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
555

Did you try the SHIFT statement?

shift matnr LEFT  DELETING LEADING  '0'

Also remember to CONDENSE the field after the shift.

Br,

Advait

Edited by: Advait Gode on Sep 18, 2009 8:16 AM

4 REPLIES 4
Read only

Former Member
0 Likes
556

Did you try the SHIFT statement?

shift matnr LEFT  DELETING LEADING  '0'

Also remember to CONDENSE the field after the shift.

Br,

Advait

Edited by: Advait Gode on Sep 18, 2009 8:16 AM

Read only

0 Likes
555

thnx dear...i am just a beginner cud u plz tell me how cud i condense and wat does it do?

Read only

0 Likes
555

No problem, we all were new once upon a time and this is what we did.

Goto t-code ABAPHELP --> Enter the keyword you wish to lookup the help documentation for, in your case CONDENSE. ABAP keyword documentation will open for the entered keyword. Read it and you will know what it does -:) . Simple.

Br,

Advait

Read only

0 Likes
555

thnx