SAP K_PRIM_COST_TOTAL_PLAN Function Module for









K_PRIM_COST_TOTAL_PLAN is a standard k prim cost total plan 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 k prim cost total plan FM, simply by entering the name K_PRIM_COST_TOTAL_PLAN into the relevant SAP transaction such as SE37 or SE38.

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



Function K_PRIM_COST_TOTAL_PLAN 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_PRIM_COST_TOTAL_PLAN'"
EXPORTING
ID_PLNHDR = "
ID_TESTRUN = "
ID_DELTA = "
* ID_VALUES_PLAN = 'B' "
* ID_COMMIT = ' ' "

TABLES
IT_TOTAL_VALUES = "
RETURN = "
.



IMPORTING Parameters details for K_PRIM_COST_TOTAL_PLAN

ID_PLNHDR -

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

ID_TESTRUN -

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

ID_DELTA -

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

ID_VALUES_PLAN -

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

ID_COMMIT -

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

TABLES Parameters details for K_PRIM_COST_TOTAL_PLAN

IT_TOTAL_VALUES -

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

RETURN -

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

Copy and paste ABAP code example for K_PRIM_COST_TOTAL_PLAN 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_id_plnhdr  TYPE PLNHDR, "   
lt_it_total_values  TYPE STANDARD TABLE OF PCPTOTLINE_I, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2, "   
lv_id_testrun  TYPE TESTRUN, "   
lv_id_delta  TYPE CO_DELTA, "   
lv_id_values_plan  TYPE C, "   'B'
lv_id_commit  TYPE SYBATCH. "   SPACE

  CALL FUNCTION 'K_PRIM_COST_TOTAL_PLAN'  "
    EXPORTING
         ID_PLNHDR = lv_id_plnhdr
         ID_TESTRUN = lv_id_testrun
         ID_DELTA = lv_id_delta
         ID_VALUES_PLAN = lv_id_values_plan
         ID_COMMIT = lv_id_commit
    TABLES
         IT_TOTAL_VALUES = lt_it_total_values
         RETURN = lt_return
. " K_PRIM_COST_TOTAL_PLAN




ABAP code using 7.40 inline data declarations to call FM K_PRIM_COST_TOTAL_PLAN

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.

 
 
 
 
 
DATA(ld_id_values_plan) = 'B'.
 
DATA(ld_id_commit) = ' '.
 


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!