Hi all,
I'm trying to delete a row from table.
My first conditions:
SELECT SINGLE mfrpn, ean11, matnr, prdha FROM mara INTO @DATA(ls_mara)
WHERE matnr EQ @lv_matnr.
I have a table : ZADOBE_CODE
I need to check matnr and prdha and if I find same data in ZADOBE_CODE and ls_mara I should delete mfrpn. I wrote that:
SELECT SINGLE matnr, prdha FROM zadobe_code INTO @DATA(ls_zadobe_code)
WHERE matnr EQ @ls_mara-matnr OR prdha EQ @ls_mara-prdha.
IF ls_zadobe_code IS NOT INITIAL.
"DELETE mfrpn FROM ls_mara.
ELSE.
ENDIF.
But my delete row is wrong. How can I write?
Request clarification before answering.
My solution is that:
CLEAR ls_mara-mfrpn.Thanks for all helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try the following example:
Select fields (a~... , b~...) From ( mara as a LEFT OUTER JOIN zadobe_code as b ... )
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FREE ls_mara-mfrpn.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DELETE FROM target INDEX 1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See ABAP doc:
Either use
DELETE FROM target [WHERE sql_cond]or
DELETE target FROM source.
If you use the second form, source (the work area) must have same structure as target as said by SAP: "The content of the work area is not converted and is interpreted according to the structure of the DDIC database table or DDIC view."
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 17 | |
| 12 | |
| 8 | |
| 8 | |
| 4 | |
| 3 | |
| 3 | |
| 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.