cancel
Showing results for 
Search instead for 
Did you mean: 

How to cancel update thru an update routine?

Sujai
Participant
0 Kudos

Hi

I am using a field routine in the update rule and have to cancel the entire load if a condition is not satisfied and create a monitor entry. I have written the code and when i test it using simulation i get the message "Error 1 in update". what does that mean?

I am pasting the code bit below:


 SELECT SINGLE ...
  IF SY-SUBRC = 0.
     ...
      ABORT = 0.
   else.
* Display error in monitor
     MONITOR-msgid = 'ZBW_TEST'.
     MONITOR-msgty = 'E'.
     MONITOR-msgno = 000.
     MONITOR-msgv1 = COMM_STRUCTURE-SALESORG.
     MONITOR-msgv2 = COMM_STRUCTURE-Plant.
     MONITOR-msgv3 = COMM_STRUCTURE-material.
     append MONITOR.

     ABORT = 8.
     exit.
  ENDIF.

The monitor messaage is also not displayed. What is going wrong here?

Regards

Sujai

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184494
Active Contributor
0 Kudos

The ABORT code works - if you set it to anything other thsan 0 the update gets cancellled - have used it in many cases before.

Not sure about the monitor messages though...

Sujai
Participant
0 Kudos

Hi

I got the ABORT code to work, but when we set ABORT to 8 or any other value, does it set the PSA record to error status and the request to RED??? because my request has the technical status as RED when the ABORT happened.

what happens if I update several targets and have to ABORT in just one target??

Sujai

former_member184494
Active Contributor
0 Kudos

AFAIK

the overall status of the request - the technical status of the request is set to red - but if you are loading multiple targets - I guess that only the request pertaining to the DSo / Cube will be set to red - since the update rules are processed in sending data from datasource / PSA to the new data table...

virenp_devi
Contributor
0 Kudos

Hi,

I think technical status of the complete request will turn into RED which means it will be RED into all the data targets in case of 3.x data flow. This is because there is only one data mart set for the request loading data from same source to the multiple data targets ( if you are loading data to all the data targets at the same time). It may show green in the manage of targets where the ABORT is not done in between but when you go into the request it will be RED.

In case of 7.0 we have to create new DTP for each data target so not a problem in u r case. Single request correspond to single data target.

Hope this helps.

Regards,

Viren