‎2008 Jul 29 7:04 AM
Hi Friends,
I am using BAPI_GOODSMVT_CREATE for the doing GR for the Subcontracting Purchase order and getting the following Error messages.
1 Of the required quantity of material 0006140000001A,1.400 M remain(s) open.
Message Id LB
Message No 031
2 Combination of movement type 543 and function selected not possible.
Message Id M7
Message No 019
Please suggest the solution.
Krishan
‎2008 Jul 29 7:33 AM
>
> Hi Friends,
>
> I am using BAPI_GOODSMVT_CREATE for the doing GR for the Subcontracting Purchase order and getting the following Error messages.
>
> 1 Of the required quantity of material 0006140000001A,1.400 M remain(s) open. --->u should not keep any open quantites in this case , better to pass PO Item Quantity to this BAPI.>
> Message Id LB
> Message No 031
>
>
> 2 Combination of movement type 543 and function selected not possible.
> which GM_CODE u are using in this case ? plz ref. documentation of this BAPI
> Message Id M7
> Message No 019
> --->
>
> Please suggest the solution.
>
> Krishan
regards
Prabhu
‎2008 Jul 29 7:11 AM
Hello Raheja,
You can see that these errors are the standard problems. Best way of testing is create one sales order and deliver it. Then try to create GR for that using your program. some times there will some problem like if movement type is not correct one for the items then standard SAP will give error. Same thing will happens with BAPI also. So, try creating a sales order and test it.
And dont forget to test in se37 by giving the data in the function module.
Best Regards,
Sasidhar Reddy Matli.
‎2008 Jul 29 7:19 AM
Hi,
I am talking about the Purchase order not about Sales Order and I have to create Goods Receipt againt Purchase Order.
Krishan
‎2009 Apr 15 8:30 PM
Krishan,
I am woundering do you have a solution for this by now. If so, do you mind share it with us?
Jimmy
‎2008 Jul 29 7:14 AM
hi,
&----
*& Report ZRPT_SUB_KO01GOODSMOVEMENT
*&
&----
*&
*&
&----
REPORT ZRPT_SUB_KO01GOODSMOVEMENT.
PARAMETERS : P_BAG(17) TYPE C,
P_ZZORG LIKE zaUFK-ZZORG,
P_MATNR LIKE MARA-MATNR,
P_WERKS LIKE AUFK-WERKS,
P_WERK LIKE AFPO-PWERK,
P_DATE LIKE MKPF-BUDAT,
P_LGORT LIKE GOITEM-LGOBE.
DATA : BDC_DATA TYPE STANDARD TABLE OF BDCDATA. "internla table for bdc data
DATA : WA_BDC_DATA TYPE BDCDATA . "work area for bdc data
DATA : T_XMSEG TYPE MSEG.
DATA : T_XMKPF TYPE MKPF.
DATA : V_BAGS1(17) TYPE C.
DATA : BEGIN OF WA_MB1B,
ZZGCODE TYPE ZMIGO-ZZGCODE,
ZZGBAGS TYPE ZMIGO-ZZGBAGS,
WERKS TYPE AUFK-WERKS,
LGORT TYPE VBRP-LGORT,
ZZORG TYPE zAUFK-ZZORG,
END OF WA_MB1B.
DATA : V_MATERIAL TYPE BAPI2017_GM_HEAD_RET-MAT_DOC.
data : v_date(10) type c.
DATA : T_GOODSMVT_HEADER TYPE BAPI2017_GM_HEAD_01,
T_GOODSMVT_CODE TYPE BAPI2017_GM_CODE,
T_GOODSMVT_ITEM TYPE STANDARD TABLE OF BAPI2017_GM_ITEM_CREATE,
T_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
DATA : WA_GOODSMVT_ITEM TYPE BAPI2017_GM_ITEM_CREATE.
DATA : BEGIN OF S_MARA,
MEINS LIKE MARA-MEINS,
END OF S_MARA.
DATA : MATERIALDOCUMENT TYPE BAPI2017_GM_HEAD_RET-MAT_DOC.
*FORM GOODSMOVEMENT TABLES T_RETURN
USING WA_MB1B LIKE WA_MB1B.
SELECT SINGLE MEINS
FROM MARA
INTO S_MARA
WHERE MATNR = P_MATNR.
CONCATENATE p_date6(2) p_date4(2) p_date+0(4) INTO V_DATE SEPARATED BY '.'.
T_GOODSMVT_HEADER-PSTNG_DATE = P_DATE.
T_GOODSMVT_HEADER-DOC_DATE = P_DATE.
T_GOODSMVT_CODE-GM_CODE = '04'.
WA_GOODSMVT_ITEM-MATERIAL = P_MATNR. "'000000000000001556'.
WA_GOODSMVT_ITEM-PLANT = P_WERK. " '1000'.
WA_GOODSMVT_ITEM-STGE_LOC = P_LGORT. " '0001'.
WA_GOODSMVT_ITEM-MOVE_TYPE = 'Z42'.
WA_GOODSMVT_ITEM-VENDOR = P_ZZORG. "'0000100224'.
WA_GOODSMVT_ITEM-ENTRY_QNT = P_BAG. " '1'.
WA_GOODSMVT_ITEM-ENTRY_UOM = S_MARA-MEINS.
WA_GOODSMVT_ITEM-ENTRY_UOM_ISO = S_MARA-MEINS.
WA_GOODSMVT_ITEM-MOVE_PLANT = P_WERKS.
APPEND WA_GOODSMVT_ITEM TO T_GOODSMVT_ITEM.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = T_GOODSMVT_HEADER
GOODSMVT_CODE = T_GOODSMVT_CODE
IMPORTING
MATERIALDOCUMENT = V_MATERIAL
TABLES
GOODSMVT_ITEM = T_GOODSMVT_ITEM
RETURN = T_RETURN.
BREAK shailajaa.
EXPORT t_return to MEMORY ID '123'.
EXPORT V_MATERIAL TO MEMORY ID 'MAT'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = ' '.
*ENDFORM.
‎2008 Jul 29 7:33 AM
>
> Hi Friends,
>
> I am using BAPI_GOODSMVT_CREATE for the doing GR for the Subcontracting Purchase order and getting the following Error messages.
>
> 1 Of the required quantity of material 0006140000001A,1.400 M remain(s) open. --->u should not keep any open quantites in this case , better to pass PO Item Quantity to this BAPI.>
> Message Id LB
> Message No 031
>
>
> 2 Combination of movement type 543 and function selected not possible.
> which GM_CODE u are using in this case ? plz ref. documentation of this BAPI
> Message Id M7
> Message No 019
> --->
>
> Please suggest the solution.
>
> Krishan
regards
Prabhu