Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error while posting a document using the BAPI_GOODSMVT_CREATE

Former Member
0 Likes
1,060

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.

Sriram

9 REPLIES 9
Read only

Former Member
0 Likes
916

when this happened to us, it was becuase we did not properly assign the item number to both the item and serial number entries. When the posting was attempted, the seril lnumber in the table was then not associated with the correct item and the message occurred.

Break point the function module, and check the item number.

Read only

0 Likes
916

Hi 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.

Read only

0 Likes
916

i have checked my code, and it is none of these fields. it is the line number within the internal table.

so, if you have 4 items, and the item with the serial number is in the internal table of items at position 3 (sy-tabix = 3), then the item number field in the serial number table is 3.

Read only

0 Likes
916

Hi,

You need to send the ORDERID as well as ORDER_ITNO. If you are receivin against Reservations, you need to send the Reservation ID too.

Also, are you sending the correct Movement Type?

Wenonah

Read only

0 Likes
916

Hi Jaques ,

we are using the correct movement type (561) and i am able to create manually .

this is for Good Receipt , so i think i dont need to pass the order number and order id.

Please correct me if i am wrong.

Read only

0 Likes
915

Hi David,

Can you please provide me the code which you have used..?

Read only

0 Likes
915

Hi,

If you are doing a receipt against an Order and sending the ORDER_ITNO, then you need to send the corresponding ORDERID too.

Thanks,

Wenonah

Read only

0 Likes
915

i can, kind of...


data: itemcount type i.

clear itemcount
* build the items table 
loop at something.
    add 1 to itemcount
    build item table values
    append to item table
    serial_table-matdoc_itm = itemcount.
    serial_table-serialno = wserial.
    append serial_table
endloop.

essentially, you keep track of which tabix you are loading into the item table, and put that tabix into the serial number table. as tge matdoc_itm

sorry i could not be more specific. our code is embedded in a huge XML handler, and not easy to pull out.

Edited by: David Knittle on Apr 14, 2010 11:12 AM

Edited by: David Knittle on Apr 14, 2010 11:16 AM

Read only

0 Likes
915

Hi,

Pass following data

GOODSMVT_HEADER: PSTNG_DATE, DOC_DATE

GOODSMVT_CODE = '05'

TESTRUN= ' '

GOODSMVT_ITEM

Material :

Plant :

Stge_loc : (Storage Location)

moVE_type = 561

entry_qnt = (Quantity)

entry_uom = (uom)

entry_uom_iso = (uom)

BAPI Worked with these parameters.

Regards

Vinod