BAPI for GR for Outbound delivery
Hi Gurus,
I need to create a Goods Receipt against an Outbound Delivery ( movement type "101" ) using the BAPI BAPI_GOODSMVT_CREATE
user is using MIGO transaction for the same. There he will choose the GOODS RECEIPT for OUTBOUND DELIVERY and enters the delivery number. The movement type "101" is used.
I tried passing gm_code = 01 and mvt_type = 101 and mvt indicator as u2018Bu201D , but Iu2019m getting an error message 'ENTER PURCHASE ORDER NUMBER'.
I donu2019t have PO number . I just have shipment number from which I have found open outbound deliveries and now I need to do GR for each of the Outbound delivery.
Please let me know if Iu2019m passing the right gm_code and mvt indicator to the BAPI or if Iu2019m missing any parameters. Iu2019m passing the following parameters to the BAPI ?
Delivery. No. , delivery item, Doc. Date , Posting Date , ref document num , Quantity, Storage Location, External qty, External qty unit, matnr, werks .
Your help is greatly appreciated.
Thanks in advance.
Thanks for replying. I went through the entire BAPI documentation but did not found anything related to GR for outbound deliveries.
I searched some older posts in sdn related to this problem but almost all are unanswered question.
I'm passing gm_code = 01 , mvt_type = 101 and have tried all movement indicator like 'B' , 'F' and blank.
here is what I'm passing in my Bapi.Please let me know if I'm missing something or if I'm passing something incorrectly.
gm_header-pstng_date = sy-datum.
gm_header-doc_date = sy-datum.
gm_header-ref_doc_no = wa_lips-vbeln. "The Outbound delivery Number
gm_code-gm_code = '01'.
MOVE '101' TO gm_item-move_type.
gm_item-material = wa_lips-matnr . "Material Number from the Delivery.
gm_item-plant = wa_lips-werks . "Receiving Site.
gm_item-stge_loc = wa_lips-lgort. "Receiving Storage Location.
gm_item-entry_qnt = wa_lips-lfimg.
gm_item-entry_uom = wa_lips-vrkme.
gm_item-ENTRY_UOM_ISO = wa_lips-vrkme.
gm_item-mvt_ind = 'B ' .
gm_item-deliv_numb = wa_lips-vbeln.
gm_item-deliv_item = wa_lips-posnr.
gm_item-DELIV_NUMB_TO_SEARCH = wa_lips-vbeln. "delivery number
gm_item-DELIV_ITEM_TO_SEARCH = wa_lips-posnr. "delivery item
if I donot pass any value in mvt indicator the error I'm getting is 'Update control of movement type is incorrect (entry 101 X X)'
if I pass 'B' in mvt indicator error is 'Material document data and PO data do not match (Plant)'
if i pass 'F' , erro ris 'Order not found or not permitted for goods movement'.
Please help me. This is kind of critical issue. or please suggest if I can do GR for outbound delv in any other way.
Thanks...!!!!
Similar Messages
-
Bapi for vl01no create outbound delivery without order reference
Hi Guru's, i need help, I'm looking for BAPI VL01NO
Any suggestions?
Thanks for everything
Edited by: GaBo_s Gabo on Sep 22, 2009 8:48 PMHi,
Following is the sample code for creation of outbound delivery Using BAPI 'BAPI_DELIVERYPROCESSING_EXEC'
Which may be helpful.
PARAMETERS: p_vbeln LIKE vbak-vbeln.
DATA: BEGIN OF t_vbap OCCURS 0,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
kwmeng LIKE vbap-kwmeng,
matnr LIKE vbap-matnr,
werks LIKE vbap-werks,
END OF t_vbap.
DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
WITH HEADER LINE.
DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
WITH HEADER LINE.
DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
SELECT vbeln posnr kwmeng matnr werks
INTO TABLE t_vbap
FROM vbap
WHERE vbeln = p_vbeln.
LOOP AT t_vbap.
t_request-document_numb = t_vbap-vbeln.
t_request-document_item = t_vbap-posnr.
t_request-quantity_sales_uom = t_vbap-kwmeng.
t_request-id = 1.
t_request-document_type = 'A'.
t_request-delivery_date = sy-datum.
t_request-material = t_vbap-matnr.
t_request-plant = t_vbap-werks.
t_request-date = sy-datum.
t_request-goods_issue_date = sy-datum.
t_request-goods_issue_time = sy-uzeit.
APPEND t_request.
ENDLOOP.
CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
TABLES
request = t_request
createditems = t_created
return = t_return
READ TABLE t_return WITH KEY type = 'E'.
IF sy-subrc = 0.
MESSAGE e208(00) WITH 'Delivery creation error'.
ENDIF.
COMMIT WORK.
READ TABLE t_created INDEX 1.
WRITE: / 'Delivery ', t_created-document_numb, ' created'.
Let me know if any issues.
Thanks & Regards,
Naveen -
BAPI for creation Partial Outbound delivery
Hi Guru
Please suggest me any BAPI's for creating Partial Outbound Delivery
I am working on BAPI_OUTB_DELIVERY_CREATE_SLS but its creating full delivery
Pls suggest me anythg..
Best Regards
Subham AryaHi
For finding the right BAPI, have a look at the following blog:
/people/g.koopmann/blog/2010/03/07/using-bapis
Best regards,
Guido Koopmann -
Goods Issue for a Return Outbound Delivery for both Sales Returns
Hi gurus..
tell me the approch for the following development....
custom transaction to perform a Goods Issue for a Return Outbound Delivery for both Sales Returns and Consignment Returns (Pickups) process within a lean warehouse in SAP.
it is vry urgnt
thnksI seem to have found the information I required here:
http://wiki.sdn.sap.com/wiki/display/Snippets/Simulating+the+Sales+Cycle+with+BAPI's
I'm going to keep this post active because I'd still like answers to my questions and any advice that you might be willing to share in regards to what I am trying to do.
Edited by: Mikael Nensén on May 18, 2011 3:52 PM -
FM for migo against outbound delivery
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
I am using this FM for migo against outbound delivery can i get waht parameters i have to pass
for this FM for outbound deliverygmhead-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
itab-move_type = '101'.
itab-mvt_ind = 'B'.
itab-plant = 'FD11'.
itab-material = '0000900152'.
itab-entry_qnt = '1.000'.
itab-move_stloc = 'FG'.
itab-stge_loc = 'FG' .
itab-po_number = '5500004086'.
itab-DELIV_NUMB = '0171000465'.
itab-DELIV_ITEM = '10'.
itab-PO_ITEM = '10'.
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
Error in function
Material document data and PO data do not match (Material)
i am getting this error
help me -
Bapi for Goods Receipt - Outbound Delivery
Hello all,
I am looking for a Bapi for <b>Goods Receipt for Outbound Delivery</b>.
I have searched the forum but found BAPIs only for GR for Inbound Delivery, GR for purchase order etc. But not for GR for Outbound Delivery.
Can someone guide?
Thanks and Regards,
ReenaHi Reena,
use this code....
*& Report ZSAN_BAPI_GOODSMVT_CREATE *
REPORT ZSAN_BAPI_GOODSMVT_CREATE .
DATA: GOODSMVT_HEADER LIKE BAPI2017_GM_HEAD_01,
" Material Document Header Data
GOODSMVT_CODE LIKE BAPI2017_GM_CODE,
" Assign code to transaction for BAPI goods movement
MATERIALDOCUMENT LIKE BAPI2017_GM_HEAD_RET-MAT_DOC,
" Number of Material Document
GOODSMVT_ITEM LIKE BAPI2017_GM_ITEM_CREATE OCCURS 0 WITH HEADER LINE,
" Create Material Document Item
RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE
" Return table for messages
*Fill values in header
GOODSMVT_HEADER-PSTNG_DATE = '20030825'.
GOODSMVT_HEADER-DOC_DATE = '20030802'.
*Fill GOODSMVT_CODE
GOODSMVT_CODE-GM_CODE = '05' .
*Fill Item Table
GOODSMVT_ITEM-MATERIAL = '100-100'.
GOODSMVT_ITEM-PLANT = '1000'.
GOODSMVT_ITEM-STGE_LOC = '0001'.
GOODSMVT_ITEM-MOVE_TYPE = '501'.
GOODSMVT_ITEM-ENTRY_QNT = '50'.
GOODSMVT_ITEM-ITEM_TEXT = 'Test Sanket'.
*GOODSMVT_ITEM-COSTCENTER = '1000'.
APPEND GOODSMVT_ITEM.
*Create Good's movement
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = GOODSMVT_HEADER
GOODSMVT_CODE = GOODSMVT_CODE
IMPORTING
MATERIALDOCUMENT = MATERIALDOCUMENT
TABLES
GOODSMVT_ITEM = GOODSMVT_ITEM
RETURN = RETURN.
*Commit BAPI
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
*Display Goods movement number
FORMAT COLOR 6 INVERSE ON.
READ TABLE RETURN WITH KEY TYPE = 'E'.
IF SY-SUBRC = 0.
WRITE: /,'ERROR! Goods movement not created'.
ELSE.
WRITE: /,'Goods movent number',MATERIALDOCUMENT COLOR 5,
'posted for material',GOODSMVT_ITEM-MATERIAL.
ENDIF.
FORMAT COLOR OFF INVERSE OFF.
If useful reward me with points.
Thanks
Sanket. -
Functon Module required for Creation of Outbound Delivery & PGI
I am creating sales order. Now, I am creating outbound delivery using VL01N by passing Sales Order & Shipping point...and upon creation of outbound delivery doing a PGI...
This can be done manually, but need to make it automatic, I mean on save of sales order i will do it. For this is there any FUNCTION MODULE which can be used so that using the Sales Order & shipping point it automatically creates Outbound Delivery & subsequently does a PGI.Havent tried, but please check if we can manage via combination of below BAPI's:
1. BAPI_OUTB_DELIVERY_SAVEREPLICA
2. BAPI_OUTB_DELIVERY_CONFIRM_DEC
3. BAPI_ACC_GOODS_MOVEMENT_POST
Will try myself, when i am back in office on Monday.
Kind Regards
Eswar -
MIGO FOR GR against OUTBOUND DELIVERY
Hi All
In MIGO transaction I want to do some modification in that when I am going to save purchase order ie for Goods receipt for outbound delivery and movment type 101, I want to call another transaction created by myself.
But for above when I am debugging the program in that I can see that all methods only can u please tell me where to put call trancation which should be called at save button only
Regards
SagarUse LINE_MODIFY from the MB_MIGO_BADI Business Add-ins SE18. create an implementation and use the LINE_MODIFY method to restrict the plants. As for disabling why dont you try the loop at screen command and check what screens will be turned off from the other BADI methods. you can mostly find these screens in the PAI and PBO detail methods.
-
Disable auto Pick confirmation for EK00 output - Outbound Delivery
Hello experts,
Need help with Outbound Delivery Picking output typ EK00, I have setup the output type to be triggered automatically upon Delivery creation, It's printing the pick List as desired, But the problem is it's also confirming the Pick quantity automatically. Is there a way to set up this output to just print the PickList and not confirm the Pick Qty ?
Thanks for your help.
Kris THello Kris,
If you want to deactivate automatic picking confirmation, you have remove condition type WMTA which results in automatic confirmation of picking.
Go to NACE
Application V2
Here output type/ Condition record WMTA needs to be removed.
Also you have reconfigure movement type settings.
SPRO>>LOGISTICS EXECUTION>>WAREHOUSE MANAGEMENT>>ACTIVITIES>>TRANSFERS>>DEFINE MOVEMENT TYPES
Execute.
select combination of warehouse number and movement type
ands reset the automatic TO indicator to keep it 'BLANK' in background processing Tab.
With this settings maintained you can stop picking status to 'C' automatically when delivery is cerated.
Br,
Tushar -
MIGO for GRN against Outbound delivery
Hi,
I have a requirement for creation of GRN against outbound delivery using MICO tcode, i have used the FM 'BAPI_GOODSMVT_CREATE but in table T158G for MIGO tcode there is no number assigned in our system landscape as it is std table, but respectively (MB01,MB31,etc no's are there) how to create number for MIGO in table T158G and correspondingly Movement Indicator which should be used for Outbound delivery, please kindly sujjest me.
Thanks in advance,
Puneetraj.Hi
No, I am not having any release procedure.
Yes, I have picked the qty in VL02N
In vendor master, I have assigned the supplying plant to vendor.
Actually, i have created the plant as vendor and assigned it to itself.
Its not a error message. plz see the message.
Document 0080016192 does not contain any selectable items
Message no. M7064
Diagnosis
The document or document item entered cannot be adopted.
Possible reasons for this are:
The document items have already been processed
(Suggest zero lines indicator set?).
the document items have been deleted or are blocked.
the document items have been created for a different plant.
(for reservations only) movements are not yet allowed for the reservation items.
(for reservations only) the document items are retrograde components of the order. These are posted using the order confirmations.
A confirmation must exist for the document items.
The document items must be released first.
The document is an R/2 document.
Procedure
Make sure your entries are correct.
If the system has already processed the total quantity, you can set the Suggest zero lines indicator. The system will suggest the quantity zero for the items that have already been processed.
If you have entered a particular item, cancel the item. If you do not enter an item, the system searches all of the open items in the document.
If the document is a purchase order, production order or a reservation, you can enter search criteria in the dialog box.
You access the dialog box by choosing Enter with reference on the initial screen.
If the document is an SAP R/2 document, you have to cancel it manually by entering the reversal movement type.
Regards
Neeraj Kumar Jain -
Shipment Cost for an STO/ Outbound Delivery
Hello All,
We are trying to configure shipment cost for STO. We are facing an issue as explained below. Let me know if anyone of you faced a similar issue and if you have ideas for the fix -
In our scenario the Shipment cost calculation is done on the following basis -
1) Flat Rate - For example for transporting of goods from new york to atlanta.
I did complete the configuration for shipment cost and I am able to get shipment cost in the STO. Here is an example of where I am stuck -
1. I created outbound delivery # 1 (partial quantity) for the sto (with 2 line items). When I create shipment cost document, it allocates the shipment cost to the 2 line items proportionately. eg. 100$ is distributed as 50$ each.
2. Now, when I create a new outbound delivery #2 for the rest of the quantity and try to create shipment cost, it distributes based on the ratio of the quantity shipped. This is how it distributes -
(Quantity shipped in OBD#2/ Total STO Quantity) * Shipment cost from first OBD (=50$).
What we want is the exact distribution of 50$ for the second OBD as well.
Appreciate your help!!
Thanks in Advance
PiyushGot it....SAP NOTE - 907632 fixed the issue.
-
IDoc for creating VL01N (outbound) delivery
Hi,
I have an interface which provides a SO and need to create an outbound delivery (VL01N) in SAP. This Idoc will be inbound to SAP and requires to create an delivery (vl01n). I tried using delvry03 with message type desadv....but nothing is successful. pls can anyone provide ome help here?Hi,
Check Line number 96 of This bapi
perform delivery_replicate tables gt_komdlgn
and the code written inside this sub-routine.
call function 'GN_DELIVERY_CREATE'
exporting
vbsk_i = gs_vbsk
no_commit = gc_true
if_synchron = gc_false................
Though I have not used this BAPI, by going through the BAPI code, i think delivery will be created.
Regards
Vinod -
How to create collective Transfer order for a collective outbound delivery?
Hello All
I created a group of deliveries and I got two outbound documents, now I want to create a collective Transfer order it gives me an error does not exist in T311 however the individual outbound delivery whiten the group could be picked
Can any one help me to solve this
Regards
Jacopo Francoishi
Transfer order will create based on delivery document . U got two delivery document number.
So goto LT03
enter delivery document number
execute save.
again goto LT03
enter another delivery document number execute, save it
regards
krishna -
Badi for create/change outbound delivery
Hi,
I want to write a custom code on the create/change of outbound delivery.
found a badi def: DELIVERY_PUBLISH and method: delivery_publish_after_save.
I want to know if this is correct place to write my include or any other place?
Thanks & regards,
RavishHi,
Check SAP Note 415716 - User exits in delivery processing also.
Regards,
Eduardo -
VL01n with BAPI - how to crate Outbound delivery via BAPI with SerialNumber
Hi Guru,
I have a lot of problem with Serial number manage, i had try to use BAPI_SALESORDER_CREATEFROMDAT2 but without results.
Plese explain me how can i manage Serial Numer in BAPI.
Manually i charge serial number in:
Transaction VL02N , in manu i select " EXTRAS" --> "Serial Number".
thank you in advance
Simone Maina.I think(It's strictly my opinion), if a suitable serial number profile is maintained in plant/material then this assignment should happen automatically!!
**You gotta refer to a functional consultant. I am not very sure.. -
BAPI for outbound delivery without order reference - VL01NO
Hi ,
I need a BAPI to create a outbound delivery without a Order reference ( transaction VL01NO ). Please provide the BAPI. Sample code will be helpful.
Thanks,
R~Hi,
Following is the sample code for creation of outbound delivery Using BAPI 'BAPI_DELIVERYPROCESSING_EXEC'
Which may be helpful.
PARAMETERS: p_vbeln LIKE vbak-vbeln.
DATA: BEGIN OF t_vbap OCCURS 0,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
kwmeng LIKE vbap-kwmeng,
matnr LIKE vbap-matnr,
werks LIKE vbap-werks,
END OF t_vbap.
DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
WITH HEADER LINE.
DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
WITH HEADER LINE.
DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
SELECT vbeln posnr kwmeng matnr werks
INTO TABLE t_vbap
FROM vbap
WHERE vbeln = p_vbeln.
LOOP AT t_vbap.
t_request-document_numb = t_vbap-vbeln.
t_request-document_item = t_vbap-posnr.
t_request-quantity_sales_uom = t_vbap-kwmeng.
t_request-id = 1.
t_request-document_type = 'A'.
t_request-delivery_date = sy-datum.
t_request-material = t_vbap-matnr.
t_request-plant = t_vbap-werks.
t_request-date = sy-datum.
t_request-goods_issue_date = sy-datum.
t_request-goods_issue_time = sy-uzeit.
APPEND t_request.
ENDLOOP.
CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
TABLES
request = t_request
createditems = t_created
return = t_return
READ TABLE t_return WITH KEY type = 'E'.
IF sy-subrc = 0.
MESSAGE e208(00) WITH 'Delivery creation error'.
ENDIF.
COMMIT WORK.
READ TABLE t_created INDEX 1.
WRITE: / 'Delivery ', t_created-document_numb, ' created'.
Let me know if any issues.
Thanks & Regards,
Naveen
Maybe you are looking for
-
Adobe Camera Raw 5.3 does not support Canon EOS 500D
Hi, I just bought a new Canon EOS 500D and it seems that Adobe Raw 5.3 (i.e. LR2 and CS4) do not support the new (or better changed) Canon RAW format (CR2). Does anyone know when this camera model / RAW format will be supported? Any ideas for workaro
-
Privilege problem in MUD, please help
hi all When I was setting up MUD as SH.rpd following http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/mude/mude.htm, i found a privilege problem. After I merged Karen.rpd into local shared_sh.rpd, the shared_sh.rpd window opened, if now I perfo
-
Is it ok to make changes to import map by loading files from port manually?
Hi all, I want to load the files from the port which is set to manual and then want to create/modify existing maps already assigned to ports.Is it ok to do this way or do we need to create the import maps with all mappings manually other than port op
-
How to automatically update Smart LINKED Object
Hi. This is my first post here, I'm French, so excuse any English mistake i may do. I'm not an artist / designer / ..., still new about using image software editing like photoshop. So i downloaded Photoshop CC to try it because i wanted to do somethi
-
Packagemaker - Installing Office 2008 and Updates
Hiya, Is there anyway using PackageMaker to install Office 2008 and the 2 updates automatically?