BAPI_GOODSMVT_CREATE: Want to Goods Receipt onto an Existing P.O.
Trying to Post MB01/101 using the BAPI and PO num. Adding additional qtys of maynr/batch. Having issue.
Has anyone done this with the BAPI?
Thanks
Probably many people have done it, but what shall they answer?
do you just expect a yes we have done it or no, we havent ?
Or do you want help for you specific problem? then you should have given more input to enable the readers to help you.
A question that has already a reply will reduce the numbers of possible readers.
First find out if you problem is related to the BAPI or to the PO. The easist way is to try the GR manually. IF you receive already here an error, then it is not a problem in the BAPI.
Similar Messages
-
BAPI_GOODSMVT_CREATE to generate Goods Receipts
Hello Experts,
Can some one help me with a sample abap program making use of the BAPI function BAPI_GOODSMVT_CREATE to generate Goods Receipts for Purchase Order for relevant data stored in an internal table .
what are the fields of the internal table i will need to populate and from which tables am i to fetch the relavent data.
Awaiting some help .
Thanks,Hi,
Please take a look at this links for sample coding of BAPI_GOODSMVT_CREATE.
http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm
http://www.4ap.de/abap/bapi_goodsmvt_create.php
Regards
Kiran Sure -
Don't want a Goods Receipt PO without Purchase Order
Hello Experts,
I am looking for a solution that Goods Receipt PO must be restricted as no Goods should be received without Purchase Order.
Is it possible ?
Help Required ....
Thanks & Best Regards,Hi
This restriction is possible only by the 'SBO_SP_TransactionNotification' Stored procedure.
You can learn more about this stored procedure from the following link:
[https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e991e2b9-0901-0010-0395-ef5268b00aaf]
The following is the code which restricts GRPO created without PO
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER proc [dbo].[SBO_SP_TransactionNotification]
@object_type nvarchar(25), -- SBO Object Type
@transaction_type nchar(1), -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
@num_of_cols_in_key int,
@list_of_key_cols_tab_del nvarchar(255),
@list_of_cols_val_tab_del nvarchar(255)
AS
begin
-- Return values
declare @error int -- Result (0 for no error)
declare @error_message nvarchar (200) -- Error string to be displayed
select @error = 0
select @error_message = N'Ok'
IF (@object_type='20')
BEGIN
/* Purchase Delivery Note (Goods Receipt PO)*/
if (@transaction_type='A')
BEGIN
IF (SELECT max(ISNULL(T0.BaseEntry,-1)) FROM PDN1 T0 WHERE T0.DocEntry = @list_of_cols_val_tab_del) != -1
BEGIN
set @error = 0
set @error_message = N'Ok'
END
ELSE
BEGIN
set @error_message='Goods Receipt PO cannot be created directly. Copy from PO'
set @error=1
END
END
END
-- Select the return values
select @error, @error_message
end -
Goods receipt for subcontracting order! BAPI_GOODSMVT_CREATE
I wanna use BAPI "BAPI_GOODSMVT_CREATE" to create goods receipt for subcontracting order.
But it says that this combination is not possible. Combination of my movement type and this BAPI.
What can i do to solve it?
thanks in advance.>
Julia Nikiforva wrote:
> I wanna use BAPI "BAPI_GOODSMVT_CREATE" to create goods receipt for subcontracting order.
> But it says that this combination is not possible. Combination of my movement type and this BAPI.
>
> What can i do to solve it?
>
> thanks in advance.
Might work
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. -
Error while using BAPI to create Goods Receipt Document
Hello All,
While using the bapi BAPI_GOODSMVT_CREATE to create Goods receipt document ,the following error is encountered:-
Error Message:FOR OBJECT XABBELEGNR,NUMBER RANGE INTERVAL DOES NOT EXIST OM36.
Do we need to create a number range object ??If yes,how and where to create ?
Thanks,
Deepti.Hi Deepti!
There is only a valid interval missing, not the whole object.
Maintenance can be done via transaction SNRO, enter your object XABBELEGNR in entry screen. (Alternatively use transaction OMJ6).
Push button 'Number Ranges' and 'Change Intervals'. Here you can define an interval.
Regards,
Christian -
Invoice before Goods Receipt in Intercompany
Hi all!
We are setting up the Intercompany Purchasing between B1 and R/3 with local stock.
In this scenario, a delivery sent from R/3 creates a draft goods receipt in B1. When the goods arrives you must manually open the draft goods receipt and add it as a "real" goods receipt. This will do the actual posting to the inventory.
When R/3 creates the invoice, it will become a purchase invoice in B1.
At this moment it is assumed that the draft goods receipt is stored as a "real" goods receipt as the purchase invoice will be based on the goods receipt.
If the goods receipt doesn't exist, the purchase invoice will have no base reference and a posting is done to the inventory by the purchase invoice. If you later creates the "real" goods receipt (when the goods arrives), you will make a new posting to the inventory and you end up with:
a) doubled inventory
b) goods receipt with no target
c) purchase invoice with no base document
To prevent this I think the solution is to ensure that the invoice in R/3 is not created before the "real" goods receipt is created in B1.
What is the best practice to ensure this?
Regards
Lars JönsonHi Lars,
to be able to post the purchase invoice into B1, it's a prerequisite that a base document (goods receipt) was created and posted. In the standard scenario "local stock" B1iSN does not add an purchase invoice without an existing base document "goods receipt".
B1 raises an DI error "Base Document mismatch..." and B1iSN will take the purchase invoice message into the B1iSN error inbox.
This is how the scenario is defined.
To be able to post the invoice into B1, you can activate an error action for all invoicing messages named "Mark4AutomaticRetrial" within B1iSN. Now you can resend these messages out of the B1iSN error inbox automatically using the maintenance option B1iSN Tools -> Action Handling -> Cfg DA: Automatic Resend once an hour or once a day.
With this option the invoices will be posted automatically, when the B1 draft document is transferred into a goods receipt posting (after the items arrived physially and the quality checks are done).
Best regards
Bastian
P.S.: you can find details how-to set up error action in B1iSN Guide 05 - Operations, chapter 2 -
No goods receipt possible for purchase order 'PO#" "Lineitem"
Hi gurus,
Please help on below error.
While doing return to vendor transaction using BAPI 'BAPI_GOODSMVT_CREATE' error 'No goods receipt possible for purchase order 'PO#" "Lineitem"' was encountered. As checked, all data are correct including the plant, sloc, PO#, stocks, batch.
Please kindly advice on how to resolve the issue.
Thank you in advance.Hi,
Few things which immediately comes to my mind.
1. Check if the PO is released?
2. Check if the confirmation control is properly set in Confirmations tab of item details of a PO.
3. Check if the Goods Receipt indicator is ticked at item level of PO.
I hope these helps.
Kind Regards,
Prakash -
Goods Receipt Indicator- (PO under Delivery Tab)
I want set Goods Receipt Indicator in Purchase order under Delivery tab for specific company code.
What are the configuration setting for GR Indicator default in Purchase order. I know OME9 apart from that is there any other way.
thanks in advanceHi,
GR Indicator comes as active by default based on the Item Category and Account Assignment Category.
In case of Standard Item Category w/o Account Assignment Category, GR Indicator comes by dafault and In case of Account Assigned POs, dafualt settings sepends on the configuration of Account Assignment Category in OME9.
If you want it based on the Comapany Code then, you need to go for ABAP Development.
You can use BAdi - ME_PROCESS_PO_CUST
Methods - PROCESS_HEADER (Processing of Header Data) and PROCESS_ITEM (Processing of Item Data) -
Error in goods receipt with PO
Hi experts,
I am getting the following error,when trying goods receipt with Purchase Order using BAPI_GOODSMVT_CREATE.
"No goods receipt possible for pruchase order XXXXXX".
What may be the reason for this,its urgent please help.
Thanks & Regards
KarthikI just got the error message in the email. Here is a sample code for movement type 122. Replace all the XXXX values with values from your system.
Also as a sanity check make sure that the PO/Item you are testing with can be returned back to the vendor - use MB01 to make sure this movement type is successful for your PO/Item.
DATA: w_goodsmvt_header LIKE bapi2017_gm_head_01,
w_goodsmvt_code LIKE bapi2017_gm_code,
i_return LIKE bapiret2 OCCURS 0.
DATA: BEGIN OF i_goodsmvt_item OCCURS 0.
INCLUDE STRUCTURE bapi2017_gm_item_create.
DATA: END OF i_goodsmvt_item.
DATA: w_extnumber TYPE bal_s_log-extnumber.
DATA: w_goodsmvt_headret LIKE bapi2017_gm_head_ret,
w_materialdocument LIKE bapi2017_gm_head_ret-mat_doc,
w_matdocumentyear LIKE bapi2017_gm_head_ret-doc_year.
CLEAR: w_goodsmvt_header,
i_goodsmvt_item,
i_goodsmvt_item[],
i_return[].
MOVE sy-datum TO w_goodsmvt_header-pstng_date.
w_goodsmvt_code = '01'. "MB01
i_goodsmvt_item-material = 'XXXXXX'. "material number
i_goodsmvt_item-plant = 'XXXX'. "Plant that originally recieve this PO
i_goodsmvt_item-stge_loc = 'XXXX'. "Storage loc
i_goodsmvt_item-entry_qnt = 1.
i_goodsmvt_item-entry_uom = 'XXX'.
i_goodsmvt_item-entry_uom_iso = 'XXX'.
i_goodsmvt_item-po_number = 'XXXXXXXXXX'.
i_goodsmvt_item-po_item = 'XXXXX'.
i_goodsmvt_item-move_type = '122'.
i_goodsmvt_item-mvt_ind = 'B'.
i_goodsmvt_item-move_reas = '1'. "or whatever reason allowed for 122
APPEND i_goodsmvt_item.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = w_goodsmvt_header
goodsmvt_code = w_goodsmvt_code
testrun = 'X' "turn this off once I_RETURN comes back empty
IMPORTING
goodsmvt_headret = w_goodsmvt_headret
materialdocument = w_materialdocument
matdocumentyear = w_matdocumentyear
TABLES
goodsmvt_item = i_goodsmvt_item
return = i_return.
BREAK-POINT. -
Goods Receipt Value line item wise
Hi Experts,
My client wants show Goods Receipt Value line item wise at the time of GR entries.
He wants show GR Value before saving the GR document.
Please advise me how it is possible.
Thanks in advance,
Chandhuand what will be the benefit of such request? do you think a receiver (warehouse personell) can valuate whether the Po price is correct maintained by a buyer?
Maybe it is better to create check reports for the buyers instead.
you can certainly check in a user exit if price is far away from the price maintained in material master and can issue a warning or even an error. -
Dear experts!
Now, I'm getting some Issue about Good Receipt in MM module.
- The first, I created a material master with transaction code MM01.
- Second, I want to Good Receipt without PO for the Material with quantity is 40 and price is 12.000 per one.
I think I will create new movement type.
How do I have to do?
Help me, please!
Best regards Huy!Hi Huy,
You can use 501 movment type and make the field EXBWR- Ext. Amount in LC optional/editable in OMJJ. By doing so you will be able to enter the price and the Vendor and create a GR without PO. In this case it would hit the GR/IR account.
If you desire not to hit this account then you can either use 202 or you can create a Custom movment type similar to it and make the GL account field Optional. Then you can enter the GL account while doing the Goods Receipt.
Regards,
Kathir -
Dear sir,
In process industry, i want to goods receipt for the finished
material automatically with auto goods issue for BOM
components at the time of confirmation and reservation
should be reduced. for that i have maintained control key for
auto goods receipt and assigned that control key to the last
operation and phase, i have also maintained backflush
indicator in material master. but no goods movement occured
at the time of confimation.
please suggest solution.
points will be rewarded.
Regards
Pravindear pradeep,
while confirmation system shows all of material with right movement type at confirmation.
as umashankar sir says check backflushing in master recipe, when checked that there is check in material assignment screen in master recipe but in disable mode. i dont know how to select that check for backflushing.
thanks
Pravin -
hi to all
I am new to XI and i am doing a scenario in which R/3 and SUS(Supplier Self-Service) is communicating through XI.
Now i want send goods receipt from R/3 to SUS.So my question is
what should be Idoc type there on R/3 and what should be message type on SUS side?
thanks in advance.
With Regards
SamiHi Sami,
I was justing wondering if you used STPPOD/DELVRY03 msg type and idoc type for creating an outbound idoc when good receipt is performed. I am in a sitation where I want to create an outbound idoc containing all the good receipt information that I want to send to the suppliers that we received the materials. Goods receipt will be done by MIGO transaction and I want to create an outbound idoc.
Regards,
S -
About MM-SUS base Goods receipt create invoice
Dear all,
We used MM-SUS,Now we want base Goods receipt create invoice at SUS platform,Who can provide any idea or any config document?
Thank you.please refer to the thread--->
Re: MM-SUS scenario mapping of the Goodsreceipt for inbound delivery @SUS
all the details of the report are discussed here along with the required additional configurations. -
BAPI_GOODSMVT_CREATE Goods Receipt Reversal
Hello All,
According to SAP docs I need to use goodsmvt_code-gm_code = '06' but with movement type 102 I get an error message "Goods movement not possible with movement type 102". Works fine if I use regular goods receipt code '01' and movement 102. Please let me know if Im missing something here.
Also, how do you post goods receipt reversal referencing goods receipt and not PO with BAPI_GOODSMVT_CREATE?
Thanks,
LeonHi Leon,
I found the following documentation by SAP seems to be helpful for you.
<b>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.</b>
Maybe you are looking for
-
How can I get a real person to look at my IP Profi...
My current saga started 4 days ago when a BT van was spotted in the village. This is usually a bad sign as it means a BT engineer is about to break a random number of people's broadband connections. Quite why they feel the need to do this is beyond m
-
whats the best way to transfer everything from my old macbook pro to a new mac mini, i have a external hard drive which i backup to regularly via time capsule
-
How do I get my photos back to my PC?
I know. I know. I should have NOT gotten a Dell. After months of dealing with "tech support" and (as they call it) the "Repair Depot" I basically have new wine in an old bottle. Everything on my laptop is gone. My photo albums are gone but I do have
-
Can't open PDF from single source sender
I am on a Mac platform and have no trouble opening PDF documents with the exception of those that come through email from a particular sender. The error I receive when I try to open the documents from the original sender is Adobe Reader could not o
-
i have purchased sprint carrier iphone 4s from USA. But it cant unlock in nepal so how can i unlock it in nepal. Thanks for your kind information..