SAP RH_TASK_AGENTS_INDEX Function Module for Index for the Direct Agents of a Task









RH_TASK_AGENTS_INDEX is a standard rh task agents index SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Index for the Direct Agents of a Task processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for rh task agents index FM, simply by entering the name RH_TASK_AGENTS_INDEX into the relevant SAP transaction such as SE37 or SE38.

Function Group: RHW0
Program Name: SAPLRHW0
Main Program: SAPLRHW0
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RH_TASK_AGENTS_INDEX pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'RH_TASK_AGENTS_INDEX'"Index for the Direct Agents of a Task
EXPORTING
TASK_OTYPE = "
TASK_OBJID = "
* ACT_WI_ID = "
* ACT_PLVAR = "Plan Version
* ACT_BEGDA = SY-DATUM "
* ACT_ENDDA = SY-DATUM "
* UPDATE_INDEX = ' ' "

IMPORTING
ACT_BACKGROUND = "Background Processing
ACT_GENERAL = "Indicator: General task
ACT_NO_GENSEND = "General forwarding not allowed
ACT_NO_SEND = "Forwarding not allowed
ACT_PLVAR = "Plan Version

TABLES
* RELATED_AGENTS = "
* EXCLUDED_AGENTS = "

EXCEPTIONS
NO_ACTIVE_PLVAR = 1 NO_AGENTS_OF_TASK_FOUND = 2 NO_TASK_OTYPE = 3
.



IMPORTING Parameters details for RH_TASK_AGENTS_INDEX

TASK_OTYPE -

Data type: OBJEC-OTYPE
Optional: No
Call by Reference: No ( called with pass by value option)

TASK_OBJID -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ACT_WI_ID -

Data type: SWWWIHEAD-WI_ID
Optional: Yes
Call by Reference: No ( called with pass by value option)

ACT_PLVAR - Plan Version

Data type: OBJEC-PLVAR
Optional: Yes
Call by Reference: No ( called with pass by value option)

ACT_BEGDA -

Data type: OBJEC-BEGDA
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

ACT_ENDDA -

Data type: OBJEC-ENDDA
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

UPDATE_INDEX -

Data type: OBJEC-HISTO
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for RH_TASK_AGENTS_INDEX

ACT_BACKGROUND - Background Processing

Data type: P1201-BACKGROUND
Optional: No
Call by Reference: No ( called with pass by value option)

ACT_GENERAL - Indicator: General task

Data type: P1217-GENERAL
Optional: No
Call by Reference: No ( called with pass by value option)

ACT_NO_GENSEND - General forwarding not allowed

Data type: P1217-NO_GENSEND
Optional: No
Call by Reference: No ( called with pass by value option)

ACT_NO_SEND - Forwarding not allowed

Data type: P1217-NO_SEND
Optional: No
Call by Reference: No ( called with pass by value option)

ACT_PLVAR - Plan Version

Data type: OBJEC-PLVAR
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for RH_TASK_AGENTS_INDEX

RELATED_AGENTS -

Data type: SWHACTOR
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCLUDED_AGENTS -

Data type: SWHACTOR
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

NO_ACTIVE_PLVAR -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_AGENTS_OF_TASK_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_TASK_OTYPE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for RH_TASK_AGENTS_INDEX Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_task_otype  TYPE OBJEC-OTYPE, "   
lv_act_background  TYPE P1201-BACKGROUND, "   
lt_related_agents  TYPE STANDARD TABLE OF SWHACTOR, "   
lv_no_active_plvar  TYPE SWHACTOR, "   
lv_task_objid  TYPE SWHACTOR, "   
lv_act_general  TYPE P1217-GENERAL, "   
lt_excluded_agents  TYPE STANDARD TABLE OF SWHACTOR, "   
lv_no_agents_of_task_found  TYPE SWHACTOR, "   
lv_act_wi_id  TYPE SWWWIHEAD-WI_ID, "   
lv_no_task_otype  TYPE SWWWIHEAD, "   
lv_act_no_gensend  TYPE P1217-NO_GENSEND, "   
lv_act_plvar  TYPE OBJEC-PLVAR, "   
lv_act_no_send  TYPE P1217-NO_SEND, "   
lv_act_begda  TYPE OBJEC-BEGDA, "   SY-DATUM
lv_act_plvar  TYPE OBJEC-PLVAR, "   
lv_act_endda  TYPE OBJEC-ENDDA, "   SY-DATUM
lv_update_index  TYPE OBJEC-HISTO. "   SPACE

  CALL FUNCTION 'RH_TASK_AGENTS_INDEX'  "Index for the Direct Agents of a Task
    EXPORTING
         TASK_OTYPE = lv_task_otype
         TASK_OBJID = lv_task_objid
         ACT_WI_ID = lv_act_wi_id
         ACT_PLVAR = lv_act_plvar
         ACT_BEGDA = lv_act_begda
         ACT_ENDDA = lv_act_endda
         UPDATE_INDEX = lv_update_index
    IMPORTING
         ACT_BACKGROUND = lv_act_background
         ACT_GENERAL = lv_act_general
         ACT_NO_GENSEND = lv_act_no_gensend
         ACT_NO_SEND = lv_act_no_send
         ACT_PLVAR = lv_act_plvar
    TABLES
         RELATED_AGENTS = lt_related_agents
         EXCLUDED_AGENTS = lt_excluded_agents
    EXCEPTIONS
        NO_ACTIVE_PLVAR = 1
        NO_AGENTS_OF_TASK_FOUND = 2
        NO_TASK_OTYPE = 3
. " RH_TASK_AGENTS_INDEX




ABAP code using 7.40 inline data declarations to call FM RH_TASK_AGENTS_INDEX

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single OTYPE FROM OBJEC INTO @DATA(ld_task_otype).
 
"SELECT single BACKGROUND FROM P1201 INTO @DATA(ld_act_background).
 
 
 
 
"SELECT single GENERAL FROM P1217 INTO @DATA(ld_act_general).
 
 
 
"SELECT single WI_ID FROM SWWWIHEAD INTO @DATA(ld_act_wi_id).
 
 
"SELECT single NO_GENSEND FROM P1217 INTO @DATA(ld_act_no_gensend).
 
"SELECT single PLVAR FROM OBJEC INTO @DATA(ld_act_plvar).
 
"SELECT single NO_SEND FROM P1217 INTO @DATA(ld_act_no_send).
 
"SELECT single BEGDA FROM OBJEC INTO @DATA(ld_act_begda).
DATA(ld_act_begda) = SY-DATUM.
 
"SELECT single PLVAR FROM OBJEC INTO @DATA(ld_act_plvar).
 
"SELECT single ENDDA FROM OBJEC INTO @DATA(ld_act_endda).
DATA(ld_act_endda) = SY-DATUM.
 
"SELECT single HISTO FROM OBJEC INTO @DATA(ld_update_index).
DATA(ld_update_index) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!