on 2024 Aug 13 10:16 AM
Hello,
I'm a beginner in ABAP and I'm facing an issue while working with a copy of the SBOOK table. We've created a new table by copying SBOOK, but when I try to update a record to change the passenger name by using UPDATE statement the entire row gets deleted instead of just updating the field.
Could anyone help me understand why this might be happening and how to resolve it.
Thanks in advance.
Kind Regards
You need the full row as it was before in your Work Area (the variabel structure you are updating from). Like this where data is read into Work Area before updating:
DATA wa TYPE scustom.
SELECT SINGLE *
FROM scustom
WHERE id = '00017777'
INTO @wa.
wa-discount = '003'.
UPDATE scustom FROM @wa.
Otherwise you need to update specific field with this:
UPDATE <table> set <FIELDNAME> = 'xxx'
where key1 eq xxx
and key2 eq yyy...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.