2009 Feb 04 4:29 PM
Hello,
I used a ranges object in a 4.7system. If the range was empty, nothing would be deleted from my table. In a ECC6.0 system, if the range is empty, everything is deleted from the table. Could this be a bug that was fixed in ECC6.0?
Edited by: Julius Bussche on Feb 4, 2009 6:19 PM
Post split from hijacked ancient thread
Hi,
are you sure about it? I just tested it in 4.6C system and it deleted all lines from table. It also makes sense. When you have condition with range such as "field IN range" then any value fulfill this condition in case of initial range.
Cheers
2009 Feb 04 5:29 PM
I think you are right.( I am in netweaver 7 PI version )
report zars no standard page heading
line-size 170
line-count 65(4).
ranges : r_matnr for mara-matnr.
data : begin of i_mara occurs 0.
data : matnr like mara-matnr.
data : end of i_mara.
move '001' to i_mara-matnr.
append i_mara.
move '002' to i_mara-matnr.
append i_mara.
delete i_mara where matnr in r_matnr.
break-point.
Its deleting entire i_mara internal table if r_matnr is blank.
I don't think this will be a bug.
We need to check if range is not initial , like below mentioned
if not r_matnr[] is initial.
delete i_mara where matnr in r_matnr.
endif.
a®
2009 Feb 05 4:32 AM
Hi,
are you sure about it? I just tested it in 4.6C system and it deleted all lines from table. It also makes sense. When you have condition with range such as "field IN range" then any value fulfill this condition in case of initial range.
Cheers
2009 Feb 05 4:35 AM
Hi,
with ranges and select-options ,if they are empty ,it would delete all contents.This is main difference between parameters and select-options.
2009 Feb 05 4:36 AM
Hi,
with ranges and select-options ,it would delete all contents(in your case) or select all contents which is main difference between parameters and select-options.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |