Advertisement
yaramohamed78

Z_ASG_FN_INSERTSAL

Jan 18th, 2017
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 0.64 KB | None | 0 0
  1. FUNCTION Z_ASG_FN_INSERTSAL.
  2. *"----------------------------------------------------------------------
  3. *"*"Local Interface:
  4. *"  IMPORTING
  5. *"     REFERENCE(WA_EMP) TYPE  ZASG_SAL
  6. *"  EXPORTING
  7. *"     VALUE(E_SUBRC) TYPE  SY-SUBRC
  8. *"----------------------------------------------------------------------
  9. TABLES : ZASG_SAL.
  10.  
  11.  
  12.  
  13. SELECT * FROM ZASG_SAL
  14.   WHERE empid = wa_emp-empid.
  15. ENDSELECT.
  16.  IF NOT ZASG_SAL-empid is INITIAL.
  17.  E_SUBRC = '0'.
  18.  ELSE.
  19.  ZASG_SAL-empid = wa_emp-empid.
  20.  ZASG_SAL-currency = wa_emp-currency.
  21.  ZASG_SAL-amount = wa_emp-amount.
  22.  INSERT INTO ZASG_SAL VALUES ZASG_SAL.
  23.  E_SUBRC = '1'.
  24.  ENDIF.
  25.  
  26.  
  27.  
  28.  
  29. ENDFUNCTION.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement