SAP TP_CVPROF_GET Function Module for
TP_CVPROF_GET is a standard tp cvprof get 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 tp cvprof get FM, simply by entering the name TP_CVPROF_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: PC32
Program Name: SAPLPC32
Main Program: SAPLPC32
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function TP_CVPROF_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 'TP_CVPROF_GET'".
EXPORTING
* I_KOKRS = "Controlling Area
* I_CVPROF = "
* I_LANGU = SY-LANGU "
* I_VALUATION_5 = "
IMPORTING
E_TCVPROF = "
E_TCVPROFT = "
E_ACTIVE = "
E_ACTIVE_COGM_ONLY = "
TABLES
* T_TCVPROFD = "
EXCEPTIONS
CVPROF_NOT_FOUND = 1 NO_CVPROF_FOR_KOKRS = 2 KOKRS_NOT_FOUND = 3
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLPC32_001 Transfer Prices Exit
EXIT_SAPLPC32_002 TP: Validate Valuations during Invoice Verification
EXIT_SAPLPC32_003 TP: Valuation Approach Control for Intercompany Deliveries
EXIT_SAPLPC32_004 TP: Validate Valuations during Invoice Verification
IMPORTING Parameters details for TP_CVPROF_GET
I_KOKRS - Controlling Area
Data type: TKA01-KOKRSOptional: Yes
Call by Reference: No ( called with pass by value option)
I_CVPROF -
Data type: TCVPROF-CVPROFOptional: Yes
Call by Reference: No ( called with pass by value option)
I_LANGU -
Data type: SY-LANGUDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_VALUATION_5 -
Data type: XFELDOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TP_CVPROF_GET
E_TCVPROF -
Data type: TCVPROFOptional: No
Call by Reference: No ( called with pass by value option)
E_TCVPROFT -
Data type: TCVPROFTOptional: No
Call by Reference: No ( called with pass by value option)
E_ACTIVE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E_ACTIVE_COGM_ONLY -
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for TP_CVPROF_GET
T_TCVPROFD -
Data type: TCVPROFDOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CVPROF_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_CVPROF_FOR_KOKRS -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
KOKRS_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TP_CVPROF_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_kokrs | TYPE TKA01-KOKRS, " | |||
lv_e_tcvprof | TYPE TCVPROF, " | |||
lt_t_tcvprofd | TYPE STANDARD TABLE OF TCVPROFD, " | |||
lv_cvprof_not_found | TYPE TCVPROFD, " | |||
lv_i_cvprof | TYPE TCVPROF-CVPROF, " | |||
lv_e_tcvproft | TYPE TCVPROFT, " | |||
lv_no_cvprof_for_kokrs | TYPE TCVPROFT, " | |||
lv_i_langu | TYPE SY-LANGU, " SY-LANGU | |||
lv_e_active | TYPE SY, " | |||
lv_kokrs_not_found | TYPE SY, " | |||
lv_i_valuation_5 | TYPE XFELD, " | |||
lv_e_active_cogm_only | TYPE C. " |
  CALL FUNCTION 'TP_CVPROF_GET' " |
EXPORTING | ||
I_KOKRS | = lv_i_kokrs | |
I_CVPROF | = lv_i_cvprof | |
I_LANGU | = lv_i_langu | |
I_VALUATION_5 | = lv_i_valuation_5 | |
IMPORTING | ||
E_TCVPROF | = lv_e_tcvprof | |
E_TCVPROFT | = lv_e_tcvproft | |
E_ACTIVE | = lv_e_active | |
E_ACTIVE_COGM_ONLY | = lv_e_active_cogm_only | |
TABLES | ||
T_TCVPROFD | = lt_t_tcvprofd | |
EXCEPTIONS | ||
CVPROF_NOT_FOUND = 1 | ||
NO_CVPROF_FOR_KOKRS = 2 | ||
KOKRS_NOT_FOUND = 3 | ||
. " TP_CVPROF_GET |
ABAP code using 7.40 inline data declarations to call FM TP_CVPROF_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 KOKRS FROM TKA01 INTO @DATA(ld_i_kokrs). | ||||
"SELECT single CVPROF FROM TCVPROF INTO @DATA(ld_i_cvprof). | ||||
"SELECT single LANGU FROM SY INTO @DATA(ld_i_langu). | ||||
DATA(ld_i_langu) | = SY-LANGU. | |||
Search for further information about these or an SAP related objects