Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *&---------------------------------------------------------------------*
- *& Report ZASG_SAL_DELETE
- *&
- *&---------------------------------------------------------------------*
- *&
- *&
- *&---------------------------------------------------------------------*
- REPORT ZASG_SAL_DELETE.
- TABLES: ZASG_SAL.
- DATA: l_subrc TYPE SY-SUBRC,
- wa_emp TYPE ZASG_SAL,
- it_emp type TABLE OF ZASG_EMP.
- SELECTION-SCREEN BEGIN OF BLOCK SELECTION WITH FRAME TITLE text-001.
- PARAMETERS : EMP_ID LIKE ZASG_SAL-empid OBLIGATORY.
- SELECTION-SCREEN END OF BLOCK SELECTION.
- wa_emp-empid = EMP_ID.
- SELECT * FROM ZASG_EMP
- INTO CORRESPONDING FIELDS OF TABLE it_emp
- WHERE id = wa_emp-empid .
- IF it_emp[] IS INITIAL.
- MESSAGE ID 'ZINSERTION_ERRORS' TYPE 'I' NUMBER '007'.
- ELSE.
- CALL FUNCTION 'Z_ASG_FN_DELETESAL'
- EXPORTING
- WA_EMP = wa_emp
- IMPORTING
- E_SUBRC = l_subrc.
- if l_subrc = 1.
- MESSAGE ID 'ZINSERTION_ERRORS' TYPE 'I' NUMBER '010'.
- ELSEIF l_subrc = 0.
- MESSAGE ID 'ZINSERTION_ERRORS' TYPE 'I' NUMBER '004'.
- EXIT.
- ENDIF.
- ENDIF.
- INITIALIZATION.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement