Application Development and Automation 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: 
Read only

Bapi_good_movement

Former Member
0 Likes
821

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.

2 REPLIES 2
Read only

Former Member
0 Likes
637

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

Read only

0 Likes
637

@

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