SAP RH_TASK_AGENT_CHECK Function Module for Check Whether Specific OrgObject May Edit Task









RH_TASK_AGENT_CHECK is a standard rh task agent check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Check Whether Specific OrgObject May Edit 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 agent check FM, simply by entering the name RH_TASK_AGENT_CHECK 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_AGENT_CHECK 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_AGENT_CHECK'"Check Whether Specific OrgObject May Edit Task
EXPORTING
ORG_OTYPE = "
ORG_OBJID = "
TASK_OTYPE = "
TASK_OBJID = "
* ACT_WI_ID = "
* ACT_PLVAR = "
* ACT_BEGDA = SY-DATUM "
* ACT_ENDDA = SY-DATUM "
* UPDATE_INDEX = "

IMPORTING
GENERAL_TASK = "Indicator: General task
NO_GENSEND = "General forwarding not allowed
NO_SEND = "Forwarding not allowed

TABLES
* EXCLUDED_AGENTS = "

EXCEPTIONS
NO_ACTIVE_PLVAR = 1 NOT_AGENT_OF_TASK = 2 NO_AGENT_OTYPE = 3 NO_TASK_OTYPE = 4 NO_AGENTS_OF_TASK_FOUND = 5 BACKGROUND_TASK = 6
.



IMPORTING Parameters details for RH_TASK_AGENT_CHECK

ORG_OTYPE -

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

ORG_OBJID -

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

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 -

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
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for RH_TASK_AGENT_CHECK

GENERAL_TASK - Indicator: General task

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

NO_GENSEND - General forwarding not allowed

Data type: P1217-NO_GENSEND
Optional: No
Call by Reference: Yes

NO_SEND - Forwarding not allowed

Data type: P1217-NO_SEND
Optional: No
Call by Reference: Yes

TABLES Parameters details for RH_TASK_AGENT_CHECK

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)

NOT_AGENT_OF_TASK -

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

NO_AGENT_OTYPE -

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)

NO_AGENTS_OF_TASK_FOUND -

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

BACKGROUND_TASK -

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

Copy and paste ABAP code example for RH_TASK_AGENT_CHECK 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_org_otype  TYPE OBJEC-OTYPE, "   
lv_general_task  TYPE P1217-GENERAL, "   
lt_excluded_agents  TYPE STANDARD TABLE OF SWHACTOR, "   
lv_no_active_plvar  TYPE SWHACTOR, "   
lv_org_objid  TYPE SWHACTOR, "   
lv_no_gensend  TYPE P1217-NO_GENSEND, "   
lv_not_agent_of_task  TYPE P1217, "   
lv_no_send  TYPE P1217-NO_SEND, "   
lv_task_otype  TYPE OBJEC-OTYPE, "   
lv_no_agent_otype  TYPE OBJEC, "   
lv_task_objid  TYPE OBJEC, "   
lv_no_task_otype  TYPE OBJEC, "   
lv_act_wi_id  TYPE SWWWIHEAD-WI_ID, "   
lv_no_agents_of_task_found  TYPE SWWWIHEAD, "   
lv_act_plvar  TYPE OBJEC-PLVAR, "   
lv_background_task  TYPE OBJEC, "   
lv_act_begda  TYPE OBJEC-BEGDA, "   SY-DATUM
lv_act_endda  TYPE OBJEC-ENDDA, "   SY-DATUM
lv_update_index  TYPE OBJEC-HISTO. "   

  CALL FUNCTION 'RH_TASK_AGENT_CHECK'  "Check Whether Specific OrgObject May Edit Task
    EXPORTING
         ORG_OTYPE = lv_org_otype
         ORG_OBJID = lv_org_objid
         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
         GENERAL_TASK = lv_general_task
         NO_GENSEND = lv_no_gensend
         NO_SEND = lv_no_send
    TABLES
         EXCLUDED_AGENTS = lt_excluded_agents
    EXCEPTIONS
        NO_ACTIVE_PLVAR = 1
        NOT_AGENT_OF_TASK = 2
        NO_AGENT_OTYPE = 3
        NO_TASK_OTYPE = 4
        NO_AGENTS_OF_TASK_FOUND = 5
        BACKGROUND_TASK = 6
. " RH_TASK_AGENT_CHECK




ABAP code using 7.40 inline data declarations to call FM RH_TASK_AGENT_CHECK

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_org_otype).
 
"SELECT single GENERAL FROM P1217 INTO @DATA(ld_general_task).
 
 
 
 
"SELECT single NO_GENSEND FROM P1217 INTO @DATA(ld_no_gensend).
 
 
"SELECT single NO_SEND FROM P1217 INTO @DATA(ld_no_send).
 
"SELECT single OTYPE FROM OBJEC INTO @DATA(ld_task_otype).
 
 
 
 
"SELECT single WI_ID FROM SWWWIHEAD INTO @DATA(ld_act_wi_id).
 
 
"SELECT single PLVAR FROM OBJEC INTO @DATA(ld_act_plvar).
 
 
"SELECT single BEGDA FROM OBJEC INTO @DATA(ld_act_begda).
DATA(ld_act_begda) = SY-DATUM.
 
"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).
 


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!