We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

Re: [sap-dev] Add Zeros to a Field in Internal Table

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Reply from gourabdey91 on Dec 7 at 12:14 PM
see the Conversion routine in the domain of your required field.
Then use that conversion exit in your program..

---------------Original Message---------------
From: john.louk
Sent: Friday, December 07, 2012 10:54 AM
Subject: Add Zeros to a Field in Internal Table

Your example is material number. And, it has a non-numeric value it it. Why do you want leading zeroes?

If this is material number and you have defined your field in the internal table like MATNR. then you should not be manually changing the value. The material number is defined as a CHAR 18 with a conversion routine. the conversion routine (unless you have changed it) works as follows. If you enter only number, it puts the numbers on the right side and fills with leading zeroes. If you enter an non-numeric value anywhere, it leaves the value on the left and pads the end with spaces.

If you want all of your logic to work then define the field correctly and leave it alone. Because, if you use this value in a select statement where clause, it will still work. If you manipulate the value, the select where clause will fail.

If you are getting this data from VBAP, there is really no reason to manipulate it.


Cheers

John

 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2012 Ziff Davis, Inc. and message author.
Ziff Davis, Inc. 28 E 28th Street New York, NY 10016
gourabdey91  

Mr.
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Become a blogger at Toolbox.com and share your expertise with the community. Start today.

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language