SAP K_PLAN_PAI_PP Function Module for CO Planning: Execute PAI for Front End









K_PLAN_PAI_PP is a standard k plan pai pp SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for CO Planning: Execute PAI for Front End 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 k plan pai pp FM, simply by entering the name K_PLAN_PAI_PP into the relevant SAP transaction such as SE37 or SE38.

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



Function K_PLAN_PAI_PP 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 'K_PLAN_PAI_PP'"CO Planning: Execute PAI for Front End
EXPORTING
* I_SYDATAR = 'X' "Is Front End Data Loss Immanent?
* I_MESG = "
I_OK_CODE = "
* I_KPP1L_CURSOR = "
* I_COLLECT_MESSAGES = ' ' "

IMPORTING
ET_MESSAGE = "
E_OK_CODE = "

TABLES
I_TKPP1L = "Table of PAI Logical Screens
* I_TKPP1LR = "
* I_TKPP1LC = "

EXCEPTIONS
ERROR_IN_PAI = 1
.



IMPORTING Parameters details for K_PLAN_PAI_PP

I_SYDATAR - Is Front End Data Loss Immanent?

Data type: SY-DATAR
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_MESG -

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

I_OK_CODE -

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

I_KPP1L_CURSOR -

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

I_COLLECT_MESSAGES -

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

EXPORTING Parameters details for K_PLAN_PAI_PP

ET_MESSAGE -

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

E_OK_CODE -

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

TABLES Parameters details for K_PLAN_PAI_PP

I_TKPP1L - Table of PAI Logical Screens

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

I_TKPP1LR -

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

I_TKPP1LC -

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

EXCEPTIONS details

ERROR_IN_PAI - Error in PAI

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

Copy and paste ABAP code example for K_PLAN_PAI_PP 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:
lt_i_tkpp1l  TYPE STANDARD TABLE OF KPP1L, "   
lv_i_sydatar  TYPE SY-DATAR, "   'X'
lv_et_message  TYPE KPP_YT_ERROR_MESSAGE, "   
lv_error_in_pai  TYPE KPP_YT_ERROR_MESSAGE, "   
lv_i_mesg  TYPE MESG, "   
lv_e_ok_code  TYPE RSEU1-FUNC_1, "   
lt_i_tkpp1lr  TYPE STANDARD TABLE OF KPP1LR, "   
lv_i_ok_code  TYPE RSEU1-FUNC_1, "   
lt_i_tkpp1lc  TYPE STANDARD TABLE OF KPP1LC, "   
lv_i_kpp1l_cursor  TYPE KPP1L_KEY, "   
lv_i_collect_messages  TYPE KPP1L_KEY. "   ' '

  CALL FUNCTION 'K_PLAN_PAI_PP'  "CO Planning: Execute PAI for Front End
    EXPORTING
         I_SYDATAR = lv_i_sydatar
         I_MESG = lv_i_mesg
         I_OK_CODE = lv_i_ok_code
         I_KPP1L_CURSOR = lv_i_kpp1l_cursor
         I_COLLECT_MESSAGES = lv_i_collect_messages
    IMPORTING
         ET_MESSAGE = lv_et_message
         E_OK_CODE = lv_e_ok_code
    TABLES
         I_TKPP1L = lt_i_tkpp1l
         I_TKPP1LR = lt_i_tkpp1lr
         I_TKPP1LC = lt_i_tkpp1lc
    EXCEPTIONS
        ERROR_IN_PAI = 1
. " K_PLAN_PAI_PP




ABAP code using 7.40 inline data declarations to call FM K_PLAN_PAI_PP

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 DATAR FROM SY INTO @DATA(ld_i_sydatar).
DATA(ld_i_sydatar) = 'X'.
 
 
 
 
"SELECT single FUNC_1 FROM RSEU1 INTO @DATA(ld_e_ok_code).
 
 
"SELECT single FUNC_1 FROM RSEU1 INTO @DATA(ld_i_ok_code).
 
 
 
DATA(ld_i_collect_messages) = ' '.
 


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!