Creating Inventory Goods Receipt (oInventoryGenEntry)

Creating Inventory Goods Receipt (oInventoryGenEntry) gives the error "The inventory account is not defined".  But I do the same in SAP and the works.
What do I have to do in my code about accounts ?
I mean for sure I just give the item, the quantity and a bit of header information.

Dear Marc Roussel,
Please try to set the AccountCode of Document_Lines then add it again.
Best Regards
Jane Jing
SAP Business One Forums team

Similar Messages

  • Need BAPI for MIGO to create a Goods Receipt against PO &Outbound Delivery

    Hi Friends,
    GRN’s (Good receipt notifications) created in DHL (Non SAP system) will need to be communicated to SAP.
    I need to post goods receipt using input data in MIGO. Is there any BAPI that i can use.The requirement is like below:
    PO number field in output file is checked against entries in EKKO-EBELN, if a match is found the GR is posted against a Purchase Order otherwise LIKP-VBELN is checked and if a match is found GR is posted against an Outbound Delivery.
              If PO Number = EKKO-EBELN    GR against Purchase Order
                            = LIKP-VBELN      GR against Outbound Delivery
    Based on the above condition I need to create a Goods Receipt. 
    Could you please tell me the GM code, movement types and the required fields to be passed for the BAPI?
    The fields available are with us are...
    Header text. - Bill of Lading- Posting Date-Quantity- UOM--- Vendor Batch / Batch / Serial No --- PO Number or Delivery Number… SLED
    Are these fields sufficient for doing MIGO with the BAPI or do we require more fields???
    Please provide sample code if possible.
    Waiting for replies,
    Thanks and Regards,
    Sudha

    Hi Friends,
    GRN’s (Good receipt notifications) created in DHL (Non SAP system) will need to be communicated to SAP.
    I need to post goods receipt using input data in MIGO. Is there any BAPI that i can use.The requirement is like below:
    PO number field in output file is checked against entries in EKKO-EBELN, if a match is found the GR is posted against a Purchase Order otherwise LIKP-VBELN is checked and if a match is found GR is posted against an Outbound Delivery.
              If PO Number = EKKO-EBELN    GR against Purchase Order
                            = LIKP-VBELN      GR against Outbound Delivery
    Based on the above condition I need to create a Goods Receipt. 
    Could you please tell me the GM code, movement types and the required fields to be passed for the BAPI?
    The fields available are with us are...
    Header text. - Bill of Lading- Posting Date-Quantity- UOM--- Vendor Batch / Batch / Serial No --- PO Number or Delivery Number… SLED
    Are these fields sufficient for doing MIGO with the BAPI or do we require more fields???
    Please provide sample code if possible.
    Waiting for replies,
    Thanks and Regards,
    Sudha

  • Problems in creating a Goods Receipt Draft

    Hello,
    I am trying to use the DI-API and the SDK to create a Goods Receipt Draft document and link it to an existing Purchase Order.  When I try to add the draft object, I receive an internal error (-2010).  Here is the code that I am using.  Can someone see if anything is wrong with this, or does anyone have any insights into this type of error?
    SAPbobsCOM.Documents draft = null;
    draft = company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDrafts);
    draft.Reference1 = tempDocEntry;
    draft.CardCode = tempCardCode;
    draft.DocDate = DateTime.Now;
    draft.NumAtCard = tempOrderNumber;
    draft.DocObjectCode = SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes;     // Used so that the objType will be 20 for a Goods Receipt Draft
    draft.Comments = "";
    draft.Lines.BaseEntry = System.Convert.ToInt32(tempDocEntry);
    draft.Lines.BaseLine = System.Convert.ToInt32(row["Line #"].ToString());
    draft.Lines.BaseType = System.Convert.ToInt32(SAPbobsCOM.BoObjectTypes.oPurchaseOrders);
    draft.Lines.ItemCode = row["Item #"].ToString();
    draft.Lines.Quantity = System.Convert.ToInt32(row["Qty"].ToString());
    draft.Lines.Price = System.Convert.ToDouble(row["unit price (USD)"].ToString());
    draft.Lines.WarehouseCode = "0" + row["Whse Code"].ToString();   // prepend with zero, if the code is of length 1
    draft.Lines.Add();
    result = draft.Add();        // Add the draft now
    if (result != 0)
          thisError = company.GetLastErrorDescription();     //*** THE ERROR RESULT IS RETURNED HERE...
    I am hoping that someone can provide some feedback and direction on this one fairly quickly as I am on a pretty tight time constraint to implement this solution.
    Thanks,
    Jonathan

    Hi Jonathan,
    I haven't tested your code but I notice that you are calling the Add method of the Lines child object incorrectly. It's a bit confusing but the Lines.Add method should be called first and then you use the SetCurrentLine method to access the properties of this line. To make it more confusing, a new instance of the Documents object automatically gets one, blank line so you only need to call Lines.Add when adding a second line (and each subsequent line).
    For example, say I have a recordset of line details from a base PO that I want to add to a new, draft GRPO:
    int lineIndex = 0;
    while (!rec.EOF)
         if (lineIndex > 0) draft.Lines.Add(); // Only need to add new line after first one
         draft.Lines.SetCurrentLine(lineIndex); // Set focus to newly added line so I can set properties
         draft.Lines.BaseEntry = System.Convert.ToInt32(rec.Fields.Item("DocEntry").Value);
         draft.Lines.BaseLine = System.Convert.ToInt32(rec.Fields.Item("LineNum").Value);
         draft.Lines.BaseType = System.Convert.ToInt32(SAPbobsCOM.BoObjectTypes.oPurchaseOrders);
         draft.Lines.ItemCode = System.Convert.ToString(rec.Fields.Item("ItemCode").Value);
         draft.Lines.Quantity = System.Convert.ToDouble(rec.Fields.Item("Quantity").Value);
         draft.Lines.Price = System.Convert.ToDouble(rec.Fields.Item("Price").Value);
         draft.Lines.WarehouseCode = System.Convert.ToString(rec.Fields.Item("WhsCode").Value);
         lineIndex++;
         rec.MoveNext();
    Kind Regards,
    Owen

  • Call BAPI_GOODSMVT_CREATE to create a goods receipt for purchase order

    Hi,
    I'm calling the bapi BAPI_GOODSMVT_CREATE to create a goods receipt for purchase order, but the following code doesn't work. It doesn't give me any kind of error message but it does nothing as well...
    Can anyone help me please?
    Thank You
    Hugo
    Code
    DATA: wa_goodsmvt_header  LIKE bapi2017_gm_head_01,
                            wa_goodsmvt_code    LIKE bapi2017_gm_code,
                            wa_bapi2017_gm_head TYPE bapi2017_gm_head_ret-mat_doc.
                      DATA: it_goodsmvt_item LIKE bapi2017_gm_item_create OCCURS  0 WITH HEADER LINE,
                            it_return        LIKE bapiret2 OCCURS  0 WITH HEADER LINE.
                      wa_goodsmvt_header-pstng_date = SY-DATUM.
                      wa_goodsmvt_header-doc_date   = SY-DATUM.
                      wa_goodsmvt_header-ref_doc_no = '4500000020'.
                      wa_goodsmvt_code-gm_code = '01'.          "Goods receipt for purchase Order
                      it_goodsmvt_item-stge_loc  = 'BPF2'.
                      it_goodsmvt_item-move_type = '101' .
                      it_goodsmvt_item-entry_qnt = 17.
                      it_goodsmvt_item-entry_uom = 'KG'.
                      it_goodsmvt_item-mvt_ind   = 'B'.
                      it_goodsmvt_item-po_number = '4500000020'.
                      it_goodsmvt_item-po_item   = '00010'.
                      it_goodsmvt_item-material  = '50'.
                      APPEND it_goodsmvt_item.
                      CALL FUNCTION  'BAPI_GOODSMVT_CREATE'
                        EXPORTING
                          goodsmvt_header  = wa_goodsmvt_header
                          goodsmvt_code    = wa_goodsmvt_code
                        IMPORTING
                          materialdocument = wa_bapi2017_gm_head
                        TABLES
                          goodsmvt_item    = it_goodsmvt_item
                          return            = it_return.
                        data: begin of errmsg occurs 10.
                                include structure bapiret2.
                        data: end of errmsg.
                        data: wmenge like iseg-menge,
                              errflag.
                        clear errflag.
                        loop at errmsg.
                          if errmsg-type eq 'E'.
                            write:/'Error in function', errmsg-message.
                            errflag = 'X'.
                          else.
                            write:/ errmsg-message.
                          endif.
                        endloop.
                        if errflag is initial.
                          commit work and wait.
                          if sy-subrc ne 0.
                            write:/ 'Error in updating'.
                            exit.
                          else.
                            write:/ 'Ok'.
                          endif.
                        endif.
                        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                        EXPORTING
                        wait = ' '.

    Hi,
    Thank you for the asnwer! I'm a rookie at ABAP so please forgive my stupid questions
    I've changed the code to:
    DATA: wa_goodsmvt_header  LIKE bapi2017_gm_head_01,
                            wa_goodsmvt_code    LIKE bapi2017_gm_code,
                            wa_bapi2017_gm_head TYPE bapi2017_gm_head_ret-mat_doc.
                      DATA: it_goodsmvt_item LIKE bapi2017_gm_item_create OCCURS  0 WITH HEADER LINE,
                            it_return        LIKE bapiret2 OCCURS  0 WITH HEADER LINE.
                      wa_goodsmvt_header-pstng_date = SY-DATUM.
                      wa_goodsmvt_header-doc_date   = SY-DATUM.
                      wa_goodsmvt_header-ref_doc_no = '4500000020'.
                      wa_goodsmvt_code-gm_code = '01'.          "Goods receipt for purchase Order
                      it_goodsmvt_item-plant     = 'BP01'.
                      it_goodsmvt_item-stge_loc  = 'BPF2'.
                      it_goodsmvt_item-move_type = '101' .
                      it_goodsmvt_item-entry_qnt = 10.
                      it_goodsmvt_item-entry_uom = 'KG'.
                      it_goodsmvt_item-mvt_ind   = 'B'.
                      it_goodsmvt_item-po_number = '4500000020'.
                      it_goodsmvt_item-po_item   = '10'.
                      it_goodsmvt_item-material  = '50'.
                      APPEND it_goodsmvt_item.
                      CALL FUNCTION  'BAPI_GOODSMVT_CREATE'
                        EXPORTING
                          goodsmvt_header  = wa_goodsmvt_header
                          goodsmvt_code    = wa_goodsmvt_code
                        IMPORTING
                          materialdocument = wa_bapi2017_gm_head
                        TABLES
                          goodsmvt_item    = it_goodsmvt_item
                          return            = it_return.
                          write:/ it_return-message.
    And the return message is : Material document data and PO data do not match (Material)
    Any idea of what might be the problem?
    Thanks

  • Creating a Good Receipt PO via DI API No matching records found (ODBC -2028)

    Hi,
    I trying to create a Good Receipt PO via DI API.  It is working when the user I used to log in to SAP via the DI API is a Professional User but when I changed it to a Limited Logistics User, I'm receiving the No matching records found (ODBC -2028). I have already added the SDK Tools license to that user but still I'm receiving that error.
    So is it that the DI API will only work with a Professional User license or I can still use a Limited Logistics User?

    HI J S L,
    I get same error when I use different user that I just now add the SDK Tools without restarting the database server.  But previous user that I added SDK Tools before restart, no error.
    Today
    User 1 - add SDK Tools, no restart, error
    Last Wednesday
    User 2 - add SDK Tools, no restart, error
    Today - database server restarted this morning
    User 2 - no more error
    Both User 1 and 2 are Limited Logistics User.
    Best regards,
    Dennis

  • Find a bapi for Creates a Goods Receipt with correspond to Inbound Delivery

    hi expert!
    exist a bapi for tcode:MIGO_GR ( Goods Receipt with correspond to Inbound Delivery)
    i know one bapI  BAPI_GOODSMVT_CREATE can Creates a Goods Receipt,
      but i can't know to use it to Creates a Goods Receipt with correspond to Inbound Delivery.
    or other bapi exist for MIGO_GR?
    Best Regard!

    Hi Vatcan,
    Chek the Inbound Delivery 1st weather you refer the right PO in it
    You can also chek in  PO i
    1 Me23n Go to confirmation tab here you can see the  Inbound delivery  quantity
    2 Chek  which reference document you recived the goods,  (i.e You recived the goods with reference to PO or  Inbound delivery)
    2 Coz if you refer the inbound delivery then syestem will deafult show the inbound quanity
    And yes the actual quanity will update in inbound delivery if you refer the inbound deivery while reciveing the goods

  • DI to create draft goods receipt

    Hi,
    I am trying to use the DI to create a draft goods receipt but am receiving the following error:
    System.Exception: -5001 - Object type for draft is missing
    Any ideas how to do this?
    Thanks,
    Michael

    Hi Michael,
    Did you set the Object Type for the draft (property DocObjectCode) in your code?
    Dim vDrafts As SAPbobsCOM.Documents
    Set vDrafts = vCmp.GetBusinessObject(oDrafts)
    vDrafts.DocObjectCode = oInventoryGenEntry
    Kind Regards,
    Friederike
    SAP Business One Forums Team

  • Error in R3 system when create the Goods receipt in EWM

    Dear EWM expert,
    I have an error in R3 system when I confirm the goods receipt in EWM for inbound delivery
    the error in SMQ2 is:
    PALLET is an auxiliary packaging material and cannot be used as pack.mate
    PALLET is a packaging matirial type VERP that I've create in in R3 and I have transfer via  cif it in EWM.
    We have the new EWM 7 and i check some OSS note for a programm error in transfering of pakaging material during the GR but they are available only for EWM 5 and they are not available for EWM 7.
    Could you explain me if this error coul be caused by some customising settings or by some master data field.
    Thank you in advance for your help.
    Best regards
    Alessandro
    Edited by: Alessandro Dapiaggi on Jan 29, 2009 5:11 PM

    Hi
    I am not sure of your problem since there may be quite a few reasons why this would happen. However just try one thing - change the Packing material category from "auxaliary packing material" to "packing material" in Define Packaging Material Types under logistics general--->HU Management ---> Basics for the packing material type you are using in VERP and then create a new packing material and try the inbound delivery. It may work
    Thanks
    DJ

  • How to create Zero Goods Receipt

    Hi there world of SAP geniuses,
    How do I create a zero goods receipt order?
    My client's requirements demand that I create a zero goods receipt order.

    The client has a progress payment requirement -  every stage of GR a certificate will be issued indicating workdone.
    This is important because there are two points of information to the GR - interfaced and manual entry. Retention is involved and will be indicated at the GR stage. This has to flow into the invoice.
    E.G.
    Month        Work Done    GR         Cert
    Jan            100                 100         100
    Feb            150                 150         250
    March         0                     0*            250
    So it all boils back down to creating a ZERO QUANTITY Goods receipt!
    Thanks for all your help in advance.

  • How to create a Goods receipt for Purchase order

    Hi All,
    How to create a GR for PO and then i need to invoice the PO
    Please tell me ASAP.
    Regards,
    Sagar.

    Thanks for ur reply
    I understood how to do it.
    Can u please say me how to invoice a PO.
    my mail id is:[email protected]
    Thanks

  • No inbound delivery/TO created for goods receipt into a Lean WM Storage Loc

    Ladies and Gentlemen:
    We are using SAP 46C with Support pack 45. We have quite a few storage locations that are Lean WM managed. The Storage locations are not HU Managed. However everytime run a MB1C or MIGO 501, SAP is receiving the materials directly via a material document. I was under the impression that any time a storage location is either WM, Lean WM or HU managed, SAP always creates an inbound delivery and in case of Lean WM/WM a transfer order to receive the material. Please tell me what am I missing.
    I have created plant, storage location and assigned the combination a lean Warehouse.
    I have done the configuration under:
    Customizing> Logistics Execution> Shipping--> Lean WM.
    Please help me with why my system is not creating inbound deliveries.
    Thanks.

    hi
    i am not 100% percent but I do not think that you can have inbound deliveries in to a lean wm environment. Inbound deliveries need to be pout away and as there are no bins etc in lean wm there is no put away to be done. If you want Inbound deliveries etc you are talking about full WM

  • Addon Freezes on call to Good Receipt (oInventoryGenEntry) Add

    I have an add-on which has been working at my customer's site for over a year, but is failing when I try to run it.  The addon just freezes up on the line that tries to add the document object:                 RetVal = oInDoc.Add.
    I am even using a copy of their database.  The complication is that the copy was made when they were still on B1 2005 and we are on 2007 PL 46.  I restored the db, and let B1 do the upgrade when I opened it inside B1.  In recompiling the add-on, I needed to remove the references to the old DI/UI and point the project to the 2007 versions.  Other than that, everything is the same and everything else seems to work OK. 
    The customer has since updated to 2007 on their machine and is using the addon (with the old COM dll's) with no problems.
    Does anyone have any ideas about how I can solve this problem?
    Thanks!

    HI,
    Try the following:
    1st:
    clean up the sm_obs_dll directory from your temp folder
    recompile the addon and test.
    If it is not working, do the following:
    Remove DI reference
    Make clean (delete interop.dll-s)
    clean up the sm_obs_dll directory from your temp folder
    add reference DI AP 2007 A
    Compile and test.
    Old version of course working (backward compatibilty)
    Regards,
    J.

  • Purchase orders created have automatically good receipt

    hello,
    I wish that Purchase orders created have automatically good receipt. What is the manipulation to be made? Thanks for your help.

    Hi
    U have to do setting movement wise in SPRO
    Path SPRO-Material Management -Inventory Management and Physical Inventory - Good Receipts- Automatic Purchase Order Creation
    But if you want to do automatic GR receipt u have to write customised program for creation of GR ( May be check BADI - Craeation for MIGO is useful) nand run batch job for the same
    Edited by: Sanjay  Shah on Feb 8, 2010 3:28 PM

  • Creating goods receipt with refernce to PO number using BAPI_GOODSMVT_CREAT

    Hi Gurus,
    I have a requirment where in, I need to create a goods receipt with reference to a PO number which has been created by BAPI_PO_CREATE1, using another BAPI BAPI_GOODSMVT_CREATE.  How can I do this? what are all the values that I need to fill in GOODSMVT Create BAPI.
    Please help its very urgent... Need to submit by EOD.
    Thanks,
    Suma

    hi
    hope this code will help you,.
    Reward if help.
    REPORT ZRICH_0001 .
    Structures for BAPI
    DATA: GM_HEADER  TYPE BAPI2017_GM_HEAD_01.
    DATA: GM_CODE    TYPE BAPI2017_GM_CODE.
    DATA: GM_HEADRET TYPE BAPI2017_GM_HEAD_RET.
    DATA: GM_ITEM    TYPE TABLE OF
                     BAPI2017_GM_ITEM_CREATE WITH HEADER LINE.
    DATA: GM_RETURN  TYPE BAPIRET2 OCCURS 0 WITH HEADER LINE.
    DATA: GM_RETMTD  TYPE BAPI2017_GM_HEAD_RET-MAT_DOC.
    CLEAR: GM_RETURN, GM_RETMTD. REFRESH GM_RETURN.
    Setup BAPI header data.
    GM_HEADER-PSTNG_DATE = SY-DATUM.
    GM_HEADER-DOC_DATE   = SY-DATUM.
    GM_CODE-GM_CODE      = '04'.                                " MB1A
    Write 971 movement to table
    CLEAR GM_ITEM.
    MOVE '412'                 TO GM_ITEM-MOVE_TYPE     .
    MOVE 'Q'                 TO GM_ITEM-SPEC_STOCK.
    MOVE '3800533484'  TO GM_ITEM-MATERIAL.
    MOVE '1'     TO GM_ITEM-ENTRY_QNT.
    *MOVE 'PC'    TO GM_ITEM-ENTRY_UOM.
    MOVE '1060'  TO GM_ITEM-PLANT.
    MOVE '0007'  TO GM_ITEM-STGE_LOC.
    *MOVE '0901'   TO GM_ITEM-MOVE_REAS.
    MOVE 'P203601001' TO GM_ITEM-WBS_ELEM.
    MOVE 'P203601001' TO GM_ITEM-VAL_WBS_ELEM.
    APPEND GM_ITEM.
    Call goods movement BAPI
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
         EXPORTING
              GOODSMVT_HEADER  = GM_HEADER
              GOODSMVT_CODE    = GM_CODE
         IMPORTING
              GOODSMVT_HEADRET = GM_HEADRET
              MATERIALDOCUMENT = GM_RETMTD
         TABLES
              GOODSMVT_ITEM    = GM_ITEM
              RETURN           = GM_RETURN.
    IF NOT GM_RETMTD IS INITIAL.
      COMMIT WORK AND WAIT.
      CALL FUNCTION 'DEQUEUE_ALL'.
    ELSE.
      COMMIT WORK AND WAIT.
      CALL FUNCTION 'DEQUEUE_ALL'.
    ENDIF.
    WRITE:/ GM_RETMTD.
    LOOP AT GM_RETURN.
      WRITE:/ GM_RETURN.
    ENDLOOP.
    check the BAPI_GOODSMVT_CREATE.
    Functionality
    You can use this method to create a material document for a goods movement.
    You can only create one material document each time you call up the method.
    You can use a simulation function before posting the goods movement to check how the data is updated in the database. The standard system is configured so that the goods movement is posted immediately without simulating beforehand.
    Ensure that you transfer the data in the same way as it is run in the database, for example,
    Material number 18-figure with leading zeros
    Batches with uppercase letters
    Note that for all transactions/events listed below, the posting date is entered in the header data of the material document. In the BAPI2017_GM_HEAD_01 interface, fill the PSTNG_DATE (import structure GOODSMVT_HEADER) field.
    Notes
    Authorization check check
    In the MM Inventory Management component, the method does not execute any authorization checks.
    Note that during a posting of a goods movement, depending on the business transaction of the system, authorization objects of other applications can also be checked.
    Transfer
    The following information about the material document that is to be created is transferred to the method:
    a structure with header data
    a structure with the code for the movement
    a table with the item data
    a table with the serial numbers
    The posting is carried out in the SAP R/3 via the MB_CREATE_GOODS_MOVEMENT function module.
    Confirmations
    Messages are returned in the Return parameter. The parameter documentation shows the return codes and their meanings.
    Further Information
    The method can only carry out your function if no error messages were generated in the Return table. This is the case if the header data and all the items were processed successfully.
    Transaction control is not implemented. The calling program therefore has to execute the Commit Work itself after this method has been successfully called (in other words, if no errors were reported in the Return parameter).
    Which fields have to be filled during the various transactions/ events?
    The following sample scenarios demonstrate which fields have to be filled for which business transactions/events (code).
    There are the following types of transactions/events:
    1. GM_Code 01: Goods receipt for purchase order
    2. GM_Code 02: Goods receipt for production order
    3. GM_Code 03: Goods issue
    4. GM_Code 04: Transfer posting
    5. GM_Code 05: Other goods receipts
    6. GM_Code 06: Reversal of goods movements
    7. GM_Code 07: Subsequent adjustment to a subcontract order
    Entering the movement indicator
    Depending on the transaction, you must enter the following in the movement indicator:
    GM_Code 01 (Goods receipt for purchase order): B
    GM_Code 02 (Goods receipt for production order): F
    For all other transactions, you leave the field blank.
    For 1: GM_Code 01: Goods receipt for purchase order
    Purchase order known
    The following fields have to be filled:
    Purchase order
    Purchase order item
    Movement type
    Movement indicator
    Quantity in unit of entry
    ISO code unit of measurement for unit of entry or
    quantity proposal
    The following fields may have to be filled in some cases (incomplete listing):
    Shelf life expiration date (if it has been configured like this in the system)
    Reason for movement (if it has been configured like this in the system)
    Batch (if the material is handled in batches and batch numbers are not assigned automatically)
    Storage location (if a storage location has not been specified in the purchase order item)
    The following fields can be filled (incomplete listing):
    Stock type
    Item text
    Unloading point
    Delivery completed indicator
    You cannot fill the following fields (incomplete listing):
    Account assignment fields (account assignment is adopted from the purchase order)
    Reservation
    Receiving/issuing material
    Receiving/issuing plant
    Receiving/issuing storage location
    In the case of a purchase order item with the "subcontracting" item category, only the GR item in the interface is to be transferred. The system automatically determines GI items.
    Purchase order unknown: Shipping notification known
    The following fields have to be filled:
    Delivery
    Delivery item
    Movement type
    Other fields, such as those under "Purchase order known". The system determines the relevant purchase order item via the delivery/delivery item.
    Purchase order unknown: Purchase order should be created automatically
    The following fields have to be filled:
    Material number
    Plant
    Storage location
    Vendor
    Movement type
    Movement indicator
    Quantity in unit of entry
    ISO code unit of measurement for unit of entry
    The following fields may have to be filled in some cases (incomplete listing):
    Shelf life expiration date (if it has been configured like this in the system)
    Reason for movement (if it has been configured like this in the system)
    Batch (if the material is handled in batches and batches are not assigned automatically)
    The following fields can be filled (incomplete listing):
    Stock type
    Item text
    Unloading point
    You cannot fill the following fields (incomplete listing):
    Account assignment fields (automatic creation of purchase order items with account assignment is not supported)
    Reservation
    Receiving/issuing material
    Receiving/issuing plant
    Receiving/issuing storage location
    Purchase order unknown: A purchase order should not be created
    The following fields have to be filled:
    Material number
    Plant
    Storage location
    Vendor
    Movement type
    Movement indicator
    Quantity in unit of entry
    ISO code unit of measurement for unit of entry
    The following fields may have to be filled in some cases (incomplete listing):
    Shelf life expiration date (if it has been configured like this)
    Reason for movement (if it has been configured like this)
    Batch (if the material is handled in batches and automatic assignment of batch numbers is not set)
    The following fields can be filled (incomplete listing):
    Special stock indicator
    Item text
    Unloading point
    Goods recipient
    The following fields cannot be filled (incomplete listing):
    Account assignment fields (automatic creation of purchase order items with account assignment is not supported)
    Reservation
    Receiving/issuing material
    Receiving/issuing plant
    Receiving/issuing storage location
    Receiving/issuing batch
    The input combinations listed above for the GM_CODE 01 can be combined within an input table so that they can be posted in a material document. Items can also be posted for different purchase orders, provided that all the purchase orders refer to the same vendor.
    Transfer of subcontracting components
    During the posting of the ordered material of a subcontract order with movement type 101, for the transfer of the subcontracting components, the filled unique identification of the document line (LINE_ID) is also required.
    More information on LINE_ID and PARENT_ID
    The following fields have to be filled for the components:
    Unique identification of the document line
    Identification of the immediately superior line
    Material number
    Plant
    Storage location
    Quantity in unit of entry
    The following fields can be filled for the components:
    All other fields in the method that are included in this list.
    The following fields cannot be filled for the components:
    All fields that are not included in the list above. The movement indicator must be initial.
    Additional fields in goods-receipt-based invoice verification
    When you post a goods receipt to purchase order with movement type 102, an issue with reference to a previously posted goods issue, the following fields must also be transferred:
    REF_DOC_IT (LFPOS): Item of a reference document
    REF_DOC (LFBNR): Document number of a reference document
    REF_DOC_YR (LFBJA): Fiscal year of a reference document
    Only when you transfer these fields is it guaranteed that the reference to the original goods movement stay the same.
    For 2 GM_Code 02: Goods receipt for production order
    The following fields have to be filled:
    Order
    Movement type
    Movement indicator
    Quantity in unit of entry
    ISO code unit of measurement for unit of entry or
    quantity proposal
    The following fields may have to be filled in some cases (incomplete listing):
    Shelf life expiration date (if the system has been configured like this)
    Reason for movement (if the system has been configured like this)
    Batch (if the material is handled in batches and automatic batch number assignment is not set)
    Storage location (if storage location has not been specified in the order)
    The following fields can be filled (incomplete listing):
    Order item (co-product)
    Stock type
    Item text
    Unloading point
    "Delivery completed" indicator
    The following fields cannot be filled (incomplete listing):
    Account assignment fields (the account assignments are adopted from the purchase order)
    Reservation
    Receiving/issuing material
    Receiving/issuing plant
    Receiving/issuing storage location
    Receiving/issuing batch
    For 3 GM_Code 03: Goods issue
    Goods issue without reference to a reservation
    The following fields have to be filled:
    Material number
    Plant
    Storage location
    Movement type
    Movement indicator
    Quantity in unit of entry
    ISO code unit of measurement for unit of entry
    The following fields may have to be filled in some cases (incomplete listing):
    Special stock (e.g. sales order, project, vendor etc.)
    Shelf life expiration date (if the system is configured like this)
    Reason for movement (if the system has been configured like this)
    Batch (if the material is handled in batches and automatic batch number assignment is not set)
    Account assignment fields
    The following fields can be filled (incomplete listing):
    Special stock indicator
    Item text
    Unloading point
    Goods recipient
    The following fields cannot be filled (incomplete listing):
    Reservation
    Receiving/issuing material
    Receiving/issuing plant
    Receiving/issuing storage location
    Receiving/issuing batch
    Goods issue with reference to a reservation
    The following fields have to be filled:
    Reservation number
    Reservation item
    Record type of the reservation
    Movement indicator
    Quantity in unit of entry
    ISO code unit of measurement for unit of entry
    The following fields may have to be filled in some cases (incomplete listing):
    Shelf life expiration date (if this has been configured in the system)
    Reason for movement (if this has been configured in the system)
    Batch (if the material is handled in batches and automatic batch number assignment is not set)
    Storage location (if not planned in the reservation)
    The following fields can be filled (incomplete listing):
    Special stock indicator
    Item text
    Unloading point
    Goods recipient
    The following fields cannot be filled (incomplete listing):
    Movement type
    Material
    Plant
    Account assignment fields
    For 4 GM_Code 04: Transfer posting
    Transfer posting without reference to a reservation
    The following fields have to be filled:
    Material number
    Plant
    Storage location
    Movement type
    Movement indicator
    Quantity in unit of entry
    ISO code unit of measurement for unit of entry
    The following fields may have to be filled in some cases (incomplete listing):
    Receiving material
    Receiving plant
    Receiving storage location
    Receiving batch (if material is handled in batches and you want to change batches)
    Receiving/issuing special stock (e.g. sales order, project, vendor etc.)
    Shelf life expiration date (if this has been configured in the system)
    Reason for movement (if this has been configured in the system)
    Batch (if the material is handled in batches and automatic batch number assignment is not set)
    The following fields can be filled (incomplete listing):
    Special stock indicator
    Item text
    Account assignment fields (for automatic posting lines: Expense/income from stock transfer)
    The following fields cannot be filled (incomplete listing):
    Reservation
    Transfer posting with reference to a reservation
    See goods issue with reference to a reservation
    For 5 GM_Code 05: Other goods receipts
    Other goods receipt without reference to a reservation
    See goods issue without reference to a reservation
    Other goods receipt with reference to a reservation
    See goods issue with reference to a reservation
    For 6 GM_Code 06: Reversal of goods movements
    You can use the Cancel method to reverse goods movements. But you may also want to cancel a goods movement without referring to a material document (see the Cancel method).
    If you want to work without referring to the document, you have to fill the field BAPI_GM_ITEM_CREATE-XSTOB in the interface (import table GOODSMVT_ITEM). In this case, the system converts the movement type assigned in the interface to the reversal movement type. Alternatively, you can set the reversal movement type in the interface. In this case, the BAPI_GM_ITEM_CREATE_XSTOB field must be transferred blank.
    If you want to cancel a goods movement with reference to a reservation (without using the Cancel method) you can only transfer the field BAPI_GM_ITEM_CREATE_XSTOB if it is filled. Movement types are not transferred when you post with reference to a reservation, as the movement type is contained in the reservation item.
    For 7. GM_Code 07: Subsequent adjustment to a subcontract order
    Ordered material of subcontract order
    The following fields have to be filled:
    Unique identification of document line (can be assigned to anything)
    Posting date in document header
    Document number of purchasing document
    Item number of purchasing document
    Material number check
    Plant check
    Movement type (select movement type 121)
    Movement indicator (must be O)
    Further entries are not allowed. The entry quantity for the ordered material of a subcontract order must be zero.
    Components
    The following fields have to be filled:
    Unique identification of document line (can be assigned to anything)
    Identification of the immediately superior line
    Plant
    Material number check
    Quantity in unit of entry; can also be negative
    The following fields can be filled:
    Storage location
    All other fields in the method that are included in this list.
    The following fields may not be filled:
    All fields that are not in the list above. The movement indicator must be blank.
    More information on LINE_ID and PARENT_ID
    Additional fields in goods-receipt-based invoice verification
    When you post a subsequent adjustment, the following fields must also be transferred:
    REF_DOC_IT (LFPOS): Item of a reference document
    REF_DOC (LFBNR): Document number of a reference document
    REF_DOC_YR (LFBJA): Fiscal year of a reference document
    Only when you transfer these fields is it guaranteed that the reference to the original goods movement stays the same.

  • DIAPI - Create Goods Receipt for Serial Number - on Release Only

    Hi Experts,
    I need your advise to create Goods Receipt by using DIAPI, where the item is managed by Serial Number - on Release Only.
    The option that I'm exploring is to use ‘Automatic Serial Number Creation on Receipt’ turned on.
    In standard SAP function with the above setting, we can create a Goods Receipt without entering any Serial Number, and SAP will automatically creates empty Serial Number. I'm trying to do the same thing by using DIAPI with the below code.
    oTargetDocument.Lines.ItemCode = 'abc'
    oTargetDocument.Lines.WarehouseCode = 'whs'
    oTargetDocument.Lines.UnitPrice = 100
    oTargetDocument.Lines.BinAllocations.BinAbsEntry = 1
    oTargetDocument.Lines.BinAllocations.Quantity = 1
    oTargetDocument.Lines.Quantity = 1
    '--       I skipped the below code, expecting SAP will create the empty Serial Number automatically
    '     oTargetDocument.Lines.SerialNumbers.SetCurrentLine(0)
    '     oTargetDocument.Lines.SerialNumbers.InternalSerialNumber = 2
    '     oTargetDocument.Lines.SerialNumbers.Add()
    '     oTargetDocument.Lines.BinAllocations.SerialAndBatchNumbersBaseLine = 0
    oTargetDocument.Add
    But, it returns 1470000838 - Invalid "SerialAndBatchNumbersBaseLine"; specify a valid "SerialAndBatchNumbersBaseLine"
    Can anyone please advise how we should achieve this?
    Any example or reference is very much appreciated.
    Thank you and kind regards,
    Krisma

    Hi Krisma,
    I was trying to simulate the issue here, but I couldn't post a good receipt PO even from the SAP itself with the setting you mentioned.
    I have set the management method as 'On Release' and ticked the Automatic serial number creation flag as well under general settings of inventory. Is that the setting you mentioned or something else?
    Best Regards,
    J S L Geeganage

Maybe you are looking for

  • Satellite A300 (PSAG8E) - What is new in BIOS 1.9?

    Hi, I have a A300 PSAG8E and I would like to know what news between BIOS 1.7 and 1.9? The new BIOS can change the fan control? On my A300 it is so loud. Thank's, regards, cricri975.

  • Export actions parameters

    Is there any way to change the parameters LR send to programs (WIN)? For example i have a export profile that saves images to e:\export\web and then opens my FTP program (filezilla). I placed the filezilla shortcut to export actions folder... Now whe

  • Problem creating a function based index

    Hi, Database: 8.0.6 OS: win 2000 server I want to create a function based index as shown below: sql> create index new_index on A_INP_PATIENTS_ADMT(bus_unit, admit_status_flag, nvl(clinical_discharge_yn,'N'), ward_code) When i press return its showing

  • Problems attaching files to e-mails

    After installing Lyon, from my wife's user she can't attach files to an e-mail. The window opens but only shows folders and the folders can not be opened. I can do it from my user. What could be happening?

  • How to use  EXIT_SAPLEBND_002 form class M06E0004

    hi    my problem is my client want that if user do any changes in a released PO , then release should get revert. currently it is reverting only on when Quantity Increases . i gone through many threads but not able to solve this . but come to know th