Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Reply from john.louk on Dec 20 at 10:35 AM I believe it also had a dash in it. Also, we have not heard back from the OP as to whether any of the suggestions helped. Nor, has the OP anwsered any of the questions. This issue with the leading zeroes would be if the field was then going to be used to select data in SAP as leading zeroes with non-numeric value still in the field would not work in selecting SAP material data. Unless, you change SAP's conversion routine (MATN1) which is two function modules. Honestly too me an easy solution (if you really had to do this; I am not sure that I see a reason to do this) is below. It is a character field length 18. Shift right deleting trailing space (check sfull statement syntax). translate <field> using ' 0' (there is a blank space before the zero). or use the REPLACE cammand either is fine (check sfull statement syntax). Cheers John
| | | ---------------Original Message--------------- From: RBIrving Sent: Wednesday, December 19, 2012 2:18 PM Subject: Add Zeros to a Field in Internal Table Sorry, forgot to mention that you have to remove the M first. Try it this way then. This assumes the M will only be the last character DATA: nv_matnr(18) TYPE n, w(3) TYPE n. IF ematnr CA 'Mm'. w = strlen( ematnr ). SUBTRACT 1 FROM w. matnr = nv_matnr = ematnr(w). else. matnr = ematnr. ENDIF. Ralph B Irving Senior Programmer Analyst | | Reply to this email to post your response. __.____._ | _.____.__ |