Skip to Content
author's profile photo Former Member
Former Member

Prob in updating profit&cost centers while useing 'BAPI_GOODSMVT_CREATE'

I am using FM 'BAPI_GOODSMVT_CREATE' , and i am passing below parameters

header info...

wa_goodsmvt_header-pstng_date = wa_gi-budat.

wa_goodsmvt_header-doc_date = wa_gi-budat.

wa_goodsmvt_code = '03'.

item info....

wa_item-material = wa_gi-matnr.

wa_item-plant = wa_gi-werks.

wa_item-stge_loc = 'SL01' .

wa_item-move_type = '201'.

wa_item-entry_qnt = wa_gi-qty.

wa_item-entry_uom = wa_gi-meins.

wa_item-costcenter = wa_gi-kostl. <==

wa_item-profit_ctr = wa_gi-prctr. <==

wa_item-mvt_ind = space.

APPEND wa_item TO it_item.

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

EXPORTING

goodsmvt_header = wa_goodsmvt_header

goodsmvt_code = wa_goodsmvt_code

IMPORTING

materialdocument = v_mat_doc

matdocumentyear = v_doc_year

TABLES

goodsmvt_item = it_item

return = it_ret.

IF sy-subrc = 0 AND v_mat_doc <> ''.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = 'X'.

WRITE:/ 'Good Issue',v_mat_doc.

ELSE.

CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.

ENDIF.

data is passing to FM is absolutely fine , problem is after generating document number , if observe profit center and cost center are not updating properly , it is showing material profit center and cost center.....

but it should take and update profit center and cost center which i have passed . what is the solution??

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 29, 2009 at 04:01 PM

    ok

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 31, 2019 at 12:29 AM

    Have you solved this problem?

    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.