Bapi_Goodsmvt_Create...Issue????
Hi...
I am testing the Bapi_Goodmvt_item in Function module it works fine.
Like inputing the basic values..
and using Bapi_transaction_commit..
am able to view the document posted.
Buit when in an interface like the firms Program,I use this call...
I get an error.
ID: B1
Message: No unit of measure found for ISO code
Number: 548
Parameter: Goodsmvt_Item
row: 2
when using the material, I used the existing example in IDES
Material: 100-130
Plant: 1000
Stor_lc: 0001
Order Number: 100001300
Mo v Type: 261
Unit: PC
Qty: 5 PC
GM_code: 03
same values when tested with the call in Function Module
works fine.
Please Advice
Thank You,
Diana
Yes Tom.
YOu are right.
Here is an excerpt from the BAPI FM's documentation in SE37:
"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)."
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?
-
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^ -
Issue with BAPI BAPI_GOODSMVT_CREATE
Hello,
I am using BAPI_GOODSMVT_CREATE to post goods mvt against PO. When the PO is fully delivered and if i run my program again, it again posts against the same PO
How can i avoid this ? Won't the BAPI check this automatically ?
ThanksHi Anup,
When the PO is fully delivered, and if i use MIGO for the PO it issues a message "Document 4100000105 does not contain any selectable items".
But when i post using the BAPI it posts again (even when the PO is fully delivered), which should not happen...Ideally it should give a error !!
Thanks -
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.
-
Issue with BAPI_GOODSMVT_CREATE
Hi experts,
I am developing a program whereby I have to create GR from PO and post these documents. I have been able to use the BAPI_GOODSMVT_CREATE to create the GR. However I am facing an issue. After the BAPI_GOODSMVT_CREATE, I call the FM - BAPI_TRANSACTION_COMMIT to commit the BAPI, but it isn't working.
The bapi is only creating the GR and it isn't posting it. also, I have tried to use COMMIT WORK AND WAIT statement, but this too is not really posting the document. The only solution I have been able to find is to use WAIT UP TO 10 SECONDS. In terms of performance tough, this isn't the best solution.
I was wondering if anyone knows how I can force the commit to the BAPI or if there is another alternative to create and post GR from PO.
Thanks for your precious help.
ShabirHi,
try this way..Hope this will work and worked for us..
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = t_goodsmvt_header
goodsmvt_code = t_goodsmvt_code
IMPORTING
goodsmvt_headret = w_docret
materialdocument = w_docno
TABLES
goodsmvt_item = t_goodsmvt_item
goodsmvt_serialnumber = t_goodsmvt_slno
return = t_goodsmvt_ret.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'W'
IMPORTING
return = wa_return2.
Prabhudas -
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?
-
BAPI_GOODSMVT_CREATE lock issue with no access to ABAP!
Hello everyone,
I have written a class in vb .NET that uses the BAPI_GOODSMVT_CREATE to post goods issues. I have done numerous tests myself which all were successful. However, when a colleague wanted to test my class he suddenly got the following error "The plant data of the material <XXXX> is locked by the user <XXXX>". The user specified is the standard background user we use for RFCs. So basically the user is blocking himself.
This issue seems to be quite common as Google turns up with numerous results. They either end up with people being desperate and giving up or finding solutions in ABAP. However, my team has no access to ABAP since SAP-programming has all been outsourced to India. Getting any changes done in ABAP will be a long and tedious progress for which we simply do not have the time.
Is there anyway to resolve this issue on our side? Maybe through other RFCs or changes in how we handle the BAPI? I am quite desperate as this problem occurred shortly before we wanted to go live and now it is not sure we can even do anything on our side.Hi Tom,
If you want to call DEQUEUE_ALL from vb.net then tell your ABAP counterpart to create a new remote enabled function module and he can subsequently make a call to DEQUEUE_ALL in the custom developed function module through ABAP. You can then call the newly created custom function module using its calling parameter.
Also, if required he can expose that newly custom created function module as a webservice that you can call from vb.net.
I hope its clear to you now about how can you access it from vb.net.
Regards,
Sachin -
Issue in stock transfer with BAPI_GOODSMVT_CREATE
Hi Experts,
In LQ02 with movement type 321 Q, when a transfer stock from Quality inspection project to Unrestricted project is made, our requirement is to further transfer the stock from Unrestricted project to Unrestrcited using movmt type 411 Q.
i.e. Run LQ02 with Movt type 321 Q => should also trigger goods movmt with 411 Q.
for this we have used badi method MB_DOCUMENT_BADI ~MB_DOCUMENT_BEFORE_UPDATE to trigger an update function module ZFM with start delayed. i.e. this ZFM will be triggered in update task to transfer stock from unres proj to Unres using 411 Q from LQ02.
Now the issue is, when some one runs LQ02 with movmt 321 Q, I can see in MMBE that stock is perfectly moved to unrestricted ( QI PRoj to Project and then Proj to Unrest.). However, when I look at the stock overview in LS26 , I still see the stock in Project Unrestricted. ( instead of unrestricted)The movmt ocde I use for bapi is 06.
I have tried using different movement types and codes, however i have the same result. stock overview is perfect in MM and not correct in WM. I''m out of ideas. Please help. I appreciate any suggestions.
Thanks,
AmberHi david,
Thanks for the hint. I did check in LU04 and unfortunately I don't see any open TO created nor to be confirmed.
now, I did observe some strange behaviour while testing. When I again run LQ02 with movt type 309 or 411, I could see that the material is very well transfered from project unrest to Unrest.
This is surprising , since I supply the same data in Badi, however it does not do the same for WM (LS26 Transaction ) but does for MM (MMBE).
Do you think any customizing tables underlying are causing this. please help.
Thanks,
Amber -
BAPI_GOODSMVT_CREATE for movement type 161, issues in PO creation
Hello Gurus,
I am using movement type 161 with BAPI_GOODSMVT_CREATE in order creating a vendor PO based on the goods receipt posted with the BAPI.
It works fine, nevertheless due to business requirements, I need to apply the following changes:
- in SAP standard the order type is NB by default but in our case I would like to force another order type using the same range that NB. I guess this could be done by activating exit ZXM06U17 (MM06E003). Does someone could confirm it?
- in our process, the purchasing group is not maintained at vendor level (LFM1-EKGRP) but as this field is mandatory in the PO creation and as this data can not be maintained in BAPI_GOODSMVT_CREATE, does someone know if it would be possible to force this value during the PO creation (EKKO-EKGRP) based on a maintenance table? If yes in which user-exit? Exit ZM06U43 could be used?
- furthermore, our specific PO type should have a specific account assignement EKPO-KNTTP instead of the default value U, does someone know if it would be possible to force this value during the PO creation (EKKO-EKGRP) based on a maintenance table? If yes in which user-exit? Exit ZM06U43 could be used?
Kind regards
ChrisHi Priya,
Just want to share with your guys how to fit this error in BAPI_GOODSMVT_CREATE.
For movement type 161 of PO return you have to pass movement type 101 instead of 161
goodsmvt_item-bwart = 101. After that standard function will determine 101 to 161 automatically and
post that material doc.
NOTE:
In my case
It just heppen only the FIRST time that you do movement with PO Return wich is needed to pass
101 in stead of 161 but after that you can pass 161 the system will continue process correctly.
Hope it help.
Sayan. -
Issue with BADI in BAPI_GOODSMVT_CREATE
Dear All,
I am using BAPI BAPI_GOODSMVT_CREATE to create GR with some custom fields for this custom fields am using EXTENSION in BAPI but while execution am getting exception 'badi not implemented' in internal BADI below am sending that code.
Call BAdI MB_BAPI_GOODSMVT_CREATE to fill own fields
TRY.
get badi lo_mb_bapi_GOODSMVT_CREATE.
CATCH cx_badi_not_implemented. "#EC NO_HANDLER
ENDTRY.
Kindly suggest me some solution why this BADI throwing exception...as i think this BADI should implemented automatically when i call BAPI BAPI_GOODSMVT_CREATEHello Raj
Can you share your answer?
I have added my fields in MSEG table and i want to update those fields using BADI
MB_BAPI_GOODSMVT_CREATE.
Can you pls tellme how you have done this.
Regards
Chandra -
Bapi BAPI_GOODSMVT_CREATE lock issues
Hi all,
I have a problem with BAPI_GOODSMVT_CREATE, FM
I have using this to post goods movement type 309 & 321 and I am calling this in LOOP as there are more number of goods movement.
In each iteration i have to post the goods movement and after that i have to create the delivery using bdc MBRL Tcode.
The problem is the BAPI is locking the Material document number even after posting the goods movement for a while. Because of this the delivery creation is failing.
After BAPI i'm using BAPI commit work FM
I have used FM deque_all, but its not working. wait up to 2 secs.
Even the combination of deque_all & wait up to 2 secs is not working.
Is there anyother way to release locks?
ThanksHi,
Try this way ......
SET UPDATE TASK LOCAL.
if sy-subrc eq 0.
call function BAPI_GOODS_MVMT_CREATE
endif.
if return is initial with no errors then
SET UPDATE TASK LOCAL.
if sy-subrc eq 0.
call function 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = return.
endif.
Maybe you are looking for
-
please help me figure out why I cannot get my music library to load
-
Webdynpro application using BI queries
Hello Webdynpro gurus!! I am quite new to Webdynpro and am actually trying to develop a new webdynpro application that calls in some existing BI queries and displays the chart/table as per the query. Could anybody please help me in achieving this? An
-
Microsoft visual C++ Runtime Library Runtime error Program:C:\Program Files\Mozilla Firefox\firefox.exe This aplication has requested the Runtime to terminate it in an unusual way Please contact the application`s support team for more information
-
after installing ios 6.1.3 i face many problems.one of them is that during the calls after 5 or 6 minutes the phone close and it writes recalling. when i use some applications like facebook or games suddenly it stops working and i am out of the appli
-
BW will be still needed when HANA using?
Hi Experts, Is HANA replacement for relational database? What support and maintenance for such database? what application that can use HANA, OLTP,BW,SCM,CRM? Is HANA same with BW/BI Accelerator? HANA appliance may be addition or plug in to existing t