"BAPI_GOODSMVT_CREATE" for delivery
Hi
I have found a BAPI "BAPI_GOODSMVT_CREATE" , I want to use it for delivery, now I have given all relevant information, but I get an error " Goods movement not possible with mvmt type 653", The order type is ZGOR, is the movement type not correct? Please suggest.
Truly, you should read the note...however some hints :
- GM_CODE is translated to a TCODE transaction code via table T158G
1 MB01 Post Goods Receipt for PO
2 MB31 Goods Receipt for Production Order
3 MB1A Goods Withdrawal
4 MB1B Transfer Posting
5 MB1C Other Goods Receipts
6 MB11 Goods Movement
7 MB04 Subsequ.Adj.of "Mat.Provided"Consmp.
- Allowed movement code by transaction codes are in table T158B
653 VL01 Create Delivery
653 VL01N Create Outbound Dlv. with Order Ref.
653 VL01NO Create Outbound Dlv. w/o Order Ref.
653 VL02 Change Outbound Delivery
653 VL02N Change Outbound Delivery
653 VL03N Display Outbound Delivery
653 VL08 Confirmation of Picking Request
So i fear that this BAPI cannot be used here, perform some search on [BAPI_OUTB_DELIVERY_CREATE_SLS|http://www.sdn.sap.com/irj/scn/advancedsearch?query=bapi_outb_delivery_create_sls]
Regards,
Raymond
Similar Messages
-
BAPI_GOODSMVT_CREATE for movement 971 (TCode MB1B)
Dear all,
I try to use the BAPI_GOODSMVT_CREATE to create a good movement 971 but nothing seems to be created..
Below the parameters used :
Header
wa_goodsmvt_header-doc_date = sy-datum.
wa_goodsmvt_header-pstng_date = sy-datum.
wa_goodsmvt_header-pr_uname = sy-uname.
Code Movement
wa_goodsmvt_code-gm_code = '04'.
Items
wa_goodsmvt_item-material = . "Material
wa_goodsmvt_item-plant = . "Plant
wa_goodsmvt_item-stge_loc = . "Sotrage Location
wa_goodsmvt_item-entry_qnt = . "Quantity
wa_goodsmvt_item-entry_uom = . "Unity
wa_goodsmvt_item-move_type = '971'. "Code movement
wa_goodsmvt_item-move_stloc = . "Receiving Storage Location
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = wa_goodsmvt_header
goodsmvt_code = wa_goodsmvt_code
TABLES
goodsmvt_item = t_goodsmvt_item
return = t_return.
When I use the transaction M1B1 with this parameters, the document is created. Do you know if something missing?
Thank you very much in advance.
Best regards,
RobinFirst read my answers at Re: "BAPI_GOODSMVT_CREATE" for delivery
- Look in table T158B for transaction(s) allowed to movement '971' (is this a customer specific movement type, transaction OMJJ)
- Look in table T158G to find gm_code (MB1B is '04')
I hope you don't forget the COMMIT_WORK/BAPI_TRANSACTION_COMMIT and that you looked in table RETURN for error messages.
Regards,
Raymond -
BAPI_GOODSMVT_CREATE for Outbound delivery
Hi Gurus,
I am using BAPI_GOODSMVT_CREATE for creation of GRN against a Outbound delivery
I am able to create the same using MIGO,but not with the help of this bapi
i have passed GM_CODE as 01 and MVT_IND as L
and all relevant datas but it throws an error
E M7 226 Update control of movement type is incorrect (entry 101 X X _ L)
What shall i do??
Can any one help me?Hi,
Leave MVT_IND as blank.
And be sure to provide delivery number and item and other shipping details.
Leave rest part as it is.
Regards,
Sunny -
BAPI_GOODSMVT_CREATE for mov.type 101 for Delivery
Hi expert,ù
I have to use the BAPI_GOODSMVT_CREATE to create a 101 referring to a delivery but I can't find wich parameters I have to set.
If I refre to a purch.order it works correclyt, but the same settings are not applicable for delivery.
Any documentations or example?
ThanksHi,
Check if this is useful.
*-Step 1: Create Inbound delivery from outbound delivery
Input the delivery number, date & creator name
to impkf structure
*-- Do MIGO using Outbound delivery
wa_imkpf-bldat = goodsrecdate.
wa_imkpf-budat = goodsrecdate.
wa_imkpf-xblnr = deliverynumber.
wa_imkpf-usnam = sy-uname.
CLEAR ws_i_cnt.
*-- Pass all the necessary details to I_MSEG - item details
CLEAR wa_wueb. REFRESH i_mseg.
LOOP AT i_wueb INTO wa_wueb.
CLEAR wa_lips. CLEAR wa_mseg.
READ TABLE i_lips INTO wa_lips WITH KEY vbeln = wa_wueb-vbeln
posnr = wa_wueb-vbelp BINARY SEARCH.
IF sy-subrc = 0 AND wa_lips-lgnum NE space. " only for WH managed
ws_i_cnt = ws_i_cnt + 1.
wa_mseg-line_id = ws_i_cnt. " Line Number
wa_mseg-global_counter = ws_i_cnt. " Line Number
wa_mseg-bwart = '101'. " Movement Type
wa_mseg-matnr = wa_wueb-matnr. " Material Number
wa_mseg-werks = wa_wueb-werks. " Plant
wa_mseg-lgort = wa_wueb-lgort. " Storage Loc
wa_mseg-charg = wa_wueb-charg. " Batch
wa_mseg-kzbew = c_b. " Movement Indicator ( B indicates
Goods movement for purchase order)
wa_mseg-erfmg = wa_wueb-erfmg. " Quantity
wa_mseg-erfme = wa_wueb-erfme. " UoM
wa_mseg-bprme = wa_wueb-erfme. " UoM
wa_mseg-menge = wa_wueb-erfmg. " Qty
wa_mseg-meins = wa_wueb-erfme. " UoM
wa_mseg-ebeln = wa_wueb-ebeln. " STO Number
wa_mseg-ebelp = wa_wueb-ebelp. " STO Item Number
wa_mseg-migo_elikz = 1. " Delivery completion indicator( 1 - set automatically)
wa_mseg-bstmg = wa_wueb-erfmg. " QTY
wa_mseg-lgnum = wa_lips-lgnum. " WH No
wa_mseg-vbeln = wa_wueb-vbeln. " Delivery Number
wa_mseg-posnr = wa_wueb-vbelp. " Delivery Item number
wa_mseg-lsmng = wa_wueb-erfmg. " QTY
wa_mseg-lsmeh = wa_wueb-erfme. " UoM
wa_mseg-bukrs = wa_wueb-ekorg. " Purchase org
*-- Get Vendor Number from STO
CLEAR wa_ekko.
READ TABLE i_ekko INTO wa_ekko WITH KEY ebeln = wa_wueb-ebeln BINARY SEARCH.
IF sy-subrc = 0.
wa_mseg-lifnr = wa_ekko-lifnr. " Vendor number
ENDIF.
wa_mseg-ean11_bme = wa_wueb-ean11. " EAN11
wa_mseg-insmk = space. " Stock Type ( space - Unrestricted use)
wa_mseg-weanz = 1. " Number of GR/GI Slips to Be Printed
wa_mseg-weanzx = c_x. " Updated information in related user data field
wa_mseg-wempfx = c_x. " Updated information in related user data field
wa_mseg-abladx = c_x. " Updated information in related user data field
APPEND wa_mseg TO i_mseg.
ENDIF.
ENDLOOP.
*-- Do MIGO
CALL FUNCTION 'MB_CREATE_GOODS_MOVEMENT'
EXPORTING
imkpf = wa_imkpf
xallp = c_x
xallb = c_x
xallr = c_x
ctcod = c_migo
xlisu = c_x
IMPORTING
emkpf = i_emkpf
TABLES
emseg = i_emseg
imseg = i_mseg.
IF i_emkpf-subrc = 1. "Inbound delivery creation is success
ws_c_indelvry = i_emkpf-msgv1. -
BAPI_GOODSMVT_CREATE for GRN posting
Hi Experts,
I am using BAPI_GOODSMVT_CREATE for posting GRN against Purchase Order.
I want to post Quantity in Delivery note(LSMNG) and Unit of Measure From Delivery Note(LSMEH) also.
I used itab-QUANTITY = '1'.
itab-BASE_UOM = 'L'.
but it is not getting updated properly.
I am getting document number and GRN has been done against Purchase Order using this BAPI.All other fields are properly getting updated except these 2 fields Qty in delivery note and unit of delivery note. Can i pass these 2 field values using this BAPI or do I need to use any other BAPI. Is there any BAPI for MIGO instead of MB01?
Can any one help me to pass these values through BAPI
Regards,
SamHi,
you can update LSMNG quantity using EXTENSIONIN structures of BAPI_GOODSMVT_CREATE.
The steps are the following:
Add LSMNG field in BAPI_TE_XMSEG structure create an appending structure (char field)
By SE19 transaction create the Enhancement Spot starting from MB_GOODSMOVEMENT
Define the Badi Implementation choosing MB_BAPI_GOODSMVT_CREATE Badi Definition implementing a new customer class.
Remember to choose to copy the class with the source code of methods.
In The method IF_EX_MB_Hi, you can update LSMNG quantity using EXTENSIONIN structures of BAPI_GOODSMVT_CREATE. The steps are the following: Add LSMNG field in BAPI_TE_XMSEG structure create an appending structure (char field) By SE19 transaction create the Enhancement Spot starting from MB_GOODSMOVEMENT Define the Badi Implementation choosing MB_BAPI_GOODSMVT_CREATE Badi Definition implementing a new customer class.
Remember to choose to copy the class with the source code of methods.
In the method IF_EX_MB_BAPI_GOODSMVT_CREATE~EXTENSIONIN_TO_MATDOC you will find the following source code:
DATA: c_lenstruc TYPE i VALUE 30,
wa_bapi_mb_header TYPE bapi_te_xmkpf,
wa_bapi_mb_item TYPE bapi_te_xmseg,
wa_extension_in TYPE bapiparex.
FIELD-SYMBOLS: TYPE imseg.
CHECK NOT extension_in[] IS INITIAL.
* Analyze IMSEG for document structure and assign LINE_IDs if necessary
CALL METHOD cl_mmim_line_id_manager=>analyze_mb_create
CHANGING ct_imseg = ct_imseg[]
EXCEPTIONS duplicate_line_id = 1
OTHERS = 2.
LOOP AT extension_in INTO wa_extension_in.
CASE wa_extension_in-structure.
* extension of MKPF
WHEN 'BAPI_TE_XMKPF'.
MOVE wa_extension_in+c_lenstruc TO wa_bapi_mb_header.
MOVE-CORRESPONDING wa_bapi_mb_header TO cs_imkpf.
* extension of MSEG
WHEN 'BAPI_TE_XMSEG'.
MOVE wa_extension_in+c_lenstruc TO wa_bapi_mb_item.
READ TABLE ct_imseg WITH KEY line_id = wa_bapi_mb_item-matdoc_itm ASSIGNING <fs_imseg>.
IF sy-subrc EQ 0.
MOVE-CORRESPONDING wa_bapi_mb_item TO <fs_imseg>.
ENDIF.
ENDCASE.
ENDLOOP.
Then you have to call BAPI_GOODSMVT_CREATE using extensionin in the following way:
* Fill goodsmvt_header structures
goodsmvt_header-........
* Fill goodsmvt_item-position
Loop at it_position.
goodsmvt_item-..........
wf_line_id = wf_line_id + 1.
goodsmvt_item-line_id = wf_line_id.
APPEND goodsmvt_item.
CLEAR extensionin.
MOVE 'BAPI_TE_XMSEG' TO extensionin-structure.
MOVE wf_line_id+2(4) TO extensionin-valuepart1+14(4).
MOVE LSMNG TO extensionin-valuepart1+18(16).
APPEND extensionin.
endloop.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = goodsmvt_header
goodsmvt_code = goodsmvt_code
* TESTRUN = ' '
goodsmvt_ref_ewm = goodsmvt_ref_ewm
IMPORTING
* GOODSMVT_HEADRET =
materialdocument = materialdocument
matdocumentyear = matdocumentyear
TABLES
goodsmvt_item = goodsmvt_item
* GOODSMVT_SERIALNUMBER =
return = return
extensionin = extensionin.
Hope it helps
Lorenzo -
BAPI BAPI_GOODSMVT_CREATE for Transaction MB01
Hi All,
I am using BAPI BAPI_GOODSMVT_CREATE for transaction MB01.
I have one problem while passing the value in BAPI.
Goods receipts for Schedule Agreements are not allow for delivery schedule lines with delivery date in the future.
Manual turn around for transaction MB01 is to check field "Suggest Zero Lines" from main selection screen:
I am not able to get the field name in BAPI for filling the value for check field "Suggest Zero Lines".
Kindly help me to find out the field name.
Thanks in advance.
Piyush Mathurdata flag(1) value 'X'.
set parameter ID 'NUL' field flag.
u can set the parameter 'Suggest zero lines' as 'X' by default and then call ur bapi..see if tht field is X now or not?
otherwise it can be possible tht u r not using the correct BAPI
amit -
BAPI_GOODSMVT_CREATE for MB01
Hi,
i´m using
BAPI_GOODSMVT_CREATE for MB01.
The message i´m getting is as follows:
message type = 'E'
message ID = 'LB'
message num. = '031'
message text = 'of the required quantity of material
013F1RE1101PB000, 3,000 HOJ remain(s) open'.
What does this message mean?.Best regardsTry setting the 'Delivery completed indicator', if that is applicable in this situation. I think the system thinks that there is some residual amount left to be received and may be your config requires it to be received in total before issuing it.
Did you check if the unit of issue(in sales view, sales unit) and the unit of receipt(in purchasing view) are the same for this material?
Also, some of these messages are configurable, in the sense that a configuration person can set this message to be a warning or information message, instead of an error message. System will issue the message accordingly, instead of the error message that you are getting now.
Regards,
Srinivas -
Proforma invoice is created for delivery without PGI in STO(Depot sales)
Dear Gurus,
I am facing a strange issue, user created Purchase order with some material X of 4 quantity, and he created the replenishment delivery for 1 quantity and without doing any Picking and PGI but system allowed to create proforma invoice with 4 quantity I checked the copy control config settings for Delivery and Proforma invoice all are maintained fine (viz., billing qty as D, copying req:311 and Data VBRK\VBRP:001)( Ichecked the change log for delivery but I didnt observed any chanes in delivery) .. strange to watch ........created the same scenario in quality but system doesnt allowed to create proforma invoice without PGI and picking(Just one month before quality is refreshed with Production).
If anyone faced the same problem let me konw the solution ate the earliest.
Best Regards,
Kishore.SGRHi
As already said, as per the standard the Performa Invoice do not check the Goods Issue status of a Delivery since it uses the Copying Requirement 009 in transaction VTFL.
If you want your performa invoice to be created only after the PGI of a delivery, then use the Requirement 003 in Copying Requirement field for the combination of your Delivery Doc. and Billing doc. in transaction VTFL at Header level.
Regards
Amitesh Anand -
Hi,
1.
I need to have a report for the paid delivey costs(planned and unplanned) for the given pos.
2.
Is there any std transaction which can give the list of fast moving items based on movement types?
Please help me, it is very urgent.
Your help is appreciated.
Regards,
Subbu.Hi,
For Delivery Cost look in Table EKBZ ,EKBZH.For Fast moving item use the T Code MCBE (also MCBA,MCBC)in which you can find the fields like number of valuated stock receipts and issue and also number of movements .Selecting a given period range if the number of movemnets is sorted in descending order the maximum moved material can be found.
Dhruba
Message was edited by:
Dhruba Charan Behera -
Sales order need to be blocked for delivery while creation
Hi experts,
My requirement is to block sales orders for delivery, for the selected distribution channels, and for selected countries while creation itself, so for this I came to known that a program MV45AFZZ include, here in this at which form can I write code to block SO for delivery. and is it enough to put a reason in the field LIFSK in VBAK table to block SO for delivery.
Thanks in advance
Regards
SriNivas........Hi,
You can use form routine USEREXIT_SAVE_DOCUMENT_PREAPRE of user exit MV45AFZZ to update the delivery block.
MOVE '10' to vbak-lifsk. "13 is the reason for block in header"
MOVE '10' to xvbak-lifsk. "13 is the reason for block in header"
Use following code to update delivery block at item level
MOVE '10' to vbep-lifsp. "13 is the reason for block in item schedule line"
MOVE '10' to xvbep-lifsp. "13 is the reason for block in item schedule line"
Regards
Vinod -
Want to know the sale order report for Delivery bclok at header level
Dear,
i would like to know some reports
1). I would like to know is ther any SAP std report is available for Sale order if Blocked for delivery(VBAK-LIFSK)??
2). is ther any report for knowing the Sale order if header/item text is maintained??
Pl advice if any std report is available.
Thanks in advanceDear Pradyumna,
Thanks for your reply, I did't find any Header r item text in the report.
Pl suggest is there any other report is availble???
Thanks in adv. -
Hi,
My requirement is -
whenever I save any sale order,by default it should be block for delivery.
how to make the setting in system.
HarshHi
Put Delivery Block at Sales Order type in t code VOV8.
regards
kedasu.a -
Can't change quantity when copy from Sale order for Delivery
Hi all!
Can i use authorization for can't change quantity when copy from Sale order for Delivery.Tien,
Approval will not work when you have mutiple rows of data. You would have to work with SP Transaction Notification
There has been threads before on the forum on the same topics.
Block the Quantity in Sales Delivery
Approval Procedure for chaning quantity in Delivery Document
Suda -
Open Order scheduled for delivery
Hi there ,
Please suggest me the report to spool the Open Order scheduled for delivery for a material ....
Regards
KaushikHi
Check the delivery due list, its shows open orders due for delivery for a particular date
and the list can be printed or sent to spool
Anurag -
Bursting Control file, Error!! Could not deliver the output for Delivery
Hi,
I am using bursting control file to send report output to email in R12.1.3.
If the report output is having data, it is working fine. if there is no data it is getting errored out with the below message.
"Error!! Could not deliver the output for Delivery channel:null "
In the report output i put "No data found", when i click on view output the output in application is showing as "NO DATA FOUND" in PDF .
"Bursting VMC Approved Purchase Orders for a period (XML Publisher Report Bursting Program)" got above error.
my requirement is if there is no data, still i require the output to email.
Thanks in Advance
Adina.Hi,
I am facing the same situation and want the bursting program to finish in normal even when there is no data.
Can you please let me know how you resolved this?
Thanks
RG
Maybe you are looking for
-
My iPod Touch stops syncing halfway through
I just got a new computer and I transfered all of my files onto it. I plugged my ipod in and updated it but instead syncing after it was done it deleted all the content off of my ipod. I restarted my computer and then tried to sync it again but now t
-
HP Officejet Pro 8600 e-All-in-One Printer - N911a printer assistant
Hi! So, I replaced an HP Officejet Pro 8600 e-All-in-One Plus with an HP Officejet Pro 8600 e-All-in-One Printer - N911. Subsequently the HP Printer Assistant desktop shortcut disappeared from my computer -- and apparently from the computer entirel
-
Windows 2008 R2 state backup fails with various errors
Since a few years we are using DPM to backup our servers but since some time the system state of the server where DPM is installed started to fail. I was trying to do system state backup using command line windows backup: wbadmin start systemstatebac
-
Transferring Music from Macbook pro to iphone
So I just bought my new macbook pro and I have already transferred all my music from my iphone onto the computer itself. However, throughout the day I have been dowloading music from the internet using a youtube converter site. They dowloaded onto th
-
I have a new PowerBook Pro with Windows & Parallels. Somehow, I have reduced the size of my Mac screen. There are black strips on either side of the blue desktop. How do I get it back to full size? Thanks. Lynn