BAPI_GOODSMVT_CREATE w/ mvt 601

Dear all,
I have automating the the sales, delivery and billing process using BDC but with the requirement of posting across 2 diff clients i have to switch to BAPI with RFC capabilities.
I have tried using BAPI_GOODSMVT_CREATE with movement type 601, and movement ind 'L'. I have created with reference to DO that I have created. Somehow after creation I managed to see the Mat Doc links to DO but it doesn't seem to be linked at all.
I have used BAPI_OUTB_DELIVERY_CREATE_SLS to create my DO w/ ref to SO then follow by PGI using above mentioned FM. One I notice that it doesn't even have Picking Request creation if BAPI_OUTB_DELIVERY_CREATE_SLS is use.
here's the sequence.
BAPI_OUTB_DELIVERY_CREATE_SLS
SALES_ORDER_ITEMS-REF_DOC = '800000'.
SALES_ORDER_ITEMS-REF-ITEM = '000010'.
SALES_ORDER_ITEMS-DLV_QTY = '1.000'.
SALES_ORDER_ITEMS-SALES_UNIT = 'EA'.
with this DO got created, but I don't see a picking request. Then I proceed to create PGI for this DO using BAPI_GOODSMVT_CREATE.
here's the parameters.
BAPI_GOODSMVT_CREATE
GOODSMVT_HEADER-PSTNG_DATE = today
GOODSMVT_HEADER-DOC_DATE = TODAY
GOODSMVT_HEADER--REFDOC_NO = DO# created from FM
GOODSMVT_HEADER-HEADER_TXT = 'Testing'
GOODSMVT_HEADER-VER_GR_GI_SLIP = '01'
GOODSMVT_CODE-GM_CODE = '06' - MB11
GOODSMVT_ITEM-MATERIAL = 'X1000'.
GOODSMVT_ITEM-PLANT = '1000'
GOODSMVT_ITEM-STGE_LOC = '3001'
GOODSMVT_ITEM-MOVE_TYPE = '601'
GOODSMVT_ITEM-CUSTOMER = Sold to Party from SO
GOODSMVT_ITEM-ENTRY_QNT = '1.000'
GOODSMVT_ITEM-MVT_IND = 'L' for Delivery Order
GOODSMVT_ITEM-DELIV_NUMB = DO# created from FM
GOODSMVT_ITEM-DELIV_ITEM = DO item #
with this, i managed to psot goods issue for my stocks. After which I went to check my Document Flow.
here's how it looks.
Document Flow.
SO - 800000
   DO - 8300001
      PGI - 4900000001
it doesn't even have Picking request. Did i miss something, but BAPI_OUTB_DELIVERY_CREATE_SLS is about the only BAPI FM that I can use for DO creation with ref to SO.
It doesn't create picking request. Worse still the MatDoc doesn't even link to DO even I have seen it in document flow. I had manually fill in the Pick Qty in DO then PGI again to complete the Shipping process because Billing can be triggered.
What have I missed with above scenario? Has anyone done so with.

Hi Preeti,
          Please refer to the following code.The below are the fields I used for BAPI     
  X_GOODSMVT_HEADER-PSTNG_DATE = SY-DATUM.
  X_GOODSMVT_HEADER-DOC_DATE   = SY-DATUM.
*--Goods Mvt Code is 04
  X_GOODSMVT_CODE-GM_CODE = C_05.
*--Fill up Item level values
  IT_GOODSMVT_ITEM-MATERIAL  = V_MATNR.
  IT_GOODSMVT_ITEM-PLANT     = IT_INFILE-TO_DEPT.           "C_5002.
  IT_GOODSMVT_ITEM-STGE_LOC  = V_SLGORT.
  IT_GOODSMVT_ITEM-BATCH     = IT_INFILE-LOT_NBR.
  IT_GOODSMVT_ITEM-MOVE_TYPE = P_V_BWLVS.
  CONDENSE IT_INFILE-MENGE."TRANS_QTY.
  IT_GOODSMVT_ITEM-ENTRY_QNT = IT_INFILE-MENGE. "TRANS_QTY.
  IT_GOODSMVT_ITEM-ENTRY_UOM = C_UOM.
  IT_GOODSMVT_ITEM-MOVE_MAT  = V_MATNR.
  IT_GOODSMVT_ITEM-MOVE_PLANT = IT_INFILE-TO_DEPT.          "C_5002.
  IT_GOODSMVT_ITEM-MOVE_STLOC = V_DLGORT.
  IT_GOODSMVT_ITEM-MOVE_BATCH = IT_INFILE-LOT_NBR.
  IF NOT IT_INFILE-PICK_LOCN IS INITIAL.
    IT_GOODSMVT_ITEM-GR_RCPT = IT_INFILE-PICK_LOCN."_FROM.
  ELSE.
    IT_GOODSMVT_ITEM-GR_RCPT = IT_INFILE-PICK_LOCN_FROM.
  ENDIF.
  APPEND   IT_GOODSMVT_ITEM.
  CLEAR    IT_GOODSMVT_ITEM.
