Estimated reading time: 1 min
|
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Form GET_WORKLIST_FOR_APPROVER, Ende A *$*$-Start: (1)---------------------------------------------------------------------------------$*$* ENHANCEMENT 2 ZHR_LPT_ARQ_ARQ_REQUEST. "active version * Vertreter berücksichtigen data: lv_uname type syuname, lv_pernr type pernr_d, lt_subst type table of HRWFUSER_V WITH HEADER LINE, lt_list type ptarq_reqlist_tab_flat, ls_list like line of lt_list. CALL FUNCTION 'CATSXT_GET_USER_ID_OF_PERNR' EXPORTING im_personnel_number = pernr IMPORTING EX_USER_ID = lv_uname EXCEPTIONS FAILED = 1 OTHERS = 2. check sy-subrc = 0. if not lv_uname is INITIAL. CALL FUNCTION 'RH_SUBSTITUTIONS_GET' EXPORTING USER_TYPE = 'US' USER_NAME = lv_uname TABLES inbox_view = lt_subst EXCEPTIONS NO_ACTIVE_PLVAR = 1 USER_NOT_DEFINED = 2 NO_SUBSTITUTION_FOUND = 3 OTHERS = 4. check sy-subrc = 0. loop at lt_subst. if lt_subst-reppr = 'ALL' or lt_subst-reppr = 'DISZILPINAR' or lt_subst-reppr = 'ALL1'. * Hier activ abfragen. Wenn ja, normal weiter, wenn nein, prüfen ob gerade übernommen. wenn ja normal weiter, wenn nein -> abbruch CALL FUNCTION 'BAPI_USR01DOHR_GETEMPLOYEE' EXPORTING ID = lt_subst-objid IMPORTING EMPLOYEENUMBER = lv_pernr. if not lv_pernr is INITIAL. CALL METHOD reqlist->sel_reqs_attsabs_for_next_proc EXPORTING im_status_range = status_range im_pernr = lv_pernr im_read_inbox = 'X' IMPORTING ex_requests = lt_list. loop at lt_list into ls_list. if ls_list-version-owner-pernr = pernr. "Eigener Antrag CONTINUE. endif. CALL FUNCTION 'Z_HR_WF_CHECK_SUBSTITUTION' "Bin ich als Vertreter für den zuständig? <- Brauch ich nicht EXPORTING uname = lt_subst-objid REP_NAME = lv_uname PERNR = ls_list-version-owner-pernr profile = lt_subst-reppr EXCEPTIONS NOT_ALLOWED = 1 OTHERS = 2. if sy-subrc = 0. append ls_list to list. endif. endloop. endif. endif. endloop. endif. ENDENHANCEMENT. *$*$-End: (1)---------------------------------------------------------------------------------$*$* ENDFORM. "get_list_for_myself |
Views: 28