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

Toolbox sap-dev

Reply from PCorpGal on Dec 11 at 12:50 PM
The MATNR field is a CHAR18 field. The visible length of MATNR appears as 000nnnnnnn (char10).
You might try this approach…
1. Define some temporary field:
MATNR2 TYPE CHAR10. and
MATNR3 TYPE CHAR10.
2. In your program, do the statements:
SHIFT <table>-MATNR LEFT DELETING LEADING '0' IN CHARACTER MODE.
MOVE <table>-MATNR TO <table>-MATNR2.
CONCATENATE '000' <table>-MATNR2 INTO MATNR3.

…resulting in MATNR3 appearing as 000nnnnnnn

Also if you invoke SE37 and enter function module 'CONVERSION_EXIT_MATN1_INPUT' you can test it by entering a material number and it'll show you the resulting CHAR18 material number.

Good Luck!
-Emily

---------------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
PCorpGal  
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Toolbox.com for iPhone & Android: Ask Questions & Get Answers Anywhere. Download the Free App

_.____.__

0 comments:

Post a Comment

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