Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Delete Source Package not working in Start Routine for Range

aakash2903
Newcomer
0 Likes
735

Hello Experts,

I have requirement of range between order series, other than all order number has to be deleted from source package. I have written start routine but it is not providing me any kind of data in required DSO.

Code is written as below,

DELETE SOURCE_PACKAGE WHERE
( AUFNR NOT BETWEEN '000010000000' AND '000019999999' ) OR
( AUFNR NOT BETWEEN '000020000000' AND '000029999999' ) OR
( AUFNR NOT BETWEEN '000030000000' AND '000039999999' ) OR
( AUFNR NOT BETWEEN '000040000000' AND '000049999999' ) OR
( AUFNR NOT BETWEEN '000050000000' AND '000059999999' ) OR
( AUFNR NOT BETWEEN '000060000000' AND '000069999999' ) OR
( AUFNR NOT BETWEEN '000070000000' AND '000079999999' ).

Hello Experts,

I have requirement of range between order series, other than all order number has to be deleted from source package. I have written start routine but it is not providing me any kind of data in required DSO.

Code is written as below,

DELETE SOURCE_PACKAGE WHERE
( AUFNR NOT BETWEEN '000010000000' AND '000019999999' ) OR
( AUFNR NOT BETWEEN '000020000000' AND '000029999999' ) OR
( AUFNR NOT BETWEEN '000030000000' AND '000039999999' ) OR
( AUFNR NOT BETWEEN '000040000000' AND '000049999999' ) OR
( AUFNR NOT BETWEEN '000050000000' AND '000059999999' ) OR
( AUFNR NOT BETWEEN '000060000000' AND '000069999999' ) OR
( AUFNR NOT BETWEEN '000070000000' AND '000079999999' ).
1 REPLY 1
Read only

matt
Active Contributor
631

Yes. It will delete everything. You really need to brush up on your boolean algebra. If any of those clauses is true, then the record is deleted.

000015000000 does not match your first clause, but matches all the rest. It is not between the 2nd to 7th ranges. Ergo it is a match. So it will be deleted. Anything between 000010000000 and 000079999999 matches your condition.