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 john.louk on Dec 7 at 10:53 AM
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

---------------Original Message---------------
From: pavangonuguntla2008
Sent: Friday, December 07, 2012 7:17 AM
Subject: Add Zeros to a Field in Internal Table

Generally we copy a fields of matnr field from vbap to our internal table ,my question is normally matnr field is like 'm-01' but i want to store in my table like '00000m-01' in matnr ,
please suggest me relevant answer .

 
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
john.louk  

Workflow Designer
12 achievements
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Earn Recognition for Your Contributions at Toolbox for IT. Gain Points for Community Achievements

_.____.__

0 comments:

Post a Comment

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