FUNCTION zalv_variant_delete.
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" VALUE(I_REPORT) TYPE LTDX-REPORT
*" VALUE(I_VARIANT) TYPE LTDX-VARIANT
*" EXCEPTIONS
*" NO_DELETION
*" NO_ENTRY
*"----------------------------------------------------------------------
DATA: ld_mandt TYPE sy-mandt,
ld_count TYPE i.
ld_mandt = sy-mandt.
SELECT COUNT( * ) FROM v_ltdx CLIENT SPECIFIED
INTO ld_count
WHERE mandt = ld_mandt AND
report = i_report AND
variant = i_variant .
IF sy-subrc <> 0.
RAISE no_entry.
ELSE.
IF ld_count > 0.
DELETE FROM ltdx WHERE report = i_report AND variant = i_variant.
IF sy-subrc <> 0.
RAISE no_deletion.
ENDIF.
ENDIF.
ENDIF.
ENDFUNCTION.
阅读(717) | 评论(0) | 转发(0) |