I just discovered my first bug in the ABAP Programming language introduced with SAP NetWeaver 7.4.
Some of our customers are still on very old releases and the bug just came up when they upgraded their system.
Prior to SAP NetWeaver 7.4, you were able to do the following:
FIELD-SYMBOLS: <result> type USR02.
DATA: results type table of USR02.
append initial line to results assigning <result>.
select * from usr02 into corresponding fields of <result>.
append initial line to results assigning <result>.
endselect.This code does exactly what you would expect it to do on a release lower than NW 7.4 - It appends all entries of USR02 to the table RESULTS.
However, starting with NW 7.4 the following happens:
...
This is clearly a bug.
My guess:
Prior to NW 7.4, a pointer was passed to the select, now, the field symbol is no longer handled as a pointer within the select, instead the address of the work area is passed to the select.
This is confusing behaviour, as the same field symbols used in INTO CORRESPONDING FIELDS OF and between SELECT and ENDSELECT now point to different addresses. This should not happen.
I suggest, that either the compiler will error when having to compile this, or that the previous, correct behaviour is restored.
Request clarification before answering.
Have a look here: works as specified.
https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/ABAPINTO_CLAUSE.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Even in higher releases the behavior is as you describe. You should open an incident for component BC-ABA-LA.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.