Skip to Content

Planning not updated with BAPI_COSTACTPLN_POSTACTINPUT

We use the bapi to create costplanning on internal orders

BAPI_COSTACTPLN_POSTACTINPUT

it gets the information on for instance the planned hours from a ztable which the controllers maintain for there projects.

but once a plan record is created like you do with kpf6 the bapi won't update this record when the amount of hours changes ??

is it the wrong bapi when you want to update the planning ?

    s_hdr-co_area       = ta_zcats_order_plan-kokrs.
    s_hdr-fisc_year     = ta_zcats_order_plan-begperiod(4).

    s_hdr-period_from   = '001'.
    s_hdr-period_to     = '012'.
    s_hdr-version       = '000'.
    s_hdr-plan_currtype = 'C'.

    t_obj-object_index = '1'.
    t_obj-orderid = ta_zcats_order_plan-aufnr.
    append t_obj.


    SELECT SINGLE * FROM zcats_0315
                   WHERE kokrs EQ ta_zcats_order_plan-kokrs
                   AND pernr EQ ta_zcats_order_plan-pernr
                   AND begda >= '20080101'.

    ta_tval-send_cctr = zcats_0315-kostl.
    ta_tval-send_activity = zcats_0315-lstar.
    ta_tval-order_celem = '0000055000'.
    ta_tval-unit_of_measure = 'U'.

    ta_tval-quantity_var = ta_zcats_order_plan-zplanhours.
    ta_tval-value_index = '1'.
    APPEND ta_tval.

    CALL FUNCTION 'BAPI_COSTACTPLN_POSTACTINPUT'
      EXPORTING
        headerinfo           = s_hdr
*   DELTA                = ' '
      TABLES
        indexstructure       = t_idx
        coobject             = t_obj
*   PERVALUE             =
        totvalue             = ta_tval
        return               = t_ret
              .

kind regards

arthur de smidt

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jun 13, 2008 at 02:09 PM

    HI Arthur,

    You need to use BAPI_TRANSACTION_COMMIT to commit the changes done by BAPI_COSTACTPLN_POSTACTINPUT.

    Regards,

    Kalyan.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.