‎2024 May 21 8:50 AM - edited ‎2024 May 22 7:02 AM
Question title is the error I get in complier:
I simply want to concatenate all BAPI error messages, I can do with Reduce maybe.
but now I am curious why am I getting error.
ls_head is a structure with fields MSGTYP, MESSAGE(char1024) etc..
I understand that another ( ) after FOR essentially means creating rows with every loop which is obviously wrong but I get error for the line above it first.
Code below:
DATA: ls_head TYPE ZSK_S_VBAK.
ls_head = VALUE #( FOR <ls_ret> IN lt_return2 WHERE ( type = 'E' )
( message = message && lc_semicol && <ls_ret>-message ) ).
Request clarification before answering.
Hi, according to the documentation you can't use FOR with VALUE if your type is a structure. This is only possible if your type is an internal table.
VALUE - Structures
Syntax
... VALUE dtype|#( [let_exp]
[BASE dobj]
comp1 = dobj1 comp2 = dobj2 ... ) ...
VALUE - Internal Tables
Syntax
... VALUE dtype|#( [let_exp]
[BASE itab]
[FOR for_exp1
FOR for_exp2
... ]
( line_spec1 )
( line_spec2 )
... ) ...Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 11 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.