sir pls check this statements which was used in the program.
types : begin of it_bseg,
bukrs TYPE bukrs, "Company Code
belnr TYPE belnr_d, "Accounting Document Number
gjahr TYPE gjahr, "Fiscal Year
buzei TYPE buzei, "Number of Line Item Within Accounting Document
augdt TYPE augdt, "Clearing Date
wrbtr TYPE wrbtr, "Amount in document currency
hkont TYPE hkont, "General Ledger Account
sgtxt TYPE sgtxt, "Item Text
lifnr TYPE lifnr, "Account Number of Vendor or Creditor
bschl TYPE bschl, "Posting Key
koart TYPE koart, "Account Type
umskz TYPE umskz, "Special G/L Indicator
augbl TYPE augbl, "Document Number of the Clearing Document
shkzg TYPE shkzg, "Debit/Credit Indicator
dmbtr TYPE dmbtr, "Amount in Local Currency
rebzg TYPE rebzg, "Number of the Invoice the Transaction Belongs to
qbshb TYPE qbshb, "Withholding Tax Amount (in Document Currency)
ebeln TYPE ebeln, "Purchasing Document Number
nebtr TYPE nebtr, "Net Payment Amount
ENDOF ty_bseg.
data : it_bseg type table of ty_bseg,
wa_bseg type ty_bseg.
IF sy-subrc = 0.
SELECT bukrs "Company Code
belnr "Accounting Document Number
gjahr "Fiscal Year
buzei "Number of Line Item Within Accounting Document
augdt "Clearing Date
wrbtr "Amount in document currency
hkont "General Ledger Account
sgtxt "Item Text
lifnr "Account Number of Vendor or Creditor
bschl "Posting Key
koart "Account Type
umskz "Special G/L Indicator
augbl "Document Number of the Clearing Document
shkzg "Debit/Credit Indicator
dmbtr "Amount in Local Currency
rebzg "Number of the Invoice the Transaction Belongs to
qbshb "Withholding Tax Amount (in Document Currency)
ebeln "Purchasing Document Number
nebtr "Net Payment Amount
FROM bseg
INTOTABLE it_bseg
WHERE bukrs = wa_bkpf-bukrs
AND augbl = wa_bkpf-belnr
AND augdt = wa_bkpf-budat
AND gjahr = wa_bkpf-gjahr.
IF sy-subrc = 0.
DELETE it_bseg WHERE belnr = pr_belnr.
ENDIF.
ENDIF.
ENDIF.
IN the point IF SY-SUBRC = 0.
the program was terminating.