Skip to Content
0
May 12, 2010 at 12:51 PM

Delete Routes thru BDC

263 Views

Hi Experts,

i have a scenario where i am writing a BDC to mass delete Routes from the tcode 0VTC. The routes to be deleted are uploaded into the deletion program using an excel file.

When i select a route and click on delete button in tcode 0VTC, i get pop-up message for few routes saying the selected route has dependent entries followed by 3 buttons on that pop-up message.

First button says 1. All entries, 2. Without Dep. Records, 3. Cancel.

My requirement is to delete all entries, so i will click on the first button on the pop-up message.

PERFORM bdc_dynpro TABLES i_bdc USING 'SAPLSPO2' '0300'. ->Pop-up Screen Program

PERFORM bdc_field TABLES i_bdc USING 'BDC_OKCODE' '=OPT1'. -> First button (Delete all entries)

The above code will be inserted after the delete button coding.

The question i have is how to identify which route has got dependent entries?? Once i can get to know that, then i can put a condition in the code.

Looking forward to answers.