Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Question from jeansagi on Mar 18 at 12:11 PM Hi everyone, I need to set the "Deletion Indicator" of a given group of reservations. I want to use the bapi BAPI_RESERVATION_CHANGE for that purpose and I tested it and it has worked well. Lets say I want to use this BAPI with say 1 million reservations... What might be the best approach to do this? I've thought these approaches:
- it_res <- all the reservations to mass delete say 1 million
LOOP AT it_res INTO... _____Set needed values for BAPI _____CALL FUNCTION 'BAPI_RESERVATION_CHANGE' _____IF no-errors. __________CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'. _____ELSE. __________CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'. _____ENDIF. ENDLOOP. - it_res <- all the reservations to mass delete say 1 million
LOOP AT it_res INTO... _____Set needed values for BAPI _____CALL FUNCTION 'BAPI_RESERVATION_CHANGE' _____"No Error Check !! ENDLOOP. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'. The first approach is that for every reservation passed to BAPI_RESERVATION _CHANGE a COMMIT or ROLLBACK is issued depending on the result of the bapi. I'm concerned that this could be very heavy if I'm dealing with a lot of reservations. The second approach is based on the fact that almost all of the reservations are not been worked (or locked) by anyone so one may fairly assume that the BAPI won't fail because of locks or something like that. I think this approach might be faster that the first one.But the COMMIT at he end could be very heavy too. In the first approach I don't know if using BAPI_TRANSACTION_COMMIT in asyncronous mode might be of help considering there would be a lot of reservation to deal with. All in all, Please can you provide some recomendations or what approach might be best suited for. Thanks in advance. J. PD: I've tryed standar transaction MBVR (Administer - [Reservation]) but this fisically deletes the reservations and I don't want that. I just want to set the "Deletion Indicator" of a given group of reservations (a lot of them indeed). | Reply to this email to post your response. __.____._ | _.____.__ |