LIV for Goods receipt with out PO?
Hi all,
How to do Invoice posting for Goods receipt withput PO but with vendor ?
Is it possible in SAP? If not what is the alternative?
Please reply.
Thanks,
Aravind
hi all,
Thanks for the replies.
I am very new to MM, so far i have created LIV's with PO reference only.
Please explain me how to create an Invoice with ref to Vendor in MIRO? I tried to create but it is giving the error "Enter atleast one allocation Item with PO reference" ?
Thanks,
Aravind
Similar Messages
-
Price change for material with Goods Receipt with out Order reference?
hi all,
Our client company have some finished products produced from raw materials. But we are not using Production planning module. So in MM we are receiving these products with Goods receipt with out order reference(521).
The issue is, the price for this product will change monthly. This new price will affect the existing stock as moving average price calculation.
ex:
Quantity Price Value
Stock balanace 100To 2.00/To 200
Newly produced 100To 2.20/To 220
after the GRN for newly produced is done. The price also need to change as below.
Total 200To 2.10/To 420
This is easy if we receive goods with PO price, as moving average price will updae in the master record.
But here no reference. So only quantity updated with existing price.
So how to achieve the change of price ? Please help.
Thanks,
AravindHi Bijay,
Thanks for the reply. I will use the posting method suggested by you.
but how you are arriving newly produced material quantity & price!
The reply for your comment is,
Every month My client company revise the price of the produced material based on various factors including the
raw material purchase cost.
The price will be fixed for the whole month.
While posting the GRN, the accounts updated are,
Dr Material account
Cr Production Cost
Please let me know what you have asked is answered or not.
So that i can brief more. This is my initial project. So your feedback is very helpful to me.
Thanks,
Aravind -
Regarding Outbound IDOC for Goods Receipt with MBGMCR03
Hi Experts,
Please let me know ,how to handle TYPE QUANT fields when i am generating an Outbound IDOC for Goods receipt for message type MBGMCR with the IDOC type MBGMCR03.
At item level when passing the value for quantity received field ,the QUAN value into NUMC or CHAR before MASTER_IDOC_DISTRIBUTE to pass it to data record it is showing correctly in my BADI .
after generating the idoc , the field value is appended with next field value passed.
before generating IDOC
erfmg( 60.000) - ENTRY_QTY(060)
efrme (EA) - ENTRY-UOM(EA)
after generating IDOC
IN WE02
ENTRY_QTY-060EA
later field values are mismatching .
Please let me know the resolution.
Thanks & regards
VishnuHi,
Standard Idoc types for invoice is INVOIC01 and INVOIC02.
- Use WE30 for seeing Idoc types with segment.
Or otherwise go for Custom Idoc
Create Custom Idoc type with required fields,custom output type and assign it to partner profiles.(If there is no std idoc type or output type)
Use Funtion module MASTER_IDOC_DISTRIBUTE to generate Idocs while saving MIRO, for this you need to find exit or implement implicit enhancement while saving MIRO.
http://wiki.sdn.sap.com/wiki/display/ABAP/StepstocreatecustomIDOC - Creating Custom idocs -
Find a bapi for Creates a Goods Receipt with correspond to Inbound Delivery
hi expert!
exist a bapi for tcode:MIGO_GR ( Goods Receipt with correspond to Inbound Delivery)
i know one bapI BAPI_GOODSMVT_CREATE can Creates a Goods Receipt,
but i can't know to use it to Creates a Goods Receipt with correspond to Inbound Delivery.
or other bapi exist for MIGO_GR?
Best Regard!Hi Vatcan,
Chek the Inbound Delivery 1st weather you refer the right PO in it
You can also chek in PO i
1 Me23n Go to confirmation tab here you can see the Inbound delivery quantity
2 Chek which reference document you recived the goods, (i.e You recived the goods with reference to PO or Inbound delivery)
2 Coz if you refer the inbound delivery then syestem will deafult show the inbound quanity
And yes the actual quanity will update in inbound delivery if you refer the inbound deivery while reciveing the goods -
Goods Receipt with respect to sales order
hi,
goods receipt with respect to sales order ,that sales order is prepared with reference to quotation
erroer is
Account assignment cannot be carried out because of different origin no.
Message no. V1134
Diagnosis
The sales document to which you want to refer is based on sales document 20000005 and item 000010. Therefore, the settlement and possibly inventory management are carried out using the number of the preceding document.
System Response
This entry is not allowed.
Procedure
Enter the document and the item number of the preceding sales documentHi,
Refer the sales quotation number for GR instead of the sales order number.
Regards,
Ravi Kumar C. -
Block Vendor for Goods Receipt without QM
Dear Experts,
We have a specific requirement to set a purchasing block in a vendor (XK05), which must necessarily include a block in goods receipt.
As far as I know, and according to SAP Note 64440 - MMIM: Block vendor for goods receipt, this is only possible activating QM for the material.
However, our client cannot do it for all the materials so we need to find out an alternative solution. Does anyone have any idea how can we do it?
Thanks in advance.
Best Regards,
AndreiaHi guys,
Thank you very much for your quick replies!
Jürgen L, you are right. The requirement is not to block the GR forever, but just during a period of time, in specific situations.
AKTP MM, we will check the BADI: MB_MIGO_BADI, as suggested. I will come back with feedback, as soon as possible.
If you have more suggestions please feel free to share!
Thank you.
Best Regards,
Andreia -
Creating goods receipt with refernce to PO number using BAPI_GOODSMVT_CREAT
Hi Gurus,
I have a requirment where in, I need to create a goods receipt with reference to a PO number which has been created by BAPI_PO_CREATE1, using another BAPI BAPI_GOODSMVT_CREATE. How can I do this? what are all the values that I need to fill in GOODSMVT Create BAPI.
Please help its very urgent... Need to submit by EOD.
Thanks,
Sumahi
hope this code will help you,.
Reward if help.
REPORT ZRICH_0001 .
Structures for BAPI
DATA: 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.
Setup BAPI header data.
GM_HEADER-PSTNG_DATE = SY-DATUM.
GM_HEADER-DOC_DATE = SY-DATUM.
GM_CODE-GM_CODE = '04'. " MB1A
Write 971 movement to table
CLEAR GM_ITEM.
MOVE '412' TO GM_ITEM-MOVE_TYPE .
MOVE 'Q' TO GM_ITEM-SPEC_STOCK.
MOVE '3800533484' TO GM_ITEM-MATERIAL.
MOVE '1' TO GM_ITEM-ENTRY_QNT.
*MOVE 'PC' TO GM_ITEM-ENTRY_UOM.
MOVE '1060' TO GM_ITEM-PLANT.
MOVE '0007' TO GM_ITEM-STGE_LOC.
*MOVE '0901' TO GM_ITEM-MOVE_REAS.
MOVE 'P203601001' TO GM_ITEM-WBS_ELEM.
MOVE 'P203601001' TO GM_ITEM-VAL_WBS_ELEM.
APPEND GM_ITEM.
Call goods movement BAPI
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.
IF NOT GM_RETMTD IS INITIAL.
COMMIT WORK AND WAIT.
CALL FUNCTION 'DEQUEUE_ALL'.
ELSE.
COMMIT WORK AND WAIT.
CALL FUNCTION 'DEQUEUE_ALL'.
ENDIF.
WRITE:/ GM_RETMTD.
LOOP AT GM_RETURN.
WRITE:/ GM_RETURN.
ENDLOOP.
check the BAPI_GOODSMVT_CREATE.
Functionality
You can use this method to create a material document for a goods movement.
You can only create one material document each time you call up the method.
You can use a simulation function before posting the goods movement to check how the data is updated in the database. The standard system is configured so that the goods movement is posted immediately without simulating beforehand.
Ensure that you transfer the data in the same way as it is run in the database, for example,
Material number 18-figure with leading zeros
Batches with uppercase letters
Note that for all transactions/events listed below, the posting date is entered in the header data of the material document. In the BAPI2017_GM_HEAD_01 interface, fill the PSTNG_DATE (import structure GOODSMVT_HEADER) field.
Notes
Authorization check check
In the MM Inventory Management component, the method does not execute any authorization checks.
Note that during a posting of a goods movement, depending on the business transaction of the system, authorization objects of other applications can also be checked.
Transfer
The following information about the material document that is to be created is transferred to the method:
a structure with header data
a structure with the code for the movement
a table with the item data
a table with the serial numbers
The posting is carried out in the SAP R/3 via the MB_CREATE_GOODS_MOVEMENT function module.
Confirmations
Messages are returned in the Return parameter. The parameter documentation shows the return codes and their meanings.
Further Information
The method can only carry out your function if no error messages were generated in the Return table. This is the case if the header data and all the items were processed successfully.
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).
Which fields have to be filled during the various transactions/ events?
The following sample scenarios demonstrate which fields have to be filled for which business transactions/events (code).
There are the following types of transactions/events:
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 receipts
6. GM_Code 06: Reversal of goods movements
7. GM_Code 07: Subsequent adjustment to a subcontract order
Entering the movement indicator
Depending on the transaction, you must enter the following in the movement indicator:
GM_Code 01 (Goods receipt for purchase order): B
GM_Code 02 (Goods receipt for production order): F
For all other transactions, you leave the field blank.
For 1: GM_Code 01: Goods receipt for purchase order
Purchase order known
The following fields have to be filled:
Purchase order
Purchase order item
Movement type
Movement indicator
Quantity in unit of entry
ISO code unit of measurement for unit of entry or
quantity proposal
The following fields may have to be filled in some cases (incomplete listing):
Shelf life expiration date (if it has been configured like this in the system)
Reason for movement (if it has been configured like this in the system)
Batch (if the material is handled in batches and batch numbers are not assigned automatically)
Storage location (if a storage location has not been specified in the purchase order item)
The following fields can be filled (incomplete listing):
Stock type
Item text
Unloading point
Delivery completed indicator
You cannot fill the following fields (incomplete listing):
Account assignment fields (account assignment is adopted from the purchase order)
Reservation
Receiving/issuing material
Receiving/issuing plant
Receiving/issuing storage location
In the case of a purchase order item with the "subcontracting" item category, only the GR item in the interface is to be transferred. The system automatically determines GI items.
Purchase order unknown: Shipping notification known
The following fields have to be filled:
Delivery
Delivery item
Movement type
Other fields, such as those under "Purchase order known". The system determines the relevant purchase order item via the delivery/delivery item.
Purchase order unknown: Purchase order should be created automatically
The following fields have to be filled:
Material number
Plant
Storage location
Vendor
Movement type
Movement indicator
Quantity in unit of entry
ISO code unit of measurement for unit of entry
The following fields may have to be filled in some cases (incomplete listing):
Shelf life expiration date (if it has been configured like this in the system)
Reason for movement (if it has been configured like this in the system)
Batch (if the material is handled in batches and batches are not assigned automatically)
The following fields can be filled (incomplete listing):
Stock type
Item text
Unloading point
You cannot fill the following fields (incomplete listing):
Account assignment fields (automatic creation of purchase order items with account assignment is not supported)
Reservation
Receiving/issuing material
Receiving/issuing plant
Receiving/issuing storage location
Purchase order unknown: A purchase order should not be created
The following fields have to be filled:
Material number
Plant
Storage location
Vendor
Movement type
Movement indicator
Quantity in unit of entry
ISO code unit of measurement for unit of entry
The following fields may have to be filled in some cases (incomplete listing):
Shelf life expiration date (if it has been configured like this)
Reason for movement (if it has been configured like this)
Batch (if the material is handled in batches and automatic assignment of batch numbers is not set)
The following fields can be filled (incomplete listing):
Special stock indicator
Item text
Unloading point
Goods recipient
The following fields cannot be filled (incomplete listing):
Account assignment fields (automatic creation of purchase order items with account assignment is not supported)
Reservation
Receiving/issuing material
Receiving/issuing plant
Receiving/issuing storage location
Receiving/issuing batch
The input combinations listed above for the GM_CODE 01 can be combined within an input table so that they can be posted in a material document. Items can also be posted for different purchase orders, provided that all the purchase orders refer to the same vendor.
Transfer of subcontracting components
During the posting of the ordered material of a subcontract order with movement type 101, for the transfer of the subcontracting components, the filled unique identification of the document line (LINE_ID) is also required.
More information on LINE_ID and PARENT_ID
The following fields have to be filled for the components:
Unique identification of the document line
Identification of the immediately superior line
Material number
Plant
Storage location
Quantity in unit of entry
The following fields can be filled for the components:
All other fields in the method that are included in this list.
The following fields cannot be filled for the components:
All fields that are not included in the list above. The movement indicator must be initial.
Additional fields in goods-receipt-based invoice verification
When you post a goods receipt to purchase order with movement type 102, an issue with reference to a previously posted goods issue, the following fields must also be transferred:
REF_DOC_IT (LFPOS): Item of a reference document
REF_DOC (LFBNR): Document number of a reference document
REF_DOC_YR (LFBJA): Fiscal year of a reference document
Only when you transfer these fields is it guaranteed that the reference to the original goods movement stay the same.
For 2 GM_Code 02: Goods receipt for production order
The following fields have to be filled:
Order
Movement type
Movement indicator
Quantity in unit of entry
ISO code unit of measurement for unit of entry or
quantity proposal
The following fields may have to be filled in some cases (incomplete listing):
Shelf life expiration date (if the system has been configured like this)
Reason for movement (if the system has been configured like this)
Batch (if the material is handled in batches and automatic batch number assignment is not set)
Storage location (if storage location has not been specified in the order)
The following fields can be filled (incomplete listing):
Order item (co-product)
Stock type
Item text
Unloading point
"Delivery completed" indicator
The following fields cannot be filled (incomplete listing):
Account assignment fields (the account assignments are adopted from the purchase order)
Reservation
Receiving/issuing material
Receiving/issuing plant
Receiving/issuing storage location
Receiving/issuing batch
For 3 GM_Code 03: Goods issue
Goods issue without reference to a reservation
The following fields have to be filled:
Material number
Plant
Storage location
Movement type
Movement indicator
Quantity in unit of entry
ISO code unit of measurement for unit of entry
The following fields may have to be filled in some cases (incomplete listing):
Special stock (e.g. sales order, project, vendor etc.)
Shelf life expiration date (if the system is configured like this)
Reason for movement (if the system has been configured like this)
Batch (if the material is handled in batches and automatic batch number assignment is not set)
Account assignment fields
The following fields can be filled (incomplete listing):
Special stock indicator
Item text
Unloading point
Goods recipient
The following fields cannot be filled (incomplete listing):
Reservation
Receiving/issuing material
Receiving/issuing plant
Receiving/issuing storage location
Receiving/issuing batch
Goods issue with reference to a reservation
The following fields have to be filled:
Reservation number
Reservation item
Record type of the reservation
Movement indicator
Quantity in unit of entry
ISO code unit of measurement for unit of entry
The following fields may have to be filled in some cases (incomplete listing):
Shelf life expiration date (if this has been configured in the system)
Reason for movement (if this has been configured in the system)
Batch (if the material is handled in batches and automatic batch number assignment is not set)
Storage location (if not planned in the reservation)
The following fields can be filled (incomplete listing):
Special stock indicator
Item text
Unloading point
Goods recipient
The following fields cannot be filled (incomplete listing):
Movement type
Material
Plant
Account assignment fields
For 4 GM_Code 04: Transfer posting
Transfer posting without reference to a reservation
The following fields have to be filled:
Material number
Plant
Storage location
Movement type
Movement indicator
Quantity in unit of entry
ISO code unit of measurement for unit of entry
The following fields may have to be filled in some cases (incomplete listing):
Receiving material
Receiving plant
Receiving storage location
Receiving batch (if material is handled in batches and you want to change batches)
Receiving/issuing special stock (e.g. sales order, project, vendor etc.)
Shelf life expiration date (if this has been configured in the system)
Reason for movement (if this has been configured in the system)
Batch (if the material is handled in batches and automatic batch number assignment is not set)
The following fields can be filled (incomplete listing):
Special stock indicator
Item text
Account assignment fields (for automatic posting lines: Expense/income from stock transfer)
The following fields cannot be filled (incomplete listing):
Reservation
Transfer posting with reference to a reservation
See goods issue with reference to a reservation
For 5 GM_Code 05: Other goods receipts
Other goods receipt without reference to a reservation
See goods issue without reference to a reservation
Other goods receipt with reference to a reservation
See goods issue with reference to a reservation
For 6 GM_Code 06: Reversal of goods movements
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.
For 7. GM_Code 07: Subsequent adjustment to a subcontract order
Ordered material of subcontract order
The following fields have to be filled:
Unique identification of document line (can be assigned to anything)
Posting date in document header
Document number of purchasing document
Item number of purchasing document
Material number check
Plant check
Movement type (select movement type 121)
Movement indicator (must be O)
Further entries are not allowed. The entry quantity for the ordered material of a subcontract order must be zero.
Components
The following fields have to be filled:
Unique identification of document line (can be assigned to anything)
Identification of the immediately superior line
Plant
Material number check
Quantity in unit of entry; can also be negative
The following fields can be filled:
Storage location
All other fields in the method that are included in this list.
The following fields may not be filled:
All fields that are not in the list above. The movement indicator must be blank.
More information on LINE_ID and PARENT_ID
Additional fields in goods-receipt-based invoice verification
When you post a subsequent adjustment, the following fields must also be transferred:
REF_DOC_IT (LFPOS): Item of a reference document
REF_DOC (LFBNR): Document number of a reference document
REF_DOC_YR (LFBJA): Fiscal year of a reference document
Only when you transfer these fields is it guaranteed that the reference to the original goods movement stays the same. -
Standard smartform for Goods receipt slip version 3
Hi all,
I need to copy and modify a smartform for Goods receipt slip.
How do we find out the main program(driver program) for a smartform.
<b>In my case the smartform name is /SMB11/MMGR3_A</b>
Regards,
KaushalI used /SMB11/BL_MMGR1_L in my choice and I then searched programs using /SMB11* until I found something that looked like a match in it's text.
I can only tell you that after configuring via tcode NACE application ME and output type WE03 (because again the text matched what I was wanting to do) with program /SMB40/M07DR it did give me the results I wanted. This is a specific answer and NOT the more general answer you might have really wanted. There is much discussion in forum for that more general question. Personally until SAP sees the wisdom of maintaining a table to make a more direct search key more possible rather than a full SAPSCRIPT, SMARTFORM, PDF search we have some agony to endure.
Now if can you tell me where (table & fields) number of containers found on tabstrip Quantity of tcode MIGO is stored and we can call this even.
GOITEM-ANZGEB is NOT the answer I want to hear as structure names do not count and it is not defined in any structures of the global settings.
Good Luck!!! -
Hi guys,
Can any one lemme know what is the output type we can use for goods receipt- for generating a goods receipt smartform output?
and can u also lemme know the standard print program also.
if u have written any zprint program plz send it ASAP.
thanks n regards,
Bhargava.u can see the output types for Goods Receipt in Transaction NACE. Application M1
Output type Name
CHKL Count List ( Program RTCHECKL, form RT_CHECK_LIST)
GRPL Pallet Sticker ( Pro RTCHECKL, form RT_PALLET_LABEL)
The Form names mentioned are SAPSCRIPTS not smartforms.
Also Bhargava, chk out with ur Consultant wat output type suits ur requirement coz there r multiple options as u can see for urself in NACE under Applications M1/ME.
Hope it helps.
Regards,
Bikash
Message was edited by: Bikash Agarwal
Message was edited by: Bikash Agarwal -
Free of goods returns with out main item
Hi.. All
Free goods returns with out Main item
created sale order with Shoes 5 Pair qnty
and free of goods are pair Soxs are 3
Now one pair Damaged now i want to send returns only For Free of goods Here no main item""""No seller is creating billing with free of goods with main items
now i am going to create Return order main item is coming as well as Free of goods items also coming to RO
Now i want to return only free of goods only one pair
i cant delete main item Right""""
Have you tested this? what was the problem in deleting the item??
Have you activated the complete reference in your VTAA controls??
Phanikumar -
Cancellation of Goods Receipt with Credit Memo Transaction Issue
Dear SAP Expert and Guru,
Normally cancellation of goods receipt cannot be done when invoice has been issued. Cancellation of Goods receipt can only be done when there is the credit memo being issued in MIRO.
The problem now is that is there any table that can tracked the linkage between Credit Memo and the Cancellation of Goods receipt?
The goods receipt with the invoice linkage can be found in both table EKBE and BKPF. But not the credit memo and cancellation of Goods receipt.
Thank you
Regards
Leonard TanDear Jeya and SAP expert and Gurus,
You are correct, but with the document number, how am I going to get the Cancellation of GR document?
In table BKPF and EKBE. With the invoice number (34*******) then pass it to table BKPF to get the invoice number (52*******),
Then get the invoice number (52*******) pass it to table EKBE to get the Goods Receipt document (61*******).
However, this only can track the transaction goods receipt and Invoice but not the credit memo with cancellation of goods receipt.
Kindly asvise on that.
Thank you
Regards
Leonard Tan
Note : Do not quote previous reply every time,simply reply for member you want to respond.
Edited by: Jeyakanthan A on Jul 8, 2011 3:23 PM -
Goods Receipt with respect to Handling Unit (Transaction u0096 MIGO)
Hi All,
A delivery is created for stock transport order for goods movement from Plant XXXX (Storage Location YYYY) to Plant XXXX (Storage Location ZZZZ).
Handling Units are packed on delivery and delivery is post goods issued from Plant XXXX (Storage Location ZZZZ).
While posting goods receipt (Transaction MIGO) without selecting Via Handling Units system populates the packaging material line item whereas when Via Handling Units is selected (in other words when tried to post Goods Receipt with respect to Handling Units) system doesnt populate the associated packaging material.
Requirement is to populate packaging material line item while posting Goods Receipt with respect to Handling Unit.
Plz guide me.
SatishHi Vatcan,
Chek the Inbound Delivery 1st weather you refer the right PO in it
You can also chek in PO i
1 Me23n Go to confirmation tab here you can see the Inbound delivery quantity
2 Chek which reference document you recived the goods, (i.e You recived the goods with reference to PO or Inbound delivery)
2 Coz if you refer the inbound delivery then syestem will deafult show the inbound quanity
And yes the actual quanity will update in inbound delivery if you refer the inbound deivery while reciveing the goods -
Create Goods Receipt with an Inbound Delivery
Hi,
Can you anybody help me, how to create a Goods Receipt with correspond to Inbound Delivery.
Which FM or BAPI avaliable for this. Anybody did it before please pass to me with details?
Thanks in Advance
Cino C B
Edited by: Cili on Feb 11, 2008 8:19 PMCheck BAPI_GOODSMVT_CREATE
Look at the documentation if you want to make a goods issue or a good receipt for purchase order or production order, etc.
Inbound delivery only means is going to enter the plant (ie. mvt 101) -
BAPI needed for Goods Receipt Purchase Order(Transaction : MIGO)
Hi all,
We have a requirement where in we need to post the documents throuh BAPI for Goods receipt Purchase order(Transaction: MIGO).
Any inputs on this..is highly appreciable...
thanks in advance...
regards..
prathima.Hi,
use 'BAPI_GOODSMVT_CREATE'
Check this sample.
code
REPORT ZRICH_0001 .
Structures for BAPI
DATA: 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.
Setup BAPI header data.
GM_HEADER-PSTNG_DATE = SY-DATUM.
GM_HEADER-DOC_DATE = SY-DATUM.
GM_CODE-GM_CODE = '04'. " MB1A
Write 971 movement to table
CLEAR GM_ITEM.
MOVE '412' TO GM_ITEM-MOVE_TYPE .
MOVE 'Q' TO GM_ITEM-SPEC_STOCK.
MOVE '3800533484' TO GM_ITEM-MATERIAL.
MOVE '1' TO GM_ITEM-ENTRY_QNT.
*MOVE 'PC' TO GM_ITEM-ENTRY_UOM.
MOVE '1060' TO GM_ITEM-PLANT.
MOVE '0007' TO GM_ITEM-STGE_LOC.
*MOVE '0901' TO GM_ITEM-MOVE_REAS.
MOVE 'P203601001' TO GM_ITEM-WBS_ELEM.
MOVE 'P203601001' TO GM_ITEM-VAL_WBS_ELEM.
APPEND GM_ITEM.
Call goods movement BAPI
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.
IF NOT GM_RETMTD IS INITIAL.
COMMIT WORK AND WAIT.
CALL FUNCTION 'DEQUEUE_ALL'.
ELSE.
COMMIT WORK AND WAIT.
CALL FUNCTION 'DEQUEUE_ALL'.
ENDIF.
WRITE:/ GM_RETMTD.
LOOP AT GM_RETURN.
WRITE:/ GM_RETURN.
ENDLOOP.
[/code]
Also check the Bapis
BAPI_PO_CREATE --> To create Purchase Order
BAPI_PO_CHANGE --> To change Purchase Order
BAPI_PO_GETDETAIL --> Todisplay Purchase Order
Regards,
Raj. -
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.
Maybe you are looking for
-
I have a Blue and White G3 running OS 8.6, and I have to upgrade it to 9.2.2 but I want to know if I can go back to 8.6 if I need to? Powerbook G4 15.2" 1.67 GHz 512MB Mac OS X (10.4.2) iPod Video 30GB White
-
Weblogic.xml - reference-descriptor
Hello All, When ever I put "reference-descriptor" element directly under root element "weblogic-web-app" in weblogic.xml, I get this message during server startup.. "weblogic.xml" is malformed. Check against the DTD: org.xml
-
How do I get the Norton 360 Toolbar & Identity Safe onto Firefox 4?
I cannot get the Identity Safe feature of Norton 360 onto my Firefox 4 toolbar. I tried configuring Norton 360 as per the FIrefox 4 instructions to no avail. it worked on Firefox 3.
-
Ltunes crashes every time I try to use it.
Why does itunes crash every time I try to use it? Begins startup and get message that itunes is in compatability mode (which I don't know what it is nor have ever set itunes to run in it). Then itunes crashes every time even after deleting and rein
-
How do i connect srs-x5 to windows 8.1?
it is not working and the rep that i spoke to was clueless