Question and Answer about SAP ABAP Assignments, Conversions, and Calculations
Monday, June 30th, 2008Q:I can use the clear statement to set a value to blanks or zeros, but is there a statement that can set a variable back to the value I specified using the value addition on the data statement?
A:No, unfortunately there isn’t.
Q:Can I use the move statement with field strings of differing lengths?
A:Yes, you can. They will both be treated as variables of type c. The sending value will be truncated or padded on the end with blanks as needed before assignment to the receiving field string.
Q:Why do I need to know about padding bytes? Doesn’t the system take care of that if I just follow all the rules?
A:Technically, yes, it will. However, as you code more programs, occasionally you will inadvertently assign a field string incorrectly using move. If you understand padding bytes and how they affect your output, hopefully you will be able to recognize the cause of your problems, and won’t resort to a “hack” to make the program work. (more…)
Popularity: 9% [?]