Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *&---------------------------------------------------------------------*
- *& Report ZASG_SAL_INSERT
- *&
- *&---------------------------------------------------------------------*
- *&
- *&
- *&---------------------------------------------------------------------*
- REPORT ZASG_SAL_INSERT.
- TABLES: ZASG_SAL , ZASG_EMP , TCURC.
- DATA: l_subrc TYPE SY-SUBRC,
- wa_emp TYPE ZASG_SAL,
- it_emp type TABLE OF ZASG_EMP,
- wa_emp_copy TYPE ZASG_SAL,
- it_sal type TABLE OF TCURC.
- SELECTION-SCREEN BEGIN OF BLOCK SELECTION WITH FRAME TITLE text-001.
- *SELECTION-SCREEN SKIP.
- *SELECTION-SCREEN BEGIN OF LINE.
- PARAMETERS : EMP_ID LIKE ZASG_SAL-empid OBLIGATORY.
- *SELECTION-SCREEN END OF LINE.
- *SELECTION-SCREEN BEGIN OF LINE.
- PARAMETERS : EMP_CUR LIKE ZASG_SAL-currency OBLIGATORY.
- *SELECTION-SCREEN END OF LINE.
- *SELECTION-SCREEN BEGIN OF LINE.
- PARAMETERS : EMP_AMNT LIKE ZASG_SAL-amount OBLIGATORY.
- *SELECTION-SCREEN END OF LINE.
- SELECTION-SCREEN END OF BLOCK SELECTION.
- wa_emp-empid = EMP_ID.
- wa_emp-currency = EMP_CUR.
- wa_emp-amount = EMP_AMNT.
- *ID VALIDATION.
- 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.
- SELECT * FROM TCURC
- INTO CORRESPONDING FIELDS OF TABLE it_sal
- WHERE waers = wa_emp-currency.
- IF it_sal[] IS INITIAL.
- MESSAGE ID 'ZINSERTION_ERRORS' TYPE 'I' NUMBER '008'.
- ELSE.
- CALL FUNCTION 'Z_ASG_FN_INSERTSAL'
- EXPORTING
- WA_EMP = wa_emp
- IMPORTING
- E_SUBRC = l_subrc.
- if l_subrc = 1.
- MESSAGE ID 'ZINSERTION_ERRORS' TYPE 'I' NUMBER '006'.
- ELSEIF l_subrc = 0.
- MESSAGE ID 'ZINSERTION_ERRORS' TYPE 'I' NUMBER '003'.
- EXIT.
- ENDIF.
- ENDIF.
- ENDIF.
- INITIALIZATION.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement