Circumventing Authorizations in BAPI_GOODSMVT_CREATE

Does anyone know if there is a way to circumvent the standard authorizations in BAPI_GOODSMVT_CREATE in order to use custom authorizations?
Thanks...

Please check SAP Note 402522
This may help you

Similar Messages

  • How to display the data at Table level though we don't have authorisations

    Hi Friends,
    While i'm trying to check the entries of a Table, it's ending up by showing status messg. as 'no authorisations to display the contents' !!!
    Even in debuggin mode, i tried by passing AUTH check (by changin subrc value), but went vain as showing same message
    Please help me out, Thanks
    Best Regards,
    Suren
    Moderator message: please do not ask how to circumvent authorization checks, rather apply for the missing roles.
    Edited by: Thomas Zloch on Dec 1, 2010 11:58 AM

    Try function module CALL_TRANSACTION_FROM_TABLE for SE16 transaction code.

  • Regarding BAPI_GOODSMVT_CREATE

    Hi Experts!
    I am using BAPI_GOODSMVT_CREATE to create a material document in migo screen using mb01 transaction.
    I am getting one error that is whenever i put the quantity in , for example
    if ordered quantity is 20 and i put quantity in unit of entry 21 it does not qive me error that p0 exceeded by 1. and post the data.
    but after 24 it gives me an error which it has to given earlier 'po exceeded by 4'.
    i am using gm_code = 01
    with kzbew = B.
    also populating fields like
    matnr, po, po item, entry_qnt, movement type = 101
    posting date, document date and reference document.
    so plz help me out with that.
    thanks in advance

    Hi
    Check this and do accordingly
    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.
    Regards
    Anji

  • 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.

  • Getting message No maintenance authorization for shipping point 2001

    Getting message No maintenance authorization for shipping point 2001 when performing goods receipt for a STO with reference to delivery using BAPI BAPI_GOODSMVT_CREATE.
    When same program is executed in program it is working fine.
    We have set the SU24 for the program name as no authorization check.
    For back ground do we neeed to set anything specific.

    Yep. The same also applies to couples of call transactions (see SAP note 358122) - although BAPI's by definition do not and may not check S_TCODE...
    The reason for this is because the checks can be turned off in SU24 against specific transactions. BUt when you schedule a program into a background job, then it does not have a transaction context. You will experience similar behaviour if you execute the program directly from SA38, SE38, etc.
    Generally, you have 3 options:
    - Some functions will expose a "NO_CHECK" or "NO_AUTHORITY" parameter which can be set when calling the function module. Some of them will only let you do it once Others will call themselves again with certain (usually customizable) parameters. You can look for this in the function module documentation, interface and coding.
    - Grant the authority to the user ID, and ensure that this is a SYSTEM type user segregated from the dialog users. It would then have this authority, but by design could not start the transaction directly (even if someone did logon as the user...).
    - If this object is not intended to be used at all for control in your concept, then you can globally deactivate some authorization objects using transaction AUTH_SWITCH_OBJECTS. The object will have no affect in the whole system when the ABAP application coding checks it in an AUTHORITY-CHECK object statement. The return code is always set to 0, and not only selectively...
    You need to be carefull with all 3 options, but they can all three be applied in a secure way.
    Cheers,
    Julius

  • How to use BAPI_GOODSMVT_CREATE to reverse the receipt

    Hi all
    I wanted to know how to reverse the reciept of the qty difference using FM bapi_goodsmvt_create. i used it with gm_code = '06' but dint work.
    I wanted to know what parameters need to be passed

    hi
    look at the underlined part of the post
    hopen ths helps
    BAPI_GOODSMVT_CREATE.
    1.Material number 18-figure with leading zeros should be passed.
    2.Batches with uppercase letters.
    Have a look at following documentation.
    FU BAPI_GOODSMVT_CREATE
    Text
    Post goods movements with MB_CREATE_GOODS_MOVEMENT
    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
    <u><i>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 orderOrdered material of subcontract order</i></u>
    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.
    Parameters
    GOODSMVT_HEADER
    GOODSMVT_CODE
    TESTRUN
    GOODSMVT_HEADRET
    MATERIALDOCUMENT
    MATDOCUMENTYEAR
    GOODSMVT_ITEM
    GOODSMVT_SERIALNUMBER
    RETURN
    Exceptions
    Function Group
    MB_BUS2017
    Hope it helps.
    Regards,
    navjot
    reward points accordingly
    Message was edited by:
            navjot sharma

  • BAPI_GOODSMVT_CREATE help

    hi guys,  i have 10 lines in my internal table. i want to create two stock movements.First movement will consist of the first 5 lines and the second movement,the rest 5 lines.I am getting an error message for the second movement  'Impossible to execute MF MB_CREATE_GOODS_MOVEMENT.can anyone please help me on this?

    Hi
    Check it. hope it will help you.
    Pls 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.

  • How secure is APEX authorization?

    We are developing a system which mandates that a user only be able to perform functions that they have been authorized (trained) to do. My understanding is that APEX will do this nicely using authentication to make sure a user is who they say they are and authorization to restrict which pages, regions, or buttons the individual user can see/navigate to. Once we sort through all the details and get this set up, how sure can we be that a malicious user will not be able to circumvent the authorization scheme? For example: could a view only user spoof the application into thinking they had pressed a delete button on a page where the delete button was hid from them because of the authorization scheme attached to it? Our concern is that since all of the security lives in the application, if the application security is defeated a user will be able to do anything the application’s “parse as” schema can do.

    Bud,
    Absolutely a savvy user could do this. That is why you also need to protect the delete process from the user. Let's say you have a button (delete) and a process (delete proc) that only runs when the delete button is pressed. If you add an authorization scheme to the button, you should also add the same auth scheme on the process. Beyond that, you just need to make sure that your authorization scheme is well-defined (that is, not dependent on something that the user could hack) and you will be fine.
    Hope this helps,
    Anton

  • Authorization check  for posting a specified movement type on certain plant

    <h5>Iu2019m posting goods movements using BAPI_GOODSMVT_CREATE, I have to check If the user has authorities for posting for a specified movement type on certain plant.
    How do I implement it, do I need to create a authorization object with ACTVT, WERKS and BWART, what will be value of ACTVT in this case?
    Or is there any other way through which the BAPI can automatically check for authorization.</h5>

    Just to bring to your notice that authorization check is done by the BAPI. Please check the function module.
    AUTHORITY-CHECK OBJECT 'M_MSEG_WMB'
                  ID 'ACTVT' FIELD '03'
                  ID 'WERKS' FIELD I_MSEG-WERKS.
         AUTHORITY-CHECK OBJECT 'M_MSEG_BMB'
                  ID 'ACTVT' FIELD '03'
                  ID 'BWART' FIELD I_MSEG-BWART.
    Regards,
    Lalit MOhan Gupta

  • ADE Authorization Trouble!!

    When I try to authorize my ADE it tells me that 'auth is not ready'...I am trying to transfer a book downloaded from Overdrive to my Nook Color. Oh, and the format is epub.

    I am not sure if this is possible using ADE.
    There are apps such as epubee http://epubee.com
    There are arguments on both sides about the legality of using such software;
    as long as it is not used to circumvent the intent of the DRM it seems morally completely justified in cases there is no alternative solution.

  • Open and close posting period authorization control TCODE: S_ALR_87003642

    HI All,
    Is there any chance to control the user to open and close another company code posting period variant in TCODE: S_ALR_87003642.
    In our system we are using the same client for different countries. So user can able to change the other country company code posting periods.
    We would like to control either on the country (or) organizational unit(company code) (or) posting period variant so that user can only open/close  their country / company code posting periods.
    Our present authorization role for open and close posting period contain the auth.Obj. : S_TABU_DIS.
    Please share your knowledge if you come across this problem..
    Thanks in advance..

    Hey Sandhya,
    Congratz, this can be done using linbe item authorization with the object S_TABU_LIN.
    Field ORG_CRIT - Value 02
    Field ORG_FIeld1 - Value ZT001B
    We have successfully done it in our client.
    You need to contact your BASIS consultant for this.
    Thanks,
    Nitish

  • Analysis Authorization in BO 4.0 Webi report

    Hi All,
    I am using BO 4.0 and creating connection from Information Design tool to a BW query using BICS client. This connection is then published to CMC.
    We are using SAP authentication and importing the roles from BW system. We have added profiles to this role and these profiles have Analysis Authorization set on Company Code. So one user can access data to one company code and vice versa. Now this works well in Bex Analyzer, but if I try to create a report in Webi, the analysis authorization fails. I went through the forum before posting this question and I found that is in 3.1 version and in most cases using SSO in universe connection solved the problem.
    However in 4.0 I am using BICS client and followed the same processes to create a connection but for some reason it doesn't work ? Is this suppose to work differently in 4.0 ?
    I have tried:
    1. To create connection in Information Design tool using SSO, selecting user ID and password. It doesn't work.
    2. Checked the Bex query and it already has Company code as a Characteristic restrictions (I have made it a mandatory variable).
    3. Publish the connection to CMC with my Enterprise and SAP ID and in both cases it doesn't work.
    Please let me know if anyone encountered a similar issue and what is the best method to resolve this.
    (BO 4.0 no service pack or fix pack installed on the system yet)
    Thanks - Appreciate your help !
    Prasad Rasam

    Ingo,
    1. To create connection in Information Design tool using SSO, selecting user ID and password. It doesn't work.
    >> Correct you need to setup you OLAP Connection with SSO.
    >>> What I meant was I created the connections using both the methods, Using SSO it allows me to create a connection. The ID which I am using to create a connection has Admin access to BOBJ system. When I login as a regular user to create a Webi report and select this new connection, it throws an error message 'The DSL Service returned an error: com.businessobjects.dsl.services.workspace.impl.QueryViewAnalyzer$CannotGetCubeFromConnectionException: Cannot get the cube from the connection'
    Using the other method to create a connection with User ID and password, I can create a connection and with the normal user login I can connect to the BW query but Analysis Authorization doesn't work.
    Ingo : Could you be more specific what you mean here with the different users ? When you say "regular" user are you referring to an SAP credentials or SAP BusinessObjects Enteprrise credentials ?
    2. Checked the Bex query and it already has Company code as a Characteristic restrictions (I have made it a mandatory variable).
    >> The variable in the BEx query needs to be an authorization variable.
    >>> This has already been set as Authorization variable. There is still a question here. If I select the variable as Authorization variable, I cannot set the other parameters in the query properties such as Mandatory variable (as this is greyed out).
    Ingo : What other parameters would you like to configure ? Could you perhaps describe the scenario with more details ?
    regards
    Ingo Hilgefort

  • Analysis Authorization Issue 7.3

    Hello Friends,
    System BW 7.3, Currently there are 80 odd analysis authorization objects
    We want to introduce a new info object (GL Account) to be authorization relevant, ( there are few objects in the system which are already authorization relevant in the system with proper analysis authorization objects and they are working fine)
    Things done, made the GL Account object authorization relevant in RSA1, Created 2 analysis authorization objects with GL Account and TCT objects and one with hierarchy restrictions and one open access.
    Added this object to the user in addition to its already existing authorization objects. Created authorization variable in BEx.
    Some how the authorization is not picked up and it gives us all the values in the report. But if I add the GL Account info object to the existing analysis authorization objects then it works fine.
    I do not want to change all the existing analysis authorization objects to add GL Account.
    Your inputs are most welcome.
    Thanks
    Ed.

    Gajesh- I have added the new analysis authorization object to the user in RSECadmin.
    Subhendu- Problem statement: What are the steps involved in making a new info object(GL Account) authorization relevant. Authorizations are given at hierarchy level. Can we create a new analysis authorization with  GL Account only or do we have to add it to every existing analysis authorization
    I have done the following steps
    1. Made the GL Account object authorization relevant in RSA1,
    2. Created 2 new analysis authorization objects with GL Account ( with hierarchy restrictions) and TCT objects and one with GL Account open access.
    3. Added this object ( which has restrictions) to the user in RSECADMIN, in addition to its already existing authorization objects.
    4. Created authorization variable in BEx.
    5. No existing analysis authorization objects have been changed.
    When I test the report, It does not restrict based on the hierarchy that I have given, it gives open access.
    But If I add GL Account with restrictions to the existing analysis authorization object, it works good.
    Guess I am missing some thing here.
    Do you need any other screen shots.
    Thanks
    Ed.

  • Analysis Authorization Issue

    Hi:
    I created an analysis authorization ZCO_CODE to trstrict it by a company code.
    I added following objects in authorization with values.
    0COMP_CODE = 1000
    0TCAACTVT = 03
    0TCAIFAREA = *
    0TCAIPROV = *
    0TCAVALID = *
    Then I created a role Z:00:BW_REPORT, where I added following authorization objects S_RS_AUTH and restricted it by value ZCO_CODE. Then I assigned this role to a user test01.
    When I execute a program RSEC_MIGRATION for this specific user, I do not see authorization object ZCO_CODE on 2nd step of this program. Any Idea Why? I think this object should show up as I want to migrate this specific object.
    Help will be appreciated.

    Hi Sachin:
    Okay here is my issue.
    I have a Reporting authorization Object created earlier which is ZCOCODE. I though I'll have to create a new Analysis authorization object e.g. ZCO_CODE and then restrict it with other chars. as mentioned in Marc Bernards presentation and then you have to migrate it.
    In selection list I can see old Reporting authorization object. If I select it and use option "Enhance existing profile" then It will update profile and not role? right....
    How can I see whether it has updated existing profile?????
    Do I need to create new Analysis Auth. for Company code or I can use old Reporting authorization for company code?
    For testing purpose, I created a test user and assigned all reporting roles but It will not show up in RSEC_MIGRATION step???

  • BW Analysis authorization issue on cost center range

    Hello BIW security experts
    I have a problem where I created an analysis authorization on a cost center range and it looks like the interval is not working. The report is just a list of cost centers (demo to users to prove that analysis authorizations work in order to skip 2 managerial cost centers.
    . Cost centers are numeric. Example:  2000100. In the drop down list they appear as such.
    . I want to have the following cost center range: 1000000 to 1000771, 1000773 to 2000771, 2000773 to 9999999.
    Thereofore 1000772  and 2000772 should not appear in the list.
    . In the analysis authorization I have put the 3 ranges above on 3 separate lines. 'BT' is the operator. The cost centers have been selected from the drop down list.
    Results:  I get only 1 record from the report....  2000772. (which is one I want to exclude..
    Steps tried to debug:
    . When I put a list of cost centers in the analysis authorization on separate line with the 'EQ' operator, then the report works.
    . I tried putting ' ' delimiters since cost center is a char field but it fails.
    . I tried adding leading and trailing zeros to fill up the char(10) but no luck.
    . I tried creating a hierarchy with the interval and put it in the hierachy auth. tab and it does not work either. It gives the same number of records than the first step.
    . A hierarchy with single values work.
    I do not know what else to try..
    Thanks.
    YB.

    Good morning
    Here it is from RSECVAL
    ZCC_TEST     0COSTCENTER                    I       BT        1000000                                                      1000771
    ZCC_TEST     0COSTCENTER                    I       BT        1000773                                                      2000771
    ZCC_TEST     0COSTCENTER                    I       BT        2000773                                                      9999999
    ZCC_TEST     0COSTCENTER                    I       EQ        #
    ZCC_TEST     0COSTCENTER                    I       EQ        :
    ZCC_TEST     0INFOPROV                         I       CP        *
    ZCC_TEST     0TCAACTVT                        I       EQ        03
    ZCC_TEST     0TCAIPROV                         I       CP        *
    ZCC_TEST     0TCAKYFNM                       I       CP        *
    Thank you for your help.

Maybe you are looking for

  • Photo streaming synch problem.

    Today has appear an "unknow" picture on mi iPhone 4's streaming folder (IOS 6.1), I suppose this picture was downloaded to my iPad (wifi+3G IOS 5.1)  and then deleted from the camera roll and the streaming (because it's any more). Both devices  are u

  • Apple "fixed" my ipod, but it's broken again!

    I had my iPod shipped back to the company to repair it, and they did ship it back "fixed." Under the warranty, if you'e experiencing problems with your ipod within 6 months, then you can have them send you a box for packaging, and shipped back at no

  • Dual Core G5 using only one CPU

    Anyone has an idea about what happened to me last week? Here is what happened: I let my dual 2.3 GHz Power Mac G5 run over night to run a certain task. When I came back the following morning, the fans were running like crazy and the computer was froz

  • DELORD process in automobile industry.

    Hi All, We have standard DELORD process, here process is SDSA then create sale order then delivery. My question is when creating sale order with reference with SDSA the Ship from getting coiped from customer master only and not from SDSA.  i want Shi

  • Export video track from DVDPS to iDVD ?

    Hi ! I truly love iDVD, but I have to use DVD Studio Pro to add subtitles to my video tracks. Since I'd rather use iDVD to create the menus and all, is there a way to export my subtitled video track to iDVD ?