SAP K_WIP_OBJECT_CALC Function Module for
K_WIP_OBJECT_CALC is a standard k wip object calc 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 wip object calc FM, simply by entering the name K_WIP_OBJECT_CALC into the relevant SAP transaction such as SE37 or SE38.
Function Group: KV02
Program Name: SAPLKV02
Main Program: SAPLKV02
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function K_WIP_OBJECT_CALC 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_WIP_OBJECT_CALC'".
EXPORTING
* PAR_AUFLO = ' ' "
* PAR_AWVSB = ' ' "
* PAR_MMESS = ' ' "
PAR_GJAHR = "
* PAR_KNACH = ' ' "
PAR_KOKRS = "
PAR_OBJNR = "
PAR_POPER = "
PAR_SAFNR = "
* PAR_PLAKO = ' ' "
* PAR_AWBVA = ' ' "
IMPORTING
PAR_KV014 = "
FLG_NOTOK = "
TABLES
PTA_KV012 = "
* PTA_KPZP1 = "
EXCEPTIONS
TARGETCOSTS_IMPOSSIBLE = 1 SYSTEM_ERROR = 2
IMPORTING Parameters details for K_WIP_OBJECT_CALC
PAR_AUFLO -
Data type: KV042-XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PAR_AWVSB -
Data type: TKV09-AWVSBDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PAR_MMESS -
Data type: KV042-XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PAR_GJAHR -
Data type: T009B-BDATJOptional: No
Call by Reference: No ( called with pass by value option)
PAR_KNACH -
Data type: KV042-XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PAR_KOKRS -
Data type: TKA00-KOKRSOptional: No
Call by Reference: No ( called with pass by value option)
PAR_OBJNR -
Data type: COSLA-OBJNROptional: No
Call by Reference: No ( called with pass by value option)
PAR_POPER -
Data type: T009B-POPEROptional: No
Call by Reference: No ( called with pass by value option)
PAR_SAFNR -
Data type: SAFK-AUFNROptional: No
Call by Reference: No ( called with pass by value option)
PAR_PLAKO -
Data type: KV042-XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PAR_AWBVA -
Data type: TKV09-AWBVADefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for K_WIP_OBJECT_CALC
PAR_KV014 -
Data type: KV014Optional: No
Call by Reference: No ( called with pass by value option)
FLG_NOTOK -
Data type: KV042-XFELDOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for K_WIP_OBJECT_CALC
PTA_KV012 -
Data type: KV012Optional: No
Call by Reference: No ( called with pass by value option)
PTA_KPZP1 -
Data type: KPZP1Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
TARGETCOSTS_IMPOSSIBLE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SYSTEM_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for K_WIP_OBJECT_CALC 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_par_auflo | TYPE KV042-XFELD, " SPACE | |||
| lv_par_kv014 | TYPE KV014, " | |||
| lt_pta_kv012 | TYPE STANDARD TABLE OF KV012, " | |||
| lv_targetcosts_impossible | TYPE KV012, " | |||
| lv_par_awvsb | TYPE TKV09-AWVSB, " SPACE | |||
| lv_par_mmess | TYPE KV042-XFELD, " SPACE | |||
| lv_flg_notok | TYPE KV042-XFELD, " | |||
| lv_par_gjahr | TYPE T009B-BDATJ, " | |||
| lt_pta_kpzp1 | TYPE STANDARD TABLE OF KPZP1, " | |||
| lv_system_error | TYPE KPZP1, " | |||
| lv_par_knach | TYPE KV042-XFELD, " SPACE | |||
| lv_par_kokrs | TYPE TKA00-KOKRS, " | |||
| lv_par_objnr | TYPE COSLA-OBJNR, " | |||
| lv_par_poper | TYPE T009B-POPER, " | |||
| lv_par_safnr | TYPE SAFK-AUFNR, " | |||
| lv_par_plako | TYPE KV042-XFELD, " SPACE | |||
| lv_par_awbva | TYPE TKV09-AWBVA. " SPACE |
|   CALL FUNCTION 'K_WIP_OBJECT_CALC' " |
| EXPORTING | ||
| PAR_AUFLO | = lv_par_auflo | |
| PAR_AWVSB | = lv_par_awvsb | |
| PAR_MMESS | = lv_par_mmess | |
| PAR_GJAHR | = lv_par_gjahr | |
| PAR_KNACH | = lv_par_knach | |
| PAR_KOKRS | = lv_par_kokrs | |
| PAR_OBJNR | = lv_par_objnr | |
| PAR_POPER | = lv_par_poper | |
| PAR_SAFNR | = lv_par_safnr | |
| PAR_PLAKO | = lv_par_plako | |
| PAR_AWBVA | = lv_par_awbva | |
| IMPORTING | ||
| PAR_KV014 | = lv_par_kv014 | |
| FLG_NOTOK | = lv_flg_notok | |
| TABLES | ||
| PTA_KV012 | = lt_pta_kv012 | |
| PTA_KPZP1 | = lt_pta_kpzp1 | |
| EXCEPTIONS | ||
| TARGETCOSTS_IMPOSSIBLE = 1 | ||
| SYSTEM_ERROR = 2 | ||
| . " K_WIP_OBJECT_CALC | ||
ABAP code using 7.40 inline data declarations to call FM K_WIP_OBJECT_CALC
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 XFELD FROM KV042 INTO @DATA(ld_par_auflo). | ||||
| DATA(ld_par_auflo) | = ' '. | |||
| "SELECT single AWVSB FROM TKV09 INTO @DATA(ld_par_awvsb). | ||||
| DATA(ld_par_awvsb) | = ' '. | |||
| "SELECT single XFELD FROM KV042 INTO @DATA(ld_par_mmess). | ||||
| DATA(ld_par_mmess) | = ' '. | |||
| "SELECT single XFELD FROM KV042 INTO @DATA(ld_flg_notok). | ||||
| "SELECT single BDATJ FROM T009B INTO @DATA(ld_par_gjahr). | ||||
| "SELECT single XFELD FROM KV042 INTO @DATA(ld_par_knach). | ||||
| DATA(ld_par_knach) | = ' '. | |||
| "SELECT single KOKRS FROM TKA00 INTO @DATA(ld_par_kokrs). | ||||
| "SELECT single OBJNR FROM COSLA INTO @DATA(ld_par_objnr). | ||||
| "SELECT single POPER FROM T009B INTO @DATA(ld_par_poper). | ||||
| "SELECT single AUFNR FROM SAFK INTO @DATA(ld_par_safnr). | ||||
| "SELECT single XFELD FROM KV042 INTO @DATA(ld_par_plako). | ||||
| DATA(ld_par_plako) | = ' '. | |||
| "SELECT single AWBVA FROM TKV09 INTO @DATA(ld_par_awbva). | ||||
| DATA(ld_par_awbva) | = ' '. | |||
Search for further information about these or an SAP related objects