*--call Bapi Function module
  CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
    EXPORTING
      GOODSMVT_HEADER             = X_GOODSMVT_HEADER
      GOODSMVT_CODE               = X_GOODSMVT_CODE
    TESTRUN                     = ' '
   IMPORTING
      GOODSMVT_HEADRET            = X_GOODSMVT_HEADRET
    MATERIALDOCUMENT            =
    MATDOCUMENTYEAR             =
    TABLES
      GOODSMVT_ITEM               = IT_GOODSMVT_ITEM
    GOODSMVT_SERIALNUMBER       =
      RETURN                      = IT_RETURN.
Regards,
Savitha
Message was edited by: savitha m

Similar Messages

  • BAPI_GOODSMVT_CREATE - 101 mvt.

    Hi ...
    I'm trying to use BAPI_GOODSMVT_CREATE to create a '101' movement for an inbound shipping notification.
    I am entering following data in the item table
    PLANT
    STGE_LOC
    BATCH
    MOVE_TYPE 
    ENTRY_QNT
    ENTRY_UOM
    PO_PR_QNT 
    ORDERPR_UN
    DELIV_NUMB 
    DELIV_ITEM 
    I'm getting the error:
    No stock posting possible for this material
    Trying the same data manually in MIGO/MB01 it works.
    Can anyone help???
    Preeti

    Hi Preeti,
              Please refer to the following code.The below are the fields I used for BAPI     
      X_GOODSMVT_HEADER-PSTNG_DATE = SY-DATUM.
      X_GOODSMVT_HEADER-DOC_DATE   = SY-DATUM.
    *--Goods Mvt Code is 04
      X_GOODSMVT_CODE-GM_CODE = C_05.
    *--Fill up Item level values
      IT_GOODSMVT_ITEM-MATERIAL  = V_MATNR.
      IT_GOODSMVT_ITEM-PLANT     = IT_INFILE-TO_DEPT.           "C_5002.
      IT_GOODSMVT_ITEM-STGE_LOC  = V_SLGORT.
      IT_GOODSMVT_ITEM-BATCH     = IT_INFILE-LOT_NBR.
      IT_GOODSMVT_ITEM-MOVE_TYPE = P_V_BWLVS.
      CONDENSE IT_INFILE-MENGE."TRANS_QTY.
      IT_GOODSMVT_ITEM-ENTRY_QNT = IT_INFILE-MENGE. "TRANS_QTY.
      IT_GOODSMVT_ITEM-ENTRY_UOM = C_UOM.
      IT_GOODSMVT_ITEM-MOVE_MAT  = V_MATNR.
      IT_GOODSMVT_ITEM-MOVE_PLANT = IT_INFILE-TO_DEPT.          "C_5002.
      IT_GOODSMVT_ITEM-MOVE_STLOC = V_DLGORT.
      IT_GOODSMVT_ITEM-MOVE_BATCH = IT_INFILE-LOT_NBR.
      IF NOT IT_INFILE-PICK_LOCN IS INITIAL.
        IT_GOODSMVT_ITEM-GR_RCPT = IT_INFILE-PICK_LOCN."_FROM.
      ELSE.
        IT_GOODSMVT_ITEM-GR_RCPT = IT_INFILE-PICK_LOCN_FROM.
      ENDIF.
      APPEND   IT_GOODSMVT_ITEM.
      CLEAR    IT_GOODSMVT_ITEM.
    *--call Bapi Function module
      CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
        EXPORTING
          GOODSMVT_HEADER             = X_GOODSMVT_HEADER
          GOODSMVT_CODE               = X_GOODSMVT_CODE
        TESTRUN                     = ' '
       IMPORTING
          GOODSMVT_HEADRET            = X_GOODSMVT_HEADRET
        MATERIALDOCUMENT            =
        MATDOCUMENTYEAR             =
        TABLES
          GOODSMVT_ITEM               = IT_GOODSMVT_ITEM
        GOODSMVT_SERIALNUMBER       =
          RETURN                      = IT_RETURN.
    Regards,
    Savitha
    Message was edited by: savitha m

  • Post Goods issue using delivery

    Hi,
    Anyone know a function module or BAPI to post goods issue (mvt:601) for delivery. function module BAPI_GOODSMVT_CREATE does not support 601 or like. and if we use BDC, there are no return message because we use transaction VL02N and in this if any error, it will stop at error screen.
    Pls let me know if you have any solution on this.
    regards,
    Nilesh

    Hi,
    I got solution with fm: WS_DELIVERY_UPDATE_2 which will update delivery, packing, picking.......
    Still waiting for answer on: creating delivery realted billing document. Tried BAPI_BILLINGDOC_CREATEMULTIPLE which will create order related only.

  • Free of Charge (FOC)  items Should not be posted to Cost of sales

    Hi all,
    We are in ECC 6.
    SD Requirement: In sales order, we create  line  items.  Once DO is created , we post PGI. At this point
    Cr Stock A/C  19000  Dr Cost of sales 45000. We do not Dr GL 45000 for FOC items. We want to use another GL for this.
    How can I set up this?
    Thanks in advance

    Hi all, Tks for the solution.  Issue is resolved now.
    I have done following config  to get the desired outcome.
    Config Steps:
    MM Config:
    1.New mvt type 901 created by copying std mvt 601.
    2.In account grouping account modifier VAX was replaced by ZAX for WA01 -2 -GBB & WA03 -2 -GBB
    3.In OBYC Copy GBB-0001-VAX 3100 Old GL to GBB-0001-ZAX 3100  NewGL
    SD Config
    4.In VOV6 Maintain Sch line cat. Cretate Z2 by Copying CN   and change mvt type from 601 to 901
    No separate item cat or delivery type is created .
    Transaction Steps:
    1. VA01:Create Sales order with Two line items one with item cat TAN and second with item cat TANN.
       For line item 2, Change Sch line cat to Z2
    2. VL01N :Create delivery with std type LF > TO>Confirm-->PGI.
         Accounting entries, for first line item       Cr: Stock A/C Dr: cost of sales
                                         for second line item  Cr: Stock A/c Dr: New GL
    3.VF01: Billing doc created. Accounting entries Dr Trade Debtors Cr Sales Revenue

  • Goods Issue for BOM material thru SD route

    Hi Experts,
    I have to carry out Goods issue of BOMB material (Main Material + Components) using Sales BOM. Currently I donot find any config setting that allows me to carry out goods issue thru SD route. Currently we are carrying out this transaction using IS-OIL TD route which is a standard functionality.
    Can experts guide me how I can carry out this transaction using SD route. What will be the setting required etc.
    Thanks in Advance,
    Casimer.

    Hello Francis,
    I did not understand why master of Configurable material is required. It is simple oil bom. The bom is maintained using CS01. The item category is set as required.
    Sales order / Delivery gets created. As the main item is not in stock, no sloc is entered for this line item only the valuation type is assigned. For the component, the sloc and the valuation is assigned. After entering these data in the delivery and clicking on Post goods button, system gives error message like not stock for main item etc.
    Actually the system shall make material to material transfer in the background from component to main item and issue main item thru mvt 601.
    Can u adivse on this.
    regards

  • Auto populate of vendor in partner Tab during Goods issue- Batch management

    Dear All,
    I there a possibility of populating the Vendor (in partner tab) during goods issue (MVT 601,201, 240 etc).
    Provided the material is batch managed.
    Thanks and Best Regards
    W.Raghuram

    What I feel is that u have to maintain the Batch Characteristics then it is quite possible.
    In std In Partner tab I feel not possible. Not sure other expert may guide you.
    Biswajit

  • WM: Return Purchase order process issue-Using 161 movement type

    Hi
          i did return PO with using 161 movementype .when i do GRN, WM is appear 601 movement type and storage type is 916 .
          i  think is wrongly triggered the movementype and storage type 916 .
          so where i made mistake the configuration.pls suggest me to do the configuration.
        with regards
       dinesh
    Edited by: code acess on Jul 8, 2011 7:50 AM

    You can ask SAP AG why it was designed this way - I already told you my explanation I have no better thoughts.
    Just remark: WM-mvt 601 is not only related to sales process. Just check the WM/IM interface and you will see it (e.g. IM-mvt 261, IM-mvt 541 are assigned to it). I think it generally means outbound delivery process.
    If the stock is not in the right place and system cannot find it based on the search strategy you use, you have to enter the data manually.
    Edited by: Csaba Szommer on Jul 8, 2011 11:41 AM
    Edited by: Csaba Szommer on Jul 8, 2011 11:48 AM

  • Material movement in COPA

    Hi Sapians
    I have created 2 Value Fields for Qty posting, How and where I mapped to get my results as follows:
    When Mvt 101 will be done on Product (Material) : Qty should be posted to VV001 (Production)
    When Mvt 102 will be done on Product (Material) : Qty should be reversed from VV001 (Production)
    When Mvt 601 will be done on Product (Material) : Qty should be posted to VV002 (Production)
    When Mvt 602 will be done on Product (Material) : Qty should be reversed from VV002 (Production)
    Regards
    imdad

    Hi Suraj
    Do you have material ledger link. pl send
    regards
    imdad

  • Restict the overdeliveries to only one storage type ( WM )

    The issue  is some material coming in bag so i can't issue it particaly
    In the WM MVT ( 601 GI to delivery note ) i change the field overdelieveries to be active and the system make round for the picked quantity regardless the quntity regardless the quantity required ( for example if the quantity required is 1000 kg and the available quantity in the bin is 1250 kg system should pick the full quantity 1250 kg )
    but the problem is
    it is activated now for all storage type in this  warehouse No.
    my reqiurement to activate it for only one storage type
    i changed the configration for this storege type and diactivate the field full stock removal is required but still the system pick the full quantity for this storage type
    how restrict this for only one storage type
    can anybody help
    Edited by: wello76 on Nov 2, 2010 1:40 PM
    Edited by: wello76 on Nov 2, 2010 1:41 PM
    Edited by: wello76 on Nov 4, 2010 9:01 AM

    create a manual TO with either LT01 or LT10 with movment type 999.
    Then confirm the movement with LT12.

  • Auto printing transfer order issue

    hi,
    TO is automatically generated upon the MIGO GR MvT 101 based on the material doc#, TO supposes to print automatically at this point, but it just not happening! i have to manually print out through SP02, TO is in spool. the status is 'error" doesn't specify whats wrong with that though!
    in another case, TO created by outbound delivery Mvt 601 printed automatically without probs! checked all setting haven't found anything wrong, any clues! thanks!
    Edited by: qgjddcel on Dec 18, 2008 4:11 PM

    What is the proper procedure/transactions for this? Is there any other way to solve this? This STO is about 5 months old, would that cause any issue?
    thanks in advance.

  • Urgent :--------- Transfer Requirement creating for the delivery

    Hi Gurus,
    For a Delivery document Transfer Requirement and as well as Transfer Order is creating,
    Based on Transfer Order picking was happening in the WMu2026 the PGI for the delivery and Billing properly is happening.
    But Open Transfer Requirements are laying for each delivery document, here source is respective storage type and bins and destination storage type 916 and bin is delivery number.
    Please suggest me how the it is happening where we did configuration mistake.
    Regards
    madhu

    Hi,
    I think you set TR creation indicator for IM mvt 601 (reference mvt) under SPRO > LE > WM > Interfaces > IM > Define Movement Types - LE-WM interface....
    Please check it. If it is set delete it.
    BR
    Csaba

  • HUM vs. sales return

    Dear All,
    We did the following process:
    1. SO for materialA
    2. Delivery refering to the SO
    3. Pack materialA with mat_pack, based on configuration delivery item was created for mat_pack automatically.
    4. Picking (WM picking for materialA and normal picking for mat_pack)
    5. PGI (mvt 601 for materialA, mvt 621 V for mat_pack)
    6. Return sales order (RE) refering to the original SO
    7. Packing, but no automatic item determination > the packaging material was not generated
    So, mat_pack got to return. pack. special stock to customer (special stock "V").
    I checked SAP help:
    - I can create SO (order type AT) > delivery (type: LR) will be created for packaging material with item category LAN
    - no information in SAP online help or in SCM660 how sales return for HUs should be done (I haven't found anything).
    - I tried to assign item category LAN for delivery type LR for VERP items in SPRO > LE > Shipping > Deliveries > Delivery Item Category Determination - the problem is that the delivery item category LAN ( document category J ) and delivery type LR are not allowed to be linked (error message: VLCU001)
    My questions:
    - I cannot assign LAN to LR (error message). SAP can: if it creates the delivery for AT sales order type. (SAP creates LR-type delivery with LAN del. item category for packmat with SO of AT type). Why does it work so?
    - What is the standard sales return process with handling unit + returnable packaging)? I would prefer to pack the return item and get the packing item on the delivery - and reduce special stock "V" by posting GR.
    Thanks,
    Csaba
    Edited by: Csaba Szommer on Oct 27, 2008 5:20 PM
    Edited by: Csaba Szommer on Oct 27, 2008 5:23 PM
    Problem solved by one of my colleague:
    1. sales order item category TAL was copied > ZEL > "returns" indicator checked
    2. delivery item category TAL was copied > ZEL > document type "T"
    3. delivery type LR > Item requirement: 202, Default order type: DL
    4. delivery item category determination: LR VERP PACK ___ ZEL
    Edited by: Csaba Szommer on Nov 7, 2008 4:13 PM

    Normally the Sales Return Order is created with reference to the billing document of the original sales order. You can get the billing document number from the table VBRP (field VBELN).
    VBRP-AUBEL = VBAK-VBELN = VBAP-VBELN
    VBRP-AUPOS = VBAP-AUPOS
    The Sales Return Order can be fetched from the table VBAP (field VBELN)
    VBRP-VBELN = VBAP-VGBEL
    VBRP-POSNR = VBAP-VGPOS
    Hope this helps.
    Regards,
    Manoj

  • Activate stock removal for all quant in the bin regardless the quantity

    Dear Expert
    i have one requirement come from the business that the system should remove all the quntity exist in the bin regadelss the quantity requirement  in the outbound Del. according to the charactristics of some material which is Bag , so we cann't issue part of the bag
    i did something which is :
    in the WM MVT  ( 601  GI to delivery note ) i change the field overdelieveries to be active and the system PIck all the quantity regardless the quntity regardless the quantity required but the problem is
    it  is activated  now for all storage type in the warehouse No.
    how to activate it for only one storage type
    can anybody help

    Dear
    for the same material which coming on bag the weigh is differant from bag to another for example one contain 1000 and the other contain 1200 , so i think the solution should through the TO
    i did this already but the control at MVT but the problem it is aplicable for all storge types , i want to applay it for only one storage type
    how to make restriction for storage type

  • Wrong dest.storage type (921 / TRANSFER) is chosen when picking of OBD

    Hi Folks,
    I am configuring a new warehouse. while testing of the same i came across below issue.
    wrong dest.storage type and dynamic storage bin (921 / TRANSFER instead of 916 / OBD No.) is chosen when picking of Outbound Delivery.
    What may be the reason of this when all the settings of LE-WM interface are in place ?
    I have made the configuration similar to an existing WH and same is working fine there.

    IM-LE interface is one thing.
    You should get from IM-LE interface which WM-movement type is used for your IM-movement type (in standard system e.g. im-mvt 601, 641, 643 for GI --> they are linked to wm-mvt 601).
    In the definition of the wm-mvt (V_T333) you should have:
    - destination storage type: '916' (V_T333-NLTYP)
    - dymic bin inducator: 'X' (V_T333-NKDYN)
    (Please be careful because wm-mvt definition as well as IM-LE interface setting might be WH specific...)
    If your settings in config are proper, you should check your develpments (user exists, etc)...

  • When billing, forward the sale cost

    Dear All.
    about billing and forwarding sale cost. we now do  according to the following two steps.
    A .When do  goods issues(Mvt:601).the system generate the below accounting   document:
    Dr: Cost of Goods Sold
        Cr: Stock-Finished goods
    B.When billing, the system generate the below accounting document:
       Dr: Accounts Receivable
          cr: Sales income.
    but there is some faults according the above steps,because  do month-closing,perhaps do goods issue but don't billing ,so the income and the cost won't macth.
    my problem is how configure in system can generate the following effect:
    when do goods issue:the system generate the below accounting document:
    Dr: Stock-Finished goods-in transist
        Cr: Stock-Finished goods
    B.When billing, the system generate the below accounting document:
       Dr: Accounts Receivable
          cr: Sales income.
       Dr:Cost of Goods Sold
          cr:Stock-Finished goods-in transist
    Best regards.

    Hi,
    No is no other way.
    You have to bill the goods delivered in old period only.
    Then only you can generate P&L Stmt correctly.

Maybe you are looking for