BAPI_GOODSMVT_CREATE - GOODS ISSUE
I want to do a goods issue using this BAPI but I don't the print. How I can I stop it here ?
Hi Marc,
We need more info.
Do you have a std print output type in delivery that is getting triggered when you use this?
If so, can't you control it in the print driver program to ignore the print if it is being called by this function?
Raj
Similar Messages
-
BAPI_GOODSMVT_CREATE goods issue for tmovement type 261 not updating costs
GMHEAD-PSTNG_DATE = SY-DATUM.
GMHEAD-DOC_DATE = SY-DATUM.
GMCODE-GM_CODE = '03'. "03 - MB1A - Goods Issue
GOODSMVT_ITEM-MOVE_TYPE = '261'.
GOODSMVT_ITEM-ENTRY_QNT = '1'.
I am using BAPI_GOODSMVT_CREATE for goods issue, instead of MB1A.
it is updating the data correctly.
The only issue i am having is that, it is not calculating the material costs.
The actual costs for material cost from IW32 is $0.00
I can see all the data updating correctly from MB02.
Please let me know what might be the issue regarding costs.How did you solve it?
-
BAPI --- /AFS/BAPI_GOODSMVT_CREATE --- Goods Issue --- AFS
I am trying the BAPI for Goods Issue for Production Orders with reference to a reservation in AFS and getting this error message when executed.
E 8J 607 Internal error
I tried the information found in the page BAPI_GOODSMVT_CREATE - GI for GR but it didn't work out.
I used following fields to send the data to BAPI
/AFS/BAPI_GOODSMVT_CREATE
PSTNG_DATE = 10.01.2008
DOC_DATE = 10.01.2008
PR_UNAME = USER1
GM_CODE = 03
MATERIAL__________= 2004237
PLANT_____________= 1000
STGE_LOC_________= RMPL
BATCH_____________= 0366M
GRID_VALUE________= M
MOVE_TYPE________= 261
SPEC_STOCK_______= E
SALES_ORD________= 40003
S_ORD_ITEM________= 000010
ENTRY_QNT_________= 10.0
ENTRY_UOM________= EA
ORDERID___________= 1046778
VAL_SALES_ORD____= 40003
VAL_S_ORD_ITEM____= 000010
RESERV_NO_________= 0000883202
RES_ITEM___________= 0003
RES_TYPE__________= ' '
Any help is appreciated.How did you solve it?
-
Goods Issue using BAPI_GOODSMVT_CREATE movement type 541
Hi
According to my requirement I need to do Post goods issue using BAPI_GOODSMVT_CREATE. But I am unable to do PGI . how to consume BOM details if batches are changed. please let me know what values I need to pass to BAPI . give with an example.
Its an urgent requirement.are you passing batch number to the BAPI?
if not try pass the batch number the rest of the things bapi will take care of.
bi -
Goods Issue on Process Order with BAPI_GOODSMVT_CREATE
Hi together,
I want to post a goods issue on an process order (some of them are networks) but I have some problem with filling the structures.
Could you please help me?
Book material
ls_bapi_head-pstng_date = ls_booking-budat.
ls_bapi_head-doc_date = sy-datum.
ls_bapi_head-pr_uname = sy-uname.
ls_bapi_item-material = ls_booking-idnrk.
ls_bapi_item-plant = p_werks.
ls_bapi_item-stge_loc = ls_booking-lgort.
ls_bapi_item-entry_qnt = ls_booking-dmeng.
ls_bapi_item-entry_uom = ls_booking-meins.
ls_bapi_item-orderid = ls_booking-aufnr.
ls_bapi_item-mvt_ind = gc_mvt_ind.
IF ls_bapi_item-entry_qnt > 0.
ls_bapi_item-move_type = '261'.
ELSE.
ls_bapi_item-move_type = '262'.
ENDIF.
APPEND ls_bapi_item TO lt_bapi_item.
CLEAR: lt_bapi_ret, ls_bapi_item.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = ls_bapi_head
goodsmvt_code = '03'
testrun = p_test
IMPORTING
materialdocument = ls_mat_bel
TABLES
goodsmvt_item = lt_bapi_item
return = lt_bapi_ret.Here send a example:
DATA: RTR LIKE BAPIRET2.
DATA: G_HEADER LIKE BAPI2017_GM_HEAD_01,
G_CODE LIKE BAPI2017_GM_CODE,
TESTRUN LIKE BAPI2017_GM_GEN-TESTRUN,
G_HEADRET LIKE BAPI2017_GM_HEAD_RET,
MATDOCUMENT TYPE BAPI2017_GM_HEAD_RET-MAT_DOC,
MATYEAR TYPE BAPI2017_GM_HEAD_RET-DOC_YEAR,
G_ITEM TYPE STANDARD TABLE OF BAPI2017_GM_ITEM_CREATE WITH HEADER LINE,
RETURN TYPE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.
TOMO DATOS DE LA TABLA Z
SELECT * FROM ZCOTT_ACT_VOLUM
INTO CORRESPONDING FIELDS OF TABLE TI_VOLUMEN.
CLEAR: RETURN. REFRESH: RETURN.
CLEAR: WA_MJES.
WA_MJES-ICONID = '@DH@'.
WA_MJES-TYPE = 'S'.
WA_MJES-MSGTXT = 'Errores del Proceso Nro 2'.
APPEND WA_MJES TO TI_MJES.
LOOP AT TI_VOLUMEN INTO WA_VOL.
CLEAR: G_HEADER, G_CODE, TESTRUN, G_HEADRET, MATDOCUMENT,
MATYEAR, G_ITEM.
REFRESH: G_ITEM.
G_HEADER-PSTNG_DATE = WA_VOL-BUDAT. " Fecha de contabilización en el documento
G_HEADER-DOC_DATE = WA_VOL-BLDAT. " Fecha de documento en documento
G_HEADER-REF_DOC_NO = 'REF NRO:'. " Número de documento de referencia
G_HEADER-PR_UNAME = SY-UNAME. " Nombre de usuario
G_HEADER-HEADER_TXT = WA_VOL-BKTXT. " Texto de cabecera de documento
G_CODE = '04'. " Traspaso
Emisor
G_ITEM-MATERIAL = WA_VOL-DE_MATNR. " Nro de Material
G_ITEM-PLANT = WA_VOL-DE_WERKS. " Centro
G_ITEM-STGE_LOC = WA_VOL-DE_LGORT. " Almacen
G_ITEM-MOVE_TYPE = WA_VOL-BWART. " Clase de Mov.
G_ITEM-COSTCENTER = WA_VOL-KOSTL. " Centro de Costo.
G_ITEM-ENTRY_QNT = WA_VOL-MENGE. " Cantidad en unidad de medida de entrada
G_ITEM-ENTRY_UOM = WA_VOL-UNIT. " Unidad de medida de entrada
G_ITEM-ENTRY_UOM_ISO = WA_VOL-UNIT. " Código ISO p.unidad de medida
G_ITEM-BATCH = WA_VOL-DE_LGORT. " Lote
Receptor
G_ITEM-MOVE_MAT = WA_VOL-A_MATNR. " Nro de Material.
G_ITEM-MOVE_PLANT = WA_VOL-A_WERKS. " Centro
G_ITEM-MOVE_STLOC = WA_VOL-A_LGORT. " Almacen
G_ITEM-MOVE_BATCH = WA_VOL-A_LGORT. " Lote
APPEND G_ITEM.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = G_HEADER
GOODSMVT_CODE = G_CODE
TESTRUN = ' ' "TESTRUN
IMPORTING
GOODSMVT_HEADRET = G_HEADRET
MATERIALDOCUMENT = MATDOCUMENT
MATDOCUMENTYEAR = MATYEAR
TABLES
GOODSMVT_ITEM = G_ITEM
RETURN = RETURN.
CLEAR: RTR.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = RTR.
LOOP AT RETURN.
CLEAR: WA_MJES.
WA_MJES-TYPE = RETURN-TYPE.
CASE WA_MJES-TYPE.
WHEN 'S'.
WA_MJES-ICONID = '@08@'.
WHEN 'W'.
WA_MJES-ICONID = '@09@'.
WHEN 'E'.
WA_MJES-ICONID = '@0A@'.
ENDCASE.
WA_MJES-MSGTXT = RETURN-MESSAGE.
APPEND WA_MJES TO TI_MJES.
ENDLOOP.
ENDLOOP. -
Post Goods issue using bapi_goodsmvt_create
hi,
Iam trying to do post goods issue using bapi_goodsmvt_create. please let me know what are the mandatory fields to be passed?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. -
Hi Experts,
I am facing one issue while doing Goods Issue for sub contracting PO . In my case, inbound idoc will trigger the BAPI 'BAPI_GOODSMVT_CREATE' with movement code '07' and movement type as 543.
But it throws the error Deficit of Stck w.vend.unr.prev 438.793 THD : U329557 0113 VARIOUS O. U329557 is the child material of finished material 0003121XAZ. When i checked in MMBE, for the given material/storageloc/batch it has sufficient quantity.
I debugged the whole scenerio and found that from one table T156F in FM 'MB_MODIFY_STOCK_ENQUEUE_ENTRY', the value <m> is ASSIGNED from (t156f-felds) with value 1126.190. Later it subtract the value, provided in structure GOODS_ITEMS of BAPI BAPI_GOODSMVT_CREATE with quantity 1564.983 which is to be Goods issued from vendor.
1564.983 - 1126.190 = 438.793 .
Please help me why i am getting this Deficit error even when quantity is present for child material.
Thanks
ShahabHi Experts,
Please help me in this issue. -
GOODS ISSUE BAPI_GOODSMVT_CREATE problem
Hii Alll,
BAPI_GOODSMVT_CREATE is not posting my document but its creating material document
and doc year.
n i hv tested in se37 same prob .
its not posting production orderhi
good
go through this below code and use the functionmodule accordingly,
The following is an abap program making used of the BAPI function BAPI_GOODSMVT_CREATE to do Goods Receipts for Purchase Order after importing the data from an external system.
BAPI TO Upload Inventory Data
GMCODE Table T158G - 01 - MB01 - Goods Receipts for Purchase Order
02 - MB31 - Goods Receipts for Prod Order
03 - MB1A - Goods Issue
04 - MB1B - Transfer Posting
05 - MB1C - Enter Other Goods Receipt
06 - MB11
Domain: KZBEW - Movement Indicator
Goods movement w/o reference
B - Goods movement for purchase order
F - Goods movement for production order
L - Goods movement for delivery note
K - Goods movement for kanban requirement (WM - internal only)
O - Subsequent adjustment of "material-provided" consumption
W - Subsequent adjustment of proportion/product unit material
report zbapi_goodsmovement.
parameters: p-file like rlgrap-filename default
'c:\sapdata\TEST.txt'.
parameters: e-file like rlgrap-filename default
'c:\sapdata\gdsmvterror.txt'.
parameters: xpost like sy-datum default sy-datum.
data: begin of gmhead.
include structure bapi2017_gm_head_01.
data: end of gmhead.
data: begin of gmcode.
include structure bapi2017_gm_code.
data: end of gmcode.
data: begin of mthead.
include structure bapi2017_gm_head_ret.
data: end of mthead.
data: begin of itab occurs 100.
include structure bapi2017_gm_item_create.
data: end of itab.
data: begin of errmsg occurs 10.
include structure bapiret2.
data: end of errmsg.
data: wmenge like iseg-menge,
errflag.
data: begin of pcitab occurs 100,
ext_doc(10), "External Document Number
mvt_type(3), "Movement Type
doc_date(8), "Document Date
post_date(8), "Posting Date
plant(4), "Plant
material(18), "Material Number
qty(13), "Quantity
recv_loc(4), "Receiving Location
issue_loc(4), "Issuing Location
pur_doc(10), "Purchase Document No
po_item(3), "Purchase Document Item No
del_no(10), "Delivery Purchase Order Number
del_item(3), "Delivery Item
prod_doc(10), "Production Document No
scrap_reason(10), "Scrap Reason
upd_sta(1), "Update Status
end of pcitab.
call function 'WS_UPLOAD'
exporting
filename = p-file
filetype = 'DAT'
IMPORTING
FILELENGTH =
tables
data_tab = pcitab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
OTHERS = 6
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
gmhead-pstng_date = sy-datum.
gmhead-doc_date = sy-datum.
gmhead-pr_uname = sy-uname.
gmcode-gm_code = '01'. "01 - MB01 - Goods Receipts for Purchase Order
loop at pcitab.
itab-move_type = pcitab-mvt_type.
itab-mvt_ind = 'B'.
itab-plant = pcitab-plant.
itab-material = pcitab-material.
itab-entry_qnt = pcitab-qty.
itab-move_stloc = pcitab-recv_loc.
itab-stge_loc = pcitab-issue_loc.
itab-po_number = pcitab-pur_doc.
itab-po_item = pcitab-po_item.
concatenate pcitab-del_no pcitab-del_item into itab-item_text.
itab-move_reas = pcitab-scrap_reason.
append itab.
endloop.
loop at itab.
write:/ itab-material, itab-plant, itab-stge_loc,
itab-move_type, itab-entry_qnt, itab-entry_uom,
itab-entry_uom_iso, itab-po_number, itab-po_item,
pcitab-ext_doc.
endloop.
call function 'BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header = gmhead
goodsmvt_code = gmcode
TESTRUN = ' '
IMPORTING
goodsmvt_headret = mthead
MATERIALDOCUMENT =
MATDOCUMENTYEAR =
tables
goodsmvt_item = itab
GOODSMVT_SERIALNUMBER =
return = errmsg
clear errflag.
loop at errmsg.
if errmsg-type eq 'E'.
write:/'Error in function', errmsg-message.
errflag = 'X'.
else.
write:/ errmsg-message.
endif.
endloop.
if errflag is initial.
commit work and wait.
if sy-subrc ne 0.
write:/ 'Error in updating'.
exit.
else.
write:/ mthead-mat_doc, mthead-doc_year.
perform upd_sta.
endif.
endif.
FORM UPD_STA *
form upd_sta.
loop at pcitab.
pcitab-upd_sta = 'X'.
modify pcitab.
endloop.
call function 'WS_DOWNLOAD'
exporting
filename = p-file
filetype = 'DAT'
IMPORTING
FILELENGTH =
tables
data_tab = pcitab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
OTHERS = 6
endform.
*--- End of Program
reward point if helpful.
thanks
mrutyun^ -
Goods issue using bapi BAPI_GOODSMVT_CREATE getting error E M7
HI consultants,
While posting goods issue using bapi BAPI_GOODSMVT_CREATE . Running the batch job(zprogram) to post the goods issue . The goods issue is been posted by passing goods receipt data's.
while processing 3 goods receipt , 2 works fine one goods receipt getting E M 7 300 NO ITEMS ARE TRANSFERED error.
when i processing one by one all the 3 goods receipt is working fine and process sucessfully. While processing in bulk ,i am getting this issue.
If anybody faces this same problem or knows the solution .Please post the answer.
The way i am passing the parameter to bapi given bellow.
WA_GOODSMVT_CODE-GM_CODE = C_03.
*--populate header data
WA_GOODSMVT_HEADER-DOC_DATE = WA_MKPF-BLDAT.
WA_GOODSMVT_HEADER-PSTNG_DATE = WA_MKPF-BUDAT.
*--populate item data
*-- call the bapi for posting goods issue
IT_GOODSMVT_ITEM-NETWORK = WA_RESBP-AUFNR.
IT_GOODSMVT_ITEM-RESERV_NO = WA_RESBP-RSNUM.
IT_GOODSMVT_ITEM-RES_ITEM = WA_RESBP-RSPOS.
IT_GOODSMVT_ITEM-ACTIVITY = WA_RESBP-VORNR.
IT_GOODSMVT_ITEM-MOVE_TYPE = C_281.
IT_GOODSMVT_ITEM-ENTRY_QNT = WA_RESBP-NET.
*--get the item details
IT_GOODSMVT_ITEM-MATERIAL = WA_MSEG-MATNR.
IT_GOODSMVT_ITEM-PLANT = WA_MSEG-WERKS.
IT_GOODSMVT_ITEM-STGE_LOC = WA_MSEG-LGORT.
IT_GOODSMVT_ITEM-ENTRY_UOM = WA_MSEG-ERFME.
CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'
EXPORTING
INPUT = WA_MSEG-PS_PSP_PNR
IMPORTING
OUTPUT = WA_PSPHI_TEMP.
IT_GOODSMVT_ITEM-WBS_ELEM = WA_PSPHI_TEMP.
APPEND IT_GOODSMVT_ITEM.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = WA_GOODSMVT_HEADER
GOODSMVT_CODE = WA_GOODSMVT_CODE
IMPORTING
MATERIALDOCUMENT = WA_MATERIALDOCUMENT
TABLES
GOODSMVT_ITEM = IT_GOODSMVT_ITEM
RETURN = IT_RETURN.
With Regards,
Ambrose Mohandoss.Problem solved.
-
Regarding Goods Reversal and Goods Issue process for Production orders
Hi,
I have a issue regarding <b>Goods Reversal</b> and <b>Goods Issue</b> process for <b>Production orders</b>.
Actually I am having a Z - Function Module in that i am passing <b>production order number other details</b> to
make the <b>Goods Reversal</b> happen.
The code for the above is as below:
i_mvtit-material = wa_mdfa-matnr.
i_mvtit-plant = i_resb-werks.
i_mvtit-spec_stock = 'Q'. "New
i_mvtit-stge_loc = 'ZWIP'.
i_mvtit-stge_type = i_resb-lgtyp. "New
i_mvtit-batch = i_resb-charg. "New
i_mvtit-orderid = i_resb-aufnr.
i_mvtit-spec_stock = i_resb-sobkz.
i_mvtit-entry_qnt = i_resb-enmng.
i_mvtit-entry_uom = i_resb-erfme.
i_mvtit-entry_uom_iso = i_resb-meins. "New
i_mvtit-wbs_elem = v_frwbs.
i_mvtit-move_type = '262'.
i_mvtit-xstob = 'X'.
i_mvtit-gr_rcpt = i_resb-aufnr. "New
i_mvtit-reserv_no = i_resb-rsnum.
i_mvtit-res_item = i_resb-rspos.
APPEND i_mvtit.
* HEADER ELEMENTS
k_gmvt_code-gm_code = '03'.
k_gmvt_head-pstng_date = sy-datum.
k_gmvt_head-doc_date = sy-datum.
* CREATE GOODS MOVEMENTS
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = k_gmvt_head
goodsmvt_code = k_gmvt_code
TABLES
goodsmvt_item = i_mvtit
return = i_return.
The Above code does the <b>Goods Reversal</b> but then i will update one Z Table with fields like
Production Order Number[AUFNR], Number of Reservation[RSNUM], Item Number of Reservation [RSPOS], Material Number [MATNR], Requirement Quantity [BDMNG], WBS element[PSPNR] etc. If Above BAPI runs sucessfully.
That is happening correctly.
But Then actual issue is i have do <b>Goods Issue</b> for those Z-Table records.
There i will give Production order Number's & Storage Location in Selection-Criteria.
Then i need to do <b>Goods Issue</b> for that order.
The code i had written as follows.
* POPULATE VALUES FOR BAPI CALL
i_mvtit-material = i_zpsi7603_01-matnr.
i_mvtit-plant = i_resb-werks.
i_mvtit-spec_stock = 'Q'. "New
i_mvtit-stge_loc = p_sloc.
i_mvtit-stge_type = i_resb-lgtyp. "New
i_mvtit-batch = i_resb-charg.
i_mvtit-orderid = i_resb-aufnr.
i_mvtit-spec_stock = i_resb-sobkz.
i_mvtit-entry_qnt = i_resb-enmng.
i_mvtit-entry_uom = i_resb-erfme.
i_mvtit-entry_uom_iso = i_resb-meins. "New
i_mvtit-wbs_elem = v_frwbs.
i_mvtit-move_type = c_261.
i_mvtit-mvt_ind = 'F'. "New
i_mvtit-xstob = c_x.
i_mvtit-gr_rcpt = i_resb-aufnr. "New
i_mvtit-reserv_no = i_resb-rsnum.
i_mvtit-res_item = i_resb-rspos.
APPEND i_mvtit.
* HEADER ELEMENTS
k_gmvt_code-gm_code = c_03.
k_gmvt_head-pstng_date = sy-datum.
k_gmvt_head-doc_date = sy-datum.
* CREATE GOODS MOVEMENTS
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = k_gmvt_head
goodsmvt_code = k_gmvt_code
TABLES
goodsmvt_item = i_mvtit
return = i_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = c_x.
READ TABLE i_return INDEX 1.
IF i_return-type EQ c_s.
DELETE FROM zpsi7603_01 WHERE aufnr = i_resb-aufnr AND
rsnum = i_resb-rsnum AND
rspos = i_resb-rspos.
ENDIF.
If i run above code for <b>Goods Issue</b> it is giving error can anybody tell me what changes i need to do to make it work.
The <b>Error Message</b> i am getting is as below:
<b>Qty and / or "delivery completed" ind. or final issue ind. are missing</b>
<b>Error Number for the above is : 264.</b>
Can anybody solve my issue.
Any help will be appreciated.
Thanks in advance.
Thanks & Regards,
Rayeez.Hi,
Thanks boss.
It is working now correctly.
The issue is the i_mvtit-XSTOB should be equal space in case of Goods issue while incase of Reversal it should be equal to X.
Thanks for ur efforts.
I had awarded you points.
Thanks a lot.
Thanks & Regards,
Rayeez. -
Need Bapi Names for Post Goods Reciept and Post Goods issue to STO in MIGO
Hi All..
I need to post goods receipt using input data in MIGO. Is there any BAPI that i can use.
Also once STO (Stock Transport order) is created, i also need to Post goods issue to STO in MIGO transaction. I do need a bapi for this too...
Appreciate your help and will reward any helpful answers.
Thanks..Hi,
ata : 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.
gm_code-gm_code = '03'.
gm_header-header_txt = firstscreen-bktxt.
gm_header-pstng_date = sy-datum.
gm_header-doc_date = sy-datum.
gm_header-ver_gr_gi_slip = ' '. "print
gm_code-gm_code = '03'.
move lineitem1-bwartwa to gm_item-move_type .
move lineitem1-matnr to gm_item-material.
move lineitem1-erfmg to gm_item-entry_qnt.
move 'EA' to gm_item-entry_uom.
move lineitem1-werks to gm_item-plant.
move lineitem1-lgort to gm_item-stge_loc.
move lineitem1-kostl to gm_item-costcenter.
while gm_item-costcenter+9(1) = ' '.
shift gm_item-costcenter right.
endwhile.
overlay gm_item-costcenter with '0000000000'.
append gm_item.
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.
Thanks
venki -
BAPI to post a Goods issue with relation to Sales Order?
Hi Everyone,
After creating a delivery order, I need a BAPI to automatically post a goods issue for this DO.
I tried using BAPI_GOODSMVT_CREATE but it returns the message 'Goods Movement not possible with mvmt type 601'.
Any advice?
Best Regards,
JunwenHi John,
My data are as follows:
GOODSMVT HEADER:
PSTNG_DATE: 30.09.2004
DOC_DATE: 30.09.2004
REF_DOC_NO: had tried 1014000359 or empty
GOODSMVT_CODE: 03
GOODSMVT_ITEM:
MATERIAL: HP0121002
PLAN: 1010
STGE: 10FG
BATCH: BATCH1
MOV: 601
CUSTOMER: 180017
ENTRY_QNT: 1
ENT_UOM: PC
ENT_UOM_ISO: PC
DELIV_NUMB: 1014000359
DELIV_ITEM: 000001
From your feedback, it is possible to use the BAPI to create a goods issue for movement type 601?
Best Regards,
Junwen -
Hi Gurus,
I am working on an interface where I need to work on a process that allows posting of Goods recipts and goods issue and for this I have been asked to create a custom transaction that will pull the data from the local file and replicate Goods receipt (MIGO) and goods issue process in Inventory Managemnt.
Can anyone out there please help me out how to approach this development and what would be easiest way to accomplish this task.
Help will really be appreciated.
Thanks
Rajeev...1. Create a custom report which get the data from input file.
2. Populate the BAPI parameter with respective information and movement type.
3. Call BAPI - BAPI_GOODSMVT_CREATE .
4. Call BAPI_TRANSACTION_COMMIT.
For the custome report you can create transaction and execute.
I don;t have detail information - BAPI_GOODSMVT_CREATE with example. Better you search on SDN.
Regards
Nilesh -
Error while doing Good Issue for Production Order using BAPI
Hi All,
I am facing an error like 'u2018Content of order 1011907: MDT218AJ10 transferred to interface (IMSEG): T-86410-71".
I have written the code as below. Please let me know what is missing when using the BAPI 'BAPI_GOODSMVT_CREATE'. What is the cause of this error ?
*Action in Transaction (GM_CODE)
*GM Code for Goods Issue for Production Order is 03
gs_gmcode-gm_code = '03'.
*Header Data
*Posting date
gs_header-pstng_date = sy-datum.
*Document date
gs_header-doc_date = sy-datum.
*Item Data
*Material
gs_item-material = zptp_s_rf_migo_261-matnr1.
*Movement Type
gs_item-move_type = '261'.
*Movement Indicator
gs_item-mvt_ind = 'F'.
*Stock Type
gs_item-stck_type = 'F'.
*Plant
gs_item-plant = gv_plant.
*Storage Location
gs_item-stge_loc = gv_str_loc.
*Quantity
gs_item-entry_qnt = zptp_s_rf_migo_261-menge2.
*Unit
gs_item-entry_uom = gv_uom.
*ISO code for unit of measurement
gs_item-entry_uom_iso = gv_uom.
*Order Number
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = zptp_s_rf_migo_261-aufnr
IMPORTING
output = gs_item-orderid.
*Reservation Number
gs_item-reserv_no = gv_resv_num.
*Reservation Item
gs_item-res_item = gv_resv_itm.
*Reservation Type
gs_item-res_type = gv_resv_type.
APPEND gs_item TO gt_item.
Calling BAPI_GOODSMVT_CREATE to create the Material Document Number
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = gs_header
goodsmvt_code = gs_gmcode
IMPORTING
goodsmvt_headret = gs_headret
TABLES
goodsmvt_item = gt_item
goodsmvt_serialnumber = gt_serial
return = gt_return.
Thanks in Advance.hi,
did you look at message ?
System says, there are differences between the interface data and the order data. It can be anything. I think you should check
data in the interface .
this is the long explanation of your message :
Diagnosis
When calling the function module MB_CREATE_GOODS_MOVEMENT or the BAPI GoodsMovement.CreateFromData (BAPI_GOODSMVT_CREATE) to post a goods receipt for a production order, there are differences between the interface data and the order data.
Example: The order was created for plant 0001, but plant 0002 is passed on in the interface.
The system checks this for the material and the order item.
System response
Due to this difference, the system cannot post the goods receipt.
Procedure
Check the data in the interface (IMSEG-WERKS, IMSEG-AUFNR). If necessary, correct the plant or the order number in the interface.
<< Moderator message - Point begging removed >>
Edited by: Rob Burbank on Feb 6, 2012 11:24 AM -
Post goods Issue ,in VL02n
Hi friends ,
I am trying to post Goods issue from delivery order,through VL02n .I tried using BAPI_GOODSMVT_CREATE but it returns the message 'Goods Movement not possible with mvmt type 645'.
I saw in some of the threads about this BAPI ,BAPI_OUTB_DELIVERY_CONFIRM_DEC .Can i achive the same functionality .Please suggest me which parameters should be passed into the BAPI.
The BAPI should return me the material document number generated from VL02n ,i mean after posting the goods issue .
Regards ,
Hemanth Nugur .Hi
"I am trying to post Goods issue from delivery order,through VL02n"
If you want to do it inside VL02N transaction, you already a PGI button, just click on that, PGI will be done
Regards
MD
Maybe you are looking for
-
How do I use external hard drive
how do I use external hard drive and Photos? I keep getting a msg that there is not enough free space on your photo library volume - i even bought 500Gb of space on iCloud.... that didn't even work please help
-
Help with DR plan for Exchange & SQL Server vDP 6 please.
Hi there, I just need a little guidance building a backup & DR strategy using vDP and/or VR. SRM is probably not in the budget right now. First question about "Application" backup recovery.... Do I need BOTH a "Guest Image" & "Application" backup of
-
JTable with editable JComboBoxes
For some reason once I added editable JComboBoxes to a JTable I can no longer tab among the fields in the table. If I just select a cell, I can tab to the other cells in that row, and then to proceeding rows as I reach the end of each. However if I d
-
Trigger to execute query when value from LOV is selected
HI Guys, I have a form in which I have 2 fields in Master and 4 fields in detail, all showing on the same canvas. I have put an 'execute_query' in when_new_form_instance trigger so that when I open the form it is pre - populated. The Master fields dr
-
Hey gusy, I've reseted All my Content and Settings after my Icloud backup. I wanted to download all my songs back on my phone. I could download most of them, but in some of them it says:This Device Is Already Associated With an Apple ID You can downl