SAP PTRM_UTIL_PLAN_ACTIVITY_GET Function Module for Retrieve Customizing Tables









PTRM_UTIL_PLAN_ACTIVITY_GET is a standard ptrm util plan activity get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Retrieve Customizing Tables 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 ptrm util plan activity get FM, simply by entering the name PTRM_UTIL_PLAN_ACTIVITY_GET into the relevant SAP transaction such as SE37 or SE38.

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



Function PTRM_UTIL_PLAN_ACTIVITY_GET 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 'PTRM_UTIL_PLAN_ACTIVITY_GET'"Retrieve Customizing Tables
EXPORTING
I_EMPLOYEENUMBER = "Personnel Number
* I_TRIPNUMBER = "Trip Number
* I_DATE = "Start Date of Trip Segment
* I_LANGUAGE = SY-LANGU "Language Key

IMPORTING
PLAN_ACTIVITY_VISIBLE = "Checkbox
PLAN_ACTIVITY_INPUT = "Checkbox
PLAN_ACTIVITY_REQUIRED = "Checkbox
PLAN_ACTIVITY_DEFAULT = "

TABLES
* ET_PLAN_ACTIVITY_TYPES = "Trip activity type - Travel Planning
* ET_RETURN = "Table with BAPI Return Information
.



IMPORTING Parameters details for PTRM_UTIL_PLAN_ACTIVITY_GET

I_EMPLOYEENUMBER - Personnel Number

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

I_TRIPNUMBER - Trip Number

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

I_DATE - Start Date of Trip Segment

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

I_LANGUAGE - Language Key

Data type: BAPITRVXXX-LANGU
Default: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for PTRM_UTIL_PLAN_ACTIVITY_GET

PLAN_ACTIVITY_VISIBLE - Checkbox

Data type: XFELD
Optional: No
Call by Reference: Yes

PLAN_ACTIVITY_INPUT - Checkbox

Data type: XFELD
Optional: No
Call by Reference: Yes

PLAN_ACTIVITY_REQUIRED - Checkbox

Data type: XFELD
Optional: No
Call by Reference: Yes

PLAN_ACTIVITY_DEFAULT -

Data type: PTRP_WEB_TA20R1-ACTICITY
Optional: No
Call by Reference: Yes

TABLES Parameters details for PTRM_UTIL_PLAN_ACTIVITY_GET

ET_PLAN_ACTIVITY_TYPES - Trip activity type - Travel Planning

Data type: PTRP_WEB_TA20R1_T
Optional: Yes
Call by Reference: Yes

ET_RETURN - Table with BAPI Return Information

Data type: BAPIRETTAB
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for PTRM_UTIL_PLAN_ACTIVITY_GET 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_i_employeenumber  TYPE BAPIEMPL-PERNR, "   
lv_plan_activity_visible  TYPE XFELD, "   
lt_et_plan_activity_types  TYPE STANDARD TABLE OF PTRP_WEB_TA20R1_T, "   
lt_et_return  TYPE STANDARD TABLE OF BAPIRETTAB, "   
lv_i_tripnumber  TYPE BAPITRIP-TRIPNO, "   
lv_plan_activity_input  TYPE XFELD, "   
lv_i_date  TYPE BAPITRIP-DEP_DATE, "   
lv_plan_activity_required  TYPE XFELD, "   
lv_i_language  TYPE BAPITRVXXX-LANGU, "   SY-LANGU
lv_plan_activity_default  TYPE PTRP_WEB_TA20R1-ACTICITY. "   

  CALL FUNCTION 'PTRM_UTIL_PLAN_ACTIVITY_GET'  "Retrieve Customizing Tables
    EXPORTING
         I_EMPLOYEENUMBER = lv_i_employeenumber
         I_TRIPNUMBER = lv_i_tripnumber
         I_DATE = lv_i_date
         I_LANGUAGE = lv_i_language
    IMPORTING
         PLAN_ACTIVITY_VISIBLE = lv_plan_activity_visible
         PLAN_ACTIVITY_INPUT = lv_plan_activity_input
         PLAN_ACTIVITY_REQUIRED = lv_plan_activity_required
         PLAN_ACTIVITY_DEFAULT = lv_plan_activity_default
    TABLES
         ET_PLAN_ACTIVITY_TYPES = lt_et_plan_activity_types
         ET_RETURN = lt_et_return
. " PTRM_UTIL_PLAN_ACTIVITY_GET




ABAP code using 7.40 inline data declarations to call FM PTRM_UTIL_PLAN_ACTIVITY_GET

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 PERNR FROM BAPIEMPL INTO @DATA(ld_i_employeenumber).
 
 
 
 
"SELECT single TRIPNO FROM BAPITRIP INTO @DATA(ld_i_tripnumber).
 
 
"SELECT single DEP_DATE FROM BAPITRIP INTO @DATA(ld_i_date).
 
 
"SELECT single LANGU FROM BAPITRVXXX INTO @DATA(ld_i_language).
DATA(ld_i_language) = SY-LANGU.
 
"SELECT single ACTICITY FROM PTRP_WEB_TA20R1 INTO @DATA(ld_plan_activity_default).
 


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!