on ‎2021 Nov 03 2:43 PM
Hello everyone,
I need some help with syntax in ABAP
Is there a way to write another select statement here?
To put more context to it, I have multiple rows in a table for the same document (4 rows for example). For 2 of them AUFNR is INITIAL, for other 2 is the same number '0001' (but for other docs its diff number). I need to set so all 4 rows have the same value for AUFNR ('0001').
Request clarification before answering.
Subqueries cannot be used in the SELECT list.
For combining SELECT lists from different sources, Joins can be used.Maybe you can do something with UNION?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Horst,
thank you so much for answering. I did try using UNION but I had no luck getting the needed result. Like I said I need to change the value of one record from the select list. If this was a SAP HANA sql I would try something like this
SELECT acdoca~RLDNR,
acdoca~BELNR,
(SELECT top 1 aufnr FROM acdoca WHERE aufnr is not initial ) as aufnr,acdoca~REBZG,
acdoca~AWREFFROM acdoca
INTO TABLE @it_acdoca.
This also might not work bcuz I need to specify for witch document number is he getting AUFNR.
Since this can't be used in ABAP, can you, please write me a code sample of what I could do to solve this without losing any records (I need to get those sets where the AUFNR is initial but to change that so it has value) ? 🙂
Best regards.
| User | Count |
|---|---|
| 42 | |
| 26 | |
| 16 | |
| 6 | |
| 3 | |
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.