BAPI_GOODSMVT_CREATE: move 309 for transfer posting - change of sales order

Hello Experts,
I'm trying to use BAPI_GOODSMVT_CREATE to transfer the material from one sales order to another.
But that doesn't seem to work.
ls_goodsmvt_header-pstng_date = sy-datum.
      ls_goodsmvt_header-doc_date   = sy-datum.
      ls_goodsmvt_code-gm_code      = '04'.
      ls_goodsmvt_item-material    = ls_outtab_l-matnr.
      ls_goodsmvt_item-plant       = ls_outtab_l-werks.
      ls_goodsmvt_item-stge_loc    = ls_outtab_l-lgort.
      ls_goodsmvt_item-move_mat    = ls_outtab_l-matnr.
      ls_goodsmvt_item-move_plant  = ls_outtab_l-werks.
      ls_goodsmvt_item-move_stloc  = ls_outtab_l-lgort.
      ls_goodsmvt_item-move_type   = '309'.
      ls_goodsmvt_item-mvt_ind     = ''.
      ls_goodsmvt_item-entry_qnt   = ls_outtab_l-kalab.
      ls_goodsmvt_item-entry_uom   = 'EA'.
      ls_goodsmvt_item-spec_stock  = 'E'.
      ls_goodsmvt_item-val_sales_ord  = ls_outtab_l-vbeln.
      ls_goodsmvt_item-val_s_ord_item = ls_outtab_l-posnr.
      ls_goodsmvt_item-sales_ord   = ls_outtab_r-vbeln.
      ls_goodsmvt_item-s_ord_item  = ls_outtab_r-posnr.
"      ls_goodsmvt_item-sched_line  = '000'.
      APPEND ls_goodsmvt_item TO lt_goodsmvt_item.
      CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
        EXPORTING
          goodsmvt_header  = ls_goodsmvt_header
          goodsmvt_code    = ls_goodsmvt_code
          testrun          = ''
        IMPORTING
          goodsmvt_headret = ls_goodsmvt_headret
          materialdocument = lv_materialdocument
          matdocumentyear  = lv_matdocumentyear
        TABLES
          goodsmvt_item    = lt_goodsmvt_item
          return           = lt_return.
Right now i supply val_sales_ord with destination order number, and sales_ord with source. But I'm not really sure about that, which is the destination, and which is source sales order number parameter in itemline, val_sales_ord or sales_ord? Or maybe it doesnt work like that?
Thanks for any help,

So after some time i found out where the flow of bapi and migo differ, this is also, where the field KDAUF gets reseted, and the cause of not posting material document correctly:
Starts in line 59 of MM07MFU0_UMLAGERUNG_PRUEFEN:
* The old fieldselection (T156B) is not valid for a transfer posting
* from MIGO
  IF NOT vm07m-xstor = zwei AND xmigo <> x.
    IF dm07m-fausw+55(1) = minus.
      CLEAR mseg-ummat.
    ENDIF.
    IF dm07m-fausw+56(1) = minus.
      CLEAR mseg-umwrk.
    ENDIF.
    IF dm07m-fausw+57(1) = minus.
      CLEAR mseg-umlgo.
    ENDIF.
    IF dm07m-fausw+64(1) = minus.
      CLEAR mseg-umcha.
    ENDIF.
    IF NOT vm07m-kzbwa = kzbwa-01 AND
       NOT vm07m-kzbwa = kzbwa-05 AND
       NOT vm07m-kzbwa = kzbwa-07.
      CLEAR: mseg-umbar.
    ENDIF.
" the condition below is the source of my problems
    IF dm07m-fausw+60(1) = minus.
      CLEAR: mseg-kdauf, mseg-kdpos.
    ENDIF.
    IF dm07m-fausw+62(1) = minus.
      CLEAR mseg-ps_psp_pnr.
    ENDIF.
  ENDIF.
I changed the value minus '-' of dm07m-fausw+60(1) to a dot '.', and the bapi worked like a charm. I am just not sure if I can change the records of T156B just like that, I guess not a good idea.
Still i have no solution...

