11-13-2015 1:56 PM
Hello,
we are facing the following problem:
We would like to book fix and variable costs with the help of BAPI_COSTACTPLN_POSTPRIMCOST.
We hand over fix and variable values, but the BAPI is building a sum of both and saves it as fix value as well as total value.
The results are saved in the table COSP in the columns WKG001...WKG005 (total) and WKF001...WKF005 (fix)
Please find a code snippet below.
A similiar issue has already been described here: http://scn.sap.com/thread/677570
We are using the BAPI without Delta = 'X' at the moment, but tried it already also with Delta='X'.
Did anybody faced the same issue or has a solution already?
Many thanks in advance!
Best Regards,
Thorsten
ls_pervalue-fix_val_per01 = lv_value_fix.
ls_pervalue-fix_val_per02 = lv_value_fix.
ls_pervalue-fix_val_per03 = lv_value_fix.
ls_pervalue-fix_val_per04 = lv_value_fix.
ls_pervalue-fix_val_per05 = lv_value_fix.
......
ls_pervalue-var_val_per01 = lv_value_var.
ls_pervalue-var_val_per02 = lv_value_var.
ls_pervalue-var_val_per03 = lv_value_var.
ls_pervalue-var_val_per04 = lv_value_var.
ls_pervalue-var_val_per05 = lv_value_var.
.....
......
lv_suc = lv_suc + 1.
APPEND ls_pervalue TO lt_pervalue.
ENDLOOP.
CALL FUNCTION 'BAPI_COSTACTPLN_POSTPRIMCOST'
EXPORTING
headerinfo = ls_header
* DELTA = ' '
TABLES
indexstructure = lt_index
coobject = lt_coobject
pervalue = lt_pervalue
* TOTVALUE =
* CONTRL =
return = lt_bapiret.
11-18-2015 10:31 PM
Solution was to use the correct activity type.
Using "wrong" activity types doesn't lead to an error in bapiret, but sums up var and fix.
11-17-2015 9:11 AM
Looks quite different to the example given behind the documentation button that can be found in SE37 for BAPI_COSTACTPLN_POSTPRIMCOST
11-18-2015 10:31 PM
Solution was to use the correct activity type.
Using "wrong" activity types doesn't lead to an error in bapiret, but sums up var and fix.