Dave Fosket
New Member
- Joined
- Jul 3, 2014
- Messages
- 1
Greetings Excel Experts,
I have a problem with some materials with leading zeroes that Excel automatically trims on exporting from SAP. For example, 000100-0113 exports as 100-0113. However, when I query the trimmed value in SAP, the material is not found, and it generates and 619 runtime error. In the code below, the error is caught the first time through and one leading zero is appended to the beginning of the string. The code then tries to re-query the material. If the material only has one leading zero, the code works as expected. If more than one leading zero is required, the code fails to catch the subsequent error. Any suggestions on fixing this are greatly appreciated! Thanks in advance!
I have a problem with some materials with leading zeroes that Excel automatically trims on exporting from SAP. For example, 000100-0113 exports as 100-0113. However, when I query the trimmed value in SAP, the material is not found, and it generates and 619 runtime error. In the code below, the error is caught the first time through and one leading zero is appended to the beginning of the string. The code then tries to re-query the material. If the material only has one leading zero, the code works as expected. If more than one leading zero is required, the code fails to catch the subsequent error. Any suggestions on fixing this are greatly appreciated! Thanks in advance!