Similar Messages

  • One sales order qty transfer posted to other sales order

    Hi All,
    One sales order qty transfer posted to other sales order.How can I find this relation with table frields.
    Please advise.
    Pranitha.

    Hi,
    Check table MKPF and MSEG if transfer posting has been done with reference to a sales order.
    Regards,
    Amit

  • Mov Type for Transfer Posting ?

    Hi,
    What is the movt type for transfer posting
    a) Quality Insp Stock to Block Stock ?
    b) Block Stock to Unrestricted use stock ?
    Regrds,

    Hi
    350 movement is used for stock trasfer from QI to Block
    350          Transfer posting blocked stock to QI stock - reversal
    Vishal...

  • Reg:Transfer posting from one sales order to another sales order( V C)

    Friends,
    can anyone tell me how to transfer stock  between one sales order to another sales order(Having different configuarations).
    We tried with movement type 413E but as configuaration is diiferent we cannot carry out.
    Please let me know the solution as early as possible...
    thanks in advance

    Hi,
    Sales order stock with different configuration cannot be delivered against a new sales order. If possible change the configuration of the new sales order matching the configuration of the sales order against which the stock is available by changing the variant characteristics. If the configuration is mapped then system will allow sales order stock transfer.
    Regards,
    Ravi Kumar C.

  • Movement type for transfer posting  wbs to normal stock

    which movement type used for asset trasferred from wbs(special stock) to normal stock

    Dear,
    i hope u have created asset as a material,
    trasferred material from wbs(special stock) to normal stock--310 Q(Transfer posting project material to material - reversal)
    312 Q(Transfer posting stor. loc. (one-step) - project - reversal).
    Regards,
    Gopala.S

  • Transfer Posting problem with "sales order stock type" status

    Hello, i have this problem, i spend 2 days looking in the forum, but
    nothing, the question is:
    The SD users sell an item, and the item get the status of "sales order
    stock type" in the MMBE, but at the same time, the MM user made a
    trasfer posting in two steps, he take out material with transaction
    MIGO, mvt 351, to another plant, but the materail was already
    compromised with SD; now he cant sell the items, because he dont
    realize that the material was in sales order stock type, and he already
    transfer it to another plant. how can i block this? if a material in
    MMBE is with "sales order stock type" status, he CANT transfer it with
    351 mvt type, what config i have to make?  thanks a lot!!!!
    now the quantity of the unrestict use
    stock is lower than the sales order, we dont want to have this issue,
    thanks again
    Edited by: Alex Arti on Aug 6, 2008 7:14 PM
    Edited by: Alex Arti on Aug 6, 2008 7:16 PM

    Hi!
    Have you recently upgraded to EHP4? In this case, please, check the note 1441195. This note should solve the issue that you are reporting.
    I hope this helps,
    Esther.

  • How to use the BAPI_GOODSMVT_CREATE for Transfer posting Sales order

    Hi Friends,
    How to use the Bapi BAPI_GOODSMVT_CREATE for transfer posting sales order to sales order.
    pls, send the list of parameteres to pass to the bapi, if program avail please send it to me.
    Thanks in advance
    Shankar

    You have to pass Header and GM code as the INput parameters for uing this BAPI....GM code would be structure.
    Also you have to pass the INternal table Item for the goods mvt cxreate which will contains
          BATCH.
          MOVE_TYPE.
          ENTRY_QNT.
          MOVE_PLANT.
          MOVE_STLOC.
          MOVE_BATCH.
          MOVE_REAS
    these parameters.
    Regards,
    Sushil.

  • Bapi for transfer posting

    Estimated,
    I have to make a move between storage location of material that is blocked with status (movement 325). For that I'm trying on the Bapi MB_CREATE_GOODS_MOVEMENT and run with the same parameters as when I review the transaction MIGO_TR, but the structure EMSEG gives me the message number M7096 "Goods movement not possible with mvmt type 325". What could be wrong? and tried doing the Bapi commit, but still gives me error. It also showed the Bapi BAPI_GOODSMVT_CREATE and throws me the same message. Please I am desperate.
    Thanks.

    Hi,
    You can't use function module MB_CREATE_GOODS_MOVEMENT for movement 325, since that function module is used for Goods Issue for delivery.
    You should use bapi "BAPI_GOODSMVT_CREATE" for this movement 325 instead.
    Passing GOODSMVT_CODE = 04 (for Transfer Posting)
    The following thread has a sample code of above BAPI, then do adjustment accordingly as per your requirement.
    Re: i want to Stock upload with movement 561 and t code is mb1c
    Cheers,

  • Movement 415 Q- transfer posting project to project

    In case of movement 415 Q- transfer posting project to project, I want to change the accounting entries.
    As per the business need, it is decided that for some cases where excess stock is available in one project that can be transfered to other project without cost. Hence in some cases I need to cancel the accounting posting done by movement 415 (Q) so that only quanity is transfered to other project.
    Is this feasible with the help of development ?

    Hi,
    Whenever you procure materials against Project 'A', cost will be booked against the same project. If project is completed & still u've excess materials which u want to issue to some other project 'B', U can use std SAP movement type 415Q. By using this, cost which was already booked against project 'A' will be transferred to project 'B' to the extent of materials cost issued to project 'B'. Accounting documents represents the same.
    But your requirement is : excess stock of project 'A' should be transferred to project 'B' with out value flow. That means.... Cost will be still lying with project 'A'  for the excess materials issued to project 'B' though those materials are not consumed against project 'A'. And also the cost booked against project 'B' will be lesser than the actual spent. (bcoz these materials cost will not get added to project 'B' cost)
    Finally total cost of both project 'A' & 'B' will have wrong figures, which is not a correct practice.
    Thanks
    Kishore

  • Movement type for transfer of stock from Stock-in-transit to Vendor

    Hello,
    Is there any movement type for transfer of stock from Stock-in-transit to Vendor.
    For internal transfer from Plant to Plant we follow Purchase Requisition -> Stock Transfer Order (PO – Modified) -> Delivery (VL04) -> MIGO (Goods Receipt against Delivery) method.
    The problem arises when the actual delivery quantity is less then what is entered in the system (due to clerical error). That is, physically less quantity were dispatched and received at the receiving plant. Now the balance quantity is lying as stock-in-transit. To clear it we are receiving the material and using transfer posting for plant to plant transfer. Though physically there is no transfer of goods. Now we do not want to receive the material instead we want it to transfer from stock in transit to the supplying plant. Is it possible ?
    Thanks.
    Ashish

    Hi Ashish,
    When You issue the stock,  the accounting document is posted . There is no accounting entires when you do Goods receipt at receving plant . In case , we are developing to make it happen , I feel it may have impact on the Material Valuation aspects .
    Hence, I feel it is better to adopt any of the following 2 options.
    1) Cancellation of the entire delivery and make new delivery   or 2) Receive the entire qty  at the receiving plant and decide what you want to do with the unavl  qty . For example in your case of loss of material due to accident , you can scrap the material in the receving plant itself  or return the material back to the sending plant.
    Regards
    Mani

  • Goods delivery error for transfer posting

    I have created a P.O for transfer posting for a material from Plant 2000 to plant 3000.where in my account assignment I have mentioed the WBS element.
    created the delivery document---VL10B and outbound delivery VL01N.
    during PGI, system gives error that no WBS element has been assigned.I went to item level and in financial posting TAB page I could not locate the same WBS number in the filed, which is not editable too.the movement type is 641.
    Please advcie what other things to check.
    Zinni

    Check your delivery type which  copy control and  how this value is passing.I think through some routine it is populated.Check the routine in VOFM transaction.

  • Movement type 453 (Transfer posting to own stock from returns from customer

    Hi all,
    I have problem in goods movement type 453 (Transfer posting to own stock from returns from customer)
    it picking from from profit center from in material master under  sales:general/plant tab   but we need picking from based on account assignment group  in the material maser sales org.2.
    Other movement types are picking from based on account assignment group only . for that what i can do please help me on this.
    K.Satish

    Hi,
    In Co controlling are the automatic account assignment is only the default and it on the Priority.
    if you think what is picked up from the mm is wrong.
    the best way out will be to go with the substitution  rule.
    based on the movement type use the rule.
    hope this is clear , assign points.
    With regards
    Krishna

  • PO no is not updateing in MSEG table for transfer posting wrt PO

    Hi All ,
    PO number not updateing  in MSEG table field EBELN for transfer posting with reference to PO . What should be the reason . This is for subcontracting process .

    Hi Raghavendra Balegar
    If u r doing through scheduling agreement then it will not sit in MSEG. only if u doing through standard PO i.e. NB then only u can view the data of PO in MSEG.
    Regards
    Ram

  • Bapi for Transfer posting with clearing

    Hello,
    please let me know the bapi for Transfer posting with clearing for transcation F-04 or FB05.
    quick reply wil be helpfull.
    Thanks,
    ram

    Hi
    I don't know in release greater than 4.7, but there isn't that BAPI.
    There's a BAPI to post a document, but the clearing is an internal transaction so I don't believe there's a BAPI for it.
    Anyway you can try to create one using the std BDC RFBIBL00: it suppoerts that transaction.
    Max

  • Reference movement type for transfer in warehouse mgmt

    Hi ,
    In the warehause management system,  IM movement type is link to WM movement type.
    Maintenace veiw V_156S_WM ( Table  156SC ).  IM movement type 321 has three reference movement type in WM.
    396 , 397 , 321 .
    Again  through table T321 ( veiw V_T321 ) reference Mvt 396 is  link to 311 in WM , 397 link to 312 in WM and 321 to 321 In WM.
    If i perform 321 movement in IM , then how the system will determine unique reference movement from table
    V_156S_WM ( Table  156SC ) .
    Thanks
    Sanjay

    Hi,
    The stock tsf ref mvnt type in V_156S_WM(-UMRBL) is:
    Reference movement type for transfer in warehouse mgmt
    Reference movement type for the second transfer in the Warehouse Management system.
    Use
    This reference movement type is necessary when a goods movement (stock transfer) in Inventory Management causes two transfers in the Warehouse Management system (stock removal from one storage type and stock placement in another).
    Inventory Management movement types that do not initiate any activity in the Warehouse Management System have the reference movement type 999.
    The ref mvnt type in V_156S_WM(-RBLVS) is:
    Reference movement type for WM from material movements
    Reference key for determining the movement type in the Warehouse ManagementSystem.
    Use
    Each Inventory Management movement type that is relevant to the WM system is allocated to a reference movement type, with which the system determines the corresponding movement type in the WM system.
    Using the reference movement type, you can group together Inventory Management movement types that result in the same movement in the WM system.
    Inventory Management movement types that do not initiate any activity in the Warehouse Management System have the reference movement type 999.
    ...sorry, basic help text.
    Cheers,
    Hein

Maybe you are looking for

  • How to find out Oracle 11i Standard Objects

    Hi Gurus, There is a requirement from my client. My client is on 11i Oracle Applications. He has many customization. But somehow he failed to use naming convention and all during implementation. Now he wants us to write a program which can tell us ho

  • Sharing a Cinema display with a PC

    I know this is heresy, but I'd like to share an ACD between a PC and a Mac Pro without resorting to a KVM. I currently have a 30" ACD dedicated just to the Mac Pro. I'm considering buying an additional 30", but will need to be able to use the PC occa

  • Homogeneous System Copy on VMWare

    We are executing a Homegeneous System Copy of (based on the+ Homogeneous and Heterogeneous system Copy for SAP Systems Based on SAP Web Application Server Java 6.40 Patch Collection+ Installation Guide) on windows 2003 server, following the Oracle 9.

  • SmoothCam

    I am gettimng "tearing" on verticals in a clip treated with Smooth Cam when I create QT movie (H264). Where SmoothCam hasn't been used i don't have the problem. The tearing is only evident on the exported QT file, not in the FCP canvas so unsure wher

  • Oracle drive could not connect

    Hi, I installed oracle drive and when tried to connect using system (sys or any account) return and invalid username/password error but if I tried to connect with IE using the same user there are not problem. Any help welcome. Thanks