Advertisement
yaramohamed78

ZASG_SAL_DELETE

Jan 18th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 1.08 KB | None | 0 0
  1. *&---------------------------------------------------------------------*
  2. *& Report  ZASG_SAL_DELETE
  3. *&
  4. *&---------------------------------------------------------------------*
  5. *&
  6. *&
  7. *&---------------------------------------------------------------------*
  8.  
  9. REPORT ZASG_SAL_DELETE.
  10. TABLES: ZASG_SAL.
  11. DATA: l_subrc TYPE SY-SUBRC,
  12.       wa_emp TYPE ZASG_SAL,
  13.       it_emp type TABLE OF ZASG_EMP.
  14.  
  15. SELECTION-SCREEN BEGIN OF BLOCK SELECTION WITH FRAME TITLE text-001.
  16. PARAMETERS :     EMP_ID LIKE ZASG_SAL-empid OBLIGATORY.
  17. SELECTION-SCREEN END OF BLOCK SELECTION.
  18.  
  19. wa_emp-empid = EMP_ID.
  20. SELECT * FROM ZASG_EMP
  21.   INTO CORRESPONDING FIELDS OF TABLE it_emp
  22.   WHERE id = wa_emp-empid .
  23.  
  24.   IF  it_emp[] IS INITIAL.
  25.     MESSAGE ID 'ZINSERTION_ERRORS' TYPE 'I' NUMBER '007'.
  26. ELSE.
  27. CALL FUNCTION 'Z_ASG_FN_DELETESAL'
  28.   EXPORTING
  29.     WA_EMP        = wa_emp
  30.  IMPORTING
  31.    E_SUBRC       =  l_subrc.
  32. if l_subrc = 1.
  33.   MESSAGE ID 'ZINSERTION_ERRORS' TYPE 'I' NUMBER '010'.
  34.  ELSEIF l_subrc = 0.
  35.    MESSAGE ID 'ZINSERTION_ERRORS' TYPE 'I' NUMBER '004'.
  36.    EXIT.
  37.  ENDIF.
  38. ENDIF.
  39. INITIALIZATION.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement