2012 Jun 19 6:37 PM
Hi,
I am using bapi BAPI_GOODSMVT_CREATE
here is my problem ı am trying to do 301 Q movement transfer posting but ı am trying to change wbs element
but ı cant change wbs element its always sending same wbs
here is the code below
LOOP AT gt_out where checkbox is NOT INITIAL .
goodsmvt_item-material = gt_out-matnr.
goodsmvt_item-plant = gt_out-werks.
goodsmvt_item-stge_loc = gt_out-lgort.
goodsmvt_item-batch = gt_out-charg.
goodsmvt_item-move_type = p_bwart.
goodsmvt_item-stck_type = gt_out-sobkz.
goodsmvt_item-spec_stock = ch.
goodsmvt_item-val_type = gt_out-charg.
* call function 'CONVERSION_EXIT_ABPSP_INPUT'
* exporting
* input = gt_out-pspnr2
* importing
* output = goodsmvt_item-val_wbs_elem.
goodsmvt_item-move_mat = gt_out-matnr.
goodsmvt_item-move_plant = p_twerks.
goodsmvt_item-move_stloc = p_lgort.
goodsmvt_item-move_batch = gt_out-charg.
goodsmvt_item-move_val_type = gt_out-charg.
* goodsmvt_item-val_wbs_elem = gt_out-pspnr. "" Here ı am sending different wbs ı can see second in table but but in bapi it doesnt take
* goodsmvt_item-wbs_elem = gt_out-pspnr2 ."""
goodsmvt_item-entry_qnt = gt_out-prlab.
SELECT SINGLE meins FROM mara INTO goodsmvt_item-entry_uom
WHERE matnr = gt_out-matnr.
goodsmvt_item-entry_uom_iso = goodsmvt_item-entry_uom.
* goodsmvt_item-st_un_qtyy_1 = gt_out-prlab.
goodsmvt_item-spec_mvmt = 'R'.
PERFORM conversion_exit_abpsp_output
USING gt_out-pspnr2
CHANGING : goodsmvt_item-wbs_elem
.
PERFORM conversion_exit_abpsp_output
USING gt_out-pspnr
CHANGING : goodsmvt_item-val_wbs_elem
.
perform batchange changing goodsmvt_item-move_batch
goodsmvt_item-move_val_type.
append goodsmvt_item . clear goodsmvt_item .
ENDLOOP.
2012 Jun 20 7:38 AM
Hi,
Movement type 301 Q is for plant to plant transfer of project stock. This movement will transfer stock of same WBS from one plant to other, hence system behavior is correct. If you want to transfer project stock from 1 WBS to other, use movement type 415 Q. I would suggest you discuss this with your MM consultant in details. Hope this helps.
Regards
Shrikant
2012 Jun 21 2:56 PM
When mm consaltants tried it manually it is possible. you can make 301 q with wbs change.
but problem solved it is disabled in default. If you make it optional . It goes fine