Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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??

2 REPLIES 2

Former Member
0 Kudos

ok

former_member650478
Discoverer
0 Kudos

Have you solved this problem?