Application Development 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: 

Issue with Goods Issue.....

Former Member
0 Kudos

Hi gurus,

I am working on an interface where I need to do goods Issue and for this I have written the following code, but my return statement is returning this error" Goods movement not possible with mvmt type 201"

data: begin of it_input_file occurs 0,

matnr(18),

werks(4),

uoe_qty(13),

amount(13),

st_loc(4),

batch(10),

account(10),

uoe_uom(3),

end of it_input_file.

v_semfile = p_ifname.

refresh it_input_file.

call function 'WS_UPLOAD'

EXPORTING

filename = v_semfile

filetype = 'DAT'

TABLES

data_tab = it_input_file

EXCEPTIONS

conversion_error = 1

file_open_error = 2

file_read_error = 3

invalid_type = 4

no_batch = 5

unknown_error = 6

invalid_table_width = 7

gui_refuse_filetransfer = 8

customer_error = 9

others = 10.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

move: syst-datum to v_doc_date,

syst-datum to v_pos_date.

loop at it_input_file.

move: v_doc_date to GOODSMVT_HEADER-DOC_DATE,

v_pos_date to GOODSMVT_HEADER-pstng_date,

syst-uname to GOODSMVT_HEADER-pr_uname.

move: '05' to GOODSMVT_CODE-GM_CODE.

move: it_input_file-matnr to GOODSMVT_ITEM-material,

it_input_file-werks to GOODSMVT_ITEM-plant,

it_input_file-st_loc to GOODSMVT_ITEM-stge_loc,

it_input_file-batch to GOODSMVT_ITEM-batch,

it_input_file-uoe_qty to GOODSMVT_ITEM-entry_qnt,

it_input_file-uoe_uom to GOODSMVT_ITEM-entry_uom,

it_input_file-amount to GOODSMVT_ITEM-AMOUNT_LC,

' ' to GOODSMVT_ITEM-MVT_IND,

'X' to GOODSMVT_ITEM-NO_MORE_GR,

move: '201' to GOODSMVT_ITEM-move_type,

append goodsmvt_item.

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

EXPORTING

GOODSMVT_HEADER = GOODSMVT_HEADER

GOODSMVT_CODE = GOODSMVT_CODE

IMPORTING

GOODSMVT_HEADRET = GOODSMVT_HEADRET

MATERIALDOCUMENT = MATERIALDOCUMENT

MATDOCUMENTYEAR = MATDOCUMENTYEAR

TABLES

GOODSMVT_ITEM = GOODSMVT_ITEM

RETURN = RETURN

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

IMPORTING

RETURN = return2.

Message was edited by:

Rajeev Gupta

Message was edited by:

Rajeev Gupta

Message was edited by:

Rajeev Gupta

3 REPLIES 3

Former Member
0 Kudos

Hi

See the table T156 and use the some other movement type other than 201

and see.

Movement type(Bwart) 201, is not accepted for the GI

Regards

Anji

jj
Active Contributor
0 Kudos

what is the value that you are passing in move:

c_mov_type2 to GOODSMVT_ITEM-move_type?

In SAP IMG.

Please check whether this movement type is assigned to Settings for Goods Movements (MIGO).

Materials Management ->Inventory Management and Physical Inventory->

Settings for Transactions and Reference Documents.

Please check with your functional team.

Former Member
0 Kudos

Hi thanks for your replies, well I tried passing 201, 202 and it shows me thw same error. althogh when I used the same code for GR and passes a GR movement type it worked perfectly. So I am not sure what is the error. CAn you please guide me through.

Thnaks

Rajeev