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: 

Please try to help...

Former Member
0 Kudos

Hi gurus,

I have posted this query before also but noone answered, can you please help me to solve this, I will really appreciate you efforts.

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: c_mov_type2 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.

4 REPLIES 4

Former Member
0 Kudos

hi rajeev,

this is i think functional error. <b>u just ask your functional</b>, is it possible to do goods movement fo that.

there are lot of movement types r there na,,

or otherwise check whether all the mandatory fields r given

regsrds

karthik

0 Kudos

Hey thanks for the reply....I will ask my functional guy, can you please let me know what are the manadtory fields...beacuse I used 2-3 diff movement types and I got the same kind of error...

Thnaks

Rajeev

0 Kudos

hi

plz go and see the function module documentation in se37.

in that there r field s which has to given mandatory.

bcoz i have met same problem with<b> BAPI_PO_CREATE1</b>. OR OTHERWISE

plz search in sdn itself

Former Member
0 Kudos

not answered