2/16/2016 5:25:29 PM

Inspection Type for Automatically Created Lots in SAP. Sometimes SAP Inspection Lot not created during GR using BAPI BAPI_GOODSMVT_CREATE. STCK_TYPE needs to pass as 'X' in tables GOODSMVT_ITEM parameter during BAPI_GOODSMVT_CREATE call. Actually BAPI_GOODSMVT_CREATE is used to do the following types of transactions:


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 receipt

6. GM_Code 06: Reversal of goods movements

7. GM_Code 07: Subsequent adjustment with regard to a subcontract order

Below the code can be used for to create goods receipt by using IDoc.

  LOOP AT idoc_data.

    CASE idoc_data-segnam.

      WHEN 'E1BP2017_GM_CODE'.

        lwa_gm_code  = idoc_data-sdata.

        MOVE-CORRESPONDING lwa_gm_code TO goodsmvt_code.

      WHEN 'E1BP2017_GM_HEAD_01'.

        lwa_gm_header  = idoc_data-sdata.

        MOVE-CORRESPONDING lwa_gm_header TO gm_header.

          lwa_gm_code-gm_code = '01'.

          MOVE-CORRESPONDING lwa_gm_code TO goodsmvt_code.

        gm_header-PSTNG_DATE = sy-datum.

      WHEN 'E1BP2017_GM_ITEM_CREATE'.

        lwa_gm_item  = idoc_data-sdata.

        MOVE-CORRESPONDING lwa_gm_item TO gm_item.

        gm_item-stck_type = 'X'.

        APPEND gm_item TO gt_item.

    ENDCASE.

  ENDLOOP.


Please find more info on automatic lot creation.


When the SAP system creates an inspection lot automatically, it must determine which inspection type to use. Depends on various system and Customizing settings, the system normally selects one of the following inspection types:

a) Default inspection type

b) Preferred inspection type

For inspection lot origins 01, 03, 10, 11, 12, 14, the system may select an inspection type other than one of the above.


To ensure that the SAP system can select a default inspection type or preferred inspection type, make sure the following conditions have been met:

a) Define the default inspection type in Customizing for Inspection Lot Origin by assigning an inspection type to variant 01 for the corresponding inspection lot origin. The system uses the default inspection type if this inspection type is active in the inspection settings of the material master.

b) In the Inspection settings of the material master, you can specify a preferred inspection type for each inspection lot origin. If you set the indicator Preferred inspection type for an inspection type, the system uses this inspection type to automatically create an inspection lot. This inspection type has priority over the default inspection type.


If you do not set the indicator for the preferred inspection type and several inspection types are active in the material master, the system uses the default inspection type.

If you set the indicator for the preferred inspection type, but the corresponding indicator for activating the inspection type is not set, the system uses the default inspection type.

If you like this blog, please share (Facebook/LinkedIn/Google+) to click below links so it will reach to others.


COMMENTS