1 Reply Latest reply: Apr 30, 2009 4:53 PM by Pedro Santos RSS

BAPI_GOODSMVT_CREATE with Serial Number

Dany Mathew
Currently Being Moderated

Dear Gurus,

 

Scenario

 

We have to transfer serialized Material from one plant to another via STO

 

ST order --> Delivery --> PGI (with Serial Number) --> MIGO at recieving plant.

 

For MIGO (101) movement we want to use BAPI_GOODSMVT_CREATE.

 

Now we have tried many combinations for it.

 

if we se GM_CODE = '01'. and Movement Indicator 'B' (for purchase orders) then it gives error "Maintain Serial number."

 

So if we maintaine serial number in thetable it says that you "cannot assign this serial number to the material "(AS the serial no is attached to the material at the time of PGI).

 

Now if we try to change the the movement Indicator to 'L' (for deliveries) we are getting the error "Update control of movement type is incorrect (entry 101 X X _ L) "

 

We have maintianed all necessary fields otherwise it would not give he Maintain srial no error (we think). I know this is very technical. but if anyone has prior knowledge please Help

 

Dany

  • Re: BAPI_GOODSMVT_CREATE with Serial Number
    Pedro Santos
    Currently Being Moderated

    hI,

     

    I have on similar error and i made this .  

     

    • header

       IT_HEADER-PSTNG_DATE = SY-DATUM.

       IT_HEADER-DOC_DATE   = SY-DATUM.

       IT_HEADER-PR_UNAME   = SY-UNAME.

       IT_HEADER-HEADER_TXT = W_NUMDOC .

       IT_HEADER-REF_DOC_NO = IT_INPUT-NUMFR.

    • Tcod MB01

       IT_CODE-GM_CODE = '01'.

     

    • Fill item

       IT_ITEM-MATERIAL   = IT_PEDNEC-MATNR.     "Material Code

       IT_ITEM-PLANT      = ZGSARMZ-WERKS.      

       IT_ITEM-MOVE_TYPE  = ZGSMOVMOT-TPMOV1.    "Mov. Type

    *----


    • If necessary used table T156t

    • the field  KZBEW  most be used in th internal table .

    • IT_ITEM-MVT_IND

    *----


       IT_ITEM-MVT_IND    = 'B'.                    

       IT_ITEM-ENTRY_QNT  = ABS( IT_INPUT-QTDSEL ).

       IT_ITEM-ENTRY_UOM  = 'UN'.                 

       IT_ITEM-PO_NUMBER  = IT_INPUT-EBELN.         

       IT_ITEM-PO_ITEM    = IT_INPUT-EBELP.   

    • IT_ITEM-STGE_LOC   = .           

    • IT_ITEM-BATCH      = .           

    • IT_ITEM-COSTCENTER = .          

    • IT_ITEM-CUSTOMER   = .           

     

       APPEND IT_ITEM.

     

    Regards .

     

    pedro

Actions