on 2008 Aug 13 1:42 PM
Hello
I am writing a start routine where i want to delete the records which are not of status closed.
now if i write this code
delete SOURCE_PACKAGE WHERE CRM_USSTAT eq '0005'
Will this delete the records or will i have to write this code
loop at SOURCE_PACKAGE assigning <source_fields>.
if <source_fields>-CRM_USSTAT eq 'E0005'.
delete SOURCE_PACKAGE.
endif.
endloop.
Please can someone tell me the difference in this.
thanks
Hi,
delete won't work in BI 7, try this:
loop at SOURCE_PACKAGE
if CRM_USSTAT eq '0005'.
raise exception type CX_RSROUT_SKIP_RECORD.
endif.
endloop.
ie u have to use raise exception type CX_RSROUT_SKIP_RECORD to delete a record.
Narendra Reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
well normally this one will do.
delete SOURCE_PACKAGE WHERE CRM_USSTAT eq '0005'
But it deletes all records with status '0005' and I think you will keep only one status. So if '0005' is the status you like to keep you need to change eq to ne.
regards
Siggi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is good enough. You do not need to loop through.
delete SOURCE_PACKAGE WHERE CRM_USSTAT eq '0005'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.