Questions and Answers about ABAP/4 Statements
Q:Why aren’t bit operations used much in ABAP/4? What does it use instead?
A:The use of a bit operation creates an operating system dependency. This reduces portability, so they are not used unless necessary. Instead, a single character variable is used to hold a single on/off value. Most commonly, “X” represents an “on” value and space represents an “off” value.
Q:Why do they use X and space to represent the binary values of on and off? I should think they would use 1/0, T/F, or Y/N, as is common in the industry.
A:This convention is for compatibility with character-based user interfaces. Written out, the X value indicates a present selection, and space indicates not present.
Q:You recommend opening multiple sessions whenever I log on. Isn’t this a waste of resources? If everyone did that, wouldn’t it slow the application server down?
A:The most precious resource is CPU. It is true that a small amount of additional memory is required on the application server to accommodate each new session. However, no CPU is used by the idle session, so it does not slow the server down. If you write a program that begins looping, it will waste a tremendous amount of resources, primarily CPU, and will without a doubt degrade the server while it is running. If you are unable to stop it, you will be unable to mitigate the waste of resources. Unchecked, the program will run, possibly for five or ten minutes, until it exceeds its allotment of CPU and then it will be terminated. The next time you run it, it might do the same again. In short, opening another session is choosing the lesser of two evils.
Q:How do padding bytes affect the use of varying? Do I have to watch out for anything as I do when moving from and to field strings?
A:The easiest way to ensure that varying will work is to make sure the exact sequence of fields repeats. If the same sequence of fields is repeated, the same number of bytes will always separate them. As long as you follow this rule, there is no need to think about padding bytes.
Popularity: 5% [?]






