SAP TG_CHANGE_STATUS_PERIODS Function Module for









TG_CHANGE_STATUS_PERIODS is a standard tg change status periods SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 tg change status periods FM, simply by entering the name TG_CHANGE_STATUS_PERIODS into the relevant SAP transaction such as SE37 or SE38.

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



Function TG_CHANGE_STATUS_PERIODS 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 'TG_CHANGE_STATUS_PERIODS'"
EXPORTING
EMPLOYEENUMBER = "Personnel Number
TRIP_DAT_BEGIN = "Start Date of Trip Segment
TRIP_UHR_BEGIN = "Beginning Time of Trip Segment
TRIP_DAT_END = "End Date of Trip Segment
TRIP_UHR_END = "End Time of Trip Segment
* ONLY_CHECK = "
* TRIP_NUMBER_PARALL_TRIP = "

IMPORTING
ALL_SEP_ALLOW_PERIO_KEY = "

EXCEPTIONS
ERROR_UPD_PARALLEL_PERIO = 1 PARALLEL_PERIO_NOT_CHANGEABLE = 2 PARALLEL_PERIO_OVERLAP_ABSENCE = 3
.



IMPORTING Parameters details for TG_CHANGE_STATUS_PERIODS

EMPLOYEENUMBER - Personnel Number

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

TRIP_DAT_BEGIN - Start Date of Trip Segment

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

TRIP_UHR_BEGIN - Beginning Time of Trip Segment

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

TRIP_DAT_END - End Date of Trip Segment

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

TRIP_UHR_END - End Time of Trip Segment

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

ONLY_CHECK -

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

TRIP_NUMBER_PARALL_TRIP -

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

EXPORTING Parameters details for TG_CHANGE_STATUS_PERIODS

ALL_SEP_ALLOW_PERIO_KEY -

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

EXCEPTIONS details

ERROR_UPD_PARALLEL_PERIO -

Data type:
Optional: No
Call by Reference: Yes

PARALLEL_PERIO_NOT_CHANGEABLE -

Data type:
Optional: No
Call by Reference: Yes

PARALLEL_PERIO_OVERLAP_ABSENCE -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for TG_CHANGE_STATUS_PERIODS 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_employeenumber  TYPE PTP42-PERNR, "   
lv_all_sep_allow_perio_key  TYPE PTRV_UTIL_HEADER_PERIO_KEY_T, "   
lv_error_upd_parallel_perio  TYPE PTRV_UTIL_HEADER_PERIO_KEY_T, "   
lv_trip_dat_begin  TYPE PTP42-PDATV, "   
lv_parallel_perio_not_changeable  TYPE PTP42, "   
lv_trip_uhr_begin  TYPE PTP42-PUHRV, "   
lv_parallel_perio_overlap_absence  TYPE PTP42, "   
lv_trip_dat_end  TYPE PTP42-PDATB, "   
lv_trip_uhr_end  TYPE PTP42-PUHRB, "   
lv_only_check  TYPE C, "   
lv_trip_number_parall_trip  TYPE PTP42-REINR. "   

  CALL FUNCTION 'TG_CHANGE_STATUS_PERIODS'  "
    EXPORTING
         EMPLOYEENUMBER = lv_employeenumber
         TRIP_DAT_BEGIN = lv_trip_dat_begin
         TRIP_UHR_BEGIN = lv_trip_uhr_begin
         TRIP_DAT_END = lv_trip_dat_end
         TRIP_UHR_END = lv_trip_uhr_end
         ONLY_CHECK = lv_only_check
         TRIP_NUMBER_PARALL_TRIP = lv_trip_number_parall_trip
    IMPORTING
         ALL_SEP_ALLOW_PERIO_KEY = lv_all_sep_allow_perio_key
    EXCEPTIONS
        ERROR_UPD_PARALLEL_PERIO = 1
        PARALLEL_PERIO_NOT_CHANGEABLE = 2
        PARALLEL_PERIO_OVERLAP_ABSENCE = 3
. " TG_CHANGE_STATUS_PERIODS




ABAP code using 7.40 inline data declarations to call FM TG_CHANGE_STATUS_PERIODS

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 PTP42 INTO @DATA(ld_employeenumber).
 
 
 
"SELECT single PDATV FROM PTP42 INTO @DATA(ld_trip_dat_begin).
 
 
"SELECT single PUHRV FROM PTP42 INTO @DATA(ld_trip_uhr_begin).
 
 
"SELECT single PDATB FROM PTP42 INTO @DATA(ld_trip_dat_end).
 
"SELECT single PUHRB FROM PTP42 INTO @DATA(ld_trip_uhr_end).
 
 
"SELECT single REINR FROM PTP42 INTO @DATA(ld_trip_number_parall_trip).
 


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!