Advertisement
Y_SICHOV

Untitled

Jul 24th, 2020
1,598
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 1.47 KB | None | 0 0
  1. *&---------------------------------------------------------------------*
  2. *& Report ZYS_INFTY1
  3. *&---------------------------------------------------------------------*
  4. *&
  5. *&---------------------------------------------------------------------*
  6. REPORT ZYS_INFTY1.
  7.  
  8.     DATA: ls_p2001 TYPE p2001.
  9.     DATA: ls_pskey TYPE pskey.
  10.     DATA: return_struct TYPE bapireturn1.
  11.  
  12.     data: i_pernr type persno VALUE '6'.
  13.  
  14.     CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
  15.       EXPORTING
  16.         number = i_pernr
  17.       IMPORTING
  18.         return = return_struct.
  19.  
  20.     CHECK return_struct IS INITIAL.
  21.  
  22.       ls_p2001-pernr = i_pernr.
  23.       ls_p2001-infty = '2001'.
  24.       ls_p2001-subty = '0112'.
  25.       ls_p2001-awart = '0112'.
  26.       ls_p2001-begda = '20200724'.
  27.       ls_p2001-endda = '20200724'.
  28.  
  29.       CLEAR return_struct.
  30.      
  31.       CALL FUNCTION 'HR_INFOTYPE_OPERATION'
  32.         EXPORTING
  33.           infty         = '2001'
  34.           subtype       = ls_p2001-subty
  35.           objectid      = ''
  36.           lockindicator = ''
  37.           number        = ls_p2001-pernr
  38.           validityend   = ls_p2001-endda
  39.           validitybegin = ls_p2001-begda
  40.           record        = ls_p2001
  41.           operation     = 'INS'
  42.           tclas         = 'A'
  43.           nocommit      = '1'
  44.           dialog_mode   = '0'
  45.         IMPORTING
  46.           return        = return_struct
  47.         EXCEPTIONS
  48.           OTHERS        = 0.
  49.  
  50.       IF return_struct IS INITIAL.
  51.         COMMIT WORK.
  52.       ENDIF.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement