Lsmng in BAPI_GOODSMVT_CREATE
Hi all,
Where to fill field lsmng in migo while updating
using the bapi BAPI_GOODSMVT_CREATE with movement type 105
I have searched the forum, found similar questions but no correct answers for that questions
Thanks,
R K.
We dont have a option to add this field to BAPI. Do it through by using Enhancement.
Kanagaraja L
Similar Messages
-
Update field LSMNG in MIGO transaction using bapi bapi_goodsmvt_create
Hi ,
I am using bapi bapi_goodsmvt_create for creating goods receipt against purchase order in which I have to update field LSMNG i.e. Del. Note Qty. But this field is not there in BAPI input parameters/table fields.
How i can update this field using the same bapi
Thanks and regards
Deepak SharmaHi,
Can I update this field using BAPI bapi_goodsmvt_create.
thanks
Deepak -
Addiing 'lsmng' field in bapi_goodsmvt_create
Hi Buddies,
i want to update lsmng field through bapi_goodsmvt_create, but colud not find that field in bapi, please tell me how add this field in bapi. my sap versin is 4.7
Response is awiated.see my post reply
http://scn.sap.com/message/13649968 -
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 -
Some fields in BAPI_GOODSMVT_CREATE
Hi Abapers,
I am usiing BAPI_GOODSMVT_CREATE for the MIGO transaction for creating material document.
With movement type '101' and MVT_IND = 'B'.
In this am not able to find out some fields like ' 1. Activate Print (XNAPR) , 2.Quantity in delivery note (LSMNG) , 3. unit of measure (LSMEH).
Please let me know how to get these field.
Thanks & Regards,
Simha Shi shakya
check this thread.
Re: About BAPI_GOODSMVT_CREATE
Set parameter is used to set the values of screenfields like checkboxes,
when u set it as X means u r ticking a checkbox
Anyways i dont think this has anything to do with ur requirement. I guess so!!
кu03B1ятu03B9к
Edited by: kartik tarla on Jan 22, 2009 9:31 AM
Edited by: kartik tarla on Jan 22, 2009 9:34 AM -
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. -
BADI OR USER EXIT AT THE TIME OF SAVING THE TCODE MIGO TO UPDAT FIELD LSMNG
Hello Guru,
I am using BAPI BAPI_GOODSMVT_CREATE for GRN creation it is working fine. But i want to update DELIVERY NOTE QUANTITY (LSMNG) at the time of GRN Creation . This field is not provided in the BAPI .
What i had done i had applied BADI MB_MIGO_BADI to update this field but this badi does not call at the time of saving ( THIS BADI ONLY CALL WHEN WE ARE USING MIGO TCODE AND ON THE SCREEN WE ARE PRESSING ENTER) . so i am not able to update the field (LSMNG).
So i need a badi of user exit which can updates this field at the time of saving.
there are exit which are updating other fields at the time of saving but not this one .
Why i need the badi or userexit which will update the field at the time of saving because when we are using bapi only those badi or user exit are called which are
used at the time of Saving.
Kindly suggest any solution.
Thankyou
With Regards
Shantanu ModiHi
<b>Here is the sample code...</b>
method if_ex_mb_migo_badi~post_document .
data: ls_migo_badi_example type migo_badi_exampl,
lt_migo_badi_example type table of migo_badi_exampl,
ls_extdata type migo_badi_example_screen_field,
ls_xmseg type mseg.
field-symbols: <gt_extdata> type migo_badi_example_screen_field.
* Transaction MIGO will now post a material document.
* Any errors here MUST be issued as A-message (better: X-message)
* Copy data from material document into internal table
loop at gt_extdata into ls_extdata.
if g_cancel is initial.
read table it_mseg into ls_xmseg
with key line_id = ls_extdata-line_id.
else.
read table it_mseg into ls_xmseg
with key smbln = ls_extdata-mblnr
smblp = ls_extdata-zeile
sjahr = ls_extdata-mjahr.
endif.
if sy-subrc is initial.
move-corresponding ls_extdata to ls_migo_badi_example.
move-corresponding ls_xmseg to ls_migo_badi_example.
append ls_migo_badi_example to lt_migo_badi_example.
endif.
endloop.
* The data from external detail screen can be saved now:
check gt_extdata is not initial.
call function 'MIGO_BADI_EXAMPLE_UPATE_DATA' in update task
tables
it_migo_badi_example = lt_migo_badi_example.
* The data from external header screen can be saved now:
move-corresponding is_mkpf to gs_exdata_header.
call function 'MIGO_BADI_EXAMPLE_UPDATE_HEAD' in update task
exporting
is_migo_badi_header_fields = gs_exdata_header.
endmethod. "IF_EX_MB_MIGO_BADI~POST_DOCUMENT
Hope this will help.
Please reward suitable points.
Regards
- Atul -
Error while posting a document using the BAPI_GOODSMVT_CREATE
Hi,
i was trying to post the Goods Receipt document ( Tcode MB1C) using the bapi BAPI_GOODSMVT_CREATE
i am passing the item details and Serial number details.
the error triggered was Maintain Serial Numbers for Total Quantity
but i am passing the quantity as 1 ( in item data) and passing one serial number.
is this error because of data problem or am i missing to pass the value to some dependent parameter..?
Please help me out.
Thanks in advance.
SriramHi David,
i was tring to pass the same.
in item table we have we have four item details ( below)
RES_ITEM - Item Number of Reservation/Dependent Requirement
ORDER_ITNO - Order Item Number
S_ORD_ITEM - Item Number in Sales Order ( length mismatch with serial item number)
PO_ITEM - Item Number of Purchasing Document ( length mismatch with serial item number)
out 4 , 2 are ruled out because of length mismatch. and in the reaming two are
RES_ITEM - Item Number of Reservation/Dependent Requirement
ORDER_ITNO - Order Item Number
this is a Goods receipt document, please let me know which field is required to map with item number in the above two.
Regards,
Sriram. -
BAPI_GOODSMVT_CREATE - Error while posting a Material Document
Hi Experts,
We are trying to do the material document posting using the transaction "MB1C" manually in SAP. The movement type which we are using for the same is "261". While doing this is, it is asking for a work order number and the Recipient number. We gave the Recipient Number as "123". Material document is created successfully.
Again using the same transaction "MB1C" , we are trying to do the reversal of the material document which we posted previously against another work order number for the same material and the serial number if the material is serialised and as well as for the non serialised material.
Both this case, in SAP the material document is created succesfully. This is done manually in SAP.
When we are trying to create the material document using the BAPI 'BAPI_GOODSMVT_CREATE', for the above scenario, posting the material document '261' movement type for one work order and the reversal for another work order '262' movement type for the same material (whether it is a serialised or non serialised) we are getting the eror as "RE Qty. transferred exceeded 1 PC: 50,003,695 C001 USED 1200".
We are passing the following at the item level. MATERIAL Number, Plant, STGE_LOC, ENTRY_QNT, MOVE_TYPE, BATCH, ORDERID, RESERV_NO, RES_ITEM, ACTIVITY, XSTOB for reversal.
We are passing the GM_CODE as '05'.
Please let us know what needs to be changed inorder to create the material document properly without getting errors.
Thanks in Advance,
Mohan.Hi,
We fixed this issue by removing the reservation number of the material when we are trying to post the material document with the movement type "262".
The reason for removing the reservation number for the movement type "262"
The reservation number is getting created against a work order when we trying to create the work order in IW32. This reservation number is used for validating the stock while we are trying to consume and doing the reversal.
SAP is allowing us to reverse the consumed quantities only based on the reservartion number and hence we got this error.
To fix this error, if we are trying to reverse a particular material against a different work order for which it has been consumed previiously, remove the reservation number and item number and try posting the material document.
Hope this solution will solve your issue:)
Thanks and Regards,
Mohan. -
Hi Friends,
I need to create a goods receipt for an inbound delivery.
Iam planning to use either MB_CREATE_GOODS_MOVEMENT or BAPI_GOODSMVT_CREATE.
But every time iam getting the error saying that the 101 movement type cant be used.
In my case i need to use both the movement types 101 and 543.
Basically i need to populate both the main item and component material information.
If any one has done this, Can you please give me the sample code.
Regards
SasiHi,
Iam usig the gm_code as 05.
I am paasing the movement indicator ,in that particular field.
lw_goodsmvt_item-material = lw_imseg-matnr.
lw_goodsmvt_item-plant = lw_imseg-werks.
lw_goodsmvt_item-batch = lw_imseg-charg.
IF lw_imseg-sgtxt = 'F'.
lw_goodsmvt_item-move_type = '101'.
lw_goodsmvt_item-mvt_ind = 'B'.
lw_goodsmvt_item-NO_MORE_GR = 1.
lw_goodsmvt_item-stge_loc = lw_imseg-lgort.
ELSEIF lw_imseg-sgtxt = 'C'.
lw_goodsmvt_item-move_type = '543'.
endif.
lw_goodsmvt_item-entry_qnt = lw_imseg-erfmg.
lw_goodsmvt_item-entry_uom = lw_imseg-erfme.
lw_goodsmvt_item-expirydate = lw_imseg-mhdat.
lw_goodsmvt_item-DELIV_NUMB =
lw_goodsmvt_item-DELIV_ITEM =
am i doing something wrong here.
iam gettign the following error message
Goods movement not possible with mvmt type 101
Goods movement not possible with mvmt type 543 -
Error in Bapi_GoodsMvt_Create using Purchase order
Hi Friends,
I am using Bapi_goodsmvt_create for Goods Receipts against Purchase order.
The below code i have given for Goods receipts
It shows the error like
ID : 8J
Err No.:182
Message : Entry 4500000344 00040 0000 not valid; correct entry
Please help me to correct this error.
Thanks
Shankar
===================================
Heading Structure
st_gm_code-gm_code = '01'.
st_gm_header-pstng_date = '20070930'.
st_gm_header-doc_date = '20070930'.
st_gm_header-gr_gi_slip_no = '970015'.
st_gm_header-bill_of_lading = '527213'.
st_gm_header-header_txt = 'AIR'.
st_gm_header-ref_doc_no = '4500000344'.
Tables - ITEM CREATE.
itab_afs_gm_itemx-plant = '2000'.
itab_afs_gm_itemx-deliv_numb = '80100121'.
itab_afs_gm_itemx-stge_loc = '2110'.
itab_afs_gm_itemx-move_stloc = '2110'.
itab_afs_gm_itemx-po_number = '4500000344'.
itab_afs_gm_itemx-po_item = '00040'.
itab_afs_gm_itemx-vendor = '0000650003'.
itab_afs_gm_itemx-vendrbatch = 'ABC123'.
itab_afs_gm_itemx-move_type = '101'.
itab_afs_gm_itemx-mvt_ind = 'B'.
itab_afs_gm_itemx-material = '000000000030000227'.
itab_afs_gm_itemx-entry_qnt = 10.
APPEND itab_afs_gm_itemx .
****&& Grid values
gr_afs-matdoc_itm = '0001'.
gr_afs-grid_value = '205'.
gr_afs-withdrawn_sku = 'X'. "Final issue at sku level
gr_afs-stock_cat = '0000000001000366'.
APPEND gr_afs.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = st_gm_header
goodsmvt_code = st_gm_code
TESTRUN = ' '
IMPORTING
goodsmvt_headret = st_gm_headret
materialdocument = mat_doc
matdocumentyear = doc_year
TABLES
goodsmvt_item = itab_afs_gm_itemx
afs_goodsmvt_sku = gr_afs
return = bapi_return.
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
CLEAR itab_afs_gm_itemx.
REFRESH itab_afs_gm_itemx.
CLEAR gr_afs.
REFRESH gr_afs.Hi,
Here is some sample code from one of my programs, which does a 551 movement type. This should get you started. Just check the RETURN table for messages, they should tell you what you are missing.
code
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.
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 = '06'. " MB11
Write 551 movement to table
clear gm_item.
move '551' to gm_item-move_type .
move '000000000040001234' to gm_item-material.
move '1' to gm_item-entry_qnt.
move 'EA' to gm_item-entry_uom.
move '0004' to gm_item-plant.
move '4000' to gm_item-stge_loc.
move '201' to gm_item-move_reas.
Determine cost center per plant
case xresb-werks.
when '0004'.
move '0000041430' to gm_item-costcenter.
when '0006'.
move '0000041630' to gm_item-costcenter.
when '0007'.
move '0000041731' to gm_item-costcenter.
when '0008'.
move '0000041830' to gm_item-costcenter.
endcase.
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.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
[/code]
Welcome to SDN! Please remember to award points for helpful answers and mark you post as solved when solved completely. Thanks.
REgards,
Raj. -
Error in updating 311 movement using BAPI_GOODSMVT_CREATE
Hi All,
I need hlep to understand the problem in doing a transfer.
SAP MII is doing a 311 type movement using BAPI_GOODSMVT_CREATE. BAPI is returning the response back to MII. Once the BAPI is commited it shall make transfer inside SAP. But it does not reflect the movement while checking under HUMO.
under SM13 it say " SSFCOMPOSER 323" error in address output (name not filled)
MII is getting this reponse back as a result of BAPI execution.
<?xml version="1.0" encoding="UTF-8"?>
<BAPI_GOODSMVT_CREATE>
<INPUT><GOODSMVT_CODE><GM_CODE>04</GM_CODE></GOODSMVT_CODE><GOODSMVT_HEADER><PSTNG_DATE>2010-07-03</PSTNG_DATE><DOC_DATE>2010-07-03</DOC_DATE><REF_DOC_NO/><BILL_OF_LADING/><GR_GI_SLIP_NO/><PR_UNAME/><HEADER_TXT/><VER_GR_GI_SLIP/><VER_GR_GI_SLIPX/><EXT_WMS/><REF_DOC_NO_LONG/><BILL_OF_LADING_LONG/><BAR_CODE/></GOODSMVT_HEADER><GOODSMVT_REF_EWM><REF_DOC_EWM/><LOGSYS/><GTS_SCRAP_NO/></GOODSMVT_REF_EWM><TESTRUN/></INPUT>
<OUTPUT><GOODSMVT_HEADRET><MAT_DOC/><DOC_YEAR>0000</DOC_YEAR></GOODSMVT_HEADRET><MATDOCUMENTYEAR>0000</MATDOCUMENTYEAR><MATERIALDOCUMENT/></OUTPUT>
<TABLES><EXTENSIONIN/><GOODSMVT_ITEM><item><MATERIAL>130116</MATERIAL><PLANT>2715</PLANT><STGE_LOC>LINE</STGE_LOC><BATCH>96</BATCH><MOVE_TYPE>311</MOVE_TYPE><STCK_TYPE/><SPEC_STOCK/><VENDOR/><CUSTOMER/><SALES_ORD/><S_ORD_ITEM>000000</S_ORD_ITEM><SCHED_LINE>0000</SCHED_LINE><VAL_TYPE/><ENTRY_QNT>96.000</ENTRY_QNT><ENTRY_UOM/><ENTRY_UOM_ISO/><PO_PR_QNT>0</PO_PR_QNT><ORDERPR_UN/><ORDERPR_UN_ISO/><PO_NUMBER/><PO_ITEM>00000</PO_ITEM><SHIPPING/><COMP_SHIP/><NO_MORE_GR/><ITEM_TEXT/><GR_RCPT/><UNLOAD_PT/><COSTCENTER/><ORDERID/><ORDER_ITNO>0000</ORDER_ITNO><CALC_MOTIVE/><ASSET_NO/><SUB_NUMBER/><RESERV_NO>0000000000</RESERV_NO><RES_ITEM>0000</RES_ITEM><RES_TYPE/><WITHDRAWN/><MOVE_MAT/><MOVE_PLANT>2715</MOVE_PLANT><MOVE_STLOC>J01</MOVE_STLOC><MOVE_BATCH>96</MOVE_BATCH><MOVE_VAL_TYPE/><MVT_IND/><MOVE_REAS>0000</MOVE_REAS><RL_EST_KEY/><REF_DATE>0000-00-00</REF_DATE><COST_OBJ/><PROFIT_SEGM_NO>0000000000</PROFIT_SEGM_NO><PROFIT_CTR/><WBS_ELEM/><NETWORK/><ACTIVITY/><PART_ACCT/><AMOUNT_LC>0</AMOUNT_LC><AMOUNT_SV>0</AMOUNT_SV><REF_DOC_YR>0000</REF_DOC_YR><REF_DOC/><REF_DOC_IT>0000</REF_DOC_IT><EXPIRYDATE>0000-00-00</EXPIRYDATE><PROD_DATE>0000-00-00</PROD_DATE><FUND/><FUNDS_CTR/><CMMT_ITEM/><VAL_SALES_ORD/><VAL_S_ORD_ITEM>000000</VAL_S_ORD_ITEM><VAL_WBS_ELEM/><GL_ACCOUNT/><IND_PROPOSE_QUANX/><XSTOB/><EAN_UPC/><DELIV_NUMB_TO_SEARCH/><DELIV_ITEM_TO_SEARCH>000000</DELIV_ITEM_TO_SEARCH><SERIALNO_AUTO_NUMBERASSIGNMENT/><VENDRBATCH/><STGE_TYPE/><STGE_BIN/><SU_PL_STCK_1>0</SU_PL_STCK_1><ST_UN_QTYY_1>0</ST_UN_QTYY_1><ST_UN_QTYY_1_ISO/><UNITTYPE_1/><SU_PL_STCK_2>0</SU_PL_STCK_2><ST_UN_QTYY_2>0</ST_UN_QTYY_2><ST_UN_QTYY_2_ISO/><UNITTYPE_2/><STGE_TYPE_PC/><STGE_BIN_PC/><NO_PST_CHGNT/><GR_NUMBER/><STGE_TYPE_ST/><STGE_BIN_ST/><MATDOC_TR_CANCEL/><MATITEM_TR_CANCEL>0000</MATITEM_TR_CANCEL><MATYEAR_TR_CANCEL>0000</MATYEAR_TR_CANCEL><NO_TRANSFER_REQ/><CO_BUSPROC/><ACTTYPE/><SUPPL_VEND/><MATERIAL_EXTERNAL/><MATERIAL_GUID/><MATERIAL_VERSION/><MOVE_MAT_EXTERNAL/><MOVE_MAT_GUID/><MOVE_MAT_VERSION/><FUNC_AREA/><TR_PART_BA/><PAR_COMPCO/><DELIV_NUMB/><DELIV_ITEM>000000</DELIV_ITEM><NB_SLIPS>000</NB_SLIPS><NB_SLIPSX/><GR_RCPTX/><UNLOAD_PTX/><SPEC_MVMT/><GRANT_NBR/><CMMT_ITEM_LONG/><FUNC_AREA_LONG/><LINE_ID>000000</LINE_ID><PARENT_ID>000000</PARENT_ID><LINE_DEPTH>00</LINE_DEPTH><QUANTITY>0</QUANTITY><BASE_UOM/><LONGNUM/></item></GOODSMVT_ITEM><GOODSMVT_SERIALNUMBER/><GOODSMVT_SERV_PART_DATA><item><LINE_ID>000000</LINE_ID><RET_AUTH_NUMBER/><DELIV_NUMBER/><DELIV_ITEM>000000</DELIV_ITEM><HU_NUMBER>115934300024</HU_NUMBER><INSPOUT_GUID/><EVENT/><DATE>0000-00-00</DATE><TIME>00:00:00</TIME><ZONLO/><TIMESTAMP>0</TIMESTAMP><SCRAP_INDICATOR/><KEEP_QUANTITY>0</KEEP_QUANTITY><GTS_STOCK_TYPE/><MOVE_GTS_STOCK_TYPE/></item></GOODSMVT_SERV_PART_DATA><RETURN><item><TYPE>S</TYPE><ID>L9</ID><NUMBER>514</NUMBER><MESSAGE>Delivery 80817129 created</MESSAGE><LOG_NO/><LOG_MSG_NO>000000</LOG_MSG_NO><MESSAGE_V1>80817129</MESSAGE_V1><MESSAGE_V2/><MESSAGE_V3/><MESSAGE_V4/><PARAMETER>GOODSMVT_HEADER</PARAMETER><ROW>0</ROW><FIELD/><SYSTEM>SP1330</SYSTEM></item></RETURN></TABLES>
</BAPI_GOODSMVT_CREATE>PL Stock in transit exceeded by 200 UNT : 10000000125 3065 0005"
the code does not matter, it is the process and the stock situation that does not allow the creation of the movement.
you cannot receive e.g. 200 from in-transit stock if you only have nothing in transit.
First the goods issue has to be performed in the shipping plant. -
Goods Receipt Report With 101 movement type using bapi_goodsmvt_create
Dear Abapers,
i am getting some problem, i got requirement like Goods Receipt Report with 101 movement type using
bapi_goodsmvt_create and data should upload through excel sheet.
still facing problems, i have searched sdn forum n sdn code also, but relevant answer i could not find.
What are all the inputs i need to take and please give some valuable inputs to me.
please do help ..... thanks for advance..
Thanks & regards,
Vinay.
Moderator message : Spec dumping is not allowed, show the work you have already done. Thead locked.
Edited by: Vinod Kumar on Sep 27, 2011 10:58 AMDear Abapers,
i am getting some problem, i got requirement like Goods Receipt Report with 101 movement type using
bapi_goodsmvt_create and data should upload through excel sheet.
still facing problems, i have searched sdn forum n sdn code also, but relevant answer i could not find.
What are all the inputs i need to take and please give some valuable inputs to me.
please do help ..... thanks for advance..
Thanks & regards,
Vinay.
Moderator message : Spec dumping is not allowed, show the work you have already done. Thead locked.
Edited by: Vinod Kumar on Sep 27, 2011 10:58 AM -
How to post Excise Invoice in GR using BAPI BAPI_GOODSMVT_CREATE ?
Hi,
I want to post Goods Receipt job (MB01) through BAPI 'BAPI_GOODSMVT_CREATE'.
But is there any parameter to post 'Excise Information' through (this/any) BAPI ?
Pls...... answer me soon.
thanks by advance.SEE THE FOLLOWING EXAMPLE
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. -
Short dump while using FM "BAPI_GOODSMVT_CREATE" in background
Hi Sir,
I am using the FM "BAPI_GOODSMVT_CREATE" to create the Goods movement. While running the program through a job in background, article docu is generated successfully,,but at the same time it gives short dump in ST22.
Short text
Exception condition "CNTL_ERROR" raised.
A RAISE statement in the program "CL_GUI_CUSTOM_CONTAINER=======CP" raised the
exception
condition "CNTL_ERROR".
Since the exception was not intercepted by a superior
program, processing was terminated.
Please tell me what can be the possible reason for the same and how to avoid the same?
Warm regards
KrishanThere's at least one note addressing this. You should be able to find it quite easily.
Rob
Maybe you are looking for
-
PREVIEW and QUICKTIME slow to load in SNOW LEOPARD
I've just started having a problem (after years of working perfectly) where files are taking FOREVER (up to 30 seconds anyway) to load in both PREVIEW and QUICKTIME. This occurs both when opening files fully with double-clicking - and when wanting to
-
Is it possible to change the video card of a pavilion g7-1075dx?
So, I have an HP Pavilion g7-1075dx Notebook with Windows 7. I'm an avid gamer and wish to play the newest games. However, there's one problem thats keeping me from doing so. Alot of the newer games require newer video/graphics cards. This particular
-
Weblogic error deplying OIM 9.1.0.2
We encountered the below error while trying to deploy OIM on Weblogic 10.3.0.0. The deployment functiioned properly, many times, until now, when we encountered the following error: <Debug> <J2EE> <BEA-160058> <Cannot find JDBC DataSource at jdbc/xlXA
-
Urgent : How to get current user id
Hello, fnd_global.user_id returns -1 fnd_profile.get('user_id',x_user_id) return null can anyone help how to get current logged in user to apps. Regards, Dinesh.
-
I do not fully understand how to use the "Feature Sets" of "General 1" through 5
I recently upgraded and aparently the printer driver was included in this. When printing through Photoshop Elements 10 a new drop down menu appears for printing with my Epson Stylus Photo 1400. I now have "Printer Features" and when that is selected