About BAPI_GOODSMVT_CREATE
Dear experts,
I have created program upload GR data by call function module BAPI_GOODSMVT_CREATE,and in MIGO screen,there is one checkbox 'Print via output control',I must set it check status.But in BAPI_GOODSMVT_CREATE,I can not find this importing parameter.
Could you give me any idea?
Thanks and regards,
collysun.
Hi
Just before BAPI call put this line in code
SET PARAMETER NDR VALUE 'X'.
It should work .
Cheers
Similar Messages
-
About BAPI_GOODSMVT_CREATE urgentuFF01uFF01uFF01
I am using the BAPI 'BAPI_GOODSMVT_CREATE' to post.
But, there is a small problem. When we post Po's using
MIGO, there is a check box for printing the material
document generated. The defualt setting is 3 -
Collective Slip. When MIGO is used, the user has to
click the checkbox next to this input feild, then
using MB90 we can print the material document.
There is a header field in the above BAPI
VER_GR_GI_SLIP which I set to 3. I was hoping that
this would take care of generating the print preview
for the material document through MB90. But, it
doesn't happen.You need to pass VER_GR_GI_SLIPX along witht he VER_GR_GI_SLIP.
Like
HEADER-VER_GR_GI_SLIP = '3'.
HEADER-VER_GR_GI_SLIPX = 'X'. " << To let the BAPI to that we are changing VER_GR_GI_SLIP
Regards,
Naimesh Patel -
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 -- MB31
Dear Expert,
I've tried to use BAPI_GOODSMVT_CREATE function to handle the mass GR for production order. Pls help the following problem regarding about "BAPI_GOODSMVT_CREATE".
That's what I've used for some parameters, and pls navigate me if I had done a mistake.
gmcode-gm_code = '02'. "02 - MB31 - Goods Receipts for Prod Order
loop at pcitab.
itab-move_type = pcitab-mvt_type.
itab-mvt_ind = 'F'.
itab-plant = pcitab-plant.
itab-orderid = pcitab-prod_doc.
itab-entry_qnt = pcitab-qty.
itab-move_batch = pcitab-batch.
itab-move_stloc = pcitab-stge_loc.
append itab.
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.
With the above parameters, I've got the following message:
Error in function
Order 100000841 not found or not permitted for goods movement
One the other hand, I'd used the same data to simulate MB31 transaction and it was OK and return a material doc. number. Pls tell me what wrong with my code. With many thanks!Hi,
Welcome to SDN.
Please take a look at this links for sample coding of BAPI_GOODSMVT_CREATE.
http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm
http://www.4ap.de/abap/bapi_goodsmvt_create.php
Regards -
BAPI_GOODSMVT_CREATE - Account Assignment Error
Hi,
I have to issue a material from unrestricted project stock to a reservation on a service order(Txn : IW32 ). I'm performing Goods issue with ref to Reservation. For this I'm using the BAPI_GOODSMVT_CREATE
and passing the following parameters.
GOODSMVT_HEADER-PSTNG_DATE 05/07/2007
GOODSMVT_HEADER-DOC_DATE 05/07/2007
GOODSMVT_HEADER-PR_UNAME USERS
GOODSMVT_CODE 03
GOODSMVT_ITEM:
MATERIAL MAT1
PLANT 2000
STGE_LOC 1000
BATCH 0000001490
MOVE_TYPE 221
SPEC_STOCK Q
VAL_TYPE AS_RECVD
ENTRY_QNT 1.000
ENTRY_UOM EA
ENTRY_UOM_ISO EA
RESERV_NO 0000012829
RES_ITEM 0005
GOODSMVT_SERIALNUMBER :
MATDOC_ITM 0001
SERIALNO 12
When I execute this BAPI it returns me this error message:
"Enter only one true account assignment " (Msgid = KI , Msgno = 249 )
I did some analysis of this error and found that BAPI internally is finding two account assignment (1. Service order 2. Project)
When I try to perform this goods issue from txn MB1A it executes perfectly.
I may be missing some interface parameters.
Does anyone have any idea about this?
Thanks,
SteHello Delo Celo,
Please, take a look on fololwing note:
1046794 FAQ: BAPI for outline agreement
3. Question:
You use either BAPI_SAG_CREATE or BAPI_CONTRACT_CREATE to create a scheduling agreement or a contract with some accounting data. Why is the accounting data not always taken into account?
Answer:
Please revise your accounting test data and ensure that a valid value for the serial number is given. Please observe that even for single account assignment the value '01' has to be provided in the field
corresponding to SERIAL_NO in both tables ACCOUNT and ACCOUNTX.
Also, please refer following note:
1339645 BAPI_SAG_CREATE - E06 076
Hope it helps to solve the issue.
Cheers,
Eduardo Junior -
Regarding BAPI_GOODSMVT_CREATE
Hi Experts!
I am using BAPI_GOODSMVT_CREATE to create a material document in migo screen using mb01 transaction.
I am getting one error that is whenever i put the quantity in , for example
if ordered quantity is 20 and i put quantity in unit of entry 21 it does not qive me error that p0 exceeded by 1. and post the data.
but after 24 it gives me an error which it has to given earlier 'po exceeded by 4'.
i am using gm_code = 01
with kzbew = B.
also populating fields like
matnr, po, po item, entry_qnt, movement type = 101
posting date, document date and reference document.
so plz help me out with that.
thanks in advanceHi
Check this and do accordingly
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.
Regards
Anji -
Hi all,
I'm using .Net connector to execute BAPI from my program and I'm able to login but always get the same message when I try to execute the material transfer: <b>Material xxx does not exist or is not activated</b>.
I'm not sure it has anything to do with the permission of my account because this is the first time our SAP admin create a "Communication" type user and we really don't know what kind of permission is good enough for BAPI_GOODSMVT_CREATE. Plus the error message does not show any thing about permission.... And same message returned if I use the dialog user.
If I use transaction MB1B to do the transfer (with the same material) then things are ok.
Any ideas are appreciated,
Eric
Message was edited by:
Eric NguyenThe only thing I can think of is that when calling from .net, you are passing the material number without its internal format. The material number field in R/3 is an 18 character field. If the material number is numeric, the materail number is then padded with zeros on the left. Example, for material 12345, the internal format is 000000000000012345. If the BAPI in question is not fomatting the material internally in the BAPI, then it must be passed this way. CHeck how you are passing, if it is numeric and not zero filled left, then you must write some .net code to do so.
Regards,
Rich Heilman -
'BAPI_GOODSMVT_CREATE' takes more time for creating material document
Hi Experts,
I m using 'BAPI_GOODSMVT_CREATE' in my custom report, it takes more time for creating Material documents.
Please let me know if there is any option to overcome this issue.
Thanks in advance
Regards,
LeoHi,
please check if some of following OSS notes are not valid for your problem:
[Note 838036 - AFS: Performance issues during GR with ref. to PO|https://service.sap.com/sap/support/notes/838036]
[Note 391142 - Performance: Goods receipt for inbound delivery|https://service.sap.com/sap/support/notes/391142]
[Note 1414418 - Goods receipt for customer returns: Various corrections|https://service.sap.com/sap/support/notes/1414418]
The other idea is not to commit each call, but executing commit of packages e.g. after 1000 BAPI calls.
But otherwise, I am afraid you can not do a lot about performance of standard BAPI. Maybe there is some customer enhancement which is taking too long inside the BAPI, but this has to be analysed by you. To analyse performance, just execute your program via tr. SE30.
Regards
Adrian -
'BAPI_GOODSMVT_CREATE' takes more time for creating material document for the 1st time
Hi Experts,
I am doing goods movement using BAPI_GOODSMVT_CREATE in my custom code.
Then there is some functional configuration such that, material documents and TR and TO are getting created.
Now I need to get TO and TR numbers from LTAK table passing material documnt number and year, which I got from above used BAPI.
The problem I am facing is very strange.
Only for the 1st time, I am not finding TR and TO values in LTAK table. And subsequent runs I get entries in LTAK in there is a wait time of 5 seconds after bapi call.
I have found 'BAPI_GOODSMVT_CREATE' takes more time for creating material document with similar issue, but no solution or explanation.
Note 838036 says something similar, but it seems obsolete.
Kindly share your expertise and opinions.
Thanks,
AnilHi,
please check if some of following OSS notes are not valid for your problem:
[Note 838036 - AFS: Performance issues during GR with ref. to PO|https://service.sap.com/sap/support/notes/838036]
[Note 391142 - Performance: Goods receipt for inbound delivery|https://service.sap.com/sap/support/notes/391142]
[Note 1414418 - Goods receipt for customer returns: Various corrections|https://service.sap.com/sap/support/notes/1414418]
The other idea is not to commit each call, but executing commit of packages e.g. after 1000 BAPI calls.
But otherwise, I am afraid you can not do a lot about performance of standard BAPI. Maybe there is some customer enhancement which is taking too long inside the BAPI, but this has to be analysed by you. To analyse performance, just execute your program via tr. SE30.
Regards
Adrian -
Bapi_goodsmvt_create: no error return, but no document created!
Hi guys!
I have i weired problem.
I'm using the bapi_goodsmvt_create to create a goods receipt document for a standard order.
The simulation works fine, no error or warning return, the bapi_goodsmvt_create without simulation flag works fine, bapi_transaction_commit returns no error as well, BUT: the document was not created.
Any idea about the problem?Commit the work ..
This code might help u
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = wa_header
goodsmvt_code = wa_gm_code
IMPORTING
goodsmvt_headret = tbl_export
materialdocument = matdoc
matdocumentyear = year
TABLES
goodsmvt_item = tbl_item
goodsmvt_serialnumber = tbl_serial
return = return.
WRITE AT 10 'STATUS OF BAPI UPLOAD' COLOR 2 INTENSIFIED ON .
SKIP 2.
LOOP AT return ASSIGNING <fs_return>.
IF <fs_return>-type EQ 'E'.
WRITE AT 10 'Error in function:' COLOR 6 INTENSIFIED OFF.
WRITE AT 28 <fs_return>-message .
SKIP 1.
err_flag = 'X'.
ELSE.
WRITE AT 10 <fs_return>-message .
SKIP 1.
ENDIF.
ENDLOOP.
IF err_flag IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
IF sy-subrc NE 0.
WRITE:/ 'Error in updating'.
EXIT.
ELSE.
WRITE:/
'Number of Material Document created through BAPI:',tbl_export-mat_doc.
WRITE:/ 'Material Document Year':, tbl_export-doc_year.
ENDIF.
ENDIF. -
BAPI_GOODSMVT_CREATE - Error Storage location not supported...
Dear All
I am creating the material movement documetn 561 (MB1C) using BAPI_GOODSMVT_CREATE.
Howeever, the BAPI returns me the error saying
Storage location not supported.
What is this about. Can someone give me hint
I searched the forum and not able to find it.
Regards,
VenkyHi Venky,
Are you creating a goods issue with reference to a reservation? If so, the documentation states that the storage location is only needed if it's not in the reservation.
The following fields may have to be populated in some cases (this is not a complete list):
Storage location (if not planned in the reservation)
Brenda -
BAPI_GOODSMVT_CREATE: Transport Order Goods Movements
Hi
I have a transport order (move material from plant A to plant B) and a outbound delivery already created on SAP.
From xMII using FMu2019s o BAPIu2019s I need to update the picking and also confirm the outbound delivery in order to register the goods movement, the good movement that I need to create itu2019s 641 type.
We are using quite well the BAPI_GOODSMVT_CREATE to move materials for Purchase Orders and Process Orders, but with movement type 641 I always get the following error message u201CGoods movement not possible with mvmt type 641u201D; so I began to search on the SAP SDN about this.
Is there another BAPI for create a 641 movement?
What are the BAPI or FM that I need to use?
Any help?
Best Regards and Thanks in advanceFinally I've managed to create movement type 641...
Let explain how:
First its to update the outbound delivery using the BAPI_OUTB_DELIVERY_CHANGE where you can assign a storage location for a position, the delivered quantity, net weight, gross weigth, volume and also conversion factor between units of measure.
The we need to do the picking and the post good issue (PGI) by WS_DELIVERY_UPDATE where you define the picking qty, date and time for the post good issue, etc. This is the one that creates a movement 641.
Here you can see an example of the two BAPI/FM request that you need:
<?xml version="1.0" encoding="UTF-8"?>
<BAPI_OUTB_DELIVERY_CHANGE>
<INPUT>
<DELIVERY></DELIVERY>
<HEADER_CONTROL>
<DELIV_NUMB></DELIV_NUMB>
<GROSS_WT_FLG/>
<NET_WT_FLG/>
<VOLUME_FLG/>
<DELIV_DATE_FLG/>
<DOCK_FLG/>
<DLV_DEL/>
<INCO1_FLG/>
<INCO2_FLG/>
<ROUTE_FLG/>
<SHIP_COND_FLG/>
<DLV_PRIO_FLG/>
<UNLOAD_PT_FLG/>
<PICK_DATE_FLG/>
<TRSP_DATE_FLG/>
<LOAD_DATE_FLG/>
<GDSI_DATE_FLG/>
<SIMULATE/>
<NO_LOCK/>
<SPLIT_DONE_FLG/>
<DLV_BLOCK_FLG/>
<DLV_CHANGE_OFF/>
</HEADER_CONTROL>
<HEADER_CONTROL_SPL>
<SENDER_METHOD/>
<DELIV_NUMB></DELIV_NUMB>
<GEOROUTE_FLG/>
<BOP_GUID/>
<INITIATOR_PROCESS/>
</HEADER_CONTROL_SPL>
<HEADER_DATA>
<DELIV_NUMB>2030000016</DELIV_NUMB>
<GROSS_WT/>
<NET_WEIGHT/>
<UNIT_OF_WT/>
<UNIT_OF_WT_ISO/>
<VOLUME/>
<VOLUMEUNIT/>
<VOLUMEUNIT_ISO/>
<DOOR/>
<INCOTERMS1/>
<INCOTERMS2/>
<ROUTE/>
<SHIP_COND/>
<DLV_PRIO/>
<UNLOAD_PT/>
<DLV_BLOCK/>
</HEADER_DATA>
<HEADER_DATA_SPL>
<DELIV_NUMB></DELIV_NUMB>
<GEOROUTE/>
</HEADER_DATA_SPL>
<SENDER_SYSTEM/>
<TECHN_CONTROL>
<DEBUG_FLG/>
<UPD_IND/>
<RECV_WHS_NO/>
<RECV_SYS/>
<DLV_TYPE/>
</TECHN_CONTROL>
</INPUT>
<TABLES>
<COLLECTIVE_CHANGE_ITEMS>
<item>
<DELIV_NUMB></DELIV_NUMB>
<DELIV_ITEM/>
<DLV_QTY_FROM/>
<BASE_UOM/>
<BASE_UOM_ISO/>
</item>
</COLLECTIVE_CHANGE_ITEMS>
<EXTENSION1>
<item>
<FIELD1/>
<FIELD2/>
<FIELD3/>
<FIELD4/>
</item>
</EXTENSION1>
<EXTENSION2>
<item>
<PARAM/>
<ROW/>
<FIELD/>
<VALUE/>
<TYPE/>
<LENGTH/>
</item>
</EXTENSION2>
<HEADER_DEADLINES>
<item>
<DELIV_NUMB></DELIV_NUMB>
<TIMETYPE/>
<TIMESTAMP_UTC/>
<TIMEZONE/>
</item>
</HEADER_DEADLINES>
<HEADER_PARTNER>
<item>
<UPD_MODE_PARTN/>
<DELIV_NUMB></DELIV_NUMB>
<ITM_NUMBER/>
<PARTN_ROLE/>
<PARTNER_NO/>
<ADDRESS_NO/>
<DESC_PARTN/>
<MANUAL_ADDR/>
<SCA_CODE/>
</item>
</HEADER_PARTNER>
<HEADER_PARTNER_ADDR>
<item>
<UPD_MODE_ADR/>
<ADDR_NO/>
<FORMOFADDR/>
<NAME/>
<NAME_2/>
<NAME_3/>
<NAME_4/>
<C_O_NAME/>
<CITY/>
<DISTRICT/>
<CITY_NO/>
<POSTL_COD1/>
<POSTL_COD2/>
<POSTL_COD3/>
<PO_BOX/>
<PO_BOX_CIT/>
<DELIV_DIS/>
<STREET/>
<STREET_NO/>
<STR_ABBR/>
<HOUSE_NO/>
<STR_SUPPL1/>
<STR_SUPPL2/>
<LOCATION/>
<BUILDING/>
<FLOOR/>
<ROOM_NO/>
<COUNTRY/>
<LANGU/>
<REGION/>
<SORT1/>
<SORT2/>
<TIME_ZONE/>
<TAXJURCODE/>
<ADR_NOTES/>
<COMM_TYPE/>
<TEL1_NUMBR/>
<TEL1_EXT/>
<FAX_NUMBER/>
<FAX_EXTENS/>
<STREET_LNG/>
<DISTRCT_NO/>
<CHCKSTATUS/>
<PBOXCIT_NO/>
<TRANSPZONE/>
<HOUSE_NO2/>
<E_MAIL/>
<STR_SUPPL3/>
<TITLE/>
<COUNTRYISO/>
<LANGU_ISO/>
<BUILD_LONG/>
<REGIOGROUP/>
<HOME_CITY/>
<HOMECITYNO/>
<PCODE1_EXT/>
<PCODE2_EXT/>
<PCODE3_EXT/>
<PO_W_O_NO/>
<PO_BOX_REG/>
<POBOX_CTRY/>
<PO_CTRYISO/>
<HOMEPAGE/>
<DONT_USE_S/>
<DONT_USE_P/>
</item>
</HEADER_PARTNER_ADDR>
<ITEM_CONTROL>
<item>
<DELIV_NUMB>2030000016</DELIV_NUMB>
<DELIV_ITEM>0010</DELIV_ITEM>
<CHG_DELQTY>X</CHG_DELQTY>
<DEL_ITEM/>
<VOLUME_FLG>X</VOLUME_FLG>
<NET_WT_FLG>X</NET_WT_FLG>
<GROSS_WT_FLG>X</GROSS_WT_FLG>
</item>
</ITEM_CONTROL>
<ITEM_DATA>
<item>
<DELIV_NUMB>2030000016</DELIV_NUMB>
<DELIV_ITEM>0010</DELIV_ITEM>
<MATERIAL>000000000211000001</MATERIAL>
<BATCH/>
<HIERARITEM/>
<USEHIERITM/>
<DLV_QTY>2</DLV_QTY>
<DLV_QTY_IMUNIT>2</DLV_QTY_IMUNIT>
<FACT_UNIT_NOM>2</FACT_UNIT_NOM>
<FACT_UNIT_DENOM>2</FACT_UNIT_DENOM>
<CONV_FACT>1</CONV_FACT>
<GROSS_WT>2000</GROSS_WT>
<NET_WEIGHT>2000</NET_WEIGHT>
<UNIT_OF_WT>KG</UNIT_OF_WT>
<UNIT_OF_WT_ISO>KG</UNIT_OF_WT_ISO>
<VOLUMEUNIT>M3</VOLUMEUNIT>
<VOLUMEUNIT_ISO/>
<SALES_UNIT>TO</SALES_UNIT>
<SALES_UNIT_ISO>TO</SALES_UNIT_ISO>
<BASE_UOM>TO</BASE_UOM>
<BASE_UOM_ISO>TO</BASE_UOM_ISO>
<DEL_QTY_FLO></DEL_QTY_FLO>
<DLV_QTY_ST_FLO></DLV_QTY_ST_FLO>
<STOCK_TYPE/>
<VAL_TYPE/>
<MATERIAL_EXTERNAL></MATERIAL_EXTERNAL>
<MATERIAL_GUID></MATERIAL_GUID>
<MATERIAL_VERSION/>
<INSPLOT/>
<VOLUME>2000</VOLUME>
</item>
</ITEM_DATA>
<ITEM_DATA_SPL>
<item>
<DELIV_NUMB>2030000016</DELIV_NUMB>
<DELIV_ITEM>0010</DELIV_ITEM>
<STGE_LOC>CT2A</STGE_LOC>
<PICK_DENIAL/>
</item>
</ITEM_DATA_SPL>
<ITEM_SERIAL_NO>
<item>
<DELIV_NUMB></DELIV_NUMB>
<ITM_NUMBER/>
<SERIALNO/>
</item>
</ITEM_SERIAL_NO>
<RETURN>
<item>
<TYPE/>
<ID/>
<NUMBER/>
<MESSAGE/>
<LOG_NO/>
<LOG_MSG_NO/>
<MESSAGE_V1/>
<MESSAGE_V2/>
<MESSAGE_V3/>
<MESSAGE_V4/>
<PARAMETER/>
<ROW/>
<FIELD/>
<SYSTEM/>
</item>
</RETURN>
<SUPPLIER_CONS_DATA>
<item>
<DELIV_NUMB></DELIV_NUMB>
<ITM_NUMBER/>
<SPEC_STOCK/>
<SP_STCK_NO/>
<REF_QTY/>
<BASE_UOM/>
<BASE_UOM_ISO/>
<DLV_QTY/>
<SALES_UNIT/>
<SALES_UNIT_ISO/>
</item>
</SUPPLIER_CONS_DATA>
<TOKENREFERENCE>
<item>
<TR_EXT/>
</item>
</TOKENREFERENCE>
</TABLES>
</BAPI_OUTB_DELIVERY_CHANGE>
<?xml version="1.0" encoding="UTF-8"?>
<WS_DELIVERY_UPDATE>
<INPUT>
<COMMIT>X</COMMIT>
<DELIVERY>2030000016</DELIVERY>
<IF_CONFIRM_CENTRAL> </IF_CONFIRM_CENTRAL>
<IF_DATABASE_UPDATE>1</IF_DATABASE_UPDATE>
<IF_ERROR_MESSAGES_SEND_0>X</IF_ERROR_MESSAGES_SEND_0>
<IF_GET_DELIVERY_BUFFERED> </IF_GET_DELIVERY_BUFFERED>
<IF_LATE_DELIVERY_UPD> </IF_LATE_DELIVERY_UPD>
<IF_NO_BUFFER_REFRESH> </IF_NO_BUFFER_REFRESH>
<IF_NO_GENERIC_SYSTEM_SERVICE> </IF_NO_GENERIC_SYSTEM_SERVICE>
<IF_NO_INIT> </IF_NO_INIT>
<IF_NO_MES_UPD_PACK> </IF_NO_MES_UPD_PACK>
<IF_NO_READ> </IF_NO_READ>
<IF_NO_REMOTE_CHG></IF_NO_REMOTE_CHG>
<IF_WMPP> </IF_WMPP>
<NICHT_SPERREN>X</NICHT_SPERREN>
<NO_MESSAGES_UPDATE> </NO_MESSAGES_UPDATE>
<SYNCHRON>X</SYNCHRON>
<UPDATE_PICKING>X</UPDATE_PICKING>
<VBKOK_WA>
<VBELN_VL>2030000016</VBELN_VL>
<VBTYP_VL/>
<VBELN/>
<LGNUM/>
<TANUM/>
<KODAT/>
<KOUHR/>
<BRGEW/>
<KZBRG></KZBRG>
<KZNTG></KZNTG>
<NTGEW></NTGEW>
<GEWEI/>
<VOLUM/>
<KZVOL></KZVOL>
<VOLEH/>
<KOMUE/>
<WABUC>X</WABUC>
<WADAT_IST/>
<KZWAD>X</KZWAD>
<WADAT>20080812</WADAT>
<WAUHR>115436</WAUHR>
<KZLFD></KZLFD>
<LFDAT></LFDAT>
<LFUHR></LFUHR>
<KZTOR></KZTOR>
<LGTOR/>
<KZLSP></KZLSP>
<LIFSK/>
<LIKP_DEL/>
<PACKING_REFRESH/>
<PACKING_FINAL/>
<PODAT/>
<POTIM/>
<KZPOD/>
<LIFEX/>
<BOLNR/>
<PRVBE/>
<XWMPP/>
<TRATY/>
<TRAID/>
<KZKODAT/>
<KZEBU/>
<INCO1/>
<INCO2/>
<ROUTE/>
<LPRIO/>
<VSBED/>
<LDDAT>20080812</LDDAT>
<LDUHR>115436</LDUHR>
<TDDAT/>
<TDUHR/>
<ABLAD/>
<KZINCO1/>
<KZINCO2/>
<KZROUTE/>
<KZLPRIO/>
<KZVSBED/>
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
<FLOOR/>
<ROOM_NO/>
<COUNTRY/>
<LANGU/>
<REGION/>
<SORT1/>
<SORT2/>
<TIME_ZONE/>
<TAXJURCODE/>
<ADR_NOTES/>
<COMM_TYPE/>
<TEL1_NUMBR/>
<TEL1_EXT/>
<FAX_NUMBER/>
<FAX_EXTENS/>
<STREET_LNG/>
<DISTRCT_NO/>
<CHCKSTATUS/>
<PBOXCIT_NO/>
<TRANSPZONE/>
<HOUSE_NO2/>
<E_MAIL/>
&nb -
BAPI : Multiple assignment of a line ID error in BAPI_GOODSMVT_CREATE
Hi All,
I am using BAPI_GOODSMVT_CREATE for upload using excel ...........
but i find error when execute .... Multiple assignment of a line ID
anyone know about this..........
Thanks in advance
Santoshwhich movement type you are using and wht is your movement indicator?
-
Question about BAPI Performance
I am currently evaluating options to implement interface between legacy systems and SAP. We have a requirement to post goodsmovement from external application. As some of my team claim that the BAPI approach can cause performance problems. I would like to cross check whether the claim is true.
And if it is, May I have your advice how can we prevent such problem about performance?
Ho w can I get additional source of information?
Kindly advise.
The BAPI which we are going to use is BAPI_GOODSMVT_CREATE
Thank youNo performance problem is there.
Infact BAPI is advisable against BDC. Also since BAPI is like FM there is no issue.
I am using it in lot of the objects we have created.
Cheers
Regards
Nishant -
BAPI_GOODSMVT_CREATE: move 309 for transfer posting - change of sales order
Hello Experts,
I'm trying to use BAPI_GOODSMVT_CREATE to transfer the material from one sales order to another.
But that doesn't seem to work.
ls_goodsmvt_header-pstng_date = sy-datum.
ls_goodsmvt_header-doc_date = sy-datum.
ls_goodsmvt_code-gm_code = '04'.
ls_goodsmvt_item-material = ls_outtab_l-matnr.
ls_goodsmvt_item-plant = ls_outtab_l-werks.
ls_goodsmvt_item-stge_loc = ls_outtab_l-lgort.
ls_goodsmvt_item-move_mat = ls_outtab_l-matnr.
ls_goodsmvt_item-move_plant = ls_outtab_l-werks.
ls_goodsmvt_item-move_stloc = ls_outtab_l-lgort.
ls_goodsmvt_item-move_type = '309'.
ls_goodsmvt_item-mvt_ind = ''.
ls_goodsmvt_item-entry_qnt = ls_outtab_l-kalab.
ls_goodsmvt_item-entry_uom = 'EA'.
ls_goodsmvt_item-spec_stock = 'E'.
ls_goodsmvt_item-val_sales_ord = ls_outtab_l-vbeln.
ls_goodsmvt_item-val_s_ord_item = ls_outtab_l-posnr.
ls_goodsmvt_item-sales_ord = ls_outtab_r-vbeln.
ls_goodsmvt_item-s_ord_item = ls_outtab_r-posnr.
" ls_goodsmvt_item-sched_line = '000'.
APPEND ls_goodsmvt_item TO lt_goodsmvt_item.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = ls_goodsmvt_header
goodsmvt_code = ls_goodsmvt_code
testrun = ''
IMPORTING
goodsmvt_headret = ls_goodsmvt_headret
materialdocument = lv_materialdocument
matdocumentyear = lv_matdocumentyear
TABLES
goodsmvt_item = lt_goodsmvt_item
return = lt_return.
Right now i supply val_sales_ord with destination order number, and sales_ord with source. But I'm not really sure about that, which is the destination, and which is source sales order number parameter in itemline, val_sales_ord or sales_ord? Or maybe it doesnt work like that?
Thanks for any help,So after some time i found out where the flow of bapi and migo differ, this is also, where the field KDAUF gets reseted, and the cause of not posting material document correctly:
Starts in line 59 of MM07MFU0_UMLAGERUNG_PRUEFEN:
* The old fieldselection (T156B) is not valid for a transfer posting
* from MIGO
IF NOT vm07m-xstor = zwei AND xmigo <> x.
IF dm07m-fausw+55(1) = minus.
CLEAR mseg-ummat.
ENDIF.
IF dm07m-fausw+56(1) = minus.
CLEAR mseg-umwrk.
ENDIF.
IF dm07m-fausw+57(1) = minus.
CLEAR mseg-umlgo.
ENDIF.
IF dm07m-fausw+64(1) = minus.
CLEAR mseg-umcha.
ENDIF.
IF NOT vm07m-kzbwa = kzbwa-01 AND
NOT vm07m-kzbwa = kzbwa-05 AND
NOT vm07m-kzbwa = kzbwa-07.
CLEAR: mseg-umbar.
ENDIF.
" the condition below is the source of my problems
IF dm07m-fausw+60(1) = minus.
CLEAR: mseg-kdauf, mseg-kdpos.
ENDIF.
IF dm07m-fausw+62(1) = minus.
CLEAR mseg-ps_psp_pnr.
ENDIF.
ENDIF.
I changed the value minus '-' of dm07m-fausw+60(1) to a dot '.', and the bapi worked like a charm. I am just not sure if I can change the records of T156B just like that, I guess not a good idea.
Still i have no solution...
Maybe you are looking for
-
How to get rid of title bar of a quicktime window?
The main problem: I want to display the title info etc about each track as they play in iTunes. How can I do that on an otherwise black screen (desktop) (I don't want to use the visualizer with its psychedelic patterns). Background: I want to play mu
-
Why is the G4 beebing at start up ?
Hi everybody, I'm trying to recover data from the 2nd HDD within my old G4. Odly enough, the G4 recognizes its 2nd HD sporadically and I almost got it backed up with Super Duper but had an issue with my external FireWire HD that I needed to sort out
-
I have lost the line that shows tools the toolbar how do I get it back please
At the top of the page there used to be a toolbar that showed all the options so that I could go to Tools etc and do certain things I wanted to. I have clicked something and can no longer find it. How do I get it back please?
-
Hi Im SAP-BW consultant. can anyone send me the ABAP debugger document for debugging one large ABAP program to [email protected] Txs Kumar
-
I don't know how it got there, but there is a photo attached in the header to mail I send. Can't see how to remove it in preferences. Can anyone help? David